| Version ACE : 5.0-00 | |
|
Package : Standard Sous-programme Basic : Gere_Support Nom de la gnc : gnc_rf_gere_support |
Fonctionnalité :Préparation |
| Schémas d’entrée et de sortie : | voir en fin de document. |
Cette API permet de gérer un support de préparation de regroupement de première phase.
API imbriquées : aucune.
Contraintes et limites de fonctionnement (hors périmètre)
| RAS. |
Paramétrage (PPE)
| LRFOPR (zones A1 et A2 obligatoires) - |
Prototype de la fonction Basic
| Gere_Support (numero_module, typdep, sigdep, idop, idobj, mode) |
Messages en entrée
| GERE_SUPP~typdep~sigdep~idop~idobj~mode~ |
Messages en sortie
| Aucun. |
Valeurs restituées par l’API
| VALEUR | REMARQUE |
| 1 | Le traitement de l’API s’est bien déroulé. |
| 0 | Support inexistant (en mode Lecture ou Suppression). |
| 2 | Support non disponible. |
| 3 | Problème de création. |
| 4 | Problème de suppression. |
Processus, contrôles et règles de gestion
| ETAPE | DESCRIPTION DU PROCESSUS |
|
En mode Lecture ou Suppression :
|
|
|
En mode Création :
|
|
| Détail : |
If the data action mode is ‘read’ (mode = ‘L’) or ‘delete’ (mode = ‘S’). For each child stock object data (LOBJSTK table) of the input stock object, read with the input third-party (typtie, sigtie) and idobjpere = input parameter idobj. If the reuse of a ‘bac’ (not in glossary) used on the same vacation for a different picking list is allowed. (If the parameter ‘LRFOPR’ is active and the value of the parameter field N3 is equal to 1.) Read the picking list data (LOP table) with the input parameters (typtie, sigtie and idop). If the picking list exists. Search the last created stock movement (LMVTSTK table) with ‘regrouping’ type (typmvt='Z'), with an ‘E’ direction (sensmvt='E'), which corresponds to the input parameter (typtie) and to the found stock object’s identifiers (lobjstk.idobj, lobjstk.idobjpere), ordered descending by creation date (datcre) and creation time (heucre). If the movement does not exist OR the movement does not belong to the same wave as the picking list found (lmvtstk.idbch != lop.idvac). The API returns an error code 2. If the picking list does not exist. The API returns an error code 3. Otherwise the API returns an error code 2. Read the stock object data (LOBJSTK table), which corresponds to the input parameters (typtie, sigtie and idobj). If the stock object does not exist, the API returns an error code 0. Read the container data (LCNTREF table) with (lobjstk.typtie, lobjstk.sigtie, lobjstk.cnttyp, lobjstk.cntcod). If the container does not exist the API returns the error code 0. If the container’s code level is different from 4, the API returns the error code 0. If the data action mode is ‘ delete’ (mode = ‘L’). Delete the stock object. If the deletion does not succeed, the API returns an error code 4. Otherwise. Read the picking list data (LOP table) with the input parameters (typtie, sigtie and idop). If the picking list does not exist, the API returns an error code 3. Store the input parameters (typtie, sigtie, idobj) into the logistic stock object to be created (LOBJSTK table). If the parameter ‘LRFOPR ’ is not active, the API returns an error code 3. Store the values of container code (cntcod) and container type (cnttyp) read from ‘LRFOPR’ parameter fields A1 and A2 into the logistic stock object to be created. Read the container data (LCNTREF table) with the input parameters (typtie, sigtie) and with container code (cntcod) and container type (cnttyp) read from ‘LRFOPR’ parameter fields A1 and A2. If the container does not exist, the API returns an error code 3. If the container’s code level (codlncn) is different from 4, the API returns the error code 3 Store the value of the container’s code level (codlncn) into the logistic stock object to be created. Read the depot data (LDEP table) with the input parameters (typtie, sigtie). If the depot is not found, the API returns an error code 3. Store the depot’s virtual logistic store code (magvir) into the logistic store code (lcodmag) and slot address (adremp) from the logistic stock object to be created. Read the logistic store data (LMAG table) with (lobjstk.typtie, lobjstk.sigtie, lobjstk.lcodmag). If the logistic store does not exist, the API returns an error code 3. Store the logistic store’s type (typmag) into the logistic stock object to be created. Initialize the stock type (typstock) for logistic stock object to be created with ‘0’. Initialize the container number (nbrcnt) for logistic stock object to be created with ‘1’. Read the container type data (LCNTTYP table) with (lobjstk.typtie, lobjstk.sigtie, lobjstk.cnttyp). Store the container type’s product code (codpro) and the physical company code (codsoc_phy) into the logistic stock object to be created. Initialize the quantity of CU (qteunt) for the logistic stock object to be created with ‘1’. Initialize the status for the logistic stock object to be created with an ‘Available’ value (statut=’0’). Initialize the virtual picking flag (l_virtuel) for the logistic stock object to be created with ‘0’. Initialize the moving in progress flag (flgencdpl) for the logistic stock object to be created with ‘0’. Create the logistic stock object (LOBJSTK). If the creation does not succeed, the API returns an error code 3. |
Erreurs possibles
| CODE | DESCRIPTION |
|---|---|
| 0 | The stock object is not found (‘Read’ or ‘Delete’ mode). |
| 0 | The container is not found (‘Read’ or ‘Delete’ mode). |
| 0 | The container’s code level is not correct (‘Read’ or ‘Delete’ mode). |
| 2 | The stock movement is not found OR the stock movement wave is not correct. |
| 2 | The parameter ‘LRFOPR’ is not active OR its field N3 is not equal to ‘1’. |
| 3 | The picking list does not exist. |
| 3 | The stock object is not found (‘Create’ mode). |
| 3 | The container is not found (‘Create’ mode). |
| 3 | If the container’s code level is not correct (‘Create’ mode). |
| 3 | The depot is not found. |
| 3 | The logistic store is not found. |
| 3 | The container type is not found. |
| 3 | The stock object is not successfully created. |
| 4 | The stock object is not successfully deleted. |
Exemple(s) d’utilisation
| Retour_Gere_Support = Gere_Support (numero_module, typdep, sigdep, p_idop, w_idobj_bac, "C") |
| NOM DU PARAMÈTRE | TYPE | FORMAT | TAILLE | OBL O/N | REMARQUE |
| typtie | CHAR | 3 | O | Type du dépôt | |
| sigdep | CHAR | 12 | O | Sigle du dépôt | |
| idop | CHAR | 10 | O | Identifiant de l’ordre de préparation | |
| idobj | CHAR | 18 | O | Identifiant du support de préparation | |
| mode | CHAR | 1 | O | Mode : C (créer) – L (lire) – S (supprimer) |
Aucun.