API RF IDOBJFCT

Version ACE : 5.0-00  

Package : Spécifique.

Sous-programme Basic : Idobjfct

Nom de la gnc : gnc_rf_idobjfct

Fonctionnalité :Général
Schémas d’entrée et de sortie : voir en fin de document.

The API searches for a stock object corresponding to a functional stock object. If the input parameter idobj is presented the API just controls the correspondence between that stock object ID and the functional stock object ID.

If the input parameter idobj is not presented the API searches for a stock object from the given slot address corresponding to a functional stock object and with a given consecutive number from an ascending reading by stock object’s ID for the slot address.

API imbriquées : aucune.

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

Le numéro fonctionnel doit être alimenté à la création des objets de stock. (compteur numobj)

Paramétrage (PPE)

RAS.

Prototype de la fonction Basic

Declare Function Idobjfct(p_numero_module As String, p_typdep As String, p_sigdep As String, p_idobjfct As String, p_idobj As String, p_indice As String, p_adremp As String, p_idobj_trouve As String) As Integer

Message en entrée

"IDOBJFCT" ~p_typdep~p_sigdep~p_idobjfct~p_idobj~p_indice~p_adremp~

Message en sortie

Retour~p_idobj_trouve

Valeurs restituées par l’API

VALEUR REMARQUE
1  
0  

Processus, contrôles et règles de gestion
ETAPE DESCRIPTION DU PROCESSUS
1

Dans le cas où les champs idobj et adremp ne sont pas renseignés, recherche d’un objet de stock non expédié ayant pour objet fonctionnel p_idobjfct.

Dans le cas où le champ idobj est renseigné,recherche d’un objet de stock non expédié ayant pour objet fonctionnel p_idobjfct et pour n° d’objet p_idobj

Dans le cas où le champ idobj est renseigné et p_adremp renseigné, recherche d’un objet de stock non expédié ayant pour objet fonctionnel p_idobjfct et ayant pour adresse p_adremp.

2

La recherche est triée par n° d’objet trouvé.

Dans le cas où la recherche a pour résultat plusieurs objets de stock, il est possible de retourner le Nième résultat de la recherche. Le champ p_indice permet de retourner le Nieme résultat de la recherche (p_indice = N).

Détail :

If the input functional stock object parameter is not presented (idobjfct is empty), the API returns the error code 0.

Read the depot data (TIE table) with the input parameters (sigdep,typdep).

If the depot is not found, the API returns the error code 0.

If the input stock object is presented (idobj is not empty).

The ‘indice’ input parameter is initialized with ‘0’.

For each logistic stock object (LOBJSTK table) read with the input parameters (typdep, sigdep, idobjfct)

and ( with the input parameter idobj (if the parameter is presented)

or with the input parameter adremp (if the parameter idobj is presented))

and which is in status ‘not addressed’ (statut = ‘1’), ordered by the stock object ID (idobj).

If the ‘indice’ input parameter is less than or equal to ‘2’.

The first read stock object is considered as found.

If the ‘indice’ input parameter is greater than ‘2’.

The read stock object with a consecutive number of reading equal to the (‘indice’ input parameter - 1) is considered as the object found.

(For example:

If the ‘indice’ parameter has a value of ‘3’ -> the second read stock object is considered as found.

If there is no enough stock objects to be read, as so to reach the needed number of read stock objects the last read stock object is considered as found.

If the stock object is found.

The identifier of the found stock object is copied into the output parameter ParamOut1.

Erreurs possibles

CAUSE EFFET
Le dépôt passé en paramètre n’existe pas. Retour valeur 0
L’objet recherché n’existe pas. Retour valeur 0
L’indice en paramètre est supérieur au nombre de résultats de la recherche. Retour valeur 0

Exemple(s) d’utilisation
Idobjfct(numero_module, “DEP”, “D001”, idobjfct, p_idobj, “1”, “”, p_idobj_trouve)

Paramètres en entrée
NOM DU PARAMÈTRE TYPE FORMAT TAILLE OBL O/N REMARQUE
typdep Char   3 O Type de dépôt
sigdep Char   12 O Sigle dépôt
idobjfct Char   6 O N° objet fonctionnel
idobj Char   18 N SSCC de l’objet recherché
indice Char   10 N N° indice de recherche
adremp Char   10 N Code emplacement
Paramètres en sortie
NOM DU PARAMÈTRE TYPE FORMAT TAILLE REMARQUE
ParamOut1 Char   18 N° SSCC de l’objet identifié (LOBJSTK.idobj)