Skip to main content
Skip table of contents

Exemples (GFD) ENR-ACT-ENT


Articles

Création de l’article standard ART1 (premier tableau = WfEntAct, second = WfEntVar) :

Action

EntTEn

EntCl1

EntCl2

CRE

ART

R

ART1

EntTVa

EntVar

EntVa*

SAS

GenDesArt

Désignation Article 1

VAS

SpecArticle1

Valeur SpecArticle1

Création de l’Article standard ART1DUP par duplication de l’article ART1 (tableau = WfEntAct) :

Action

EntTEn

EntCl1

EntCl2

DupCl1

DupCl2

DUP

ART

R

ART1DUP

R

ARTICLE1

Création de l’Article standard ART1DUP par duplication de l’article ARTICLE1 avec modification de la désignation pour le nouvel article (premier tableau = WfEntAct, second = WfEntVar) :

Action

EntTEn

EntCl1

EntCl2

DupCl1

DupCl2

DUP

ART

R

ART1DUP

R

ART1

EntTVa

EntVar

EntVa*

SAS

GenDesArt

Dési. Article ARTDUP1

Fournisseurs

Création du Fournisseur FOUR1 (premier tableau = WfEntAct, second = WfEntVar) :

Action

EntTEn

EntCl1

CRE

AFO

FOUR1

EntTVa

EntVar

EntVa*

SFF

AppFouNom

Nom Fournisseur

SFF

AppFouAgeDelRef

Usine

SFF

AppFouAgeLivRef

Usine

SFF

AppFouDelai

2

SFF

AppFouTVA

0

SFF

AppFouDev

SFF

AppFouDatAppPri

0

SFF

AppFouFacRef

FOURFACT

SFF

AppFouGesFac

+

VFF

SpecFour1

Valeur SpecFour1

Clients

Modification du nom du Client CLI1 de réseau « 0 » (premier tableau = WfEntAct, second = WfEntVar) :

Action

EntTEn

EntCl1

EntCl2

MOD

CLI

0

CLI1

EntTVa

EntVar

EntVaC

SCL

CliGenNom

Nom modifié du client

OFs

Création d’OF « seul » (le code de l’OF sera généré) (premier tableau = WfEntAct, second = WfEntVar) :

Action

EntTEn

EntCl1

CRE

LLA

&1

EntTVa

EntVar

EntVa*

SLL

FabRefCondi

ParCarton

SLL

LanSerMet

DF

SLL

LanTypArt

R

SLL

GenRefArt

ART001

SLL

LanSerPreFinDat

10/06/2002

SLL

LanSerFabQteLan

5

SLL

FabUniProRef

UP1

VLL

SpecOF1

Valeur SpecOF1

Création d’OF dans la série MASER001 (le code de l’OF sera généré) (premier tableau = WfEntAct, second = WfEntVar) :

Action

EntTEn

EntCl1

EntCl2

CRE

LLA

&1

MASER001

EntTVa

EntVar

EntVa*

SLL

FabRefCondi

ParCarton

SLL

LanSerMet

DF

SLL

LanTypArt

R

SLL

GenRefArt

ART001

SLL

LanSerPreFinDat

10/06/2002

SLL

LanSerFabQteLan

5

SLL

FabUniProRef

UP1

VLL

SpecOF1

Valeur SpecOF1

Liens Articles-Fournisseurs

Suppression du Lien entre l’Article ART1 et le Fournisseur FOUR1 en mode Approvisionnement (tableau = WfEntAct) :

Action

EntTEn

EntCl1

EntCl2

EntCl3

SUP

LAF

FOUR1

ART1

A

Suppression du Lien entre le Vari-Article VA-ART1 et le Fournisseur FOUR1 en mode Approvisionnement (tableau = WfEntAct) (premier tableau = WfEntAct, second = WfEntVar) :

Action

EntTEn

EntCl1

EntCl2

EntCl3

SUP

LAF

FOUR1

VA-ART1

A

EntTVa

EntVar

EntVa*

SAF

GenRefTypeArt

VAD

Voir cas particulier des liens vari-articles/fournisseurs (chapitre Détail des clés pour chaque application GFG)

Série + OFs

A patir d’une liste « TMP » contenant une liste d’OF à lancer :

  • Création d’une série et du premier OF de la série, un seul EAE pour les deux opérations

  • Récupération du numéro de série,

  • Création des autres OF de la série.

POUR CHAQUE LST TMP :

VLO.NumOrdreOF = VLO.NumOrdreOF + CLO.1

VLO.GenRefArt = TMP.GenRefArt

VLO.DatBes = TMP.DateFab

VLO.QteFab = TMP.QteFab

VLO.Jour = CHAINE( VALEUR= VLO.PosLst , FORMAT= E/1 )

VLO.PropLct = CLO." &1"

SI VLO.NumOrdreOF = CLO.1

EFFACER Liste WfEntAct

EFFACER Liste WfEntVar

COMMENTAIRE : "*** Création SERIE ***"

CREATION Liste WfEntAct :

PRENDRE WfEntAct Action = CLO."CRE"

PRENDRE WfEntAct EntTEn = CLO."LAN"

PRENDRE WfEntAct ActCle = CLO."01"

PRENDRE WfEntAct EntCl1 = VLO.PropLct

COMMENTAIRE : "*** Priorisation du Traitement Série par Numéro d'Ordre ***"

