| Version ACE : 5.0-00 | |
|
Package : Standard Sous-programme Basic : No_Serie Nom de la gnc : gnc_rf_no_serie |
Fonctionnalité :Général |
| Schémas d’entrée et de sortie : | voir en fin de document. |
Cette API permet d’enregistrer un numéro de série en réception ou en préparation, en fonction du mode d'action.
API imbriquées : aucune.
Contraintes et limites de fonctionnement (hors périmètre)
| RAS. |
Paramétrage (PPE)
| SAISER - |
Prototype de la fonction Basic
| No_Serie (numero_module, mode, typdep, sigdep, num, numlig, reflot) |
Messages en entrée
| NO_SERIE~mode~typdep~sigdep~num~numlig~reflot~ |
Messages en sortie
| Retour~code_message~ |
Valeurs restituées par l’API
|
1 : le traitement de l’API s’est déroulé correctement. 0 : un problème est survenu dans le traitement de l’API. |
Cas d’erreur
| Code | Paramètres | Description |
|---|---|---|
| 0 | 2 | The EE number is already presented in Reception. |
| 0 | 3 | The EE number is not corresponding to a declared enter number. (Not blocked error) |
| 0 | 4 | Database problem. |
Processus, contrôles et règles de gestion
| ETAPE | DESCRIPTION DU PROCESSUS |
| 1 | Enregistre un numéro de série en réception ou en préparation. |
| Détail : |
If the action mode is 1 (Reception). Read the reception line (LREL) with the input parameters (typdep, sigdep, num, numlig). If reception line does not exist, the API function returns a code 0 with the parameter 4. Read the logistic serial numbers (LSERIE) with (lrel.typtie, lrel.sigtie, lrel.codpro and the input parameter reflot) For each logistic serial number found. If the EE number for the logistic serial number (lserie.numea) and the EE number for the reception line (lrel.numea) are equal. The API function returns a code 0 with the parameter 2. If the delivery order identifier of the logistic serial number is equal to ‘0’ (lserie.idol = ‘0’). The API function returns a code 0 with the parameter 2. Read the EE header (LEAE) with (lrel.typtie, lrel.sigtie, lrel.numea). Create a new logistic serial number (LSERIE). If the creation is not successful, the API function returns a code 0 with the parameter 4. Else Read the stock movement data (LMVTSTK) with the input parameters (typdep, sigdep, num). If the stock movement does not exist, the API function returns a code 0 with the parameter 4. Read logistic serial number objects (LSERIE) with (lmvtstk.typtie, lmvtstk.sigtie , lmvtstk.codpro and the input parameter reflot). For each logistic serial number found. If the delivery order identifier of the logistic serial number is equal to ‘0’ (lserie.idol = ‘0’). The Order number is considered as found (The Order number of the logistic serial number is kept (lserie.numord)). If an Order number is found. The logistic serial number is updated with the order number found. Otherwise A new logistic serial number is created. If the modification or the creation is not successful the API return the error code 0 with the parameter 4. If an Order number is found. If the ‘SAISER’ parameter is active and the parameter field A2 is equal to ‘1’. The API function returns a code 1 with the parameter 3. The API function returns a code 1 with the parameter 1. |
Erreurs possibles
| CAUSE | EFFET |
| Problème d’accès à la base de données. |
Code retour 0, code message 4 « Problème de mise a jour » |
| Numéro de série déjà saisi en réception. |
Code retour 0, code message 2 « No déjà saisi » |
| Le numéro de série saisi en préparation ne correspond pas à un numéro déclaré en réception. |
Code retour 0, code message 3 « No non déclaré en entrée » |
Exemple(s) d’utilisation
| ret = No_Serie (numero_module, "1", typdep, sigdep, idreception, numligrec, w_serie) |
| NOM DU PARAMÈTRE | TYPE | FORMAT | TAILLE | OBL O/N | REMARQUE |
| mode | CHAR | 1 | O |
1: Réception, 2: Préparation |
|
| typdep | CHAR | 3 | O | Type de dépôt | |
| sigdep | CHAR | 12 | O | Sigle du dépôt | |
| num | CHAR | 19 | O |
Numéro de réception, en mode réception Numéro de mouvement, en mode préparation |
|
| numlig | CHAR | 19 | N | Numéro de ligne de réception. | |
| reflot | CHAR | 30 | O | Numéro de série. |
| NOM DU PARAMÈTRE | TYPE | FORMAT | TAILLE | REMARQUE |
| Code_message | CHAR | 1 |
2 : Numéro déjà saisi 3 : Numéro non déclaré en entrée 4 : Problème de mise a jour |