| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- { SUPER/funktionen.i }
- DEF VAR cString AS CHAR NO-UNDO.
- DEF TEMP-TABLE tArtst LIKE Artst
- FIELD cBez1 AS CHAR
- FIELD cBez2 AS CHAR
- FIELD cKGeb AS CHAR
- FIELD cVGeb AS CHAR
- FIELD cGGeb AS CHAR
- FIELD cWgr AS CHAR
- FIELD cPgr AS CHAR
- FIELD cAgr AS CHAR
- FIELD cRabGrp AS CHAR
- FIELD cBonGrp AS CHAR
- FIELD cFarbe AS CHAR
- FIELD cTraube AS CHAR
- FIELD cRegion AS CHAR
- FIELD cLand AS CHAR
- FIELD cHerst AS CHAR
- FIELD cStyle AS CHAR
- FIELD lBez2 AS LOG
- FIELD iKnr AS INT
- FIELD cLief AS CHAR
- FIELD cSeineNr AS CHAR
- FIELD cStrKGeb AS CHAR
- FIELD cStrVGeb AS CHAR
- FIELD cStrGGeb AS CHAR
- .
-
- cString = SUBSTITUTE('&1&4&2&4&3', 'wari', 'saab009', '1000', CHR(01) ).
- RUN ANMELDUNG ( cString ).
-
- FOR EACH Artst NO-LOCK
- WHERE Artst.Firma = '1000'
- AND Artst.Aktiv = TRUE:
- CREATE tArtst.
- BUFFER-COPY Artst TO tArtst.
-
- FIND FIRST ArtBez OF Artst NO-LOCK.
- ASSIGN tArtst.cBez1 = ArtBez.Bez1
- tArtst.cBez2 = Artbez.Bez2
- tArtst.lBez2 = Artbez.Bez2_Druck.
- tArtst.cKGeb = DYNAMIC-FUNCTION('getKGebindeKBez':U, tArtst.KGeb_Cd ) NO-ERROR.
- tArtst.cVGeb = DYNAMIC-FUNCTION('getVGebindeKBez':U, tArtst.VGeb_Cd ) NO-ERROR.
- tArtst.cGGeb = DYNAMIC-FUNCTION('getGGebindeKBez':U, tArtst.GGeb_Cd ) NO-ERROR.
- tArtst.cWgr = DYNAMIC-FUNCTION('getWarenGrp':U , tArtst.Wg_Grp) NO-ERROR.
- tArtst.cPgr = DYNAMIC-FUNCTION('getProdukteGrp':U, tArtst.Wg_Grp, tArtst.Prod_Grp) NO-ERROR.
- tArtst.cAgr = DYNAMIC-FUNCTION('getArtikelGrp':U , tArtst.Wg_Grp, tArtst.Prod_Grp, tArtst.Art_Grp) NO-ERROR.
- tArtst.cLand = DYNAMIC-FUNCTION('getLand':U , tArtst.Herk_Lkz ) NO-ERROR.
-
- RUN FIND_RABATTGRP ( tArtst.Rab_Grp, OUTPUT cString ).
- tArtst.cRabGrp = ENTRY(2, cString, CHR(01)).
-
- RUN FIND_BONUSGRUPPE ( tArtst.Bonus_Grp, OUTPUT cString ).
- tArtst.cBonGrp = ENTRY(2, cString, CHR(01)).
-
- RUN FIND_FARBE ( tArtst.Farbe, OUTPUT cString ).
- tArtst.cFarbe = ENTRY(2, cString, CHR(01)).
-
- RUN FIND_TRAUBE ( tArtst.Traub_Grp, OUTPUT cString ).
- tArtst.cTraube = ENTRY(2, cString, CHR(01)).
-
- RUN FIND_REGION ( tArtst.Reg_Grp, OUTPUT cString ).
- tArtst.cRegion = ENTRY(2, cString, CHR(01)).
-
- RUN FIND_REGION ( tArtst.Reg_Grp, OUTPUT cString ).
- tArtst.cRegion = ENTRY(2, cString, CHR(01)).
-
- RUN FIND_HERSTELLER ( tArtst.Herst, OUTPUT cString ).
- tArtst.cRegion = ENTRY(2, cString, CHR(01)).
-
- RUN FIND_STYLE ( tArtst.Style, OUTPUT cString ).
- tArtst.cStyle = ENTRY(2, cString, CHR(01)).
-
- FIND FIRST ArtLief NO-LOCK
- WHERE ArtLief.Firma = tArtst.Firma
- AND ArtLief.Artnr = tArtst.Artnr
- AND ArtLief.Inhalt = tArtst.Inhalt
- AND ArtLief.Jahr = tArtst.Jahr
- AND ArtLief.Haupt = TRUE NO-ERROR.
- IF NOT AVAILABLE ArtLief THEN DO:
- FIND FIRST ArtLief NO-LOCK
- WHERE ArtLief.Firma = tArtst.Firma
- AND ArtLief.Artnr = tArtst.Artnr
- AND ArtLief.Inhalt = tArtst.Inhalt
- AND ArtLief.Jahr = tArtst.Jahr NO-ERROR.
- END.
- IF AVAILABLE ArtLief THEN DO:
- FIND Adresse NO-LOCK
- WHERE Adresse.Firma = '1000'
- AND Adresse.Knr = ArtLief.Knr NO-ERROR.
- ASSIGN tArtst.iKnr = ArtLief.Knr
- tArtst.cLief = (IF AVAILABLE Adresse THEN Adresse.Anzeig_Br ELSE '??????????')
- tArtst.cSeineNr = ArtLief.S_Artnr
- tArtst.cStrKGeb = ArtLief.Strichcode_KGeb
- tArtst.cStrVGeb = ArtLief.Strichcode_VGeb
- tArtst.cStrGGeb = ArtLief.Strichcode_GGeb.
- END.
- END.
- OUTPUT TO 'C:\Entwicklung\Temp\Artikeldetail.csv' NO-MAP NO-CONVERT.
- PUT CONTROL 'Artnr;Inhalt;Jahr;Suchbe;Bez1;Bez2;KGeb;KGebinde;VGeb;VGebinde;GGeb;GGebinde;Wg;Warengruppe;ProdGrp;Produktegruppe;ArtGrp;Artikelgruppe;'
- 'Mwst;Status;Netto;Lager;Preisliste;Alk-%;Gewicht;Strichcode;Listen_EP;EP-Intern;eShop;Bez-2?;Bestand;'
- 'RabGrp;Rabattgruppe;BonusGrp;Bonusgruppe;Farbe;Farbe;TraubGrp;Traubensorte;RegGrp;Region;Herk;Herkunftsland;Herest;Hersteller;Style;Style;'
- 'KNr;Lieferant;Seine Artnr;StrCode KGeb;StrCode VGeb;StrCode GGeb' CHR(10).
- FOR EACH tArtst:
- EXPORT DELIMITER ';'
- tArtst.Artnr
- tArtst.Inhalt
- tArtst.Jahr
- tArtst.Suchbe
- tArtst.cBez1
- tArtst.cBez2
- tArtst.KGeb_Cd
- tArtst.cKGeb
- tArtst.VGeb_Cd
- tArtst.cVGeb
- tArtst.GGeb_Cd
- tArtst.cGGeb
- tArtst.Wg_Grp
- tArtst.cWgr
- tArtst.Prod_Grp
- tArtst.cPgr
- tArtst.Art_Grp
- tARtst.cAgr
- tArtst.Mwst
- tArtst.Ausverk
- tArtst.Netto
- tArtst.Lager
- tArtst.Preisliste
- tArtst.Alk_Gehalt
- tARtst.Gewicht
- tArtst.Strichcode
- tArtst.Listen_EP
- tArtst.EP-Intern
- tARtst.eShop
- tArtst.lBez2
- tArtst.Bestand
- tArtst.Rab_Grp
- tArtst.cRabGrp
- tArtst.Bonus_Grp
- tArtst.cBonGrp
- tArtst.Farbe
- tArtst.cFarbe
- tArtst.Traub_Grp
- tArtst.cTraube
- tArtst.Reg_Grp
- tArtst.cRegion
- tArtst.Herk_Lkz
- tArtst.cLand
- tArtst.Herst
- tArtst.cHerst
- tArtst.Style
- tArtst.cStyle
- tArtst.iKnr
- tArtst.cLief
- tArtst.cSeineNr
- tArtst.cStrKGeb
- tArtst.cStrVGeb
- tArtst.cStrGGeb
- .
- END.
- OUTPUT CLOSE.
|