PRENDRE WfEntAct ActNOr = CLO."01"

FIN_BLOC

CREATION Liste WfEntVar :

PRENDRE WfEntVar EntTEn = CLO."LAN"

PRENDRE WfEntVar ActCle = CLO."01"

PRENDRE WfEntVar EntTVa = CLO."SLA"

PRENDRE WfEntVar EntVar = CLO."GesUtiRef"

PRENDRE WfEntVar EntVaC = CLO."FAB"

FIN_BLOC

CREATION Liste WfEntVar :

PRENDRE WfEntVar EntTEn = CLO."LAN"

PRENDRE WfEntVar ActCle = CLO."01"

PRENDRE WfEntVar EntTVa = CLO."SLA"

PRENDRE WfEntVar EntVar = CLO."FabUniProRef"

PRENDRE WfEntVar EntVaC = CLO."USINE"

FIN_BLOC

CREATION Liste WfEntVar :

PRENDRE WfEntVar EntTEn = CLO."LAN"

PRENDRE WfEntVar ActCle = CLO."01"

PRENDRE WfEntVar EntTVa = CLO."SLA"

PRENDRE WfEntVar EntVar = CLO."LanSerMet"

PRENDRE WfEntVar EntVaC = CLO."DF"

FIN_BLOC

CREATION Liste WfEntVar :

PRENDRE WfEntVar EntTEn = CLO."LAN"

PRENDRE WfEntVar ActCle = CLO."01"

PRENDRE WfEntVar EntTVa = CLO."SLA"

PRENDRE WfEntVar EntVar = CLO."LanSerPreFinDat"

PRENDRE WfEntVar EntVaD = TMP.DateFab

FIN_BLOC

COMMENTAIRE : "*** Création du Premier OF ***"

CREATION Liste WfEntAct :

PRENDRE WfEntAct Action = CLO."CRE"

PRENDRE WfEntAct EntTEn = CLO."LLA"

PRENDRE WfEntAct EntCl1 = CLO."&1"

PRENDRE WfEntAct EntCl2 = VLO.PropLct

PRENDRE WfEntAct ActCle = CLO."02"

COMMENTAIRE : "*** Traitement en second ordre, grâce au numéro d'ordre ***"

PRENDRE WfEntAct ActNOr = CLO."02"

FIN_BLOC

CREATION Liste WfEntVar :

PRENDRE WfEntVar EntTEn = CLO."LLA"

PRENDRE WfEntVar ActCle = CLO."02"

PRENDRE WfEntVar EntTVa = CLO."SLL"

PRENDRE WfEntVar EntVar = CLO."LanSerMet"

PRENDRE WfEntVar EntVaC = CLO."DF"

FIN_BLOC

CREATION Liste WfEntVar :

PRENDRE WfEntVar EntTEn = CLO."LLA"

PRENDRE WfEntVar ActCle = CLO."02"

PRENDRE WfEntVar EntTVa = CLO."SLL"

PRENDRE WfEntVar EntVar = CLO."LanTypArt"

PRENDRE WfEntVar EntVaC = CLO."R"

FIN_BLOC

CREATION Liste WfEntVar :

PRENDRE WfEntVar EntTEn = CLO."LLA"

PRENDRE WfEntVar ActCle = CLO."02"

PRENDRE WfEntVar EntTVa = CLO."SLL"

PRENDRE WfEntVar EntVar = CLO."GenRefArt"

PRENDRE WfEntVar EntVaC = VLO.GenRefArt

FIN_BLOC

CREATION Liste WfEntVar :

PRENDRE WfEntVar EntTEn = CLO."LLA"

PRENDRE WfEntVar ActCle = CLO."02"

PRENDRE WfEntVar EntTVa = CLO."SLL"

PRENDRE WfEntVar EntVar = CLO."LanSerPreFinDat"

PRENDRE WfEntVar EntVaD = VLO.DatBes

FIN_BLOC

CREATION Liste WfEntVar :

PRENDRE WfEntVar EntTEn = CLO."LLA"

PRENDRE WfEntVar ActCle = CLO."02"

PRENDRE WfEntVar EntTVa = CLO."SLL"

PRENDRE WfEntVar EntVar = CLO."LanSerFabQteLan"

PRENDRE WfEntVar EntVaN = VLO.QteFab

FIN_BLOC

COMMENTAIRE : "*** Lancement du EAE : Série + Premier OF ***"

VLO.ResFctEAE = ENR-ACT-ENT( )

SI VLO.ResFctEAE <> CLO.""

RECH PREM LST WfEntAct :

TRACE= CLO."ERR SERIE" + " " + WfEntAct.ActErr

FIN_BLOC

FIN_BLOC

SINON

COMMENTAIRE : "*** Récupération du numéro d'OF ***"

RECH DER LST WfEntAct :

VLO.NumOF1 = WfEntAct.ActRes

FIN_BLOC

FIN_BLOC

EFFACER Liste WfEntAct

EFFACER Liste WfEntVar

FIN_BLOC

VLO.GenRefArt = TMP.GenRefArt

VLO.DatBes = TMP.DateFab

VLO.QteFab = TMP.QteFab

COMMENTAIRE : "*** Calcul Numéro OF / Numéro Série ***"

VLO.NumSerie = SS-CHAINE( CHAINE= VLO.NumOF1 , DEBUT= 1 , LONGUEUR= 9 )

