API RF SCE_GP_011

  Version ACE : 1.3

Package : Standard

Nom de la gnc : gnc_sce_gp_011

gnc_ue_annul_prepa

Fonctionnalité : Poste de contrôle
Schémas d’entrée et de sortie : voir en fin de document.

Cette API permet d’annuler la préparation du contenu d’une UP.

API imbriquées : aucune.

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

RAS.

Paramétrage (PPE)

RAS.

Processus, contrôles et règles de gestion

ETAPE DESCRIPTION DU PROCESSUS
  L’API traite tous les objets contenus dans l’UP.
  Pour chaque objet un mouvement de transfert validé est créé, et on supprime si possible le colis et l’objet associé.
 

Différentes informations sont mises à jour :

  • la ligne d’OL,
  • l’objet de stock,
  • le colis,
  • l’en-tête d’OL.

Seuls les mouvements ne sont pas mis à jour.

Détail :

Look for logistic stock objects, which belong to the input logistic stock parcel.

(Read logistic stock date (LOBJSTK) with the input parameters (typdep, sigdep) and parent object ID equals to the input logistic stock parcel ID (idobjpere = idobjcol).)

For each logistic stock object found.

Create a validated output transfer movement stock object (LMVTSTK) corresponding to the current logistic stock object.

(Call the function gnc_alim_mvt_obj, as so to copy the common field of logistic stock object to the new movement stock object and to initialize the user, date and hour fields of the new movement stock object.

Initialize the rest of the fields of the new output movement stock object (sensmvt = ’S’ (output destination), typmvt = ‘T’ (transfer type), statut = ‘9’ (validate), datval = datcre, heuval = heucre, utival = uticre, idobjcol = lobjstk.idobjpere, codlnstmin = ‘’, opcircuit = ‘’, flgcompact = ‘0’, vldaction = ‘3’).

Execute the creation.)

If the creation is not successful, the API returns the error code 0 and the error code message ‘ERR_CREAT’.

Create a validated input transfer movement stock object (LMVTSTK) corresponding to the current logistic stock object.

(Reinitialize some fields from the new output movement stock object (sensmvt = ’E’ (input destination), idobjpere = ‘’, idobjcol = ‘’, opcircuit = ‘’, idol = 0, numligol = 0, idbl = 0, numoribl = 0) so as to correspond to an input movement stock object.

Execute the creation.)

If the creation is not successful, the API returns the error code 0 and the error code message ‘ERR_CREAT’.

If the parent logistic stock object ID is presented for the current stock object (lobjstk.idobjpere !=’’)

Call the function gnc_annul_colis, as so to delete the parcel object (LCOL) corresponding to the parent logistic stock object (idobjpere).

If the operation is not successful, the API returns the error code 0.

Read the delivery order line (LOLL), which corresponds to the current logistic stock object with (lobjstk.typtie, lobjstk.sigtie, lobjstk.idol, lobjstk.numligol).

If the container data of the current logistic stock object does not belong to the standard palettization mapping, the API returns the error code 0 and the error message ‘L_ERRCNTOL’.

If the quantity of UC of the current logistic stock object (qteunt) is not multiplied to the stock container’s quantity of UC, the API returns the error code 0 and the error message ‘QTE_PASMUL’.

Calculate the outgoing quantity of the delivery order line (loll.qtesortie).

(The old outgoing quantity – (the quantity UC of the current logistic stock object / the stock container’s quantity of UC).)

If the outgoing quantity of the delivery order line is equal to 0 (loll.qtesortie = 0) and the shipped quantity of the delivery order line equals to 0 (qteexp = 0)

If the preparation quantity of the delivery order line is equal to 0 (qteprepa = 0).

Update the status of the delivery order line to ‘pending’ (statut = ‘1’).

Otherwise.

Update the status of the delivery order line to ‘preparation in progress’ (statut = ‘3’).

If the update is not successful, the API returns the error code 0 and the error code message ‘ERR_MODIF’.

Update some fields of the logistic stock object - (idol = 0, numligol = 0, idbl = 0, numoribl = 0).

If the update is not successful, the API returns the error code 0 and the error code message ‘ERR_MODIF’.

If the outgoing quantity of the delivery order line is equal to 0 (qtesortie = 0) and the shipped quantity of the delivery order line is equal to 0 (qteexp = 0) and the preparation quantity of the delivery order line is equal to 0 (qteprepa = 0) and the parent stock object of the current stock object is presented (lobjstk.idobjpere is not empty).

Read the parcel data (LCOL) with the third-party type equals to the third-party type of the delivery order line (loll.sigtie) and the third-party ID equals to the third-party ID of the delivery order line (loll.sigtie) and parcel object ID equals to the parent stock object of the current stock object is presented (idobjcol = lobjstk.idobjpere).

If the parcel object is found.

If the parcel is a ‘Multi PL’ parcel (lcol.flg1 = ‘M’).

Search for another PL for the parcel.

Read the logistic stock data (LOBJSTK) with (typtie= loll.typtie, sigtie = loll.sigtie, idobjpere = lcol.idobj).

If the logistic stock object is found.

Read the stock object associated to the parcel (lobjstk) with (typtie= loll.typtie, sigtie = loll.sigtie, idobj = lcol.idobj).

If the parcel’s stock object is found.

Update its number of OL with the number OL of the parent stock object (idol).

Update the number OL of the parcel object with the number OL of the parent stock object (idol).

Call the function gnc_maj_entete_ol so as to update the header of the order line object.

Read the next child stock object.

If the logistic stock parcel ID input parameter is presented (idobjcol != ‘’).

Call the function gnc_annul_colis so as to delete the logistic stock parcel.

If the function returns an error, the API returns the error code 0.

The API returns the code 1.

Cas d’erreurs

CODE PARAMÈTRES DESCRIPTION
0 / ERR_CREAT LMVTSTK, “ST” The creation of the validated output transfer movement stock object is not successful.
0 / ERR_CREAT LMVTSTK, “ET” The creation of the validated input transfer movement stock object is not successful.
0   The execution of the function gnc_annul_colis is not successful.
0 / L_ERRCNTOL   The container data of the logistic stock object does not belong to the standard palettization mapping.
0 / QTE_PASMUL   The quantity of UC of the logistic stock object is not multiplied to the stock content’s quantity of UC.
0 / ERR_MODIF LOLL The update of the delivery order line is not successful.
0 / ERR_MODIF LOBJSTK The update of the logistic stock object is not successful.

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
idobjcol N° UP Char(18) O

Paramètres en sortie

NOM DU PARAMÈTRE TYPE FORMAT TAILLE REMARQUE
Aucun.