API RF SCE_GP_013

  Version ACE : 1.3

Package : Standard gnc_sce_logis

Nom de la gnc : gnc_sce_gp_013

Fonctionnalité : Préparation
Schémas d’entrée et de sortie : voir en fin de document.

Cette API, lancée par les API GestionPreparationsupprimerVacation et GestionPreparationcloturerVacation, permet de supprimer ou cloturer une vacation.

API imbriquées : aucune.

Contraintes et limites de fonctionnement (hors périmètre)

RAS.

Paramétrage (PPE)

RAS.

Processus, contrôles et règles de gestion

ETAPE DESCRIPTION DU PROCESSUS
  Lecture de la table LVACE.
 

Si typvac=’REA’ et statut<=’1’

Il faut supprimer tous les enregistrements de LVACEMP et l’enregistrement de LVACE pour cette vacation.

Retour

 

Si typvac=’REA’ et statut >’1’

Appel à gnc_cloture_logis(typdep, sigdep, idvac, 0, p_idvacnew)

Retour.

Détail :

Read the first delivery list header data which corresponds to the input parameters (‘typdep’, ‘sigdep’ and ‘idvac’).

If the delivery list header does not exist and the deselection flag is equal to 0 (desel = 0).

The API returns an error message “ELT_PASTRO” and an error code 0.

If the delivery list header does not exist and the deselection flag is equal to 1 (desel = 1).

Call the API gnc_cloture_logis, as so to close the wave.

If the function does not succeed, the API returns an error code 0.

For each delivery list header found.

If there is at least one delivery list header in status higher than ‘already selected for picking’ (status >2) for the wave.

If the deselection flag (desel) is equal to 0

Call the API gnc_cloture_logis, as so to close the wave and to return the new wave number.

If the function does not succeed, the API frees the local delivery list headers structure (td_lole) and returns an error code 0.

If deselection flag (desel) is equal to 1.

Call the API gnc_cloture_logis (typdep, sigdep, idvac, desel, NULL), as so to close the wave.

If the function does not succeed, the API returns an error code 0.

If there is no delivery list header in status higher than ‘already selected for picking’ (status >2) for the wave.

For each delivery list header in status ‘DO in backorder’ or ‘pending’ or ‘already selected for picking’ (status <= 2) set the status to pending (lole.statut=1).

If the modification does not succeed, the API returns an error message "ELT_MODIF" and an error code 0.

Call the API gnc_vacation_ligne_ol to manage the wave for the delivery list lines.

Read the wave header data (LVACE), which corresponds to the input parameters (‘typdep’, ‘sigdep’ and ‘idvac’).

Delete the wave header.

If the deletion does not succeed, the API returns an error message "ERR_SUPPR" and an error code 0.

Cas d’erreur

CODE PARAMÈTRES DESCRIPTION
0/ERR_SUPPR lvace.typtie, lvace.sigtie, lvace.idvac Deletion of the wave header is not successful.
0/ELTPASTRO lole.typtie, lole.sigtie,lole.idvac Delivery list header does not exist.
0/ELT_MODIF lole.typtie, lole.sigtie,lole.idvac Modification of the Delivery list header is not successful.
0   The execution of the function gnc_cloture_logis is not successful.

Paramètres en entrée

NOM DU PARAMÈTRE TYPE FORMAT TAILLE OBL O/N REMARQUE
typdep Char(3)     O Depot type
sigdep Char(12)     O Depot ID
idvac Long     O Wave Identifier
desel Long     N Deselecting flag (if the wave is already started in picking).

Paramètres en sortie

NOM DU PARAMÈTRE TYPE FORMAT TAILLE REMARQUE
ParamOut1 Long     Generated wave identifier.