&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 Adresse &SCOPED-DEFINE TabWhere USE-INDEX Adresse-k1 ~ WHERE {&Tabelle}.Firma = ADFirma ~ AND {&Tabelle}.Knr = tRowObject.Knr { incl/datdefinition.i } DEF VAR VSort AS INT NO-UNDO INIT 1. DEF VAR VKnr AS CHAR NO-UNDO INIT '0'. DEF VAR VSuchbe AS CHAR NO-UNDO INIT ''. DEF VAR VFirma1 AS CHAR NO-UNDO INIT ''. DEF VAR VName AS CHAR NO-UNDO INIT ''. DEF VAR VStrasse AS CHAR NO-UNDO INIT ''. DEF VAR VPlz AS CHAR NO-UNDO INIT ''. DEF VAR VOrt AS CHAR NO-UNDO INIT ''. /* _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 Adresse /* Definitions for QUERY Query-Main */ &Scoped-Define ENABLED-FIELDS AdrArt Aktiv Anrcd AnschrFix Anschrift1 Anschrift2 Anschrift3 Anschrift4~ Anschrift5 Anschrift6 Anschrift7 Anschrift8 Anschrift9 Anschrift10~ Anschrift11 Anschrift12 Anzeig_br Bem BriefAnr Cd01 Cd02 Cd03 Cd04 Cd05~ Cd06 Cd07 Cd08 Cd09 Cd10 Cd11 Cd12 Cd13 Cd14 Cd15 ErfDat ErfSb Firma Firma1~ Firma2 Funktion Knr Lkz Mail MutDat MutSb Name Natel Ort Plz Postfach Sprcd~ Strasse Suchbe Tel-1 Tel-2 Tel-3 Tel-4 Titel Vorname Zusatz1 Zusatz2~ Homepage lFreigabe &Scoped-define ENABLED-FIELDS-IN-Adresse AdrArt Aktiv Anrcd AnschrFix ~ Anschrift1 Anschrift2 Anschrift3 Anschrift4 Anschrift5 Anschrift6 ~ Anschrift7 Anschrift8 Anschrift9 Anschrift10 Anschrift11 Anschrift12 ~ Anzeig_br Bem BriefAnr Cd01 Cd02 Cd03 Cd04 Cd05 Cd06 Cd07 Cd08 Cd09 Cd10 ~ Cd11 Cd12 Cd13 Cd14 Cd15 ErfDat ErfSb Firma Firma1 Firma2 Funktion Knr Lkz ~ Mail MutDat MutSb Name Natel Ort Plz Postfach Sprcd Strasse Suchbe Tel-1 ~ Tel-2 Tel-3 Tel-4 Titel Vorname Zusatz1 Zusatz2 Homepage lFreigabe &Scoped-Define DATA-FIELDS AdrArt Aktiv Anrcd AnschrFix Anschrift1 Anschrift2 Anschrift3 Anschrift4~ Anschrift5 Anschrift6 Anschrift7 Anschrift8 Anschrift9 Anschrift10~ Anschrift11 Anschrift12 Anzeig_br Bem BriefAnr Cd01 Cd02 Cd03 Cd04 Cd05~ Cd06 Cd07 Cd08 Cd09 Cd10 Cd11 Cd12 Cd13 Cd14 Cd15 ErfDat ErfSb Firma Firma1~ Firma2 Funktion Knr Lkz Mail MutDat MutSb Name Natel Ort Plz Postfach Sprcd~ Strasse Suchbe Tel-1 Tel-2 Tel-3 Tel-4 Titel Vorname Zusatz1 Zusatz2~ Homepage lFreigabe Adresse_Id &Scoped-define DATA-FIELDS-IN-Adresse AdrArt Aktiv Anrcd AnschrFix ~ Anschrift1 Anschrift2 Anschrift3 Anschrift4 Anschrift5 Anschrift6 ~ Anschrift7 Anschrift8 Anschrift9 Anschrift10 Anschrift11 Anschrift12 ~ Anzeig_br Bem BriefAnr Cd01 Cd02 Cd03 Cd04 Cd05 Cd06 Cd07 Cd08 Cd09 Cd10 ~ Cd11 Cd12 Cd13 Cd14 Cd15 ErfDat ErfSb Firma Firma1 Firma2 Funktion Knr Lkz ~ Mail MutDat MutSb Name Natel Ort Plz Postfach Sprcd Strasse Suchbe Tel-1 ~ Tel-2 Tel-3 Tel-4 Titel Vorname Zusatz1 Zusatz2 Homepage lFreigabe &Scoped-Define MANDATORY-FIELDS &Scoped-Define APPLICATION-SERVICE &Scoped-Define ASSIGN-LIST rowObject.Anschrift1 = Adresse.Anschrift[1]~ rowObject.Anschrift2 = Adresse.Anschrift[2]~ rowObject.Anschrift3 = Adresse.Anschrift[3]~ rowObject.Anschrift4 = Adresse.Anschrift[4]~ rowObject.Anschrift5 = Adresse.Anschrift[5]~ rowObject.Anschrift6 = Adresse.Anschrift[6]~ rowObject.Anschrift7 = Adresse.Anschrift[7]~ rowObject.Anschrift8 = Adresse.Anschrift[8]~ rowObject.Anschrift9 = Adresse.Anschrift[9]~ rowObject.Anschrift10 = Adresse.Anschrift[10]~ rowObject.Anschrift11 = Adresse.Anschrift[11]~ rowObject.Anschrift12 = Adresse.Anschrift[12] &Scoped-Define DATA-FIELD-DEFS "d-adresse.i" &Scoped-define QUERY-STRING-Query-Main FOR EACH Adresse NO-LOCK INDEXED-REPOSITION {&DB-REQUIRED-START} &Scoped-define OPEN-QUERY-Query-Main OPEN QUERY Query-Main FOR EACH Adresse NO-LOCK INDEXED-REPOSITION. {&DB-REQUIRED-END} &Scoped-define TABLES-IN-QUERY-Query-Main Adresse &Scoped-define FIRST-TABLE-IN-QUERY-Query-Main Adresse /* 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 openQuery dTables _DB-REQUIRED FUNCTION openQuery 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 Adresse 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 = 72.6. /* 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.Adresse" _Options = "NO-LOCK INDEXED-REPOSITION" _FldNameList[1] > AnaDat.Adresse.AdrArt "AdrArt" "AdrArt" ? ? "character" ? ? ? ? ? ? yes ? no 5.8 yes "" _FldNameList[2] > AnaDat.Adresse.Aktiv "Aktiv" "Aktiv" ? ? "logical" ? ? ? ? ? ? yes ? no 4.8 yes "" _FldNameList[3] > AnaDat.Adresse.Anrcd "Anrcd" "Anrcd" ? ? "integer" ? ? ? ? ? ? yes ? no 6.8 yes "" _FldNameList[4] > AnaDat.Adresse.AnschrFix "AnschrFix" "AnschrFix" ? ? "logical" ? ? ? ? ? ? yes ? no 9.2 yes "" _FldNameList[5] > AnaDat.Adresse.Anschrift[1] "Anschrift[1]" "Anschrift1" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes "" _FldNameList[6] > AnaDat.Adresse.Anschrift[2] "Anschrift[2]" "Anschrift2" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes "" _FldNameList[7] > AnaDat.Adresse.Anschrift[3] "Anschrift[3]" "Anschrift3" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes "" _FldNameList[8] > AnaDat.Adresse.Anschrift[4] "Anschrift[4]" "Anschrift4" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes "" _FldNameList[9] > AnaDat.Adresse.Anschrift[5] "Anschrift[5]" "Anschrift5" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes "" _FldNameList[10] > AnaDat.Adresse.Anschrift[6] "Anschrift[6]" "Anschrift6" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes "" _FldNameList[11] > AnaDat.Adresse.Anschrift[7] "Anschrift[7]" "Anschrift7" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes "" _FldNameList[12] > AnaDat.Adresse.Anschrift[8] "Anschrift[8]" "Anschrift8" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes "" _FldNameList[13] > AnaDat.Adresse.Anschrift[9] "Anschrift[9]" "Anschrift9" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes "" _FldNameList[14] > AnaDat.Adresse.Anschrift[10] "Anschrift[10]" "Anschrift10" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes "" _FldNameList[15] > AnaDat.Adresse.Anschrift[11] "Anschrift[11]" "Anschrift11" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes "" _FldNameList[16] > AnaDat.Adresse.Anschrift[12] "Anschrift[12]" "Anschrift12" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes "" _FldNameList[17] > AnaDat.Adresse.Anzeig_br "Anzeig_br" "Anzeig_br" ? ? "character" ? ? ? ? ? ? yes ? no 60 yes "" _FldNameList[18] > AnaDat.Adresse.Bem "Bem" "Bem" ? ? "character" ? ? ? ? ? ? yes ? no 500 yes "" _FldNameList[19] > AnaDat.Adresse.BriefAnr "BriefAnr" "BriefAnr" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes "" _FldNameList[20] > AnaDat.Adresse.Cd01 "Cd01" "Cd01" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes "" _FldNameList[21] > AnaDat.Adresse.Cd02 "Cd02" "Cd02" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes "" _FldNameList[22] > AnaDat.Adresse.Cd03 "Cd03" "Cd03" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes "" _FldNameList[23] > AnaDat.Adresse.Cd04 "Cd04" "Cd04" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes "" _FldNameList[24] > AnaDat.Adresse.Cd05 "Cd05" "Cd05" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes "" _FldNameList[25] > AnaDat.Adresse.Cd06 "Cd06" "Cd06" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes "" _FldNameList[26] > AnaDat.Adresse.Cd07 "Cd07" "Cd07" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes "" _FldNameList[27] > AnaDat.Adresse.Cd08 "Cd08" "Cd08" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes "" _FldNameList[28] > AnaDat.Adresse.Cd09 "Cd09" "Cd09" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes "" _FldNameList[29] > AnaDat.Adresse.Cd10 "Cd10" "Cd10" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes "" _FldNameList[30] > AnaDat.Adresse.Cd11 "Cd11" "Cd11" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes "" _FldNameList[31] > AnaDat.Adresse.Cd12 "Cd12" "Cd12" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes "" _FldNameList[32] > AnaDat.Adresse.Cd13 "Cd13" "Cd13" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes "" _FldNameList[33] > AnaDat.Adresse.Cd14 "Cd14" "Cd14" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes "" _FldNameList[34] > AnaDat.Adresse.Cd15 "Cd15" "Cd15" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes "" _FldNameList[35] > AnaDat.Adresse.ErfDat "ErfDat" "ErfDat" ? ? "date" ? ? ? ? ? ? yes ? no 11.6 yes "" _FldNameList[36] > AnaDat.Adresse.ErfSb "ErfSb" "ErfSb" ? ? "character" ? ? ? ? ? ? yes ? no 5.2 yes "" _FldNameList[37] > AnaDat.Adresse.Firma "Firma" "Firma" ? ? "character" ? ? ? ? ? ? yes ? no 8.4 yes "" _FldNameList[38] > AnaDat.Adresse.Firma1 "Firma1" "Firma1" ? ? "character" ? ? ? ? ? ? yes ? no 35 yes "" _FldNameList[39] > AnaDat.Adresse.Firma2 "Firma2" "Firma2" ? ? "character" ? ? ? ? ? ? yes ? no 35 yes "" _FldNameList[40] > AnaDat.Adresse.Funktion "Funktion" "Funktion" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes "" _FldNameList[41] > AnaDat.Adresse.Knr "Knr" "Knr" ? ? "integer" ? ? ? ? ? ? yes ? no 7.8 yes "" _FldNameList[42] > AnaDat.Adresse.Lkz "Lkz" "Lkz" ? ? "character" ? ? ? ? ? ? yes ? no 3.4 yes "" _FldNameList[43] > AnaDat.Adresse.Mail "Mail" "Mail" ? ? "character" ? ? ? ? ? ? yes ? no 40 yes "" _FldNameList[44] > AnaDat.Adresse.MutDat "MutDat" "MutDat" ? ? "date" ? ? ? ? ? ? yes ? no 11.6 yes "" _FldNameList[45] > AnaDat.Adresse.MutSb "MutSb" "MutSb" ? ? "character" ? ? ? ? ? ? yes ? no 6.2 yes "" _FldNameList[46] > AnaDat.Adresse.Name "Name" "Name" ? ? "character" ? ? ? ? ? ? yes ? no 35 yes "" _FldNameList[47] > AnaDat.Adresse.Natel "Natel" "Natel" ? ? "character" ? ? ? ? ? ? yes ? no 20 yes "" _FldNameList[48] > AnaDat.Adresse.Ort "Ort" "Ort" ? ? "character" ? ? ? ? ? ? yes ? no 30 yes "" _FldNameList[49] > AnaDat.Adresse.Plz "Plz" "Plz" ? ? "character" ? ? ? ? ? ? yes ? no 8 yes "" _FldNameList[50] > AnaDat.Adresse.Postfach "Postfach" "Postfach" ? ? "character" ? ? ? ? ? ? yes ? no 30 yes "" _FldNameList[51] > AnaDat.Adresse.Sprcd "Sprcd" "Sprcd" ? ? "integer" ? ? ? ? ? ? yes ? no 8 yes "" _FldNameList[52] > AnaDat.Adresse.Strasse "Strasse" "Strasse" ? ? "character" ? ? ? ? ? ? yes ? no 30 yes "" _FldNameList[53] > AnaDat.Adresse.Suchbe "Suchbe" "Suchbe" ? ? "character" ? ? ? ? ? ? yes ? no 20 yes "" _FldNameList[54] > AnaDat.Adresse.Tel-1 "Tel-1" "Tel-1" ? ? "character" ? ? ? ? ? ? yes ? no 20 yes "" _FldNameList[55] > AnaDat.Adresse.Tel-2 "Tel-2" "Tel-2" ? ? "character" ? ? ? ? ? ? yes ? no 20 yes "" _FldNameList[56] > AnaDat.Adresse.Tel-3 "Tel-3" "Tel-3" ? ? "character" ? ? ? ? ? ? yes ? no 20 yes "" _FldNameList[57] > AnaDat.Adresse.Tel-4 "Tel-4" "Tel-4" ? ? "character" ? ? ? ? ? ? yes ? no 20 yes "" _FldNameList[58] > AnaDat.Adresse.Titel "Titel" "Titel" ? ? "character" ? ? ? ? ? ? yes ? no 20 yes "" _FldNameList[59] > AnaDat.Adresse.Vorname "Vorname" "Vorname" ? ? "character" ? ? ? ? ? ? yes ? no 20 yes "" _FldNameList[60] > AnaDat.Adresse.Zusatz1 "Zusatz1" "Zusatz1" ? ? "character" ? ? ? ? ? ? yes ? no 35 yes "" _FldNameList[61] > AnaDat.Adresse.Zusatz2 "Zusatz2" "Zusatz2" ? ? "character" ? ? ? ? ? ? yes ? no 35 yes "" _FldNameList[62] > AnaDat.Adresse.Homepage "Homepage" "Homepage" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes "" _FldNameList[63] > AnaDat.Adresse.lFreigabe "lFreigabe" "lFreigabe" ? ? "logical" ? ? ? ? ? ? yes ? no 8.6 yes ? _FldNameList[64] > "_" "RECID(Adresse)" "Adresse_Id" "Recid Adresse" "->>>,>>>,>>9" "INT64" ? ? ? ? ? ? no ? no 13.8 no ? _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 } xWhere = ''. &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.Adresse_Id = (RECID(Adresse)) . 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 } IF AVAILABLE rowObject AND rowObject.Knr > 0 THEN DO: DYNAMIC-FUNCTION('SETKNR':U, INPUT rowObject.Knr ) 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: 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: ------------------------------------------------------------------------------*/ RUN SUPER. IF AVAILABLE rowObject THEN DO: DYNAMIC-FUNCTION('SETKNR':U, INPUT rowObject.Knr ) 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('SETKNR':U, INPUT rowObject.Knr ) 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('SETKNR':U, INPUT rowObject.Knr ) 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('SETKNR':U, INPUT rowObject.Knr ) NO-ERROR. END. 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: ------------------------------------------------------------------------------*/ { 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: ------------------------------------------------------------------------------*/ { incl/datinitialize.i } END PROCEDURE. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME {&DB-REQUIRED-END} {&DB-REQUIRED-START} &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE OPENQUERY_REPOS dTables _DB-REQUIRED PROCEDURE OPENQUERY_REPOS : /*------------------------------------------------------------------------------ Purpose: Parameters: Notes: ------------------------------------------------------------------------------*/ DEF INPUT PARAMETER ipRecid AS RECID NO-UNDO. DEF INPUT PARAMETER ipSort AS INT NO-UNDO. DEF VAR Mandant AS CHAR NO-UNDO. Mandant = DYNAMIC-FUNCTION('GETADMANDANT':U) NO-ERROR. xWhere = 'FOR EACH Adresse USE-INDEX Adresse-k' + STRING(ipSort,'9 ') + 'WHERE Adresse.Firma = "' + Mandant + '" ' + ' 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 REAKTIVIEREN dTables _DB-REQUIRED PROCEDURE REAKTIVIEREN : /*------------------------------------------------------------------------------ Purpose: Parameters: Notes: ------------------------------------------------------------------------------*/ { incl/datreaktivieren.i } 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: Notes: ------------------------------------------------------------------------------*/ DEF INPUT PARAMETER ipRecid AS RECID NO-UNDO. FIND Adresse WHERE RECID(Adresse) = ipRecid NO-LOCK NO-ERROR. IF NOT AVAILABLE Adresse THEN RETURN. DYNAMIC-FUNCTION('SETKNR':U, INPUT Adresse.Knr ) NO-ERROR. DYNAMIC-FUNCTION('fetchRowIdent':U, INPUT STRING(ROWID(Adresse)), INPUT ? ). 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: ------------------------------------------------------------------------------*/ DEFINE INPUT PARAMETER iplOpen AS LOGICAL NO-UNDO. fOpen = iplOpen. DYNAMIC-FUNCTION('openQuery':U) NO-ERROR. 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: 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 xString AS CHAR NO-UNDO. DEF VAR Mandant AS CHAR NO-UNDO. DEF VAR lInaktiv AS LOG NO-UNDO. lInaktiv = DYNAMIC-FUNCTION('getAnzeigeAdresseInaktiv':U) NO-ERROR. IF lInaktiv = ? THEN lInaktiv = TRUE. ix = NUM-ENTRIES( ipStart, CHR(01) ). VKnr = '0'. VSuchbe = ''. VFirma1 = ''. VName = ''. VStrasse = ''. VPlz = ''. VOrt = ''. Mandant = DYNAMIC-FUNCTION('GETADMANDANT':U) NO-ERROR. DO i1 = 1 TO ix: CASE i1: WHEN 1 THEN VKnr = ENTRY(i1, ipStart, CHR(01) ). WHEN 2 THEN VSuchbe = ENTRY(i1, ipStart, CHR(01) ). WHEN 3 THEN VFirma1 = ENTRY(i1, ipStart, CHR(01) ). WHEN 4 THEN VName = ENTRY(i1, ipStart, CHR(01) ). WHEN 5 THEN VStrasse = ENTRY(i1, ipStart, CHR(01) ). WHEN 6 THEN VPlz = ENTRY(i1, ipStart, CHR(01) ). WHEN 7 THEN VOrt = ENTRY(i1, ipStart, CHR(01) ). END CASE. END. xWhere = 'WHERE Adresse.Firma = "' + Mandant + '" '. IF VKnr <> '' THEN DO: VSort = 1. XString = 'AND Adresse.Knr >= ' + VKnr + ' '. xWhere = xWhere + xString. END. IF VSuchbe <> '' THEN DO: VSort = 2. XString = 'AND Adresse.Suchbe BEGINS "' + VSuchbe + '" '. xWhere = xWhere + xString. END. IF VFirma1 <> '' THEN DO: VSort = 3. XString = 'AND Adresse.Firma1 BEGINS "' + VFirma1 + '" '. xWhere = xWhere + xString. END. IF VName <> '' THEN DO: VSort = 4. XString = 'AND Adresse.Name BEGINS "' + VName + '" '. xWhere = xWhere + xString. END. IF VOrt <> '' THEN DO: VSort = 5. XString = 'AND Adresse.Ort BEGINS "' + VOrt + '" '. xWhere = xWhere + xString. END. IF VPlz <> '' THEN DO: VSort = 6. XString = 'AND Adresse.Plz BEGINS "' + VPlz + '" '. xWhere = xWhere + xString. END. IF VStrasse <> '' THEN DO: VSort = 7. XString = 'AND Adresse.Strasse BEGINS "' + VStrasse + '" '. xWhere = xWhere + xString. END. IF NOT lInaktiv THEN xWhere = xWhere + 'AND Adresse.Aktiv '. xWhere = 'FOR EACH Adresse USE-INDEX Adresse-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 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 openQuery dTables _DB-REQUIRED FUNCTION openQuery RETURNS LOGICAL ( /* parameter-definitions */ ) : /*------------------------------------------------------------------------------ Purpose: Super Override Notes: ------------------------------------------------------------------------------*/ xWhere = ''. /* DYNAMIC-FUNCTION('setQueryWhere':U, INPUT xWhere). */ /* xSort = ''. */ /* DYNAMIC-FUNCTION('setQuerySort':U, INPUT xSort). */ IF xWhere = '' THEN RUN SET_QUERYSTRING ( INPUT '0' ). DYNAMIC-FUNCTION('setQueryString':U, INPUT xWhere). RETURN SUPER( ). END FUNCTION. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME {&DB-REQUIRED-END}