&ANALYZE-SUSPEND _VERSION-NUMBER AB_v10r12 GUI ADM2 &ANALYZE-RESUME /* Connected Databases anadat PROGRESS */ &Scoped-define WINDOW-NAME CURRENT-WINDOW {adecomm/appserv.i} &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS dTables /*------------------------------------------------------------------------ File: Description: from DATA.W - Template For SmartData objects in the ADM Input Parameters: Output Parameters: Modified: February 24, 1999 ------------------------------------------------------------------------*/ /* This .W file was created with the Progress AppBuilder. */ /*----------------------------------------------------------------------*/ /* Create an unnamed pool to store all the widgets created by this procedure. This is a good default which assures that this procedure's triggers and internal procedures will execute in this procedure's storage, and that proper cleanup will occur on deletion of the procedure. */ CREATE WIDGET-POOL. /* *************************** Definitions ************************** */ /* Parameters Definitions --- */ /* Local Variable Definitions --- */ &SCOPED-DEFINE Tabelle Artst &SCOPED-DEFINE TabWhere /* USE-INDEX Benutzer-k1 ~ WHERE {&Tabelle}.Benutzer = tRowObject.Benutzer */ { incl/datdefinition.i } /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK /* ******************** Preprocessor Definitions ******************** */ &Global-define DATA-LOGIC-PROCEDURE .p &Scoped-define PROCEDURE-TYPE SmartDataObject &Scoped-define DB-AWARE yes &Scoped-define ADM-SUPPORTED-LINKS Data-Source,Data-Target,Navigation-Target,Update-Target,Commit-Target,Filter-Target /* Db-Required definitions. */ &IF DEFINED(DB-REQUIRED) = 0 &THEN &GLOBAL-DEFINE DB-REQUIRED TRUE &ENDIF &GLOBAL-DEFINE DB-REQUIRED-START &IF {&DB-REQUIRED} &THEN &GLOBAL-DEFINE DB-REQUIRED-END &ENDIF &Scoped-define QUERY-NAME Query-Main /* Internal Tables (found by Frame, Query & Browse Queries) */ &Scoped-define INTERNAL-TABLES Artst /* Definitions for QUERY Query-Main */ &Scoped-Define ENABLED-FIELDS Aktiv Alk_Gehalt Artnr Art_Grp Ausverk Bestand Bestellt Mind_Bestand Bez~ Bonus_Grp DEP EAV_Code ErfDat ErfSB EShop Farbe Firma FremdNr Gewicht~ GGeb_Cd Herk_Lkz Herst Inhalt Jahr KGeb_Cd Konto Lager Leih_Art LEP~ Letzt_Ausg Letzt_Eing Listen_EP MutDat Min_Marge MutSB MutFlag MWSt Netto~ Preisliste Prod_Grp Rab_Grp Reg_Grp Reserviert Res_c1 Res_c2 Res_i1 Sk_Ber~ Soll_Bestand Strichcode Style Suchbe Traub_Grp VGeb_Cd Wg_Grp WHK_Code~ KGebinde VGebinde GGebinde ArtikelBild EP-Intern EShop_2 Tagesbestand~ lLotnr lVerfall Mind_MHD &Scoped-define ENABLED-FIELDS-IN-Artst Aktiv Alk_Gehalt Artnr Art_Grp ~ Ausverk Bestand Bestellt Mind_Bestand Bez Bonus_Grp DEP EAV_Code ErfDat ~ ErfSB EShop Farbe Firma FremdNr Gewicht GGeb_Cd Herk_Lkz Herst Inhalt Jahr ~ KGeb_Cd Konto Lager Leih_Art LEP Letzt_Ausg Letzt_Eing Listen_EP MutDat ~ Min_Marge MutSB MutFlag MWSt Netto Preisliste Prod_Grp Rab_Grp Reg_Grp ~ Reserviert Res_c1 Res_c2 Res_i1 Sk_Ber Soll_Bestand Strichcode Style Suchbe ~ Traub_Grp VGeb_Cd Wg_Grp WHK_Code ArtikelBild EP-Intern EShop_2 lLotnr ~ lVerfall Mind_MHD &Scoped-Define DATA-FIELDS Aktiv Alk_Gehalt Artnr Art_Grp Ausverk Bestand Bestellt Mind_Bestand Bez~ Bonus_Grp DEP EAV_Code ErfDat ErfSB EShop Farbe Firma FremdNr Gewicht~ GGeb_Cd Herk_Lkz Herst Inhalt Jahr KGeb_Cd Konto Lager Leih_Art LEP~ Letzt_Ausg Letzt_Eing Listen_EP MutDat Min_Marge MutSB MutFlag MWSt Netto~ Preisliste Prod_Grp Rab_Grp Reg_Grp Reserviert Res_c1 Res_c2 Res_i1 Sk_Ber~ Soll_Bestand Strichcode Style Suchbe Traub_Grp VGeb_Cd Wg_Grp WHK_Code~ KGebinde VGebinde GGebinde ArtikelBild EP-Intern EShop_2 Tagesbestand~ lLotnr lVerfall Mind_MHD &Scoped-define DATA-FIELDS-IN-Artst Aktiv Alk_Gehalt Artnr Art_Grp Ausverk ~ Bestand Bestellt Mind_Bestand Bez Bonus_Grp DEP EAV_Code ErfDat ErfSB EShop ~ Farbe Firma FremdNr Gewicht GGeb_Cd Herk_Lkz Herst Inhalt Jahr KGeb_Cd ~ Konto Lager Leih_Art LEP Letzt_Ausg Letzt_Eing Listen_EP MutDat Min_Marge ~ MutSB MutFlag MWSt Netto Preisliste Prod_Grp Rab_Grp Reg_Grp Reserviert ~ Res_c1 Res_c2 Res_i1 Sk_Ber Soll_Bestand Strichcode Style Suchbe Traub_Grp ~ VGeb_Cd Wg_Grp WHK_Code ArtikelBild EP-Intern EShop_2 lLotnr lVerfall ~ Mind_MHD &Scoped-Define MANDATORY-FIELDS Firma &Scoped-Define APPLICATION-SERVICE &Scoped-Define ASSIGN-LIST rowObject.ErfDat = Artst.Edat rowObject.ErfSB = Artst.Esbkb~ rowObject.MutDat = Artst.Mdat rowObject.MutSB = Artst.Msbkb &Scoped-Define DATA-FIELD-DEFS "d-artst.i" &Scoped-Define DATA-TABLE-NO-UNDO NO-UNDO &Scoped-define QUERY-STRING-Query-Main FOR EACH Artst NO-LOCK INDEXED-REPOSITION {&DB-REQUIRED-START} &Scoped-define OPEN-QUERY-Query-Main OPEN QUERY Query-Main FOR EACH Artst NO-LOCK INDEXED-REPOSITION. {&DB-REQUIRED-END} &Scoped-define TABLES-IN-QUERY-Query-Main Artst &Scoped-define FIRST-TABLE-IN-QUERY-Query-Main Artst /* Custom List Definitions */ /* List-1,List-2,List-3,List-4,List-5,List-6 */ /* _UIB-PREPROCESSOR-BLOCK-END */ &ANALYZE-RESUME /* ************************ Function Prototypes ********************** */ {&DB-REQUIRED-START} &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD getCurrentRecid dTables _DB-REQUIRED FUNCTION getCurrentRecid RETURNS RECID ( /* parameter-definitions */ ) FORWARD. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME {&DB-REQUIRED-END} {&DB-REQUIRED-START} &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD getQueryBuffer dTables _DB-REQUIRED FUNCTION getQueryBuffer RETURNS HANDLE ( /* parameter-definitions */ ) FORWARD. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME {&DB-REQUIRED-END} {&DB-REQUIRED-START} &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD getTagesBestand dTables _DB-REQUIRED FUNCTION getTagesBestand RETURNS INTEGER ( /* parameter-definitions */ ) FORWARD. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME {&DB-REQUIRED-END} {&DB-REQUIRED-START} &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD openQuery dTables _DB-REQUIRED FUNCTION openQuery RETURNS LOGICAL ( /* parameter-definitions */ ) FORWARD. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME {&DB-REQUIRED-END} {&DB-REQUIRED-START} &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD putArtstToSuperproc dTables _DB-REQUIRED FUNCTION putArtstToSuperproc RETURNS LOGICAL ( /* parameter-definitions */ ) FORWARD. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME {&DB-REQUIRED-END} /* *********************** Control Definitions ********************** */ {&DB-REQUIRED-START} /* Query definitions */ &ANALYZE-SUSPEND DEFINE QUERY Query-Main FOR Artst SCROLLING. &ANALYZE-RESUME {&DB-REQUIRED-END} /* ************************ Frame Definitions *********************** */ /* *********************** Procedure Settings ************************ */ &ANALYZE-SUSPEND _PROCEDURE-SETTINGS /* Settings for THIS-PROCEDURE Type: SmartDataObject Allow: Query Frames: 0 Add Fields to: Neither Other Settings: PERSISTENT-ONLY COMPILE APPSERVER DB-AWARE */ /* This procedure should always be RUN PERSISTENT. Report the error, */ /* then cleanup and return. */ IF NOT THIS-PROCEDURE:PERSISTENT THEN DO: MESSAGE "{&FILE-NAME} should only be RUN PERSISTENT.":U VIEW-AS ALERT-BOX ERROR BUTTONS OK. RETURN. END. &ANALYZE-RESUME _END-PROCEDURE-SETTINGS /* ************************* Create Window ************************** */ &ANALYZE-SUSPEND _CREATE-WINDOW /* DESIGN Window definition (used by the UIB) CREATE WINDOW dTables ASSIGN HEIGHT = 3.52 WIDTH = 77.2. /* END WINDOW DEFINITION */ */ &ANALYZE-RESUME &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB dTables /* ************************* Included-Libraries *********************** */ {src/adm2/data.i} /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME /* *********** Runtime Attributes and AppBuilder Settings *********** */ &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES /* SETTINGS FOR WINDOW dTables VISIBLE,,RUN-PERSISTENT */ /* _RUN-TIME-ATTRIBUTES-END */ &ANALYZE-RESUME /* Setting information for Queries and Browse Widgets fields */ &ANALYZE-SUSPEND _QUERY-BLOCK QUERY Query-Main /* Query rebuild information for SmartDataObject Query-Main _TblList = "AnaDat.Artst" _Options = "NO-LOCK INDEXED-REPOSITION" _FldNameList[1] > AnaDat.Artst.Aktiv "Aktiv" "Aktiv" ? ? "logical" ? ? ? ? ? ? yes ? no 4.8 yes ? _FldNameList[2] > AnaDat.Artst.Alk_Gehalt "Alk_Gehalt" "Alk_Gehalt" ? ? "decimal" ? ? ? ? ? ? yes ? no 10.4 yes ? _FldNameList[3] > AnaDat.Artst.Artnr "Artnr" "Artnr" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ? _FldNameList[4] > AnaDat.Artst.Art_Grp "Art_Grp" "Art_Grp" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ? _FldNameList[5] > AnaDat.Artst.Ausverk "Ausverk" "Ausverk" ? ? "integer" ? ? ? ? ? ? yes ? no 7.8 yes ? _FldNameList[6] > AnaDat.Artst.Bestand "Bestand" "Bestand" ? ? "integer" ? ? ? ? ? ? yes ? no 9.4 yes ? _FldNameList[7] > AnaDat.Artst.Bestellt "Bestellt" "Bestellt" ? ? "integer" ? ? ? ? ? ? yes ? no 9.4 yes ? _FldNameList[8] > AnaDat.Artst.Mind_Bestand "Mind_Bestand" "Mind_Bestand" ? ? "integer" ? ? ? ? ? ? yes ? no 11 yes ? _FldNameList[9] > AnaDat.Artst.Bez "Bez" "Bez" ? ? "character" ? ? ? ? ? ? yes ? no 30 yes ? _FldNameList[10] > AnaDat.Artst.Bonus_Grp "Bonus_Grp" "Bonus_Grp" ? ? "integer" ? ? ? ? ? ? yes ? no 10.6 yes ? _FldNameList[11] > AnaDat.Artst.DEP "DEP" "DEP" ? ? "decimal" ? ? ? ? ? ? yes ? no 12.2 yes ? _FldNameList[12] > AnaDat.Artst.EAV_Code "EAV_Code" "EAV_Code" ? ? "character" ? ? ? ? ? ? yes ? no 12 yes ? _FldNameList[13] > AnaDat.Artst.Edat "Edat" "ErfDat" "erfasst" ? "date" ? ? ? ? ? ? yes ? no 10.8 yes ? _FldNameList[14] > AnaDat.Artst.Esbkb "Esbkb" "ErfSB" "ErfSB" "x(20)" "character" ? ? ? ? ? ? yes ? no 20 yes ? _FldNameList[15] > AnaDat.Artst.EShop "EShop" "EShop" ? ? "logical" ? ? ? ? ? ? yes ? no 6.4 yes ? _FldNameList[16] > AnaDat.Artst.Farbe "Farbe" "Farbe" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ? _FldNameList[17] > AnaDat.Artst.Firma "Firma" "Firma" ? ? "character" ? ? ? ? ? ? yes ? yes 8 yes ? _FldNameList[18] > AnaDat.Artst.FremdNr "FremdNr" "FremdNr" ? ? "character" ? ? ? ? ? ? yes ? no 14 yes ? _FldNameList[19] > AnaDat.Artst.Gewicht "Gewicht" "Gewicht" ? ? "decimal" ? ? ? ? ? ? yes ? no 11 yes ? _FldNameList[20] > AnaDat.Artst.GGeb_Cd "GGeb_Cd" "GGeb_Cd" ? ? "character" ? ? ? ? ? ? yes ? no 10 yes ? _FldNameList[21] > AnaDat.Artst.Herk_Lkz "Herk_Lkz" "Herk_Lkz" ? ? "character" ? ? ? ? ? ? yes ? no 9.2 yes ? _FldNameList[22] > AnaDat.Artst.Herst "Herst" "Herst" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ? _FldNameList[23] > AnaDat.Artst.Inhalt "Inhalt" "Inhalt" ? ? "integer" ? ? ? ? ? ? yes ? no 5.2 yes ? _FldNameList[24] > AnaDat.Artst.Jahr "Jahr" "Jahr" ? ? "integer" ? ? ? ? ? ? yes ? no 4.8 yes ? _FldNameList[25] > AnaDat.Artst.KGeb_Cd "KGeb_Cd" "KGeb_Cd" ? ? "character" ? ? ? ? ? ? yes ? no 10 yes ? _FldNameList[26] > AnaDat.Artst.Konto "Konto" "Konto" ? ? "character" ? ? ? ? ? ? yes ? no 12 yes ? _FldNameList[27] > AnaDat.Artst.Lager "Lager" "Lager" ? ? "logical" ? ? ? ? ? ? yes ? no 5.4 yes ? _FldNameList[28] > AnaDat.Artst.Leih_Art "Leih_Art" "Leih_Art" ? ? "logical" ? ? ? ? ? ? yes ? no 7.8 yes ? _FldNameList[29] > AnaDat.Artst.LEP "LEP" "LEP" ? ? "decimal" ? ? ? ? ? ? yes ? no 12.2 yes ? _FldNameList[30] > AnaDat.Artst.Letzt_Ausg "Letzt_Ausg" "Letzt_Ausg" ? ? "date" ? ? ? ? ? ? yes ? no 10.8 yes ? _FldNameList[31] > AnaDat.Artst.Letzt_Eing "Letzt_Eing" "Letzt_Eing" ? ? "date" ? ? ? ? ? ? yes ? no 10.8 yes ? _FldNameList[32] > AnaDat.Artst.Listen_EP "Listen_EP" "Listen_EP" ? ? "decimal" ? ? ? ? ? ? yes ? no 9.6 yes ? _FldNameList[33] > AnaDat.Artst.Mdat "Mdat" "MutDat" "MutDat" ? "date" ? ? ? ? ? ? yes ? no 10.8 yes ? _FldNameList[34] > AnaDat.Artst.Min_Marge "Min_Marge" "Min_Marge" ? ? "decimal" ? ? ? ? ? ? yes ? no 10.6 yes ? _FldNameList[35] > AnaDat.Artst.Msbkb "Msbkb" "MutSB" "MutSB" "x(20)" "character" ? ? ? ? ? ? yes ? no 20 yes ? _FldNameList[36] > AnaDat.Artst.MutFlag "MutFlag" "MutFlag" ? ? "logical" ? ? ? ? ? ? yes ? no 7.6 yes ? _FldNameList[37] > AnaDat.Artst.MWSt "MWSt" "MWSt" ? ? "integer" ? ? ? ? ? ? yes ? no 6 yes ? _FldNameList[38] > AnaDat.Artst.Netto "Netto" "Netto" ? ? "logical" ? ? ? ? ? ? yes ? no 5.2 yes ? _FldNameList[39] > AnaDat.Artst.Preisliste "Preisliste" "Preisliste" ? ? "logical" ? ? ? ? ? ? yes ? no 8.2 yes ? _FldNameList[40] > AnaDat.Artst.Prod_Grp "Prod_Grp" "Prod_Grp" ? ? "integer" ? ? ? ? ? ? yes ? no 9 yes ? _FldNameList[41] > AnaDat.Artst.Rab_Grp "Rab_Grp" "Rab_Grp" ? ? "integer" ? ? ? ? ? ? yes ? no 8.6 yes ? _FldNameList[42] > AnaDat.Artst.Reg_Grp "Reg_Grp" "Reg_Grp" ? ? "integer" ? ? ? ? ? ? yes ? no 8.6 yes ? _FldNameList[43] > AnaDat.Artst.Reserviert "Reserviert" "Reserviert" ? ? "integer" ? ? ? ? ? ? yes ? no 9.6 yes ? _FldNameList[44] > AnaDat.Artst.Res_c1 "Res_c1" "Res_c1" ? ? "character" ? ? ? ? ? ? yes ? no 8 yes ? _FldNameList[45] > AnaDat.Artst.Res_c2 "Res_c2" "Res_c2" ? ? "character" ? ? ? ? ? ? yes ? no 8 yes ? _FldNameList[46] > AnaDat.Artst.Res_i1 "Res_i1" "Res_i1" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ? _FldNameList[47] > AnaDat.Artst.Sk_Ber "Sk_Ber" "Sk_Ber" ? ? "logical" ? ? ? ? ? ? yes ? no 7 yes ? _FldNameList[48] > AnaDat.Artst.Soll_Bestand "Soll_Bestand" "Soll_Bestand" ? ? "integer" ? ? ? ? ? ? yes ? no 12.4 yes ? _FldNameList[49] > AnaDat.Artst.Strichcode "Strichcode" "Strichcode" ? ? "character" ? ? ? ? ? ? yes ? no 20 yes ? _FldNameList[50] > AnaDat.Artst.Style "Style" "Style" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ? _FldNameList[51] > AnaDat.Artst.Suchbe "Suchbe" "Suchbe" ? ? "character" ? ? ? ? ? ? yes ? no 15 yes ? _FldNameList[52] > AnaDat.Artst.Traub_Grp "Traub_Grp" "Traub_Grp" ? ? "integer" ? ? ? ? ? ? yes ? no 10.2 yes ? _FldNameList[53] > AnaDat.Artst.VGeb_Cd "VGeb_Cd" "VGeb_Cd" ? ? "character" ? ? ? ? ? ? yes ? no 10 yes ? _FldNameList[54] > AnaDat.Artst.Wg_Grp "Wg_Grp" "Wg_Grp" ? ? "integer" ? ? ? ? ? ? yes ? no 8 yes ? _FldNameList[55] > AnaDat.Artst.WHK_Code "WHK_Code" "WHK_Code" ? ? "character" ? ? ? ? ? ? yes ? no 12 yes ? _FldNameList[56] > "_" "DYNAMIC-FUNCTION('getKGebindeKBez':U, RowObject.KGeb_Cd)" "KGebinde" "KGebinde" "x(12)" "character" ? ? ? ? ? ? yes ? no 12 no ? _FldNameList[57] > "_" "DYNAMIC-FUNCTION('getVGebindeKBez':U, RowObject.VGeb_Cd)" "VGebinde" "VGebinde" "x(12)" "character" ? ? ? ? ? ? yes ? no 12 no ? _FldNameList[58] > "_" "DYNAMIC-FUNCTION('getGGebindeKBez':U, RowObject.GGeb_Cd)" "GGebinde" "GGebinde" "x(12)" "character" ? ? ? ? ? ? yes ? no 12 no ? _FldNameList[59] > AnaDat.Artst.ArtikelBild "ArtikelBild" "ArtikelBild" ? ? "character" ? ? ? ? ? ? yes ? no 60 yes ? _FldNameList[60] > AnaDat.Artst.EP-Intern "EP-Intern" "EP-Intern" ? ? "decimal" ? ? ? ? ? ? yes ? no 11 yes ? _FldNameList[61] > AnaDat.Artst.EShop_2 "EShop_2" "EShop_2" ? ? "logical" ? ? ? ? ? ? yes ? no 8.8 yes ? _FldNameList[62] > "_" "DYNAMIC-FUNCTION('getTagesBestand':U IN THIS-PROCEDURE)" "Tagesbestand" "Tagesbestand" "zzz,zz9-" "Integer" ? ? ? ? ? ? yes ? no 7.4 no ? _FldNameList[63] > AnaDat.Artst.lLotnr "lLotnr" "lLotnr" ? ? "logical" ? ? ? ? ? ? yes ? no 10.8 yes ? _FldNameList[64] > AnaDat.Artst.lVerfall "lVerfall" "lVerfall" ? ? "logical" ? ? ? ? ? ? yes ? no 6.2 yes ? _FldNameList[65] > AnaDat.Artst.Mind_MHD "Mind_MHD" "Mind_MHD" "Mindest haltbar" ? "integer" ? ? ? ? ? ? yes ? no 14.8 yes ? _Design-Parent is WINDOW dTables @ ( 1.14 , 2.6 ) */ /* QUERY Query-Main */ &ANALYZE-RESUME &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK dTables /* *************************** Main Block *************************** */ { incl/datmainblock.i } SUBSCRIBE TO 'NEUER_EP' ANYWHERE. fOpen = FALSE. &IF DEFINED(UIB_IS_RUNNING) <> 0 &THEN RUN initializeObject. &ENDIF /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME /* ********************** Internal Procedures *********************** */ {&DB-REQUIRED-START} &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE DATA.CALCULATE dTables DATA.CALCULATE _DB-REQUIRED PROCEDURE DATA.CALCULATE : /*------------------------------------------------------------------------------ Purpose: Calculate all the Calculated Expressions found in the SmartDataObject. Parameters: ------------------------------------------------------------------------------*/ ASSIGN rowObject.GGebinde = (DYNAMIC-FUNCTION('getGGebindeKBez':U, RowObject.GGeb_Cd)) rowObject.KGebinde = (DYNAMIC-FUNCTION('getKGebindeKBez':U, RowObject.KGeb_Cd)) rowObject.Tagesbestand = (DYNAMIC-FUNCTION('getTagesBestand':U IN THIS-PROCEDURE)) rowObject.VGebinde = (DYNAMIC-FUNCTION('getVGebindeKBez':U, RowObject.VGeb_Cd)) . END PROCEDURE. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME {&DB-REQUIRED-END} {&DB-REQUIRED-START} &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE dataAvailable dTables _DB-REQUIRED PROCEDURE dataAvailable : /*------------------------------------------------------------------------------ Purpose: Super Override Parameters: Notes: ------------------------------------------------------------------------------*/ { incl/datdataavailable.i } END PROCEDURE. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME {&DB-REQUIRED-END} &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI dTables _DEFAULT-DISABLE PROCEDURE disable_UI : /*------------------------------------------------------------------------------ Purpose: DISABLE the User Interface Parameters: Notes: Here we clean-up the user-interface by deleting dynamic widgets we have created and/or hide frames. This procedure is usually called when we are ready to "clean-up" after running. ------------------------------------------------------------------------------*/ /* Hide all frames. */ IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE. END PROCEDURE. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME {&DB-REQUIRED-START} &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE fetchFirst dTables _DB-REQUIRED PROCEDURE fetchFirst : /*------------------------------------------------------------------------------ Purpose: Super Override Parameters: Notes: ------------------------------------------------------------------------------*/ /* Code placed here will execute PRIOR to standard behavior. */ RUN SUPER. DYNAMIC-FUNCTION('putArtstToSuperproc':U) NO-ERROR. END PROCEDURE. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME {&DB-REQUIRED-END} {&DB-REQUIRED-START} &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE fetchLast dTables _DB-REQUIRED PROCEDURE fetchLast : /*------------------------------------------------------------------------------ Purpose: Super Override Parameters: Notes: ------------------------------------------------------------------------------*/ /* Code placed here will execute PRIOR to standard behavior. */ RUN SUPER. DYNAMIC-FUNCTION('putArtstToSuperproc':U) NO-ERROR. END PROCEDURE. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME {&DB-REQUIRED-END} {&DB-REQUIRED-START} &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE fetchNext dTables _DB-REQUIRED PROCEDURE fetchNext : /*------------------------------------------------------------------------------ Purpose: Super Override Parameters: Notes: ------------------------------------------------------------------------------*/ /* Code placed here will execute PRIOR to standard behavior. */ RUN SUPER. DYNAMIC-FUNCTION('putArtstToSuperproc':U) NO-ERROR. END PROCEDURE. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME {&DB-REQUIRED-END} {&DB-REQUIRED-START} &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE fetchPrev dTables _DB-REQUIRED PROCEDURE fetchPrev : /*------------------------------------------------------------------------------ Purpose: Super Override Parameters: Notes: ------------------------------------------------------------------------------*/ /* Code placed here will execute PRIOR to standard behavior. */ RUN SUPER. DYNAMIC-FUNCTION('putArtstToSuperproc':U) NO-ERROR. END PROCEDURE. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME {&DB-REQUIRED-END} {&DB-REQUIRED-START} &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE INAKTIVIEREN dTables _DB-REQUIRED PROCEDURE INAKTIVIEREN : /*------------------------------------------------------------------------------ Purpose: Parameters: Notes: ------------------------------------------------------------------------------*/ RETURN 'LOESCHEN'. /* { incl/datinaktivieren.i } */ END PROCEDURE. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME {&DB-REQUIRED-END} {&DB-REQUIRED-START} &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE initializeObject dTables _DB-REQUIRED PROCEDURE initializeObject : /*------------------------------------------------------------------------------ Purpose: Super Override Parameters: Notes: ------------------------------------------------------------------------------*/ cSort = 'Artnr'. fDesc = FALSE. DYNAMIC-FUNCTION('getArtikelSort':U, INPUT-OUTPUT cSort, INPUT-OUTPUT fDesc ). { incl/datinitialize.i } END PROCEDURE. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME {&DB-REQUIRED-END} {&DB-REQUIRED-START} &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE NEUER_ARTIKEL dTables _DB-REQUIRED PROCEDURE NEUER_ARTIKEL : /*------------------------------------------------------------------------------ Purpose: Parameters: Notes: ------------------------------------------------------------------------------*/ DEF INPUT PARAMETER ipString AS CHAR NO-UNDO. DEF VAR Artnr AS INT NO-UNDO. DEF VAR Inhalt AS INT NO-UNDO. DEF VAR Jahr AS INT NO-UNDO. DEF VAR iRecid AS RECID NO-UNDO. Artnr = INTEGER(ENTRY(1, ipString, CHR(01))). Inhalt = INTEGER(ENTRY(2, ipString, CHR(01))). Jahr = INTEGER(ENTRY(3, ipString, CHR(01))). FIND Artst USE-INDEX Artst-k1 WHERE Artst.Firma = Firma AND Artst.Artnr = Artnr AND Artst.Inhalt = Inhalt AND Artst.Jahr = Jahr NO-LOCK NO-ERROR. IF NOT AVAILABLE Artst THEN RETURN. iRecid = RECID(Artst). DYNAMIC-FUNCTION('openQuery':U). RUN REPOS ( INPUT iRecid ). END PROCEDURE. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME {&DB-REQUIRED-END} &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE NEUER_EP dTables PROCEDURE NEUER_EP : /*------------------------------------------------------------------------------ Purpose: Notes: ------------------------------------------------------------------------------*/ DEFINE VARIABLE iRecid AS RECID NO-UNDO. iRecid = DYNAMIC-FUNCTION ('getCurrentRecid':U) NO-ERROR. DYNAMIC-FUNCTION ('openQuery':U) NO-ERROR. IF iRecid = ? OR iRecid = 0 THEN RETURN. RUN REPOS IN THIS-PROCEDURE ( iRecid ). END PROCEDURE. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME {&DB-REQUIRED-START} &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE REAKTIVIEREN dTables _DB-REQUIRED PROCEDURE REAKTIVIEREN : /*------------------------------------------------------------------------------ Purpose: Parameters: Notes: ------------------------------------------------------------------------------*/ { incl/datreaktivieren.i } END PROCEDURE. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME {&DB-REQUIRED-END} &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE refreshrow dTables PROCEDURE refreshrow: /*------------------------------------------------------------------------------ Purpose: Notes: ------------------------------------------------------------------------------*/ RUN SUPER. /* Code placed here will execute AFTER standard behavior. */ END PROCEDURE. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME {&DB-REQUIRED-START} &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE REPOS dTables _DB-REQUIRED PROCEDURE REPOS : /*------------------------------------------------------------------------------ Purpose: Parameters: Notes: ------------------------------------------------------------------------------*/ DEF INPUT PARAMETER ipRecid AS RECID NO-UNDO. FIND Artst WHERE RECID(Artst) = ipRecid NO-LOCK NO-ERROR. IF NOT AVAILABLE Artst THEN RETURN. DYNAMIC-FUNCTION('fetchRowIdent':U, INPUT STRING(ROWID(Artst)), INPUT ? ). DYNAMIC-FUNCTION('putArtstToSuperproc':U) NO-ERROR. END PROCEDURE. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME {&DB-REQUIRED-END} {&DB-REQUIRED-START} &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE REPOS_TABELLE dTables _DB-REQUIRED PROCEDURE REPOS_TABELLE : /*------------------------------------------------------------------------------ Purpose: Parameters: Notes: ------------------------------------------------------------------------------*/ { incl/datrepos.i } END PROCEDURE. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME {&DB-REQUIRED-END} {&DB-REQUIRED-START} &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE SET_FILTER dTables _DB-REQUIRED PROCEDURE SET_FILTER : /*------------------------------------------------------------------------------ Purpose: Parameters: Notes: ------------------------------------------------------------------------------*/ { incl/datsetfilter.i } END PROCEDURE. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME {&DB-REQUIRED-END} {&DB-REQUIRED-START} &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE SET_OPENFLAG dTables _DB-REQUIRED PROCEDURE SET_OPENFLAG : /*------------------------------------------------------------------------------ Purpose: Parameters: Notes: ------------------------------------------------------------------------------*/ { incl/datsetopenflag.i } END PROCEDURE. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME {&DB-REQUIRED-END} {&DB-REQUIRED-START} &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE SET_SORT dTables _DB-REQUIRED PROCEDURE SET_SORT : /*------------------------------------------------------------------------------ Purpose: Parameters: Notes: ------------------------------------------------------------------------------*/ { incl/datsetsort.i } DYNAMIC-FUNCTION('setArtikelSort':U, cSort, fDesc ) NO-ERROR. END PROCEDURE. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME {&DB-REQUIRED-END} /* ************************ Function Implementations ***************** */ {&DB-REQUIRED-START} &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION getCurrentRecid dTables _DB-REQUIRED FUNCTION getCurrentRecid RETURNS RECID ( /* parameter-definitions */ ) : /*------------------------------------------------------------------------------ Purpose: Notes: ------------------------------------------------------------------------------*/ { incl/datgetcurrentrecid.i } END FUNCTION. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME {&DB-REQUIRED-END} {&DB-REQUIRED-START} &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION getQueryBuffer dTables _DB-REQUIRED FUNCTION getQueryBuffer RETURNS HANDLE ( /* parameter-definitions */ ) : /*------------------------------------------------------------------------------ Purpose: Notes: ------------------------------------------------------------------------------*/ RETURN BUFFER rowObject:HANDLE. END FUNCTION. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME {&DB-REQUIRED-END} {&DB-REQUIRED-START} &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION getTagesBestand dTables _DB-REQUIRED FUNCTION getTagesBestand RETURNS INTEGER ( /* parameter-definitions */ ) : /*------------------------------------------------------------------------------ Purpose: Notes: ------------------------------------------------------------------------------*/ DEF VAR nBestand AS INT NO-UNDO. nBestand = rowObject.Bestand. FOR EACH Artbw NO-LOCK WHERE Artbw.Firma = rowObject.Firma AND Artbw.Artnr = rowObject.Artnr AND Artbw.Inhalt = rowObject.Inhalt AND Artbw.Jahr = rowObject.Jahr AND Artbw.Tr_Art < 10 AND Artbw.Datum > TODAY AND Artbw.Lag_Buch = TRUE : nBestand = nBestand + Artbw.Menge. END. RETURN nBestand. END FUNCTION. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME {&DB-REQUIRED-END} {&DB-REQUIRED-START} &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION openQuery dTables _DB-REQUIRED FUNCTION openQuery RETURNS LOGICAL ( /* parameter-definitions */ ) : /*------------------------------------------------------------------------------ Purpose: Super Override Notes: ------------------------------------------------------------------------------*/ DEF VAR Felder AS CHAR NO-UNDO. DEF VAR Inhalt AS CHAR NO-UNDO. DEF VAR ix AS INT NO-UNDO. DEF VAR cFeld AS CHAR NO-UNDO. DEF VAR lInaktiv AS LOG NO-UNDO. /* IF NOT fOpen THEN RETURN FALSE. */ xWhere = ''. xSort = ''. xString = ''. Felder = DYNAMIC-FUNCTION('getForeignFields':U) NO-ERROR. Inhalt = DYNAMIC-FUNCTION('getForeignValues':U) NO-ERROR. /* ix = LOOKUP('Feld', Felder, ',') / 2. */ /* cFeld = ENTRY (ix , Inhalt, CHR(01)). */ lInaktiv = DYNAMIC-FUNCTION('getAnzeigeArtikelInaktiv':U) NO-ERROR. IF lInaktiv = ? THEN lInaktiv = TRUE. xWhere = 'Artst.Firma = ' + QUOTER(Firma) + ' '. IF NOT lInaktiv THEN xWhere = xWhere + 'AND Artst.Aktiv = TRUE '. /* xString = 'FOR EACH Debop ' + xSort + 'WHERE ' */ /* + 'Debop.Firma = "' + Firma + '" AND ' */ /* + 'Debop.Knr = ' + STRING(Knr) + ' ' */ /* + 'NO-LOCK BY Debop.FakDat DESCENDING INDEXED-REPOSITION '. */ { incl/datopenquery.i } IF xWhere <> '' THEN DYNAMIC-FUNCTION('setQueryWhere':U , INPUT xWhere ). IF xString <> '' THEN DYNAMIC-FUNCTION('setQueryString':U, INPUT xString). IF xSort <> '' THEN DYNAMIC-FUNCTION('setQuerySort':U , INPUT xSort ). RETURN SUPER( ). END FUNCTION. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME {&DB-REQUIRED-END} {&DB-REQUIRED-START} &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION putArtstToSuperproc dTables _DB-REQUIRED FUNCTION putArtstToSuperproc RETURNS LOGICAL ( /* parameter-definitions */ ) : /*------------------------------------------------------------------------------ Purpose: Notes: ------------------------------------------------------------------------------*/ DEF VAR lOK AS LOG NO-UNDO. fData = TRUE. RUN dataAvailable ('SAME'). FIND FIRST tRowObject NO-ERROR. lOK = DYNAMIC-FUNCTION('setArtstInSuperproc':U, TEMP-TABLE tRowObject:DEFAULT-BUFFER-HANDLE ). RETURN lOK. END FUNCTION. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME {&DB-REQUIRED-END}