API RF CONSO_LCOL

Version ACE : 5.0-00  

Package : Standard

Sous-programme Basic : Consolide_colis

Nom de la gnc : gnc_rf_conso_lcol

Fonctionnalité :Préparation
Schémas d’entrée et de sortie : voir en fin de document.

Depending on the mode input parameter, the API performs either stacking of source and destination logistic stock parcel or transfer (consolidation) of the source logistic stock parcel into the destination logistic stock parcel.

API imbriquées : aucune.

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

RAS.

Paramétrage (PPE)

RAS.

Prototype de la fonction Basic

Consolide_colis (numero_module, typdep, sigdep, idobjcol_source, idobjcol_cible, mode, action, adremp_dep)

Messages en entrée

CONSO_LCOL~typdep~sigdep~idobjcol_source~idobjcol_cible~mode~action~ adremp_dep~

Messages en sortie

Retour~idmes~

Valeurs restituées par l’API

VALEUR REMARQUE
1 Le regroupement a été effectué avec succès.
0 Un problème de regroupement est survenu.

Processus, contrôles et règles de gestion

ETAPE DESCRIPTION DU PROCESSUS
1 Identification du colis source.
2 Identification du colis cible.
3 Contrôle de compatibilité pour le regroupement.
4 Regroupement des deux colis.
Détail :

If the input parameters idobjcol_source and idobjcol_target are empty, the API returns 0.

If the input parameter idobjcol_source is not empty

Read the source logistic stock parcel data (LCOL table) with the input parameters (typdep, sigdep, idobjcol _source ).

If the parcel does not exist, the API returns an error code 0

If the input parameters idobjcol_target is not empty

Read the destination logistic stock parcel data (lcol table) with the input parameters (typdep, sigdep, idobjcol _target ).

If the parcel does not exist, the API returns an error code 0.

If the input parameter mode is equal to ‘G’ (Stacking)

If the input parameters idobjcol_source and idobjcol_target are not empty call the function gnc_auto_gerbage, as so to check if stacking the source and destination logistic stock parcel data (lcol) is possible .

Else if idobjcol_source is empty and idobjcol_target is not empty call the function gnc_auto_gerbage, as so to check if stacking the source logistic stock parcel data (lcol) is possible .

Else call the function gnc_auto_gerbage, as so to check if stacking the destination logistic stock parcel data (lcol) is possible.

If input parameter action is 1 (verification only) OR stacking is not possible, the API returns the result of stacking check.

Call the function gnc_garbage, as so to stack the source and destination logistic stock parcel data (lcol).

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

If input parameter mode is equal to ‘C’ (consolidation)

Call the function gnc_conso_ctr_appairage, as so to check if a consolidation of source and destination logistic stock parcel data (LCOL) is possible .

If consolidation is not possible, the API returns an error code 0.

If the delivery associated third-party identifier for the source and destination logistic stock parcel data is different (lcol.sigliv) OR the delivery associated third-party type for the source and destination logistic stock parcel data is different (lcol.typliv) OR the order number address of the source and destination logistic stock parcel data is different (lcol.numadr), the API returns an error code 0.

I f the expedition tour identifier of source and destination logistic stock parcel data (lcol.idtrn) is not the same, the API returns an error code 0.

I f the wave identifier of source and destination logistic stock parcel data (lcol.idvac) is not the same, the API returns an error code 0.

If the delivery order header identifier (lcol.idol) of destination logistic stock parcel data exists.

Read the delivery order header data (LOLE) with the destination logistic stock parcel data parameters (lcol.typdep, lcol.sigdep and lcol.idol).

If such a delivery order header does not exist, the API returns an error code 0.

Read the preparation mode data (LMODPRP) with the corresponding delivery order header fields (lole.typtie, lole.sigtie, lole.modprp).

If such a preparation mode data does not exist, the API returns an error code 0.

If the delivery order header identifier (LCOL.idol) of source logistic stock parcel data exists

Read the delivery order header data (LOLE) with source logistic stock parcel data parameters (lcol.typdep, lcol.sigdep and lcol.idol).

