| API / APIs Radiofréquence | |
| Version ACE : 1.4 | |
|
Package : Standard Sous-programme Basic : gnc_sce_ft_ctrdetailp_egx |
Fonctionnalité :SCE Mobile |
| Schémas d’entrée et de sortie : | voir en fin de document. |
Cette API permet de vérifier que le produit scanné appartient au flux transit. Si ce n'est pas le cas, l'API tente de l'ajouter au flux.
API imbriquées : aucune.
Contraintes et limites de fonctionnement (hors périmètre)
| RAS. |
Paramétrage (PPE)
| RAS. |
| CODE | PARAMÈTRE | DESCRIPTION |
| 0 / ELT_PASTRO | Typdep, sigdep, idobj | The stock object is not found. |
| 0 / INCOR_GCOD | “pro”, gencod | The product object corresponding to the gencod is not found. |
| 0 / ELT_PASTRO | “prl”, gencod | The logistic variant object is not found. |
| 0 / ELT_PASTRO | "lree", typtie, sigtie, numrec | The reception header object is not found. |
| 0 / ELT_PASTRO | "ltea", typtie, sigtie, typea | The EE type object is not found. |
If the input parameter ‘typtie’ is empty.
The parameter is filled with the current user’s depot type (gnc_pev_typdep function).
If the input parameter ‘sigtie’ is empty.
Read the third-party object (tie) for the current user.
The parameter is filled with the current user’s depot ID (TIE.sigdep).
Read the stock object (LOBJSTK) with the input parameters (typtie, sigtie, idobj).
If the stock object is not found, the API returns an error message ELT_PASTRO and an error code 0.
If the input Gencod represents a stock object ID (the length of gencod is 18).
Read the stock object with the input parameters (typtie, sigtie, gencod).
Read the container type (cnttyp), container code (cntcod) and container number (l_nbrcnt) from the stock object found.
If the input Gencod represents a product code (the length of gencod is 13 or 14).
Read the logistic variant (PRL) with the input parameters (typtie, sigtie) and (codva1=’00’ and cntdft = ’O’) and (dun14 = input gencod).
Read the product code (codpro), container type (codva2), container code (cntcod), number of unit (nbre) from the logistic variant object.
If no stock object or logistic variant found.
Read the product data (PRO) with the input parameter (sigtie) and (gencod = input gencod or codpro = input gencod).
If the product object is not found, the API returns an error message INCOR_GCOD and an error code 0.
Read the logistic variant (prl) with the input parameters (typtie, sigtie), (codpro = codpro of the product object) and (codva1=’00’ and codlnst = 1).
If the logistic variant is found, read container type (codva2) and container code (cntcod).
Otherwise the API returns an error message ELT_PASTRO and an error code 0.
Read the already controlled quantity for the scanned products of the container.
(Read the stock object data (lobjstk) with the input parameters (typdep, sigdep, idobjpere = idobj) and with the product code found (pro.codpro)
Cumulate the stock object’s CU quantity).
If the stock object has a reception number (lobjstk.numrec > 0).
Read reception header data (LREE table) with the input parameters (typdep, sigdep) and reception number of the input stock object (lobjstk.numrec).
If the reception header object is not found the API returns an error message ELT_PASTRO and an error code 0.
Read the EE type data (LTEA table) with the input parameters (typdep, sigdep) and (typeea = lree.typea).
If the EE type object is not found, the API returns an error message ELT_PASTRO and an error code 0.
Set 0 to the expected quantity.
Read the stock objects of the EA group which are not in the phase « Detail control OK », depending on the EE type’s transit type (ltea.typtransit).
(Joint select on LOBJSTK, LCOL tables (if ltea.typtransit != ‘3’) OR LOBJSTK, LEAE, LEAL, LOLE, LOLL tables (otherwise))
For each stock objects found.
Calculate the expected quantity for the scanned product.
(Read the stock movements which are not controlled and associated with the EA group of the current container.
(Read the sum of CU quantity of movement stock with the input parameters (typdep, sigdep) and (typmvt='E', sensmvt='E', statut='3', idobjpere= current idobj, natstk=' ', codpro = pro.codpro).)
For each stock movements founds.
Add the current sum of CU quantity of the movement stock to the expected quantity.
)
Return the code 1.
| NOM DU PARAMÈTRE | TYPE | FORMAT | TAILLE | OBL O/N | REMARQUE |
| Typtie | Char(3) | N | Third-party type. | ||
| Sigtie | Char(12) | N | Third-party ID. | ||
| Idobj | Char(18) | O | Logistic stock object ID. | ||
| gencod | Char(18) | O | Article’s gencod or product code. |
| NOM DU PARAMÈTRE | FORMAT | REMARQUE |
| ParamOut1 | Char(16) | The product code correspondent to the scanned gencod. |
| ParamOut2 | Number | The quantity expected for the scanned product. |
| ParamOut3 | Number | The quantity controlled for the scanned product. |
| ParamOut4 | Char(2) | Container type (cnttyp) of the scanned product. |
| ParamOut5 | Char(2) | Container type (cnttyp) of the scanned product. |
| ParamOut6 | Number | Container number (l_nbrcnt) of the scanned logistic unit. |