API RF GEL_MULTI

  Version ACE : 5.0-00

Package : Standard

Sous-programme Basic : Fct_Gel_Multi

Nom de la gnc : gnc_rf_gel_multi

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

The API blocks all stock movements for a particular picking list with the same product code, slot address and lot reference as the input stock movement in case of a preparation in ‘multi parcel in the state’ mode.

API imbriquées : aucune.

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

RAS.

Paramétrage (PPE)

LRFLOP (zone N1 obligatoire) -

Prototype de la fonction Basic

Fct_Gel_Multi (numero_module, typdep, sigdep, idop, idmvt, idgel)

Messages en entrée

GEL_MULTI~typdep~sigdep~idop~idmvt~idgel~

Messages en sortie

Aucun.

Valeurs restituées par l’API

VALEUR REMARQUE
1 Les mouvements ont bien été gelés (ou dégelés).
0 Les mouvements n’ont pu être gelés (ou dégelés).

Processus, contrôles et règles de gestion

ETAPE DESCRIPTION DU PROCESSUS
1 Vérification des informations du paramètre LRFLOP : la valeur de l’option N1 doit être différente de 0.
2 Identification du mouvement passé en entrée.
3 Identification du lot porté par le mouvement.
4

L’indicateur de gel est renseigné dans la zone paramétrée numéro N1 (paramètre LRFLOP) de tous les mouvements de l’OP qui ont le même code produit, la même référence lot et la même adresse que le mouvement passé en entrée.

Les mouvements en rupture ne sont pas concernés : dans ce cas, la zone paramétrée contient la valeur « R ».

Détail :

If the parameter ‘LRFLOP’ is not active OR the parameter field N1 is equal to ‘0’.

The API returns an error code 0.

Read the input stock movement data (LMVTSTK) with the input parameters (typdep, sigdep, idmvt, typmvt) and a movement direction equals to ‘S’ (sensmvt = ‘S’).

If the stock movement is not found, the API returns 0.

Read the Lot reference of the input stock movement (ost.reflot).

(Read the lot data (OST) with the input movement’s product code (lmvtstk.codpro) and the input movement’s lot number (lmvtstk.numlot). )

Read the stock movement data (LMVTSTK) with the input parameters (typdep, sigdep, typmvt), a movement direction equals to ‘S’ (sensmvt = ‘S’), not validated status (statut <= ‘8’), belonging to the input picking list (idord = lmvtstk.idord) and ligord >= 0.

For each stock movement found.

If the Lot reference (reflot) is equal to the Lot reference of the input stock movement and product (codpro) is equal to the product of the input stock movement and the slot address (adremp) is equal to the slot address of the input stock movement.

Read the found stock movement’s parameterized field referred from the parameter field N1 of the parameter ‘LRFLOP’.

If the reading is not successful, the API returns an error code 0.

If the movement is already declared in breaking (The reading returns ‘R’ value).

Read the next stock movement.

Otherwise.

Modify the stock movement’s parameterized field referred from the parameter field N1 of the parameter ‘LRFLOP’ with Blockage ID value from the API’s input parameter (idgel).

If the modification is not successful, the API returns an error code 0.

Erreurs possibles

CODE DESCRIPTION
0 The parameter ‘LRFLOP’ is not active OR the parameter field N1 is equal to ‘0’.
0 The input stock movement is not found.
0 The reading of the stock movement parameterized field is not successful.
0 The modification of the stock movement parameterized field is not successful.

Exemple(s) d’utilisation

Retour_Fct_Gel_Multi = Fct_Gel_Multi (numero_module, p_typdep, p_sigdep, p_idop, p_idmvt, "O")

Paramètres en entrée

NOM DU PARAMÈTRE TYPE FORMAT TAILLE OBL O/N REMARQUE
typdep CHAR   3 O Type du dépôt
sigdep CHAR   12 O Sigle du dépôt
idop CHAR   9 N Identifiant de l’Ordre de Préparation
idmvt CHAR   9 O Identifiant du mouvement
idgel CHAR   40 O

Indicateur de gel (ou dégel) :

Vide = non gelé, ‘O’ = gelé

typmvt CHAR   1   Type de mouvement de stock

Paramètres en sortie

Aucun.