COMMENTAIRE : "*** Ajout des OF supplémentaires ***"

CREATION Liste WfEntAct :

PRENDRE WfEntAct Action = CLO."CRE"

PRENDRE WfEntAct EntTEn = CLO."LLA"

PRENDRE WfEntAct EntCl1 = CLO."&1"

PRENDRE WfEntAct EntCl2 = VLO.NumSerie

PRENDRE WfEntAct ActCle = CLO."03"

PRENDRE WfEntAct ActNOr = CLO."03"

FIN_BLOC

CREATION Liste WfEntVar :

PRENDRE WfEntVar EntTEn = CLO."LLA"

PRENDRE WfEntVar ActCle = CLO."03"

PRENDRE WfEntVar EntTVa = CLO."SLL"

PRENDRE WfEntVar EntVar = CLO."LanSerMet"

PRENDRE WfEntVar EntVaC = CLO."DF"

FIN_BLOC

CREATION Liste WfEntVar :

PRENDRE WfEntVar EntTEn = CLO."LLA"

PRENDRE WfEntVar ActCle = CLO."03"

PRENDRE WfEntVar EntTVa = CLO."SLL"

PRENDRE WfEntVar EntVar = CLO."LanTypArt"

PRENDRE WfEntVar EntVaC = CLO."R"

FIN_BLOC

CREATION Liste WfEntVar :

PRENDRE WfEntVar EntTEn = CLO."LLA"

PRENDRE WfEntVar ActCle = CLO."03"

PRENDRE WfEntVar EntTVa = CLO."SLL"

PRENDRE WfEntVar EntVar = CLO."GenRefArt"

PRENDRE WfEntVar EntVaC = VLO.GenRefArt

FIN_BLOC

CREATION Liste WfEntVar :

PRENDRE WfEntVar EntTEn = CLO."LLA"

PRENDRE WfEntVar ActCle = CLO."03"

PRENDRE WfEntVar EntTVa = CLO."SLL"

PRENDRE WfEntVar EntVar = CLO."LanSerPreFinDat"

PRENDRE WfEntVar EntVaD = VLO.DatBes

FIN_BLOC

CREATION Liste WfEntVar :

PRENDRE WfEntVar EntTEn = CLO."LLA"

PRENDRE WfEntVar ActCle = CLO."03"

PRENDRE WfEntVar EntTVa = CLO."SLL"

PRENDRE WfEntVar EntVar = CLO."LanSerFabQteLan"

PRENDRE WfEntVar EntVaN = VLO.QteFab

FIN_BLOC

VLO.ResFctEAE = ENR-ACT-ENT( )

SI VLO.ResFctEAE EXISTE ET <> ""

RECH PREM LST WfEntAct :

TRACE= CLO."ERR OF" + " " + WfEntAct.ActErr

FIN_BLOC

FIN_BLOC

SINON

POUR CHAQUE LST WfEntAct :

VLO.Cpt = VLO.Cpt + CLO.1

VLO.NumOF = WfEntAct.ActRes

TRACE= CLO."Num OF" + " " + CHAINE( VALEUR= VLO.Cpt ) + " " + VLO.NumOF

FIN_BLOC

FIN_BLOC

EFFACER Liste WfEntAct

EFFACER Liste WfEntVar

FIN_BLOC

Commandes Commerciales

Création d’une entête de Commande Commerciale, suivi de la création d’une ligne dans cette commande :

COMMENTAIRE : "Création Entête"

CREATION Liste WfEntAct :

PRENDRE WfEntAct Action = CLO."CRE"

PRENDRE WfEntAct ActCle = CLO."ACT01"

PRENDRE WfEntAct EntTEn = CLO."CDC"

PRENDRE WfEntAct EntCl1 = CLO."&1"

FIN_BLOC

CREATION Liste WfEntVar :

PRENDRE WfEntVar ActCle = CLO."ACT01"

PRENDRE WfEntVar EntTVa = CLO."SDE"

PRENDRE WfEntVar EntVar = CLO."CdeTypCde"

PRENDRE WfEntVar EntVaC = CLO."C"

FIN_BLOC

CREATION Liste WfEntVar :

PRENDRE WfEntVar ActCle = CLO."ACT01"

PRENDRE WfEntVar EntTVa = CLO."SDE"

PRENDRE WfEntVar EntVar = CLO."GesUtiRef"

PRENDRE WfEntVar EntVaC = CLO."GESVENTE"

FIN_BLOC

CREATION Liste WfEntVar :

PRENDRE WfEntVar ActCle = CLO."ACT01"

PRENDRE WfEntVar EntTVa = CLO."SDE"

PRENDRE WfEntVar EntVar = CLO."CliComRef"

PRENDRE WfEntVar EntVaC = CLO."COM07"

FIN_BLOC

CREATION Liste WfEntVar :

PRENDRE WfEntVar ActCle = CLO."ACT01"

PRENDRE WfEntVar EntTVa = CLO."SDE"

PRENDRE WfEntVar EntVar = CLO."CliGenRef"

PRENDRE WfEntVar EntVaC = CLO."CLI00349"

FIN_BLOC

CREATION Liste WfEntVar :

PRENDRE WfEntVar ActCle = CLO."ACT01"

PRENDRE WfEntVar EntTVa = CLO."SDE"

PRENDRE WfEntVar EntVar = CLO."CliResRef"

