| API / APIs Radiofréquence | |
| Version ACE : 5.0-00 | |
|
Package : Standard Sous-programme Basic : Codification_Produit Nom de la gnc : gnc_rf_codif_produit |
Fonctionnalité :Général |
| Schémas d’entrée et de sortie : | voir en fin de document. |
The API controls the correctness of a particular product code, looking for the presence of that code in the product data, stock product data or in the palettization plan and eventually comparing it with a referent product code.
API imbriquées : aucune.
Contraintes et limites de fonctionnement (hors périmètre)
| RAS. |
Paramétrage (PPE)
| MULEAN - |
Prototype de la fonction Basic
| Codification_Produit (numero_module, code, codpro_ref) |
Messages en entrée
| CODIF_PROD~code~codpro_ref~ |
Messages en sortie
| Aucun. |
Valeurs restituées par l’API
| VALEUR | REMARQUE |
| 1 | Le code produit correspond au GENCOD du produit (ou au DUN14). |
| 50 | Le code produit ne correspond ni à un GENCOD produit, ni à un DUN14. |
| 86 | Pas de lien entre le code et le code produit. |
Processus, contrôles et règles de gestion
| ETAPE | DESCRIPTION DU PROCESSUS |
|
Read the depot (TIE table) for the operator. Read product data (PRO table) with the input parameter ‘codpro’. |
|
|
If the product exist. Read stock product data (DSK table) with codpro and sigtie of the operator (TIE table) . If stock product data is found. If the input parameter codpro_ref is empty , the API returns 1. If the input parameter codpro_ref is equal to the product code of the found product pro.codpro, the API returns 1. Otherwise the, API returns the error code 86. If stock product data is not found, the API returns the error code 50. |
|
|
If the length of the input parameter ‘codpro’ is less than or equal to 14. Search for DUN14 code. For each logistic variant data (PRL table) found with (dun14 = first 14 symbols from the input parameter ‘codpro’). If the parameter ‘MULEAN’ is active and the parameter field A1 is equal to ‘O’. If the logistic variant is defined as ‘Multi Gencode for third-party’ (codva1 = ‘MG’). Read the logistic variant data (PRL table) with (codpro = prl.codpro (the product code from the ‘Multi Gencode’ logistic variant), codva1 = ‘00’, codva2 = prl.codva2_l (link to the container type from the ‘Multi Gencode’ logistic variant), cntcode = prl.cntcod_l (link to the container code from the ‘Multi Gencode’ logistic variant). If the logistic variant is found. Replace the ‘Multi Gencode’ logistic variant with the logistic variant found. Otherwise. Continue with the reading of logistic variants. If the current operator ID (tie.sigtie) is equal to the third-party ID from the logistic variant found (prl.sigtie) and (codpro_ref is empty or logistic variant codpro is equal to codpro_ref). Stop the reading of logistic variants. If the current operator ID (tie.sigtie) is equal to the thirdparty ID from the logistic variant found (prl.sigtie). If the input parameter codpro_ref is empty , the API returns 1. If the input parameter codpro_ref is equal to the logistic variant product code ( pro.codpro), the API returns 1. Otherwise the, API returns the error code 86. If the length of the input parameter (codpro) is less than or equal to 13. Search for EAN code. Read the product data (PRO table) with (gencod = first 13 symbols from the input parameter ‘codpro’) . If the product is found. If the input parameter codpro_ref is empty , the API returns 1. If the input parameter codpro_ref is equal to the product code of the found product ( pro.codpro), the API returns 1. Otherwise the, API returns the error code 86. If the product is not found, the API returns the error code 50. Otherwise , the API returns the error code 50. Otherwise , the API returns the error code 50. |
Erreurs possibles
| CAUSE | EFFET |
| Le code ne correspond ni à un GENCOD produit, ni à un DUN14 | Code retour 50, message « Ce code n'existe pas » |
| Pas de lien entre le code et le code produit référent. | Code retour 86, message « Le produit scanné n'est pas celui attendu » |
Exemple(s) d’utilisation
| Retour_Codification_Produit = Codification_Produit (numero_module ,w_idobj_prise, codpro) |
| NOM DU PARAMÈTRE | TYPE | FORMAT | TAILLE | OBL O/N | REMARQUE |
| codpro | CHAR | 16 | O | Product code | |
| codpro_ref | CHAR | 16 | N | Referent product code |
Aucun.