If such a delivery order header does not exist, the API returns an error code 0.

Read the preparation mode data (LMODPRP) with the corresponding delivery order header fields (lole.typtie, lole.sigtie, lole.modprp).

If such a preparation mode data does not exist, the API returns an error code 0.

If the preparation mode of source and destination delivery order header (lole.modprp) is not the same, the API returns an error code 0.

If the preparation mode for source logistic stock parcel data is not of type ‘multi DO’ ( lmodprp.multiol ) AND if the delivery order header identifier (lcol.idol) of source and destination logistic stock parcel data is not the same , the API returns an error code 0.

If the input parameter action is 1 (verification only), the API returns 1.

If the delivery order header stock level code is not empty (lcol.codlnst), the API returns an error code 0.

Call the function gnc_colis_transfert, as so to transfer the source logistic stock parcel data (lcol) into destination logistic stock parcel data (lcol).

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

Call the function gnc_colis_evol_statut, as so to change logistic stock parcel status after consolidation.

If the logistic stock parcel status is not successfully updated , the API returns an error code 0.

Call the function gnc_calcul_poids_volume_colis, as so to calculate dimensions of destination logistic stock parcel after consolidation.

If the destination logistic stock parcel is already closed ( lcol.statut > 4 )

Affect the value of theoretic weight of destination parcel (lcol.poidstheo) on the real weight (lcol.poidsreel) of destination parcel.

Set the weight flag (lcol.flagpoids) of destination parcel to 0.

If the modification of destination parcel is not successful , the API returns an error code 0.

If the destination parcel is not of type ‘multi DO’ (lcol.flg != ‘M’).

Call the function gnc_maj_entete_ol, as so to manage the status of one delivery order header and the related expeditions and waves.

Otherwise.

Call the function gnc_colis_maj_multi_ol, as so to manage the status of delivery orders.

If management of status is not successful .

The API returns an error code 0.

Erreurs possibles

CAUSE EFFET
Problème de regroupement Code retour 0, message correspondant au paramètre de sortie « idmes ».
Code Description
0 The source logistic stock parcel does not exist.
0 The destination logistic stock parcel does not exist.
0 Stacking is not successful.
0 Consolidation is not possible.
0 Delivery associated third-party identifier OR delivery associated third-party type OR order number address are different for the source and destination logistic stock parcel data.
0 Expedition tour identifier for the source and destination logistic stock parcel data is not the same.
0 Wave identifier for the source and destination logistic stock parcel data is not the same.
0 Delivery order header does not exist for destination logistic stock parcel data.
0 Preparation mode data does not exist for destination logistic stock parcel data.
0 Delivery order header does not exist for source logistic stock parcel data.
0 Preparation mode data does not exist for source logistic stock parcel data.
0 Preparation mode of source and destination delivery order header is not the same.
0 Delivery order identifier of found preparation mode not multi OL.
0 Transfer of logistic stock parcel not successful.
0 Modification of destination parcel is not successful.
0 Management of status is not successful.

Exemple(s) d’utilisation

w_ret = Consolide_colis (numero_module, "DEP", w_sigdep, idobjcol_op, w_idobj_conso, "G", "2")

Paramètres en entrée

NOM DU PARAMÈTRE TYPE FORMAT TAILLE OBL O/N REMARQUE
Typdep CHAR   3 O Depot type
Sigdep CHAR   12 O Depot ID
Idobjcol_source CHAR   18 O Source logistic stock parcel ID (Number of preparation unit)
idobjcol_target CHAR   18 O Target logistic stock parcel ID (Number of preparation unit)
Mode CHAR   1 O

C= Consolidation

G=Stacking (Gerbage in french).

Action CHAR   1 N

Action (1/2)

1=Verification

2= Verification + Grouping

adremp_dep CHAR   11 N Adresse de dépose

Paramètres en sortie

NOM DU PARAMÈTRE TYPE FORMAT TAILLE REMARQUE
idmes CHAR   10 Identifiant du message d’erreur dans le mode « Vérification du gerbage ».