PRENDRE WfEntVar EntVaC = CLO."0"

FIN_BLOC

VLO.Resultat = ENR-ACT-ENT( )

POUR CHAQUE LST WfEntAct :

COMMENTAIRE : "Si création Commande OK avec « &1 », WfEntAct.ActRes contient le numéro de Commande"

VLO.Cle1 = WfEntAct.ActRes

VLO.ErrE = WfEntAct.ActErr

FIN_BLOC

COMMENTAIRE : "Création Ligne si pas d’erreur"

SI VLO.ErrE = CLO.""

POUR CHAQUE LST WfEntAct :

EFFACER Liste WfEntAct

FIN_BLOC

POUR CHAQUE LST WfEntVar :

EFFACER Liste WfEntVar

FIN_BLOC

CREATION Liste WfEntAct :

PRENDRE WfEntAct Action = CLO."CRE"

PRENDRE WfEntAct ActCle = CLO."ACT02"

PRENDRE WfEntAct EntTEn = CLO."CDC-LIG"

PRENDRE WfEntAct EntCl1 = VLO.Cle1

PRENDRE WfEntAct EntCl2 = CLO." "

FIN_BLOC

CREATION Liste WfEntVar :

PRENDRE WfEntVar ActCle = CLO."ACT02"

PRENDRE WfEntVar EntTVa = CLO."SDL"

PRENDRE WfEntVar EntVar = CLO."CdeLigRefArt"

PRENDRE WfEntVar EntVaC = CLO."0010"

FIN_BLOC

CREATION Liste WfEntVar :

PRENDRE WfEntVar ActCle = CLO."ACT02"

PRENDRE WfEntVar EntTVa = CLO."SDL"

PRENDRE WfEntVar EntVar = CLO."CdeLigQteCom"

PRENDRE WfEntVar EntVaN = CLO.3

FIN_BLOC

CREATION Liste WfEntVar :

PRENDRE WfEntVar ActCle = CLO."ACT02"

PRENDRE WfEntVar EntTVa = CLO."SDL"

PRENDRE WfEntVar EntVar = CLO."CdeLigDateSai"

VLO.Demain = DATEJOUR( )

VLO.Demain = CAL-DATE( DATE= VLO.Demain , NB-JOURS= CLO.1 , SENS= + )

PRENDRE WfEntVar EntVaD = VLO.Demain

FIN_BLOC

CREATION Liste WfEntVar :

PRENDRE WfEntVar ActCle = CLO."ACT02"

PRENDRE WfEntVar EntTVa = CLO."SDL"

PRENDRE WfEntVar EntVar = CLO."CdeLigValSta"

PRENDRE WfEntVar EntVaL = CGL.OUI

FIN_BLOC

VLO.Resultat = ENR-ACT-ENT( )

POUR CHAQUE LST WfEntAct :

VLO.ErrL = WfEntAct.ActErr

FIN_BLOC

FIN_BLOC

COMMENTAIRE : "Suppression Commande si erreur"

SI VLO.ErrE EXISTE ET <> "" OU VLO.ErrL EXISTE ET <> ""

POUR CHAQUE LST WfEntAct :

EFFACER Liste WfEntAct

FIN_BLOC

POUR CHAQUE LST WfEntVar :

EFFACER Liste WfEntVar

FIN_BLOC

CREATION Liste WfEntAct :

PRENDRE WfEntAct Action = CLO."SUP"

PRENDRE WfEntAct EntTEn = CLO."CDC"

PRENDRE WfEntAct EntCl1 = VLO.Cle1

FIN_BLOC

VLO.Resultat = ENR-ACT-ENT( )

FIN_BLO

Remarques importantes :

  1. Lors de chaque exécution de requête (GCC, GCA, GCL), l’action de mise à jour sera « ECE » pour la création de commande et « LCE » pour la création de ligne.

  2. Il est possible de donner le numéro de ligne de commande à créer via l’alimentation de la variable « SDL.CdeNumLig » par liste « WfEntVar ».

  3. Il est possible de définir la configuration de la ligne de commande lors de la création d’une ligne.

Commandes et Lignes de Commandes Commerciales Archivées

Les actions « INI », « INI-SOC » et « INI-PRE » sont disponibles sur les entêtes et lignes de commandes et devis commerciaux archivés. Ces actions permettent d’initialiser WfEntVar qui contient la valeur de chaque variable de l’entité.

Initialisation de WfEntAct :

Nom

T

Désignation

O

Commentaire

Action

C

Action à exécuter

o

Doit contenir INI ou INI-SOC ou INI-PRE

ActCle

C

Clé de lien avec WfEntVar

Doit contenir la clé pour les liens avec WfEntVar

EntTEn

C

Entité

o

Doit contenir ARD_CDC pour les entêtes de commandes/devis ou ARD_CDC-LIG pour les lignes de commandes/devis

EntCl1

C

Clé1 entité

o

Doit contenir le numéro de commande/devis archivé

EntCl2

C

Clé2 entité

o

Doit contenir le numéro de ligne de commande/devis archivé pour l’entité ARD_CDC-LIG

EntPre

C

Présentation Entité

O

Doit contenir la référence de la présentation à utiliser dans le cas où l’action est INI-PRE

Il faut renseigner la base d’archivage de laquelle on souhaite extraire les données. Pour cela, initialiser WfEntVar tel que :

