d-besze-auswahl.w 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631
  1. &ANALYZE-SUSPEND _VERSION-NUMBER AB_v10r12 GUI ADM2
  2. &ANALYZE-RESUME
  3. /* Connected Databases
  4. anadat PROGRESS
  5. */
  6. &Scoped-define WINDOW-NAME CURRENT-WINDOW
  7. {adecomm/appserv.i}
  8. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS dTables
  9. /*------------------------------------------------------------------------
  10. File:
  11. Description: from DATA.W - Template For SmartData objects in the ADM
  12. Input Parameters:
  13. <none>
  14. Output Parameters:
  15. <none>
  16. Modified: February 24, 1999
  17. ------------------------------------------------------------------------*/
  18. /* This .W file was created with the Progress AppBuilder. */
  19. /*----------------------------------------------------------------------*/
  20. /* Create an unnamed pool to store all the widgets created
  21. by this procedure. This is a good default which assures
  22. that this procedure's triggers and internal procedures
  23. will execute in this procedure's storage, and that proper
  24. cleanup will occur on deletion of the procedure. */
  25. CREATE WIDGET-POOL.
  26. /* *************************** Definitions ************************** */
  27. /* Parameters Definitions --- */
  28. /* Local Variable Definitions --- */
  29. DEF VAR iBesnr AS INT NO-UNDO.
  30. &glob DATA-LOGIC-PROCEDURE .p
  31. &SCOPED-DEFINE Tabelle Besze
  32. &SCOPED-DEFINE TabWhere /* USE-INDEX Benutzer-k1 ~
  33. WHERE {&Tabelle}.Benutzer = tRowObject.Benutzer
  34. */
  35. { incl/datdefinition.i }
  36. /* _UIB-CODE-BLOCK-END */
  37. &ANALYZE-RESUME
  38. &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
  39. /* ******************** Preprocessor Definitions ******************** */
  40. &Scoped-define PROCEDURE-TYPE SmartDataObject
  41. &Scoped-define DB-AWARE yes
  42. &Scoped-define ADM-SUPPORTED-LINKS Data-Source,Data-Target,Navigation-Target,Update-Target,Commit-Target,Filter-Target
  43. /* Db-Required definitions. */
  44. &IF DEFINED(DB-REQUIRED) = 0 &THEN
  45. &GLOBAL-DEFINE DB-REQUIRED TRUE
  46. &ENDIF
  47. &GLOBAL-DEFINE DB-REQUIRED-START &IF {&DB-REQUIRED} &THEN
  48. &GLOBAL-DEFINE DB-REQUIRED-END &ENDIF
  49. &Scoped-define QUERY-NAME Query-Main
  50. /* Internal Tables (found by Frame, Query & Browse Queries) */
  51. &Scoped-define INTERNAL-TABLES Besze
  52. /* Definitions for QUERY Query-Main */
  53. &Scoped-Define ENABLED-FIELDS Artnr Inhalt Jahr Bez1 Bez2 MBest MGeli Eingang Aktion Alter_EP~
  54. Alter_Listen_EP Besnr Best_Sta EP Faktor Firma FRW Gewicht GGebKto GGeb_Cd~
  55. GGeb_EG GGeb_Me KGebKto KGeb_Cd KGeb_EG KGeb_Me Kurs Lager Liter lLotnr~
  56. lVerfall L_EP L_EP_FRW L_Rabatt MRuek Netto Pos Preis Rabatt Rueckstand~
  57. Spesen SpesenBetr S_Artnr S_Bez1 S_Bez2 S_Preis S_Preis_FRW Trnr Verbrauch~
  58. Verbucht VGebKto VGeb_Cd VGeb_EG VGeb_Me ZusRab
  59. &Scoped-define ENABLED-FIELDS-IN-Besze Artnr Inhalt Jahr Bez1 Bez2 MBest ~
  60. MGeli Eingang Aktion Alter_EP Alter_Listen_EP Besnr Best_Sta EP Faktor ~
  61. Firma FRW Gewicht GGebKto GGeb_Cd GGeb_EG GGeb_Me KGebKto KGeb_Cd KGeb_EG ~
  62. KGeb_Me Kurs Lager Liter lLotnr lVerfall L_EP L_EP_FRW L_Rabatt MRuek Netto ~
  63. Pos Preis Rabatt Rueckstand Spesen SpesenBetr S_Artnr S_Bez1 S_Bez2 S_Preis ~
  64. S_Preis_FRW Trnr Verbrauch Verbucht VGebKto VGeb_Cd VGeb_EG VGeb_Me ZusRab
  65. &Scoped-Define DATA-FIELDS Artnr Inhalt Jahr Bez1 Bez2 MBest MGeli Eingang Aktion Alter_EP~
  66. Alter_Listen_EP Besnr Best_Sta EP Faktor Firma FRW Gewicht GGebKto GGeb_Cd~
  67. GGeb_EG GGeb_Me KGebKto KGeb_Cd KGeb_EG KGeb_Me Kurs Lager Liter lLotnr~
  68. lVerfall L_EP L_EP_FRW L_Rabatt MRuek Netto Pos Preis Rabatt Rueckstand~
  69. Spesen SpesenBetr S_Artnr S_Bez1 S_Bez2 S_Preis S_Preis_FRW Trnr Verbrauch~
  70. Verbucht VGebKto VGeb_Cd VGeb_EG VGeb_Me ZusRab
  71. &Scoped-define DATA-FIELDS-IN-Besze Artnr Inhalt Jahr Bez1 Bez2 MBest MGeli ~
  72. Eingang Aktion Alter_EP Alter_Listen_EP Besnr Best_Sta EP Faktor Firma FRW ~
  73. Gewicht GGebKto GGeb_Cd GGeb_EG GGeb_Me KGebKto KGeb_Cd KGeb_EG KGeb_Me ~
  74. Kurs Lager Liter lLotnr lVerfall L_EP L_EP_FRW L_Rabatt MRuek Netto Pos ~
  75. Preis Rabatt Rueckstand Spesen SpesenBetr S_Artnr S_Bez1 S_Bez2 S_Preis ~
  76. S_Preis_FRW Trnr Verbrauch Verbucht VGebKto VGeb_Cd VGeb_EG VGeb_Me ZusRab
  77. &Scoped-Define MANDATORY-FIELDS Firma
  78. &Scoped-Define APPLICATION-SERVICE
  79. &Scoped-Define ASSIGN-LIST
  80. &Scoped-Define DATA-FIELD-DEFS "d-besze-auswahl.i"
  81. &Scoped-Define DATA-TABLE-NO-UNDO NO-UNDO
  82. &Scoped-define QUERY-STRING-Query-Main FOR EACH Besze NO-LOCK INDEXED-REPOSITION
  83. {&DB-REQUIRED-START}
  84. &Scoped-define OPEN-QUERY-Query-Main OPEN QUERY Query-Main FOR EACH Besze NO-LOCK INDEXED-REPOSITION.
  85. {&DB-REQUIRED-END}
  86. &Scoped-define TABLES-IN-QUERY-Query-Main Besze
  87. &Scoped-define FIRST-TABLE-IN-QUERY-Query-Main Besze
  88. /* Custom List Definitions */
  89. /* List-1,List-2,List-3,List-4,List-5,List-6 */
  90. /* _UIB-PREPROCESSOR-BLOCK-END */
  91. &ANALYZE-RESUME
  92. /* ************************ Function Prototypes ********************** */
  93. {&DB-REQUIRED-START}
  94. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD getCurrentRecid dTables _DB-REQUIRED
  95. FUNCTION getCurrentRecid RETURNS RECID
  96. ( /* parameter-definitions */ ) FORWARD.
  97. /* _UIB-CODE-BLOCK-END */
  98. &ANALYZE-RESUME
  99. {&DB-REQUIRED-END}
  100. {&DB-REQUIRED-START}
  101. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD getQueryBuffer dTables _DB-REQUIRED
  102. FUNCTION getQueryBuffer RETURNS HANDLE
  103. ( /* parameter-definitions */ ) FORWARD.
  104. /* _UIB-CODE-BLOCK-END */
  105. &ANALYZE-RESUME
  106. {&DB-REQUIRED-END}
  107. {&DB-REQUIRED-START}
  108. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD openQuery dTables _DB-REQUIRED
  109. FUNCTION openQuery RETURNS LOGICAL
  110. ( /* parameter-definitions */ ) FORWARD.
  111. /* _UIB-CODE-BLOCK-END */
  112. &ANALYZE-RESUME
  113. {&DB-REQUIRED-END}
  114. /* *********************** Control Definitions ********************** */
  115. {&DB-REQUIRED-START}
  116. /* Query definitions */
  117. &ANALYZE-SUSPEND
  118. DEFINE QUERY Query-Main FOR
  119. Besze SCROLLING.
  120. &ANALYZE-RESUME
  121. {&DB-REQUIRED-END}
  122. /* ************************ Frame Definitions *********************** */
  123. /* *********************** Procedure Settings ************************ */
  124. &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
  125. /* Settings for THIS-PROCEDURE
  126. Type: SmartDataObject
  127. Allow: Query
  128. Frames: 0
  129. Add Fields to: Neither
  130. Other Settings: PERSISTENT-ONLY COMPILE APPSERVER DB-AWARE
  131. */
  132. /* This procedure should always be RUN PERSISTENT. Report the error, */
  133. /* then cleanup and return. */
  134. IF NOT THIS-PROCEDURE:PERSISTENT THEN DO:
  135. MESSAGE "{&FILE-NAME} should only be RUN PERSISTENT.":U
  136. VIEW-AS ALERT-BOX ERROR BUTTONS OK.
  137. RETURN.
  138. END.
  139. &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
  140. /* ************************* Create Window ************************** */
  141. &ANALYZE-SUSPEND _CREATE-WINDOW
  142. /* DESIGN Window definition (used by the UIB)
  143. CREATE WINDOW dTables ASSIGN
  144. HEIGHT = 1.62
  145. WIDTH = 101.6.
  146. /* END WINDOW DEFINITION */
  147. */
  148. &ANALYZE-RESUME
  149. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB dTables
  150. /* ************************* Included-Libraries *********************** */
  151. {src/adm2/data.i}
  152. /* _UIB-CODE-BLOCK-END */
  153. &ANALYZE-RESUME
  154. /* *********** Runtime Attributes and AppBuilder Settings *********** */
  155. &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES
  156. /* SETTINGS FOR WINDOW dTables
  157. VISIBLE,,RUN-PERSISTENT */
  158. /* _RUN-TIME-ATTRIBUTES-END */
  159. &ANALYZE-RESUME
  160. /* Setting information for Queries and Browse Widgets fields */
  161. &ANALYZE-SUSPEND _QUERY-BLOCK QUERY Query-Main
  162. /* Query rebuild information for SmartDataObject Query-Main
  163. _TblList = "AnaDat.Besze"
  164. _Options = "NO-LOCK INDEXED-REPOSITION"
  165. _FldNameList[1] > AnaDat.Besze.Artnr
  166. "Artnr" "Artnr" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ?
  167. _FldNameList[2] > AnaDat.Besze.Inhalt
  168. "Inhalt" "Inhalt" ? ? "integer" ? ? ? ? ? ? yes ? no 5.2 yes ?
  169. _FldNameList[3] > AnaDat.Besze.Jahr
  170. "Jahr" "Jahr" ? ? "integer" ? ? ? ? ? ? yes ? no 4.8 yes ?
  171. _FldNameList[4] > AnaDat.Besze.Bez1
  172. "Bez1" "Bez1" ? ? "character" ? ? ? ? ? ? yes ? no 30 yes ?
  173. _FldNameList[5] > AnaDat.Besze.Bez2
  174. "Bez2" "Bez2" ? ? "character" ? ? ? ? ? ? yes ? no 30 yes ?
  175. _FldNameList[6] > AnaDat.Besze.MBest
  176. "MBest" "MBest" ? ? "decimal" ? ? ? ? ? ? yes ? no 8.8 yes ?
  177. _FldNameList[7] > AnaDat.Besze.MGeli
  178. "MGeli" "MGeli" ? ? "decimal" ? ? ? ? ? ? yes ? no 8.8 yes ?
  179. _FldNameList[8] > AnaDat.Besze.Eingang
  180. "Eingang" "Eingang" ? ? "decimal" ? ? ? ? ? ? yes ? no 8.8 yes ?
  181. _FldNameList[9] > AnaDat.Besze.Aktion
  182. "Aktion" "Aktion" ? ? "logical" ? ? ? ? ? ? yes ? no 6 yes ?
  183. _FldNameList[10] > AnaDat.Besze.Alter_EP
  184. "Alter_EP" "Alter_EP" ? ? "decimal" ? ? ? ? ? ? yes ? no 12.2 yes ?
  185. _FldNameList[11] > AnaDat.Besze.Alter_Listen_EP
  186. "Alter_Listen_EP" "Alter_Listen_EP" ? ? "decimal" ? ? ? ? ? ? yes ? no 15 yes ?
  187. _FldNameList[12] > AnaDat.Besze.Besnr
  188. "Besnr" "Besnr" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ?
  189. _FldNameList[13] > AnaDat.Besze.Best_Sta
  190. "Best_Sta" "Best_Sta" ? ? "integer" ? ? ? ? ? ? yes ? no 8.6 yes ?
  191. _FldNameList[14] > AnaDat.Besze.EP
  192. "EP" "EP" ? ? "decimal" ? ? ? ? ? ? yes ? no 12.2 yes ?
  193. _FldNameList[15] > AnaDat.Besze.Faktor
  194. "Faktor" "Faktor" ? ? "integer" ? ? ? ? ? ? yes ? no 6 yes ?
  195. _FldNameList[16] > AnaDat.Besze.Firma
  196. "Firma" "Firma" ? ? "character" ? ? ? ? ? ? yes ? yes 8 yes ?
  197. _FldNameList[17] > AnaDat.Besze.FRW
  198. "FRW" "FRW" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes ?
  199. _FldNameList[18] > AnaDat.Besze.Gewicht
  200. "Gewicht" "Gewicht" ? ? "decimal" ? ? ? ? ? ? yes ? no 11.6 yes ?
  201. _FldNameList[19] > AnaDat.Besze.GGebKto
  202. "GGebKto" "GGebKto" ? ? "character" ? ? ? ? ? ? yes ? no 8.8 yes ?
  203. _FldNameList[20] > AnaDat.Besze.GGeb_Cd
  204. "GGeb_Cd" "GGeb_Cd" ? ? "character" ? ? ? ? ? ? yes ? no 9.4 yes ?
  205. _FldNameList[21] > AnaDat.Besze.GGeb_EG
  206. "GGeb_EG" "GGeb_EG" ? ? "decimal" ? ? ? ? ? ? yes ? no 10.4 yes ?
  207. _FldNameList[22] > AnaDat.Besze.GGeb_Me
  208. "GGeb_Me" "GGeb_Me" ? ? "decimal" ? ? ? ? ? ? yes ? no 10.4 yes ?
  209. _FldNameList[23] > AnaDat.Besze.KGebKto
  210. "KGebKto" "KGebKto" ? ? "character" ? ? ? ? ? ? yes ? no 8.6 yes ?
  211. _FldNameList[24] > AnaDat.Besze.KGeb_Cd
  212. "KGeb_Cd" "KGeb_Cd" ? ? "character" ? ? ? ? ? ? yes ? no 9.2 yes ?
  213. _FldNameList[25] > AnaDat.Besze.KGeb_EG
  214. "KGeb_EG" "KGeb_EG" ? ? "decimal" ? ? ? ? ? ? yes ? no 10.4 yes ?
  215. _FldNameList[26] > AnaDat.Besze.KGeb_Me
  216. "KGeb_Me" "KGeb_Me" ? ? "decimal" ? ? ? ? ? ? yes ? no 10.4 yes ?
  217. _FldNameList[27] > AnaDat.Besze.Kurs
  218. "Kurs" "Kurs" ? ? "decimal" ? ? ? ? ? ? yes ? no 13.6 yes ?
  219. _FldNameList[28] > AnaDat.Besze.Lager
  220. "Lager" "Lager" ? ? "integer" ? ? ? ? ? ? yes ? no 5.4 yes ?
  221. _FldNameList[29] > AnaDat.Besze.Liter
  222. "Liter" "Liter" ? ? "decimal" ? ? ? ? ? ? yes ? no 11.6 yes ?
  223. _FldNameList[30] > AnaDat.Besze.lLotnr
  224. "lLotnr" "lLotnr" ? ? "logical" ? ? ? ? ? ? yes ? no 5.2 yes ?
  225. _FldNameList[31] > AnaDat.Besze.lVerfall
  226. "lVerfall" "lVerfall" ? ? "logical" ? ? ? ? ? ? yes ? no 6.2 yes ?
  227. _FldNameList[32] > AnaDat.Besze.L_EP
  228. "L_EP" "L_EP" ? ? "decimal" ? ? ? ? ? ? yes ? no 12.2 yes ?
  229. _FldNameList[33] > AnaDat.Besze.L_EP_FRW
  230. "L_EP_FRW" "L_EP_FRW" ? ? "decimal" ? ? ? ? ? ? yes ? no 15.8 yes ?
  231. _FldNameList[34] > AnaDat.Besze.L_Rabatt
  232. "L_Rabatt" "L_Rabatt" ? ? "decimal" ? ? ? ? ? ? yes ? no 8.8 yes ?
  233. _FldNameList[35] > AnaDat.Besze.MRuek
  234. "MRuek" "MRuek" ? ? "decimal" ? ? ? ? ? ? yes ? no 8.8 yes ?
  235. _FldNameList[36] > AnaDat.Besze.Netto
  236. "Netto" "Netto" ? ? "decimal" ? ? ? ? ? ? yes ? no 10.4 yes ?
  237. _FldNameList[37] > AnaDat.Besze.Pos
  238. "Pos" "Pos" ? ? "integer" ? ? ? ? ? ? yes ? no 4.8 yes ?
  239. _FldNameList[38] > AnaDat.Besze.Preis
  240. "Preis" "Preis" ? ? "decimal" ? ? ? ? ? ? yes ? no 11 yes ?
  241. _FldNameList[39] > AnaDat.Besze.Rabatt
  242. "Rabatt" "Rabatt" ? ? "decimal" ? ? ? ? ? ? yes ? no 6.4 yes ?
  243. _FldNameList[40] > AnaDat.Besze.Rueckstand
  244. "Rueckstand" "Rueckstand" ? ? "decimal" ? ? ? ? ? ? yes ? no 14 yes ?
  245. _FldNameList[41] > AnaDat.Besze.Spesen
  246. "Spesen" "Spesen" ? ? "decimal" ? ? ? ? ? ? yes ? no 7.2 yes ?
  247. _FldNameList[42] > AnaDat.Besze.SpesenBetr
  248. "SpesenBetr" "SpesenBetr" ? ? "decimal" ? ? ? ? ? ? yes ? no 11 yes ?
  249. _FldNameList[43] > AnaDat.Besze.S_Artnr
  250. "S_Artnr" "S_Artnr" ? ? "character" ? ? ? ? ? ? yes ? no 12 yes ?
  251. _FldNameList[44] > AnaDat.Besze.S_Bez1
  252. "S_Bez1" "S_Bez1" ? ? "character" ? ? ? ? ? ? yes ? no 30 yes ?
  253. _FldNameList[45] > AnaDat.Besze.S_Bez2
  254. "S_Bez2" "S_Bez2" ? ? "character" ? ? ? ? ? ? yes ? no 30 yes ?
  255. _FldNameList[46] > AnaDat.Besze.S_Preis
  256. "S_Preis" "S_Preis" ? ? "decimal" ? ? ? ? ? ? yes ? no 12.2 yes ?
  257. _FldNameList[47] > AnaDat.Besze.S_Preis_FRW
  258. "S_Preis_FRW" "S_Preis_FRW" ? ? "decimal" ? ? ? ? ? ? yes ? no 15.8 yes ?
  259. _FldNameList[48] > AnaDat.Besze.Trnr
  260. "Trnr" "Trnr" ? ? "integer" ? ? ? ? ? ? yes ? no 9.6 yes ?
  261. _FldNameList[49] > AnaDat.Besze.Verbrauch
  262. "Verbrauch" "Verbrauch" ? ? "decimal" ? ? ? ? ? ? yes ? no 14 yes ?
  263. _FldNameList[50] > AnaDat.Besze.Verbucht
  264. "Verbucht" "Verbucht" ? ? "logical" ? ? ? ? ? ? yes ? no 8.6 yes ?
  265. _FldNameList[51] > AnaDat.Besze.VGebKto
  266. "VGebKto" "VGebKto" ? ? "character" ? ? ? ? ? ? yes ? no 8.6 yes ?
  267. _FldNameList[52] > AnaDat.Besze.VGeb_Cd
  268. "VGeb_Cd" "VGeb_Cd" ? ? "character" ? ? ? ? ? ? yes ? no 9.2 yes ?
  269. _FldNameList[53] > AnaDat.Besze.VGeb_EG
  270. "VGeb_EG" "VGeb_EG" ? ? "decimal" ? ? ? ? ? ? yes ? no 10.4 yes ?
  271. _FldNameList[54] > AnaDat.Besze.VGeb_Me
  272. "VGeb_Me" "VGeb_Me" ? ? "decimal" ? ? ? ? ? ? yes ? no 10.4 yes ?
  273. _FldNameList[55] > AnaDat.Besze.ZusRab
  274. "ZusRab" "ZusRab" ? ? "decimal" ? ? ? ? ? ? yes ? no 7.6 yes ?
  275. _Design-Parent is WINDOW dTables @ ( 1.14 , 2.6 )
  276. */ /* QUERY Query-Main */
  277. &ANALYZE-RESUME
  278. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK dTables
  279. /* *************************** Main Block *************************** */
  280. fOpen = FALSE.
  281. { incl/datmainblock.i }
  282. &IF DEFINED(UIB_IS_RUNNING) <> 0 &THEN
  283. RUN initializeObject.
  284. &ENDIF
  285. /* _UIB-CODE-BLOCK-END */
  286. &ANALYZE-RESUME
  287. /* ********************** Internal Procedures *********************** */
  288. {&DB-REQUIRED-START}
  289. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE dataAvailable dTables _DB-REQUIRED
  290. PROCEDURE dataAvailable :
  291. /*------------------------------------------------------------------------------
  292. Purpose: Super Override
  293. Parameters:
  294. Notes:
  295. ------------------------------------------------------------------------------*/
  296. { incl/datdataavailable.i }
  297. END PROCEDURE.
  298. /* _UIB-CODE-BLOCK-END */
  299. &ANALYZE-RESUME
  300. {&DB-REQUIRED-END}
  301. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI dTables _DEFAULT-DISABLE
  302. PROCEDURE disable_UI :
  303. /*------------------------------------------------------------------------------
  304. Purpose: DISABLE the User Interface
  305. Parameters: <none>
  306. Notes: Here we clean-up the user-interface by deleting
  307. dynamic widgets we have created and/or hide
  308. frames. This procedure is usually called when
  309. we are ready to "clean-up" after running.
  310. ------------------------------------------------------------------------------*/
  311. /* Hide all frames. */
  312. IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE.
  313. END PROCEDURE.
  314. /* _UIB-CODE-BLOCK-END */
  315. &ANALYZE-RESUME
  316. {&DB-REQUIRED-START}
  317. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE INAKTIVIEREN dTables _DB-REQUIRED
  318. PROCEDURE INAKTIVIEREN :
  319. /*------------------------------------------------------------------------------
  320. Purpose:
  321. Parameters: <none>
  322. Notes:
  323. ------------------------------------------------------------------------------*/
  324. { incl/datinaktivieren.i }
  325. END PROCEDURE.
  326. /* _UIB-CODE-BLOCK-END */
  327. &ANALYZE-RESUME
  328. {&DB-REQUIRED-END}
  329. {&DB-REQUIRED-START}
  330. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE initializeObject dTables _DB-REQUIRED
  331. PROCEDURE initializeObject :
  332. /*------------------------------------------------------------------------------
  333. Purpose: Super Override
  334. Parameters:
  335. Notes:
  336. ------------------------------------------------------------------------------*/
  337. { incl/datinitialize.i }
  338. END PROCEDURE.
  339. /* _UIB-CODE-BLOCK-END */
  340. &ANALYZE-RESUME
  341. {&DB-REQUIRED-END}
  342. {&DB-REQUIRED-START}
  343. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE REAKTIVIEREN dTables _DB-REQUIRED
  344. PROCEDURE REAKTIVIEREN :
  345. /*------------------------------------------------------------------------------
  346. Purpose:
  347. Parameters: <none>
  348. Notes:
  349. ------------------------------------------------------------------------------*/
  350. { incl/datreaktivieren.i }
  351. END PROCEDURE.
  352. /* _UIB-CODE-BLOCK-END */
  353. &ANALYZE-RESUME
  354. {&DB-REQUIRED-END}
  355. {&DB-REQUIRED-START}
  356. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE REPOS_TABELLE dTables _DB-REQUIRED
  357. PROCEDURE REPOS_TABELLE :
  358. /*------------------------------------------------------------------------------
  359. Purpose:
  360. Parameters: <none>
  361. Notes:
  362. ------------------------------------------------------------------------------*/
  363. { incl/datrepos.i }
  364. END PROCEDURE.
  365. /* _UIB-CODE-BLOCK-END */
  366. &ANALYZE-RESUME
  367. {&DB-REQUIRED-END}
  368. {&DB-REQUIRED-START}
  369. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE SET_FILTER dTables _DB-REQUIRED
  370. PROCEDURE SET_FILTER :
  371. /*------------------------------------------------------------------------------
  372. Purpose:
  373. Parameters: <none>
  374. Notes:
  375. ------------------------------------------------------------------------------*/
  376. { incl/datsetfilter.i }
  377. END PROCEDURE.
  378. /* _UIB-CODE-BLOCK-END */
  379. &ANALYZE-RESUME
  380. {&DB-REQUIRED-END}
  381. {&DB-REQUIRED-START}
  382. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE SET_OPENFLAG dTables _DB-REQUIRED
  383. PROCEDURE SET_OPENFLAG :
  384. /*------------------------------------------------------------------------------
  385. Purpose:
  386. Parameters: <none>
  387. Notes:
  388. ------------------------------------------------------------------------------*/
  389. { incl/datsetopenflag.i }
  390. END PROCEDURE.
  391. /* _UIB-CODE-BLOCK-END */
  392. &ANALYZE-RESUME
  393. {&DB-REQUIRED-END}
  394. {&DB-REQUIRED-START}
  395. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE SET_SORT dTables _DB-REQUIRED
  396. PROCEDURE SET_SORT :
  397. /*------------------------------------------------------------------------------
  398. Purpose:
  399. Parameters: <none>
  400. Notes:
  401. ------------------------------------------------------------------------------*/
  402. { incl/datsetsort.i }
  403. END PROCEDURE.
  404. /* _UIB-CODE-BLOCK-END */
  405. &ANALYZE-RESUME
  406. {&DB-REQUIRED-END}
  407. /* ************************ Function Implementations ***************** */
  408. {&DB-REQUIRED-START}
  409. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION getCurrentRecid dTables _DB-REQUIRED
  410. FUNCTION getCurrentRecid RETURNS RECID
  411. ( /* parameter-definitions */ ) :
  412. /*------------------------------------------------------------------------------
  413. Purpose:
  414. Notes:
  415. ------------------------------------------------------------------------------*/
  416. { incl/datgetcurrentrecid.i }
  417. END FUNCTION.
  418. /* _UIB-CODE-BLOCK-END */
  419. &ANALYZE-RESUME
  420. {&DB-REQUIRED-END}
  421. {&DB-REQUIRED-START}
  422. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION getQueryBuffer dTables _DB-REQUIRED
  423. FUNCTION getQueryBuffer RETURNS HANDLE
  424. ( /* parameter-definitions */ ) :
  425. /*------------------------------------------------------------------------------
  426. Purpose:
  427. Notes:
  428. ------------------------------------------------------------------------------*/
  429. RETURN BUFFER rowObject:HANDLE.
  430. END FUNCTION.
  431. /* _UIB-CODE-BLOCK-END */
  432. &ANALYZE-RESUME
  433. {&DB-REQUIRED-END}
  434. {&DB-REQUIRED-START}
  435. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION openQuery dTables _DB-REQUIRED
  436. FUNCTION openQuery RETURNS LOGICAL
  437. ( /* parameter-definitions */ ) :
  438. /*------------------------------------------------------------------------------
  439. Purpose: Super Override
  440. Notes:
  441. ------------------------------------------------------------------------------*/
  442. DEF VAR Felder AS CHAR NO-UNDO.
  443. DEF VAR Inhalt AS CHAR NO-UNDO.
  444. DEF VAR ix AS INT NO-UNDO.
  445. DEF VAR cFeld AS CHAR NO-UNDO.
  446. DEF VAR iRecid AS RECID NO-UNDO.
  447. IF NOT fOpen THEN RETURN FALSE.
  448. PUBLISH 'GET_CURRENT_BESKO' ( OUTPUT iRecid, OUTPUT iBesnr ).
  449. IF iBesnr = ? OR
  450. iBesnr = 0 THEN RETURN FALSE.
  451. xWhere = ''.
  452. xSort = ''.
  453. xString = ''.
  454. Felder = DYNAMIC-FUNCTION('getForeignFields':U) NO-ERROR.
  455. Inhalt = DYNAMIC-FUNCTION('getForeignValues':U) NO-ERROR.
  456. /* ix = LOOKUP('Feld', Felder, ',') / 2. */
  457. /* cFeld = ENTRY (ix , Inhalt, CHR(01)). */
  458. xWhere = 'Besze.Firma = ' + QUOTER(Firma) + ' AND '
  459. + 'Besze.Besnr = ' + STRING(iBesnr) + ' AND '
  460. + 'Besze.Artnr > 0 AND '
  461. + '(Besze.MBest - Besze.MGeli - Besze.Eingang) <> 0 '.
  462. /* xString = 'FOR EACH Debop ' + xSort + 'WHERE ' */
  463. /* + 'Debop.Firma = "' + Firma + '" AND ' */
  464. /* + 'Debop.Knr = ' + STRING(Knr) + ' ' */
  465. /* + 'NO-LOCK BY Debop.FakDat DESCENDING INDEXED-REPOSITION '. */
  466. { incl/datopenquery.i }
  467. IF xWhere <> '' THEN DYNAMIC-FUNCTION('setQueryWhere':U , INPUT xWhere ).
  468. IF xString <> '' THEN DYNAMIC-FUNCTION('setQueryString':U, INPUT xString).
  469. IF xSort <> '' THEN DYNAMIC-FUNCTION('setQuerySort':U , INPUT xSort ).
  470. RETURN SUPER( ).
  471. END FUNCTION.
  472. /* _UIB-CODE-BLOCK-END */
  473. &ANALYZE-RESUME
  474. {&DB-REQUIRED-END}