API RF GNC_SCE_GP_020

  Version ACE : 1.4
Package : Standard GNC_SCE_LOGIS_020 Fonctionnalité : Préparation
Schémas d’entrée et de sortie : voir en fin de document.

Cette API permet de constituer une vacation pour les ordres de livraison ayant le même groupe de vacations et le même jour d'expédition, et dont la date de livraison est la date de livraison du cadencier.

API imbriquées : aucune.

Contraintes et limites de fonctionnement (hors périmètre)

RAS.

Paramétrage (PPE)

RAS.

Cas d'erreur

CODE PARAMÈTRES DESCRIPTION
0/ELT_PASTRO

Lplanprl, lplanprl.typdep, lplanprl.sigdep, lplanprl.codplanpr, lplanprl.typcad, w_lplanprl.codcad,

lplanprl.numligcad, lplanprl.codplantr, lplanprl.numligplantr, lplanprl.typflux

The picking plan line does not exist
0/ELT_PASTRO Lcadl, lcadl.typcad, lcadl.codcad, lcadl.numligcad The cadencia line does not exist
0/ELT_PASTRO Lplantrl, lplantrl .codplantr, lplantrl.typcad, lplantrl.codcad, lplantrl.numligcad, lplantrl.numligplantr The transportation plan line does not exist
0/ELT_PASTRO Ltrn, ltrn.typtie, ltrn.sigtie, lplantrl.codplantr, lplantrl.codtrn The expedition tour does not exist.
0/ELT_PASTRO Lvace, lvace.typtie, lvace.sigtie, lvace.idvac The wave header does not exist.
0/ELT_PASTRO Tie, lole.typdest, lole.sigdest The thirdparty does not exist.
0/ERR_CREAT Lvace, lvace.typtie, lvace.sigtie, lvace.idvac Error in creation of the wave header.
0/ERR_MODIF Lole, lole.typtie, lole.sigtie, lole.idol Error in modification of the delivery order header.
0/ERR_MODIF Lvace, lvace.typtie, lvace.sigtie, lvace.idvac Error in modification of the wave header.

Processus, contrôles et règles de gestion

ETAPE DESCRIPTION DU PROCESSUS
1 Appel gnc_egx_debut
2

Décodage des paramètres

Lire la vacation, si n’existe pas, message d’erreur

LVACE(codsoc, typdep, sigdep, idvac)

3

Si le statut de la vacation < ‘3’

Appeler gnc_or_traitement(lvace.codsoc, lvace.typtie, lvace_sigtie, lvace.idvac)

Si le code retour <> ut_bon

sortir en erreur. Code message : ‘PB_GEN’

4 Appel gnc_egx_fin
Détail

Read the picking plan line data (LPLANPRL), which correspond to the input parameters (’typdep’, ‘sigdep’, ‘codplanpr’,’typcad’, ‘codcad’, ‘numligcad’, ‘codplantr’, ‘numligplantr’, ‘typflux’).

If the corresponding line data does not exist, the API returns an error message “ELT_PASTRO” and an error code 0.

Read the cadencia line data (LCADL), which correspond to the input parameters (‘typcad’, ‘codcad’, numligcad’).

If the corresponding line data does not exist, the API returns an error message “ELT_PASTRO” and an error code 0.

Read the transportation plan line data (LPLANTRL), which correspond to the input parameters (‘codplantr’, ‘typcad’, ‘codcad’, numligcad’, ‘numligplantr’).

If the corresponding transportation plan line data does not exist, the API returns an error message “ELT_PASTRO” and an error code 0.

For each expedition tour (LTRN) associated with the transportation plan line (LPLANTRL) with the parameters (‘typdep’, ‘sigdep’, ‘LPANTRL.codplantr’, ‘LPLANTRL.codtrn’).

For each delivery order header (lole) for the expedition tour (LOLE.idtrn = LTRN.idtrn), with a status remaining or waiting (lole.statut < 2), flow type = ‘typflux’ and ( Sigdest = <lcadl.critere> if lcadl.typcritere = 1

OR Codpay = <LCADL.critere> if LCADL. typcritere = 3 OR Zonliv = <LCADL.critere> if lcadl. typcritere = 4)

If criteria type is ‘2’ (LCADL.typcritere=2).

Read the thirdparty data (TIE) with the parameters (LOLE.typdest, LOLE.sigdest).

If the corresponding data does not exist, the API returns an error message “ELT_PASTRO” and an error code 0.

If the family code of the thirdparty is not equal to lcadl.critere (TIE.famtie <> lcadl.critere):

Read the next delivery order header.

If a wave identifier is passed as a parameter (idvac >0):

Read the wave header data (LVACE) which corresponds to the input parameters (‘typdep’, ‘sigde’, ‘idvac’).

If the data which corresponds to parameters is not found, the API returns an error message “ELT_PASTRO” and an error code 0.

Otherwise the wave header is considered as found.

Else if a wave identifier is not passed as a parameter (idvac =0) and the addition in an existing wave is allowed (ajoutvac = ‘1’).

Read the wave header data (LVACE), which corresponds to the input parameters (‘typdep’, ‘sigde’, ‘datvac’) and to ‘LPLANPRL.grpvac’.

If the wave header is selected, it is considered as found.

If the wave header is not found.

Create a new wave header.

If the creation does not succeed, the API returns an error message “ERR_CREAT” and an error code 0.

If the wave header is found or created.

Update the delivery order header (LOLE) and lines (LOLL) corresponding to the wave header.

If the update does not succeed, the API returns an error message “ERR_MODIF” and an error code 0.

Update the wave header data.

If the update does not succeed, the API returns an error message “ERR_MODIF” and an error code 0.

If the expedition tour is not found, the API returns an error message “ELT_PASTRO” and an error code 0.

Paramètres en entrée

NOM DESCRIPTION FORMAT OBLIGATOIRE/FACULTATIF
Typdep Type dépôt Char (3) O
Sigdep Sigle dépôt Char (12) O
Codplanpr Plan de préparation Char (6) O
Typcad Type cadencier Long O
Codcad Code cadencier Char (6) O
Numligcad N° ligne de cadencier Long O
Codplantr Plan de transport Char (6) O
Numligplantr N° ligne plan de transport Long O
Typflux Type de flux Char (10) O
Datvac Date vacation Char (10) O
Idvac N° vacation Long F
Ajoutvac Indicateur d’ajout dans une vacation existante si elle existe.
  • 1 = oui,
  • 0 = non
Long F

Paramètres en sortie

NOM DESCRIPTION FORMAT OBLIGATOIRE/FACULTATIF
ParamOut1 N° de vacation créée ou modifiée (LVACE .idvac) Number O