Nom

T

Désignation

O

Commentaire

ActCle

C

Clé de lien avec WfEntAct

Doit contenir la clé pour les liens avec WfEntAct

EntTEn (*)

C

Entité

Doit contenir ARD_CDC pour les entêtes de commandes/devis ou ARD_CDC-LIG pour les lignes de commandes/devis

EntCl1 (*)

C

Clé1 entité

Doit contenir le numéro de commande/devis archivé

EntCl2 (*)

C

Clé2 entité

Doit contenir le numéro de ligne de commande/devis archivé pour l’entité ARD_CDC-LIG

EntVar

C

Variable

o

Doit contenir Base_ARD

EntVaC

C

Valeur Variable

o

Doit contenir le nom de la base d’archivage dans laquelle on récupère les données.

(*) : EntTen, EntCl1 et EntCl2 doivent être utiliser pour faire le lien avec WfEntAct si ActCle n’est pas renseigné.

Pour l’action « INI-SOC » qui permet de récupérer des données dans une société Diapason autre que la société courante, il faut renseigner WfEntVar tel que :

Nom

T

Désignation

O

Commentaire

ActCle

C

Clé de lien avec WfEntAct

Doit contenir la clé pour les liens avec WfEntAct

EntTEn (*)

C

Entité

Doit contenir ARD_CDC pour les entêtes de commandes/devis ou ARD_CDC-LIG pour les lignes de commandes/devis

EntCl1 (*)

C

Clé1 entité

Doit contenir le numéro de commande/devis archivé

EntCl2 (*)

C

Clé2 entité

Doit contenir le numéro de ligne de commande/devis archivé pour l’entité ARD_CDC-LIG

EntVar

C

Variable

o

Doit contenir RefSocApp

EntVaC

C

Valeur Variable

o

Doit contenir la société Diapason dans laquelle on récupère les données.

Exemple : Duplication d’une commande archivée avec certaines de ses lignes

COMMENTAIRE : "Action INI sur Commandes Commerciales et Lignes de Commandes Commerciales archivées pour créer une nouvelle commande"

COMMENTAIRE : "SCR.CdeNumCom = Numéro de Commande archivée à récupérer"

COMMENTAIRE : "VCR.LisCdeNumLig = Liste des Lignes de Commande archivées à copier"

COMMENTAIRE : "SCR.RefBase contient la Base d'archivage à utiliser"

VLO.Act = CLO."INI"

VLO.Cle1 = SCR.CdeNumCom

VLO.LisLig = VCR.LisCdeNumLig

VLO.EntTEn = CLO."ARD_CDC"

VLO.Base = SCR.RefBase

COMMENTAIRE : "Récupération de l'entête de commande"

CREATION Liste WfEntAct :

PRENDRE WfEntAct Action = VLO.Act

PRENDRE WfEntAct ActCle = VLO.Cle1

PRENDRE WfEntAct EntTEn = VLO.EntTEn

PRENDRE WfEntAct EntCl1 = VLO.Cle1

PRENDRE WfEntAct ActErr = CLO.""

PRENDRE WfEntAct ActErr = CLO.""

PRENDRE WfEntAct EntCom = CLO.""

FIN_BLOC

CREATION Liste WfEntVar :

PRENDRE WfEntVar EntTEn = VLO.EntTEn

PRENDRE WfEntVar EntCl1 = VLO.Cle1

PRENDRE WfEntVar ActCle = VLO.Cle1

PRENDRE WfEntVar EntVar = CLO."Base_ARD"

PRENDRE WfEntVar EntVaC = VLO.Base

FIN_BLOC

VLO.Resultat = ENR-ACT-ENT( )

VLO.CreCde = CGL.OUI

RECH PREM LST WfEntAct :

SI WfEntAct.ActErr <> CLO.""

VLO.CreCde = CGL.NON

FIN_BLOC

CREATION Liste Res :

PRENDRE Res EntTEn = WfEntAct.EntTEn

PRENDRE Res Cde = WfEntAct.EntCl1

PRENDRE Res Act = WfEntAct.Action

PRENDRE Res Err = WfEntAct.ActErr

PRENDRE Res Res = WfEntAct.ActRes

FIN_BLOC

FIN_BLOC

SI VLO.CreCde VRAI

COMMENTAIRE : "Création Entête de Commande"

RECH PREM LST WfEntAct :

PRENDRE WfEntAct Action = CLO."CRE"

PRENDRE WfEntAct EntTEn = CLO."CDC"

PRENDRE WfEntAct EntCl1 = CLO."&1"

PRENDRE WfEntAct ActRes = CLO.""

PRENDRE WfEntAct ActErr = CLO.""

PRENDRE WfEntAct EntCom = CLO.""

FIN_BLOC

POUR CHAQUE LST WfEntVar :

PRENDRE WfEntVar EntTEn = CLO."CDC"

PRENDRE WfEntVar EntCl1 = CLO."&1"

FIN_BLOC

VLO.Resultat = ENR-ACT-ENT( )

VLO.NouCde = CLO.""

RECH PREM LST WfEntAct :

SI WfEntAct.ActErr = CLO.""

VLO.NouCde = WfEntAct.ActRes

FIN_BLOC

CREATION Liste Res :

PRENDRE Res EntTEn = WfEntAct.EntTEn

PRENDRE Res Cde = WfEntAct.EntCl1

