| API / APIs Radiofréquence | |
| Version ACE : 5.0-00 | |
|
Package : Standard Sous-programme Basic : Consolide_Pour_OP Nom de la gnc : gnc_rf_conso_pour_op |
Fonctionnalité :Préparation |
| Schémas d’entrée et de sortie : | voir en fin de document. |
The API deletes all the not validated output movements for the destination stock parcel and afterwards transfers all the not validated movements from the input picking list object into that destination stock parcel. If after transfer there are no more movements for the source stock parcel (corresponding to the input picking list object before the transfer), this source parcel and the supporting object are deleted.
API imbriquées : aucune.
Contraintes et limites de fonctionnement (hors périmètre)
| RAS. |
Paramétrage (PPE)
| RAS. |
Prototype de la fonction Basic
| Consolide_Pour_OP (numero_module, sigdep, idop, idobj_cible) |
Messages en entrée
| CONSO_OP~sigdep~idop~idobj_cible~ |
Messages en sortie
| retour |
Valeurs restituées par l’API
| VALEUR | REMARQUE |
| 1 | La consolidation s’est déroulée avec succès. |
| 0 | Un problème de consolidation est survenu. |
Processus, contrôles et règles de gestion
| ETAPE | DESCRIPTION DU PROCESSUS |
| 1 | Contrôle que le colis cible n’est pas déjà chargé : statut < ‘7’. |
| 2 | Transfert du colis cible dans le magasin virtuel. |
| 3 | Transfert des mouvements non validés de l’OP source vers le colis cible. |
| 4 | Si aucun mouvement n’a été validé dans l’OP source, suppression du colis source. |
| 5 | Mise à jour de l’identifiant colis sur l’OP source, avec l’identifiant du colis cible. |
| Détail : |
Call the function gnc_mag_vir , as so to find the virtual store (EMP table). If the slot address code of the virtual store (emp.codemp) is empty, the API returns an error code 0. Read the logistic stock parcel data (LCOL table) with the input parameters (sigdep, idobjcol). If the parcel does not exist, the API returns an error code 0. If the parcel is already loaded (lcol.statut >6), the API returns an error code 0. Read the first output (LMVTSTK.sensmvt=’S’) not validated (lmvtstk.statut <= ’3’) movement for transfer (lmvtstk.typmvt = ‘T’) which corresponds to the logistic stock parcel (lcol.typtie, lcol.sigtie, lcol.idobjcol). If there is a movement found and it is addressed (lmvtstk.statut = ‘3’). Call the function gnc_valid_mvtstk, as so to delete the movement. If the execution of the function is not successful, the API returns an error code 0. Read the preparation support. (Read the stock object data (LOBJSTK table) with the input parameter ‘sigdep’ and with idobj=idobjcol input parameter.) If the preparation support stock object does not exist , the API returns an error code 0. If the slot address code of the virtual store (emp.codemp) is not equal to the slot address code of the preparation support stock object (lobjstk.adremp). Call the function gnc_gener_mvt_transfert, as so to generate a transfer movement for the input logistic stock parcel into the virtual store. If the function does not succeed, the API returns an error code 0. Read the created output transfer movement (lmvtstk) with (sensmvt=’S’, typmvt = ‘T’, idmvt = ID returned by the function gnc_gener_mvt_transfert and with the input parameter sigdep). If such a movement does not exist, the API returns an error code 0. Call the function gnc_valid_mvtstk, as so to validate the created movement. If the function does not succeed, the API returns an error code 0. For each output (lmvtstk.sensmvt=’S’) not validated (lmvtstk.statut <= ’3’) movements from the picking list read with the input parameters (sigdep, idop). If the delivery order identifier of logistic stock parcel (lcol.idol) is not the same as delivery order identifier of current movement (lmvtstk.idol) AND logistic stock parcel is not of type ‘multi DO’ (lcol.flg1 != ‘M’) ) The parcel is modified to ‘multi DO’ parcel (lcol.flg1 set to M). The logistic stock parcel ID for the movement is modified with the input logistic stock parcel’s ID (lmvtstk.idobjcol=lcol.idobjcol). If the modification is not successful, the API returns an error code 0. Read the logistic variant data (prl table) with (sigdep = input parameter sigdep, codpro = lmvtstk.codpro, codva1 = ‘00’, codva2 = lmvtstk.cnttyp, cntcod = lmvtstk.cntcod). Collect the gross weight (prl.poidsbrut) for all read movements. Update parcel’s indicators of weight ( flgpoids set to 0 ), modification ( flgmodif set to 1 ) and reporting ( flgedite set to 0 ). Add the value of collected variant’s gross weight to the theoretical weight of parcel (lcol.poidstheo). Affect the value of the theoretical weight of parcel (lcol.poidstheo) to the real weight (lcol.poidsreel) of parcel. Read the picking list data (LOP) with the input parameters (sigdep, idop). If the picking list object does not exist, the API returns an error code 0. Read the logistic stock parcel data (lcol) which corresponds to the picking list (sigdep = input parameters, idobjcol = lop.idobjcol). If such a stock parcel data does not exist, the API returns an error code 0. If the status of the input stock parcel is bigger than the status of parcel which corresponds to the picking list (lcol.statut). Call the gnc_colis_modif_statut function, as so to change the status of the input stock parcel with the status of parcel which corresponds to the picking list (lcol.statut). Otherwise. Call the gnc_colis_modif_statut function, as so to change the status of the input stock parcel with its current status (lcol.statut) . If the function does not succeed, the API returns an error code 0. If the 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 to related expeditions and waves. Else. Call the function gnc_colis_maj_multi_ol, as so to manage the status of delivery orders. If the parcel ID of the picking list (lop.idobjcol) is not empty. Read the output (lmvtstk.sensmvt=’S’ and lmvtstk.typmvt = ‘S’) movement with (sigdep = input parameter sigdep, idobjcol = lop.idobjcol ). If such a movement is not found. Delete the logistic stock parcel data (lcol) for the picking list data with (sigdep = input parameter, idobjcol = lop.idobjcol). If the deletion is not successful, the API returns an error code 0. Delete the logistic stock object data (lobjstk) for the picking list data with (sigdep = input parameters, idobj = lop.idobjcol). Modify the logistic stock parcel ID for the picking list with the input logistic stock parcel ID ( lop.idobjcol = idobjcol) . If the modification fails, the API returns an error code 0. |
Erreurs possibles
| CAUSE | EFFET |
| Problème de consolidation | Code retour 0 |
| 0 | Slot address code of virtual store does not exist. |
| 0 | Logistic stock parcel object does not exist. |
| 0 | Parcel is already loaded. |
| 0 | Execution of the function gnc_valid_mvtstk is not successful. |
| 0 | Stock object does not exist. |
| 0 | The execution of the function gnc_gener_mvt_transfert is not successful. |
| 0 | Output movement for transfer does not exist. |
| 0 | The execution of the function gnc_valid_mvtstk is not successful. |
| 0 | Movement update is not successful. |
| 0 | Picking list object does not exist. |
| 0 | Parcel data does not exist. |
| 0 | Execution of the function gnc_colis_modif_statut is not successful. |
| 0 | Parcel update is not successful. |
| 0 | Parcel deletion is not successful. |
| 0 | Picking list modification is not successful. |
Exemple(s) d’utilisation
| w_ret = Consolide_Pour_OP (numero_module, w_sigdep, idop, w_idobj_conso) |
| NOM DU PARAMÈTRE | TYPE | FORMAT | TAILLE | OBL O/N | REMARQUE |
| sigdep | CHAR | 12 | O | Sigle du dépôt. | |
| idop | LONG | O | Identifiant de l’Ordre de Préparation à consolider dans le colis cible. | ||
| idobjcol | CHAR | 18 | O | Identifiant de l’objet colis cible. |