API RF SCE_GR_001

  Version ACE : 1.3

Package : Standard gnc_sce_logis

Nom de la GNC : gnc_sce_gr_001

Fonctionnalité : Planification de récéption
Schémas d’entrée et de sortie : voir en fin de document.

Cette API permet, à la validation de BL, de générer des mouvements EA selon le paramétrage.

API imbriquées : aucune.

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

RAS.

Paramétrage (PPE)

LOGRECALOTIE -

Processus, contrôles et règles de gestion

ETAPE DESCRIPTION DU PROCESSUS
  L’API traite toutes les EA de la réception. Pour chaque EA, l’API valide le BL et met à jour l’en-tête d’EA.
  Une mission de réception est créée si le statut de la réception est à « 5 ».
  Les mouvements sont générés si et seulement si l’identifiant du BL pour la réception est identique à celui de l’EA (lrel.idbl = leae.idbl).
  Au final, le statut de l’en-tête du BL est positionné à « 3 ».

Cas d’erreurs

CODE PARAMÈTRES DESCRIPTION
0 / ERR_MODIF LOBJSTK, idrbe The stock object’s delivery note ID is not successfully modified.
0 / ERR_MODIF Lmvtstk, idrbe The movement’s delivery note ID is not successfully modified.
0 / ELT_PASTRO LEAE, typtie, sigtie, idbl The EA header object is not found.
0 / ELT_PASTRO LRBE The delivery note header object is not found.
0 / ELT_PASTRO LREE The reception header object is not found.
0 / ERR_MODIF lrbe, “statut” The update of the status of the delivery note header does not succeed.

Détail de l'API

Read the EA header data (LEAE) with the input parameters (typdep, sigdep, idbl).

If the EA header object is not found, the API returns the error code 0 and the error message “ELT_PASTRO”.

For each EA header objects found.

Call the gnc_sce_valid_bl_ea, as so to validate the delivery note.

If the validation succeeds.

Call the function gnc_validation_saisie_bl_leae, as so to update the EA headers.

Read the next EA header object.

Read the delivery note header data (LRBE) with the input parameters (typdep, sigdep, idbl).

If the delivery note header object is not found, the API returns the error code 0 and the error message ELT_PASTRO.

Read the reception header data (LREE table) with the input parameters (typdep, sigdep) and reception number equals to the delivery note header’s reception number (numrec = lrbe.numrec).

If the reception header object is not found, the API returns an error message ‘ELT_PASTRO’ and returns an error code 0.

Call the function gnc_validation_saisie_bl_lree as so to validate the reception.

If the status of the reception header object is equal to ‘finished control’ (statut = 5)

Call the function gnc_ea_creer_mission, as so to create a mission.

Update the status of the delivery note header to ‘terminated entry’ (statut = 3).

If the update does not succeed, the API returns an error message ‘ERR_MODIF’ and returns 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
idbl N° BL Long O

Paramètres en sortie

NOM DU PARAMÈTRE TYPE FORMAT TAILLE REMARQUE
Aucun.