PRENDRE Res Act = WfEntAct.Action

PRENDRE Res Err = WfEntAct.ActErr

PRENDRE Res Res = WfEntAct.ActRes

FIN_BLOC

FIN_BLOC

SI VLO.NouCde EXISTE ET <> ""

COMMENTAIRE : "Récupération des lignes de commandes archivées"

VLO.NbLig = NB-MOT( SEPARATEUR= CLO."," , CHAINE= VLO.LisLig )

BOUCLE VLO.Boucle DE CLO.1 A VLO.NbLig :

VLO.Cle2 = MOT( SEPARATEUR= CLO."," , CHAINE= VLO.LisLig , NUMERO= VLO.Boucle )

EFFACER Liste WfEntAct

EFFACER Liste WfEntVar

COMMENTAIRE : "Récupération de la ligne de commande"

CREATION Liste WfEntAct :

PRENDRE WfEntAct Action = VLO.Act

PRENDRE WfEntAct ActCle = VLO.Cle1

PRENDRE WfEntAct EntTEn = CLO."ARD_CDC-LIG"

PRENDRE WfEntAct EntCl1 = VLO.Cle1

PRENDRE WfEntAct EntCl2 = VLO.Cle2

PRENDRE WfEntAct ActErr = CLO.""

PRENDRE WfEntAct ActErr = CLO.""

PRENDRE WfEntAct EntCom = CLO.""

FIN_BLOC

CREATION Liste WfEntVar :

PRENDRE WfEntVar EntTEn = CLO."ARD_CDC-LIG"

PRENDRE WfEntVar EntCl1 = VLO.Cle1

PRENDRE WfEntVar EntCl2 = VLO.Cle2

PRENDRE WfEntVar ActCle = VLO.Cle1

PRENDRE WfEntVar EntVar = CLO."Base_ARD"

PRENDRE WfEntVar EntVaC = VLO.Base

FIN_BLOC

VLO.Resultat = ENR-ACT-ENT( )

VLO.CreLig = CGL.OUI

RECH PREM LST WfEntAct :

SI WfEntAct.ActErr <> CLO.""

VLO.CreLig = CGL.NON

FIN_BLOC

CREATION Liste Res :

PRENDRE Res EntTEn = WfEntAct.EntTEn

PRENDRE Res Cde = WfEntAct.EntCl1

PRENDRE Res Lig = WfEntAct.EntCl2

PRENDRE Res Act = WfEntAct.Action

PRENDRE Res Err = WfEntAct.ActErr

PRENDRE Res Res = WfEntAct.ActRes

FIN_BLOC

FIN_BLOC

SI VLO.CreLig VRAI

COMMENTAIRE : "Création Ligne de commande"

RECH PREM LST WfEntAct :

PRENDRE WfEntAct Action = CLO."CRE"

PRENDRE WfEntAct EntTEn = CLO."CDC-LIG"

PRENDRE WfEntAct EntCl1 = VLO.NouCde

PRENDRE WfEntAct EntCl2 = CLO."&1"

PRENDRE WfEntAct ActRes = CLO.""

PRENDRE WfEntAct ActErr = CLO.""

PRENDRE WfEntAct EntCom = CLO.""

FIN_BLOC

POUR CHAQUE LST WfEntVar :

PRENDRE WfEntVar EntTEn = CLO."CDC-LIG"

PRENDRE WfEntVar EntCl1 = VLO.NouCde

PRENDRE WfEntVar EntCl2 = CLO."&1"

FIN_BLOC

VLO.Resultat = ENR-ACT-ENT( )

RECH PREM LST WfEntAct :

CREATION Liste Res :

PRENDRE Res EntTEn = WfEntAct.EntTEn

PRENDRE Res Cde = WfEntAct.EntCl1

PRENDRE Res Lig = WfEntAct.EntCl2

PRENDRE Res Act = WfEntAct.Action

PRENDRE Res Err = WfEntAct.ActErr

PRENDRE Res Res = WfEntAct.ActRes

FIN_BLOC

FIN_BLOC

FIN_BLOC

FIN_BLOC

FIN_BLOC

FIN_BLOC

Commandes fournisseur

La requête suivante indique les variables entête de commande fournisseur à mettre à jour pour valider l’ARC d’une commande fournisseur. Les champs AppGesEnrARC et AppCdeARCSta doivent prendre obligatoirement les valeurs respectives Non et Oui, comme indiqué dans la requête ci-dessous.

Commandes Commerciales Archivées

Il est possible d’utiliser la fonction « ENR-ACT-ENT » sur les commandes commerciales et les devis archivés. Seules les actions « INI », « INI-SOC » et « INI-PRE » sont disponibles sur les entêtes et lignes de commandes et devis commerciaux archivés. Ces actions permettent d’initialiser WfEntVar qui contient la valeur de chaque variable de l’entité.

Pour cela, initialiser WfEntAct tel que :

Nom

T

Désignation

O

Commentaire

Action

C

Action à exécuter

o

Doit contenir INI ou INI-SOC ou INI-PRE

ActCle

C

Clé de lien avec WfEntVar

Doit contenir la clé pour les liens avec WfEntVar

EntTEn

C

Entité

o

Doit contenir ARD_CDC pour les entêtes de commandes/devis ou ARD_CDC-LIG pour les lignes de commandes/devis

EntCl1

C

Clé1 entité

