| API / APIs Radiofréquence | |
| Version ACE : 1.4 | |
|
Package : Standard Sous-programme Basic : gnc_rf_chgt_dchgt_egx |
Fonctionnalité :SCE Mobile |
| Schémas d’entrée et de sortie : | voir en fin de document. |
Cette API permet d’effectuer le chargement/déchargement d'un object de stock donné, tout en appliquant les contrôles correspondants.
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 | Ltrn, typtie, sigtie, idtrn | The expedition tour does not exist. |
| 0 / ’Problème de tire’ | The parcel does not belong to the tour . | |
| 10 | The parcel does not exist . | |
| 11 | The parcel is not in status ‘Waiting for expedition’ or ‘Waiting for loading’. | |
| 13 | The parcel is already in an expedition unit. | |
| 16 | The execution of the function gnc_colis_modif_statut does not succeed. |
Détail de l'API
Read the parcel data (LCOL) corresponding to the input parameters (typtie, sigtie, idobjcol = idobj).
If the parcel does not exit, the API returns an error code 10.
If the parcel is already in an expedition unit. (lcol.idue is not empty).
The API returns an error code 13.
Read the expedition tour data (ltrn) corresponding to the input parameters (typtie, sigtie, idtrn).
If the expedition tour does not exist, the API returns an error message ELT_PASTRO and an error code 0.
Control whether the parcel belongs to the expedition tour.
If the expedition tour identifiers of the expedition tour and parcel are different (LTRN.idtrn != LCOL.idtrn).
Search for a second tour (select on LTRN, LTRNCLI tables) with the same planned expedition data (ltrn.datexpprv) and time (ltrn.heuexpprv) and for the same client (ltrncli.sigcli).
If there is such a tour AND the quay is the same as for the input expedition tour (ltrn.quai).
It is considered that the parcel belongs to the tour .
Otherwise.
It is considered that the parcel belongs to the tour .
If the parcel does not belong to the tour .
The API returns an error message ‘Problème de tire’ and an error code 0.
If the status of the parcel is ‘Waiting for loading’ (LCOL.statut=6).
Store the first three characters from the loading field of the expedition tour (LTRN.zonchgt) as a destination store.
If the expedition tour identifiers of the expedition tour and parcel are different (ltrn.idtrn != LCOL.idtrn).
If the expedition tour Id of the parcel exists (LCOL.idtrn != 0).
Call the function gnc_colis_desaff_colis_tournee to deallocate the parcel from its tour.
Call the function gnc_colis_affect_colis_tournee to assign the parcel to the current tour (ltrn.idtrn).
Read again the parcel data (LCOL) and expedition tour data (LTRN).
Update the the expedition tour identifiers of the delivery order header (LOLE .idtrn).
If the status of the parcel is ‘Waiting for expedition’ (lcol.statut=7).
Store the quay of the expedition tour (LTRN.quai) as a destination store.
Change the status to ‘Waiting for loading’ (LCOL.statut=6).
Otherwise.
The API returns an error code 11.
Call the API gnc_colis_modif_statut to modify the status of the parcel.
If the function does not succeed, the API returns an error code 16.
Read the depot data (LDEP table) with the input parameters (typtie, sigtie).
Read the logistic stock object (LOBJSTK table) with the input parameters (typtie, sigtie, idobj).
If the logistic stock object exists.
Call the function gnc_gener_mvt_transfert to generate the transfer movement to the previously stored destination store.
Read the stock movements data (LMVTSTK table) with the direction of the movement (sensmvt=’S’), type of movement ‘T’ and with the input parameters (typtie, sigtie) and with idmvt = generated transfer movement ID.
Call the function gnc_valid_mvtstk, as so to validate the generated transfer movement.
Return the code 1.
| NOM DU PARAMÈTRE | FORMAT | OBL O/N | REMARQUE |
| typtie | Char(3) | O | Third-party type |
| sigtie | Char(12) | O | Third-party ID |
| idtrn | Number | O | Expedition tour ID |
| idobj | Char(18) | O | Stock object ID |
Aucun champ en sortie.