| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816 |
- &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:
- <none>
- Output Parameters:
- <none>
- 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 --- */
- DEF VAR xWhere AS CHAR NO-UNDO.
- DEF VAR xSort AS CHAR NO-UNDO.
- DEF VAR Firma AS CHAR NO-UNDO.
- DEF VAR SAktiv AS LOG NO-UNDO.
- DEF VAR lOpen AS LOG INIT FALSE NO-UNDO.
- /* _UIB-CODE-BLOCK-END */
- &ANALYZE-RESUME
- &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
- /* ******************** Preprocessor Definitions ******************** */
- &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 Firma Artnr Inhalt Jahr Suchbe Bez KGeb_Cd VGeb_Cd GGeb_Cd Wg_Grp Prod_Grp~
- Art_Grp Rab_Grp Bonus_Grp Farbe Traub_Grp Reg_Grp Herk_Lkz Herst MWSt Netto~
- Sk_Ber Lager Leih_Art Ausverk Preisliste Alk_Gehalt Gewicht WHK_Code~
- EAV_Code Strichcode Konto Bestand Soll_Bestand Bestellt Reserviert DEP LEP~
- Listen_EP Min_Marge Letzt_Ausg Letzt_Eing ErfDat ErfSb MutDat MutSb MutFlag~
- Res_c1 Res_c2 Res_i1 Style Aktiv EShop FremdNr iRecid cRowid Mind_Bestand~
- Mind_MHD lVerfall lLotnr EShop_2 EP-Intern ArtikelBild
- &Scoped-define ENABLED-FIELDS-IN-Artst Firma Artnr Inhalt Jahr Suchbe Bez ~
- KGeb_Cd VGeb_Cd GGeb_Cd Wg_Grp Prod_Grp Art_Grp Rab_Grp Bonus_Grp Farbe ~
- Traub_Grp Reg_Grp Herk_Lkz Herst MWSt Netto Sk_Ber Lager Leih_Art Ausverk ~
- Preisliste Alk_Gehalt Gewicht WHK_Code EAV_Code Strichcode Konto Bestand ~
- Soll_Bestand Bestellt Reserviert DEP LEP Listen_EP Min_Marge Letzt_Ausg ~
- Letzt_Eing ErfDat ErfSb MutDat MutSb MutFlag Res_c1 Res_c2 Res_i1 Style ~
- Aktiv EShop FremdNr Mind_Bestand Mind_MHD lVerfall lLotnr EShop_2 EP-Intern ~
- ArtikelBild
- &Scoped-Define DATA-FIELDS Firma Artnr Inhalt Jahr Suchbe Bez KGeb_Cd VGeb_Cd GGeb_Cd Wg_Grp Prod_Grp~
- Art_Grp Rab_Grp Bonus_Grp Farbe Traub_Grp Reg_Grp Herk_Lkz Herst MWSt Netto~
- Sk_Ber Lager Leih_Art Ausverk Preisliste Alk_Gehalt Gewicht WHK_Code~
- EAV_Code Strichcode Konto Bestand Soll_Bestand Bestellt Reserviert DEP LEP~
- Listen_EP Min_Marge Letzt_Ausg Letzt_Eing ErfDat ErfSb MutDat MutSb MutFlag~
- Res_c1 Res_c2 Res_i1 Style Aktiv EShop FremdNr iRecid cRowid Mind_Bestand~
- Mind_MHD lVerfall lLotnr EShop_2 EP-Intern ArtikelBild
- &Scoped-define DATA-FIELDS-IN-Artst Firma Artnr Inhalt Jahr Suchbe Bez ~
- KGeb_Cd VGeb_Cd GGeb_Cd Wg_Grp Prod_Grp Art_Grp Rab_Grp Bonus_Grp Farbe ~
- Traub_Grp Reg_Grp Herk_Lkz Herst MWSt Netto Sk_Ber Lager Leih_Art Ausverk ~
- Preisliste Alk_Gehalt Gewicht WHK_Code EAV_Code Strichcode Konto Bestand ~
- Soll_Bestand Bestellt Reserviert DEP LEP Listen_EP Min_Marge Letzt_Ausg ~
- Letzt_Eing ErfDat ErfSb MutDat MutSb MutFlag Res_c1 Res_c2 Res_i1 Style ~
- Aktiv EShop FremdNr Mind_Bestand Mind_MHD lVerfall lLotnr EShop_2 EP-Intern ~
- ArtikelBild
- &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-artikel.i"
- &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 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 setOpenflag dTables _DB-REQUIRED
- FUNCTION setOpenflag RETURNS LOGICAL
- ( ipOpen AS LOG ) 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 = 1.62
- WIDTH = 61.8.
- /* 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.Firma
- "Firma" "Firma" ? ? "character" ? ? ? ? ? ? yes ? yes 8 yes ""
- _FldNameList[2] > AnaDat.Artst.Artnr
- "Artnr" "Artnr" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ""
- _FldNameList[3] > AnaDat.Artst.Inhalt
- "Inhalt" "Inhalt" ? ? "integer" ? ? ? ? ? ? yes ? no 5.2 yes ""
- _FldNameList[4] > AnaDat.Artst.Jahr
- "Jahr" "Jahr" ? ? "integer" ? ? ? ? ? ? yes ? no 4.8 yes ""
- _FldNameList[5] > AnaDat.Artst.Suchbe
- "Suchbe" "Suchbe" ? ? "character" ? ? ? ? ? ? yes ? no 15 yes ""
- _FldNameList[6] > AnaDat.Artst.Bez
- "Bez" "Bez" ? ? "character" ? ? ? ? ? ? yes ? no 30 yes ""
- _FldNameList[7] > AnaDat.Artst.KGeb_Cd
- "KGeb_Cd" "KGeb_Cd" ? ? "character" ? ? ? ? ? ? yes ? no 10 yes ""
- _FldNameList[8] > AnaDat.Artst.VGeb_Cd
- "VGeb_Cd" "VGeb_Cd" ? ? "character" ? ? ? ? ? ? yes ? no 10 yes ""
- _FldNameList[9] > AnaDat.Artst.GGeb_Cd
- "GGeb_Cd" "GGeb_Cd" ? ? "character" ? ? ? ? ? ? yes ? no 10 yes ""
- _FldNameList[10] > AnaDat.Artst.Wg_Grp
- "Wg_Grp" "Wg_Grp" ? "999999" "integer" ? ? ? ? ? ? yes ? no 8 yes ""
- _FldNameList[11] > AnaDat.Artst.Prod_Grp
- "Prod_Grp" "Prod_Grp" ? "999999" "integer" ? ? ? ? ? ? yes ? no 9 yes ""
- _FldNameList[12] > AnaDat.Artst.Art_Grp
- "Art_Grp" "Art_Grp" ? "999999" "integer" ? ? ? ? ? ? yes ? no 7.2 yes ""
- _FldNameList[13] > AnaDat.Artst.Rab_Grp
- "Rab_Grp" "Rab_Grp" ? ? "integer" ? ? ? ? ? ? yes ? no 8.6 yes ""
- _FldNameList[14] > AnaDat.Artst.Bonus_Grp
- "Bonus_Grp" "Bonus_Grp" ? ? "integer" ? ? ? ? ? ? yes ? no 10.6 yes ""
- _FldNameList[15] > AnaDat.Artst.Farbe
- "Farbe" "Farbe" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ""
- _FldNameList[16] > AnaDat.Artst.Traub_Grp
- "Traub_Grp" "Traub_Grp" ? ? "integer" ? ? ? ? ? ? yes ? no 10.2 yes ""
- _FldNameList[17] > AnaDat.Artst.Reg_Grp
- "Reg_Grp" "Reg_Grp" ? ? "integer" ? ? ? ? ? ? yes ? no 8.6 yes ""
- _FldNameList[18] > AnaDat.Artst.Herk_Lkz
- "Herk_Lkz" "Herk_Lkz" ? ? "character" ? ? ? ? ? ? yes ? no 9.2 yes ""
- _FldNameList[19] > AnaDat.Artst.Herst
- "Herst" "Herst" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ""
- _FldNameList[20] > AnaDat.Artst.MWSt
- "MWSt" "MWSt" ? ? "integer" ? ? ? ? ? ? yes ? no 6 yes ""
- _FldNameList[21] > AnaDat.Artst.Netto
- "Netto" "Netto" ? ? "logical" ? ? ? ? ? ? yes ? no 5.2 yes ""
- _FldNameList[22] > AnaDat.Artst.Sk_Ber
- "Sk_Ber" "Sk_Ber" ? ? "logical" ? ? ? ? ? ? yes ? no 7 yes ""
- _FldNameList[23] > AnaDat.Artst.Lager
- "Lager" "Lager" ? ? "logical" ? ? ? ? ? ? yes ? no 5.4 yes ""
- _FldNameList[24] > AnaDat.Artst.Leih_Art
- "Leih_Art" "Leih_Art" ? ? "logical" ? ? ? ? ? ? yes ? no 7.8 yes ""
- _FldNameList[25] > AnaDat.Artst.Ausverk
- "Ausverk" "Ausverk" ? ? "integer" ? ? ? ? ? ? yes ? no 7.8 yes ""
- _FldNameList[26] > AnaDat.Artst.Preisliste
- "Preisliste" "Preisliste" ? ? "logical" ? ? ? ? ? ? yes ? no 8.2 yes ""
- _FldNameList[27] > AnaDat.Artst.Alk_Gehalt
- "Alk_Gehalt" "Alk_Gehalt" ? ? "decimal" ? ? ? ? ? ? yes ? no 10.4 yes ""
- _FldNameList[28] > AnaDat.Artst.Gewicht
- "Gewicht" "Gewicht" ? ? "decimal" ? ? ? ? ? ? yes ? no 11 yes ""
- _FldNameList[29] > AnaDat.Artst.WHK_Code
- "WHK_Code" "WHK_Code" ? ? "character" ? ? ? ? ? ? yes ? no 12 yes ""
- _FldNameList[30] > AnaDat.Artst.EAV_Code
- "EAV_Code" "EAV_Code" ? ? "character" ? ? ? ? ? ? yes ? no 12 yes ""
- _FldNameList[31] > AnaDat.Artst.Strichcode
- "Strichcode" "Strichcode" ? ? "character" ? ? ? ? ? ? yes ? no 20 yes ""
- _FldNameList[32] > AnaDat.Artst.Konto
- "Konto" "Konto" ? ? "character" ? ? ? ? ? ? yes ? no 12 yes ""
- _FldNameList[33] > AnaDat.Artst.Bestand
- "Bestand" "Bestand" ? ? "integer" ? ? ? ? ? ? yes ? no 9.4 yes ""
- _FldNameList[34] > AnaDat.Artst.Soll_Bestand
- "Soll_Bestand" "Soll_Bestand" ? ? "integer" ? ? ? ? ? ? yes ? no 12.4 yes ""
- _FldNameList[35] > AnaDat.Artst.Bestellt
- "Bestellt" "Bestellt" ? ? "integer" ? ? ? ? ? ? yes ? no 9.4 yes ""
- _FldNameList[36] > AnaDat.Artst.Reserviert
- "Reserviert" "Reserviert" ? ? "integer" ? ? ? ? ? ? yes ? no 9.6 yes ""
- _FldNameList[37] > AnaDat.Artst.DEP
- "DEP" "DEP" ? ? "decimal" ? ? ? ? ? ? yes ? no 12.2 yes ""
- _FldNameList[38] > AnaDat.Artst.LEP
- "LEP" "LEP" ? ? "decimal" ? ? ? ? ? ? yes ? no 12.2 yes ""
- _FldNameList[39] > AnaDat.Artst.Listen_EP
- "Listen_EP" "Listen_EP" ? ? "decimal" ? ? ? ? ? ? yes ? no 9.6 yes ""
- _FldNameList[40] > AnaDat.Artst.Min_Marge
- "Min_Marge" "Min_Marge" ? ? "decimal" ? ? ? ? ? ? yes ? no 10.6 yes ""
- _FldNameList[41] > AnaDat.Artst.Letzt_Ausg
- "Letzt_Ausg" "Letzt_Ausg" ? ? "date" ? ? ? ? ? ? yes ? no 10.8 yes ""
- _FldNameList[42] > AnaDat.Artst.Letzt_Eing
- "Letzt_Eing" "Letzt_Eing" ? ? "date" ? ? ? ? ? ? yes ? no 10.8 yes ""
- _FldNameList[43] > AnaDat.Artst.Edat
- "Edat" "ErfDat" "ErfDat" ? "date" ? ? ? ? ? ? yes ? no 10.8 yes ""
- _FldNameList[44] > AnaDat.Artst.Esbkb
- "Esbkb" "ErfSb" "ErfSb" ? "character" ? ? ? ? ? ? yes ? no 6 yes ""
- _FldNameList[45] > AnaDat.Artst.Mdat
- "Mdat" "MutDat" "MutDat" ? "date" ? ? ? ? ? ? yes ? no 10.8 yes ""
- _FldNameList[46] > AnaDat.Artst.Msbkb
- "Msbkb" "MutSb" "MutSb" ? "character" ? ? ? ? ? ? yes ? no 6.4 yes ""
- _FldNameList[47] > AnaDat.Artst.MutFlag
- "MutFlag" "MutFlag" ? ? "logical" ? ? ? ? ? ? yes ? no 7.6 yes ""
- _FldNameList[48] > AnaDat.Artst.Res_c1
- "Res_c1" "Res_c1" ? ? "character" ? ? ? ? ? ? yes ? no 8 yes ""
- _FldNameList[49] > AnaDat.Artst.Res_c2
- "Res_c2" "Res_c2" ? ? "character" ? ? ? ? ? ? yes ? no 8 yes ""
- _FldNameList[50] > AnaDat.Artst.Res_i1
- "Res_i1" "Res_i1" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ""
- _FldNameList[51] > AnaDat.Artst.Style
- "Style" "Style" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ""
- _FldNameList[52] > AnaDat.Artst.Aktiv
- "Aktiv" "Aktiv" ? ? "logical" ? ? ? ? ? ? yes ? no 4.8 yes ""
- _FldNameList[53] > AnaDat.Artst.EShop
- "EShop" "EShop" ? ? "logical" ? ? ? ? ? ? yes ? no 6.4 yes ""
- _FldNameList[54] > AnaDat.Artst.FremdNr
- "FremdNr" "FremdNr" ? ? "character" ? ? ? ? ? ? yes ? no 14 yes ?
- _FldNameList[55] > "_<CALC>"
- "RECID(Artst)" "iRecid" "ARecid" "->,>>>,>>9" "Integer" ? ? ? ? ? ? yes ? no 10.2 no ?
- _FldNameList[56] > "_<CALC>"
- "STRING(ROWID(Artst))" "cRowid" "ARowid" "x(8)" "character" ? ? ? ? ? ? yes ? no 8 no ?
- _FldNameList[57] > AnaDat.Artst.Mind_Bestand
- "Mind_Bestand" "Mind_Bestand" ? ? "integer" ? ? ? ? ? ? yes ? no 13.6 yes ?
- _FldNameList[58] > AnaDat.Artst.Mind_MHD
- "Mind_MHD" "Mind_MHD" ? ? "integer" ? ? ? ? ? ? yes ? no 14.8 yes ?
- _FldNameList[59] > AnaDat.Artst.lVerfall
- "lVerfall" "lVerfall" ? ? "logical" ? ? ? ? ? ? yes ? no 6.2 yes ?
- _FldNameList[60] > AnaDat.Artst.lLotnr
- "lLotnr" "lLotnr" ? ? "logical" ? ? ? ? ? ? yes ? no 5.2 yes ?
- _FldNameList[61] > AnaDat.Artst.EShop_2
- "EShop_2" "EShop_2" ? ? "logical" ? ? ? ? ? ? yes ? no 8.8 yes ?
- _FldNameList[62] > AnaDat.Artst.EP-Intern
- "EP-Intern" "EP-Intern" ? ? "decimal" ? ? ? ? ? ? yes ? no 11 yes ?
- _FldNameList[63] > AnaDat.Artst.ArtikelBild
- "ArtikelBild" "ArtikelBild" ? ? "character" ? ? ? ? ? ? yes ? no 60 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 *************************** */
- SAktiv = DYNAMIC-FUNCTION('getSuperAktiv':U) NO-ERROR.
- IF SAktiv THEN DO:
- Firma = DYNAMIC-FUNCTION('GETMANDANT':U) NO-ERROR.
- END.
- SUBSCRIBE TO 'REFRESH_ARTIKEL' ANYWHERE NO-ERROR.
- xWhere = 'FOR EACH Artst USE-INDEX Artst-k1 '
- + 'WHERE Artst.Firma = "' + Firma + '" '
- + 'NO-LOCK INDEXED-REPOSITION '.
- &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: <none>
- ------------------------------------------------------------------------------*/
- ASSIGN
- rowObject.cRowid = (STRING(ROWID(Artst)))
- rowObject.iRecid = (RECID(Artst))
- .
- 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:
- ------------------------------------------------------------------------------*/
- DEFINE INPUT PARAMETER pcRelative AS CHARACTER NO-UNDO.
- /* Code placed here will execute PRIOR to standard behavior. */
- RUN SUPER( INPUT pcRelative).
- IF AVAILABLE rowObject THEN DO:
- DYNAMIC-FUNCTION('SETARTNR':U, INPUT rowObject.Artnr ,
- INPUT rowObject.Inhalt ,
- INPUT rowObject.Jahr ) NO-ERROR.
- END.
- 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: <none>
- 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.
- IF AVAILABLE rowObject THEN DO:
- DYNAMIC-FUNCTION('SETARTNR':U, INPUT rowObject.Artnr ,
- INPUT rowObject.Inhalt ,
- INPUT rowObject.Jahr ) NO-ERROR.
- END.
- 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.
- IF AVAILABLE rowObject THEN DO:
- DYNAMIC-FUNCTION('SETARTNR':U, INPUT rowObject.Artnr ,
- INPUT rowObject.Inhalt ,
- INPUT rowObject.Jahr ) NO-ERROR.
- END.
- 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.
- IF AVAILABLE rowObject THEN DO:
- DYNAMIC-FUNCTION('SETARTNR':U, INPUT rowObject.Artnr ,
- INPUT rowObject.Inhalt ,
- INPUT rowObject.Jahr ) NO-ERROR.
- END.
- 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.
- IF AVAILABLE rowObject THEN DO:
- DYNAMIC-FUNCTION('SETARTNR':U, INPUT rowObject.Artnr ,
- INPUT rowObject.Inhalt ,
- INPUT rowObject.Jahr ) NO-ERROR.
- END.
- 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:
- ------------------------------------------------------------------------------*/
- /* Code placed here will execute PRIOR to standard behavior. */
- RUN SUPER.
- 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: <none>
- 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}
- {&DB-REQUIRED-START}
- &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE OPENQUERY_FIND dTables _DB-REQUIRED
- PROCEDURE OPENQUERY_FIND :
- /*------------------------------------------------------------------------------
- Purpose:
- Parameters: <none>
- Notes:
- ------------------------------------------------------------------------------*/
- DEF INPUT PARAMETER ipSort AS INT NO-UNDO.
- xWhere = 'FOR EACH Artst USE-INDEX Artst-k' + STRING(ipSort,'9 ')
- + 'WHERE Artst.Firma = "' + Firma + '" '
- + 'NO-LOCK INDEXED-REPOSITION '.
- DYNAMIC-FUNCTION('openQuery':U).
- END PROCEDURE.
- /* _UIB-CODE-BLOCK-END */
- &ANALYZE-RESUME
- {&DB-REQUIRED-END}
- {&DB-REQUIRED-START}
- &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE REFRESH_ARTIKEL dTables _DB-REQUIRED
- PROCEDURE REFRESH_ARTIKEL :
- /*------------------------------------------------------------------------------
- Purpose:
- Parameters: <none>
- Notes:
- ------------------------------------------------------------------------------*/
- RUN refreshRow.
- END PROCEDURE.
- /* _UIB-CODE-BLOCK-END */
- &ANALYZE-RESUME
- {&DB-REQUIRED-END}
- {&DB-REQUIRED-START}
- &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE REPOS dTables _DB-REQUIRED
- PROCEDURE REPOS :
- /*------------------------------------------------------------------------------
- Purpose:
- Parameters: <none>
- 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('SETARTNR':U, INPUT Artst.Artnr,
- INPUT Artst.Inhalt,
- INPUT Artst.Jahr ) NO-ERROR.
- DYNAMIC-FUNCTION('fetchRowIdent':U, INPUT STRING(ROWID(Artst)), INPUT ? ).
- END PROCEDURE.
- /* _UIB-CODE-BLOCK-END */
- &ANALYZE-RESUME
- {&DB-REQUIRED-END}
- {&DB-REQUIRED-START}
- &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE SET_QUERYSTRING dTables _DB-REQUIRED
- PROCEDURE SET_QUERYSTRING :
- /*------------------------------------------------------------------------------
- Purpose:
- Parameters: <none>
- Notes:
- ------------------------------------------------------------------------------*/
- DEF INPUT PARAMETER ipStart AS CHAR NO-UNDO.
- DEF VAR ix AS INT NO-UNDO.
- DEF VAR i1 AS INT NO-UNDO.
- DEF VAR VSort AS INT NO-UNDO.
- DEF VAR xString AS CHAR NO-UNDO.
- DEF VAR VArtnr AS CHAR NO-UNDO.
- DEF VAR VInhalt AS CHAR NO-UNDO.
- DEF VAR VJahr AS CHAR NO-UNDO.
- DEF VAR VSuchbe AS CHAR NO-UNDO.
- DEF VAR VBez AS CHAR NO-UNDO.
- ix = NUM-ENTRIES( ipStart, CHR(01) ).
- VArtnr = '0'.
- VInhalt = '0'.
- VJahr = '0'.
- VSuchbe = ''.
- VBez = ''.
- IF Firma = '' THEN Firma = DYNAMIC-FUNCTION('GETMANDANT':U) NO-ERROR.
- DO i1 = 1 TO ix:
- CASE i1:
- WHEN 1 THEN VArtnr = ENTRY(i1, ipStart, CHR(01) ).
- WHEN 2 THEN VInhalt = ENTRY(i1, ipStart, CHR(01) ).
- WHEN 3 THEN VJahr = ENTRY(i1, ipStart, CHR(01) ).
- WHEN 4 THEN VSuchbe = ENTRY(i1, ipStart, CHR(01) ).
- WHEN 5 THEN VBez = ENTRY(i1, ipStart, CHR(01) ).
- END CASE.
- END.
-
- xWhere = 'WHERE Artst.Firma = "' + Firma + '" '.
- IF VArtnr <> '' THEN DO:
- VSort = 1.
- XString = 'AND Artst.Artnr >= ' + VArtnr + ' '.
- xWhere = xWhere + xString.
- END.
- IF VInhalt <> '' THEN DO:
- VSort = 1.
- XString = 'AND Artst.Inhalt = ' + VInhalt + ' '.
- xWhere = xWhere + xString.
- END.
- IF VJahr <> '' THEN DO:
- VSort = 1.
- XString = 'AND Artst.Jahr = ' + VJahr + ' '.
- xWhere = xWhere + xString.
- END.
- IF VSuchbe <> '' THEN DO:
- VSort = 2.
- XString = 'AND Artst.Suchbe BEGINS "' + VSuchbe + '" '.
- xWhere = xWhere + xString.
- END.
- IF VBez <> '' THEN DO:
- VSort = 3.
- XString = 'AND Artst.Bez BEGINS "' + VBez + '" '.
- xWhere = xWhere + xString.
- END.
- xWhere = 'FOR EACH Artst USE-INDEX Artst-k' + STRING(VSort,'9 ')
- + xWhere
- + ' NO-LOCK INDEXED-REPOSITION '.
- END PROCEDURE.
- /* _UIB-CODE-BLOCK-END */
- &ANALYZE-RESUME
- {&DB-REQUIRED-END}
- /* ************************ Function Implementations ***************** */
- {&DB-REQUIRED-START}
- &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION openQuery dTables _DB-REQUIRED
- FUNCTION openQuery RETURNS LOGICAL
- ( /* parameter-definitions */ ) :
- /*------------------------------------------------------------------------------
- Purpose: Super Override
- Notes:
- ------------------------------------------------------------------------------*/
- /* xWhere = 'Firma = "' + Firma + '" '. */
- /* DYNAMIC-FUNCTION('setQueryWhere':U, INPUT xWhere). */
-
- /* xSort = ''. */
- /* DYNAMIC-FUNCTION('setQuerySort':U, INPUT xSort). */
-
- /* xWhere = ''. */
- IF NOT lOpen THEN RETURN NO-APPLY.
-
- IF xWhere = '' THEN RUN SET_QUERYSTRING ('').
- DYNAMIC-FUNCTION('setQueryString':U, INPUT xWhere).
- RETURN SUPER( ).
- END FUNCTION.
- /* _UIB-CODE-BLOCK-END */
- &ANALYZE-RESUME
- {&DB-REQUIRED-END}
- {&DB-REQUIRED-START}
- &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION setOpenflag dTables _DB-REQUIRED
- FUNCTION setOpenflag RETURNS LOGICAL
- ( ipOpen AS LOG ) :
- /*------------------------------------------------------------------------------
- Purpose:
- Notes:
- ------------------------------------------------------------------------------*/
- lOpen = ipOpen.
- END FUNCTION.
- /* _UIB-CODE-BLOCK-END */
- &ANALYZE-RESUME
- {&DB-REQUIRED-END}
|