o

Doit contenir le numéro de commande/devis archivé

EntCl2

C

Clé2 entité

o

Doit contenir le numéro de ligne de commande/devis archivé pour l’entité ARD_CDC-LIG

EntPre

C

Présentation Entité

O

Doit contenir la référence de la présentation à utiliser dans le cas où l’action est INI-PRE

Il faut renseigner la base d’archivage dans laquelle on souhaite extraire les données. Pour cela, initialiser WfEntVar tel que :

Nom

T

Désignation

O

Commentaire

ActCle

C

Clé de lien avec WfEntAct

Doit contenir la clé pour les liens avec WfEntAct

EntTEn (*)

C

Entité

Doit contenir ARD_CDC pour les entêtes de commandes/devis ou ARD_CDC-LIG pour les lignes de commandes/devis

EntCl1 (*)

C

Clé1 entité

Doit contenir le numéro de commande/devis archivé

EntCl2 (*)

C

Clé2 entité

Doit contenir le numéro de ligne de commande/devis archivé pour l’entité ARD_CDC-LIG

EntVar

C

Variable

o

Doit contenir Base_ARD

EntVaC

C

Valeur Variable

o

Doit contenir le nom de la base d’archivage dans laquelle on récupère les données.

(*) : EntTen, EntCl1 et EntCl2 doivent être utiliser pour faire le lien avec WfEntAct si ActCle n’est pas renseigné.

Pour l’action « INI-SOC » qui permet de récupérer des données dans une société Diapason autre que la société courante, il faut renseigner WfEntVar tel que :

Nom

T

Désignation

O

Commentaire

ActCle

C

Clé de lien avec WfEntAct

Doit contenir la clé pour les liens avec WfEntAct

EntTEn (*)

C

Entité

Doit contenir ARD_CDC pour les entêtes de commandes/devis ou ARD_CDC-LIG pour les lignes de commandes/devis

EntCl1 (*)

C

Clé1 entité

Doit contenir le numéro de commande/devis archivé

EntCl2 (*)

C

Clé2 entité

Doit contenir le numéro de ligne de commande/devis archivé pour l’entité ARD_CDC-LIG

EntVar

C

Variable

o

Doit contenir RefSocApp

EntVaC

C

Valeur Variable

o

Doit contenir la société Diapason dans laquelle on récupère les données.

Exemple : Duplication d’une commande archivée avec certaines de ses lignes

COMMENTAIRE : "Action INI sur Commandes Commerciales et Lignes de Commandes Commerciales archivées pour créer une nouvelle commande"

COMMENTAIRE : "SCR.CdeNumCom = Numéro de Commande archivée à récupérer"

COMMENTAIRE : "VCR.LisCdeNumLig = Liste des Lignes de Commande archivées à copier"

COMMENTAIRE : "SCR.RefBase contient la Base d'archivage à utiliser"

VLO.Act = CLO."INI"

VLO.Cle1 = SCR.CdeNumCom

VLO.LisLig = VCR.LisCdeNumLig

VLO.EntTEn = CLO."ARD_CDC"

VLO.Base = SCR.RefBase

COMMENTAIRE : "Récupération de l'entête de commande"

CREATION Liste WfEntAct :

PRENDRE WfEntAct Action = VLO.Act

PRENDRE WfEntAct ActCle = VLO.Cle1

PRENDRE WfEntAct EntTEn = VLO.EntTEn

PRENDRE WfEntAct EntCl1 = VLO.Cle1

PRENDRE WfEntAct ActErr = CLO.""

PRENDRE WfEntAct ActErr = CLO.""

PRENDRE WfEntAct EntCom = CLO.""

FIN_BLOC

CREATION Liste WfEntVar :

PRENDRE WfEntVar EntTEn = VLO.EntTEn

PRENDRE WfEntVar EntCl1 = VLO.Cle1

PRENDRE WfEntVar ActCle = VLO.Cle1

PRENDRE WfEntVar EntVar = CLO."Base_ARD"

PRENDRE WfEntVar EntVaC = VLO.Base

FIN_BLOC

VLO.Resultat = ENR-ACT-ENT( )

VLO.CreCde = CGL.OUI

RECH PREM LST WfEntAct :

SI WfEntAct.ActErr <> CLO.""

VLO.CreCde = CGL.NON

FIN_BLOC

CREATION Liste Res :

PRENDRE Res EntTEn = WfEntAct.EntTEn

PRENDRE Res Cde = WfEntAct.EntCl1

PRENDRE Res Act = WfEntAct.Action

PRENDRE Res Err = WfEntAct.ActErr

PRENDRE Res = WfEntAct.ActRes

FIN_BLOC

FIN_BLOC

SI VLO.CreCde VRAI

COMMENTAIRE : "Création Entête de Commande"

RECH PREM LST WfEntAct :

PRENDRE WfEntAct Action = CLO."CRE"

PRENDRE WfEntAct EntTEn = CLO."CDC"

PRENDRE WfEntAct EntCl1 = CLO."&1"

PRENDRE WfEntAct ActRes = CLO.""

PRENDRE WfEntAct ActErr = CLO.""

PRENDRE WfEntAct EntCom = CLO.""

FIN_BLOC

POUR CHAQUE LST WfEntVar :

PRENDRE WfEntVar EntTEn = CLO."CDC"

PRENDRE WfEntVar EntCl1 = CLO."&1"

FIN_BLOC

VLO.Resultat = ENR-ACT-ENT( )

VLO.NouCde = CLO.""

RECH PREM LST WfEntAct :

SI WfEntAct.ActErr = CLO.""

VLO.NouCde = WfEntAct.ActRes

FIN_BLOC

CREATION Liste Res :

PRENDRE Res EntTEn = WfEntAct.EntTEn

PRENDRE Res Cde = WfEntAct.EntCl1

PRENDRE Res Act = WfEntAct.Action

PRENDRE Res Err = WfEntAct.ActErr

PRENDRE Res = WfEntAct.ActRes

FIN_BLOC

FIN_BLOC

SI VLO.NouCde EXISTE ET <> ""

COMMENTAIRE : "Récupération des lignes de commandes archivées"

VLO.NbLig = NB-MOT( SEPARATEUR= CLO."," , CHAINE= VLO.LisLig )

BOUCLE VLO.Boucle DE CLO.1 A VLO.NbLig :

VLO.Cle2 = MOT( SEPARATEUR= CLO."," , CHAINE= VLO.LisLig , NUMERO= VLO.Boucle )

EFFACER Liste WfEntAct

EFFACER Liste WfEntVar

COMMENTAIRE : "Récupération de la ligne de commande"

CREATION Liste WfEntAct :

PRENDRE WfEntAct Action = VLO.Act

PRENDRE WfEntAct ActCle = VLO.Cle1

PRENDRE WfEntAct EntTEn = CLO."ARD_CDC-LIG"

PRENDRE WfEntAct EntCl1 = VLO.Cle1

PRENDRE WfEntAct EntCl2 = VLO.Cle2

PRENDRE WfEntAct ActErr = CLO.""

PRENDRE WfEntAct ActErr = CLO.""

PRENDRE WfEntAct EntCom = CLO.""

FIN_BLOC

CREATION Liste WfEntVar :

PRENDRE WfEntVar EntTEn = CLO."ARD_CDC-LIG"

PRENDRE WfEntVar EntCl1 = VLO.Cle1

PRENDRE WfEntVar EntCl2 = VLO.Cle2

PRENDRE WfEntVar ActCle = VLO.Cle1

PRENDRE WfEntVar EntVar = CLO."Base_ARD"

PRENDRE WfEntVar EntVaC = VLO.Base

FIN_BLOC

VLO.Resultat = ENR-ACT-ENT( )

VLO.CreLig = CGL.OUI

RECH PREM LST WfEntAct :

SI WfEntAct.ActErr <> CLO.""

VLO.CreLig = CGL.NON

FIN_BLOC

CREATION Liste Res :

PRENDRE Res EntTEn = WfEntAct.EntTEn

PRENDRE Res Cde = WfEntAct.EntCl1

PRENDRE Res Lig = WfEntAct.EntCl2

PRENDRE Res Act = WfEntAct.Action

PRENDRE Res Err = WfEntAct.ActErr

PRENDRE Res = WfEntAct.ActRes

FIN_BLOC

FIN_BLOC

SI VLO.CreLig VRAI

COMMENTAIRE : "Création Ligne de commande"

RECH PREM LST WfEntAct :

PRENDRE WfEntAct Action = CLO."CRE"

PRENDRE WfEntAct EntTEn = CLO."CDC-LIG"

PRENDRE WfEntAct EntCl1 = VLO.NouCde

PRENDRE WfEntAct EntCl2 = CLO."&1"

PRENDRE WfEntAct ActRes = CLO.""

PRENDRE WfEntAct ActErr = CLO.""

PRENDRE WfEntAct EntCom = CLO.""

FIN_BLOC

POUR CHAQUE LST WfEntVar :

PRENDRE WfEntVar EntTEn = CLO."CDC-LIG"

PRENDRE WfEntVar EntCl1 = VLO.NouCde

PRENDRE WfEntVar EntCl2 = CLO."&1"

FIN_BLOC

VLO.Resultat = ENR-ACT-ENT( )

RECH PREM LST WfEntAct :

CREATION Liste Res :

PRENDRE Res EntTEn = WfEntAct.EntTEn

PRENDRE Res Cde = WfEntAct.EntCl1

PRENDRE Res Lig = WfEntAct.EntCl2

PRENDRE Res Act = WfEntAct.Action

PRENDRE Res Err = WfEntAct.ActErr

PRENDRE Res = WfEntAct.ActRes

FIN_BLOC

FIN_BLOC

FIN_BLOC

FIN_BLOC

FIN_BLOC

FIN_BLOC

Actions Spécifiques sur Entités

Ce sont des actions spécifiques disponibles sur les entités Diapason et pouvant être utilisées par la fonction ENR-ACT-ENT.

La référence de l’action interne doit être renseignée dans WfEntAct.Action, l’entité sur laquelle porte l’action doit être renseignée dans WfEntAct.EntTEn et les clés de l’entité doivent être renseignées dans WfEntAct.EntCl1-3.

Remarque : La liste de ces actions spécifiques est présentée sur la branche « Actions sur Entités » de l’explorateur applicatif DIALOG.

Exemple : Pour valider une facture client avec édition de la facture, renseigner WfEntVar comme suit :

Action

EntTEn

EntCl1

VAL-FAC-EDT

FACE

Numéro_Facture

Voir « Actions Internes ».


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.