d-beseing.w 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731
  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. &SCOPED-DEFINE Tabelle BesEing
  30. &SCOPED-DEFINE TabWhere /* USE-INDEX Benutzer-k1 ~
  31. WHERE {&Tabelle}.Benutzer = tRowObject.Benutzer
  32. */
  33. { incl/datdefinition.i }
  34. /* _UIB-CODE-BLOCK-END */
  35. &ANALYZE-RESUME
  36. &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
  37. /* ******************** Preprocessor Definitions ******************** */
  38. &Global-define DATA-LOGIC-PROCEDURE .p
  39. &Scoped-define PROCEDURE-TYPE SmartDataObject
  40. &Scoped-define DB-AWARE yes
  41. &Scoped-define ADM-SUPPORTED-LINKS Data-Source,Data-Target,Navigation-Target,Update-Target,Commit-Target,Filter-Target
  42. /* Db-Required definitions. */
  43. &IF DEFINED(DB-REQUIRED) = 0 &THEN
  44. &GLOBAL-DEFINE DB-REQUIRED TRUE
  45. &ENDIF
  46. &GLOBAL-DEFINE DB-REQUIRED-START &IF {&DB-REQUIRED} &THEN
  47. &GLOBAL-DEFINE DB-REQUIRED-END &ENDIF
  48. &Scoped-define QUERY-NAME Query-Main
  49. /* Internal Tables (found by Frame, Query & Browse Queries) */
  50. &Scoped-define INTERNAL-TABLES BesEing
  51. /* Definitions for QUERY Query-Main */
  52. &Scoped-Define ENABLED-FIELDS Firma Besnr Pos SubPos Artnr Inhalt Jahr Lager lLotnr lVerfall GGeb_EG~
  53. VGeb_EG KGeb_EG Eingang Barcode Bezeichnung Lotnr Nummer_2 ProduktionsNr~
  54. Eing_Dat Verfall GGebinde VGebinde KGebinde GGebKto GGeb_Cd KGebKto KGeb_Cd~
  55. VGebKto VGeb_Cd GGeb_Me VGeb_Me KGeb_Me MRuek TotEingang lEingelagert~
  56. lEtiDrucken lEtiGedruckt lGesammelt lVerbucht Lagerort zDummy
  57. &Scoped-define ENABLED-FIELDS-IN-BesEing Firma Besnr Pos SubPos Artnr ~
  58. Inhalt Jahr Lager lLotnr lVerfall GGeb_EG VGeb_EG KGeb_EG Eingang Barcode ~
  59. Lotnr Nummer_2 ProduktionsNr Eing_Dat Verfall GGebKto GGeb_Cd KGebKto ~
  60. KGeb_Cd VGebKto VGeb_Cd lEingelagert lEtiDrucken lEtiGedruckt lGesammelt ~
  61. lVerbucht
  62. &Scoped-Define DATA-FIELDS Firma Besnr Pos SubPos Artnr Inhalt Jahr Lager lLotnr lVerfall GGeb_EG~
  63. VGeb_EG KGeb_EG Eingang Barcode Bezeichnung Lotnr Nummer_2 ProduktionsNr~
  64. Eing_Dat Verfall GGebinde VGebinde KGebinde GGebKto GGeb_Cd KGebKto KGeb_Cd~
  65. VGebKto VGeb_Cd GGeb_Me VGeb_Me KGeb_Me MRuek TotEingang lEingelagert~
  66. lEtiDrucken lEtiGedruckt lGesammelt lVerbucht Lagerort zDummy
  67. &Scoped-define DATA-FIELDS-IN-BesEing Firma Besnr Pos SubPos Artnr Inhalt ~
  68. Jahr Lager lLotnr lVerfall GGeb_EG VGeb_EG KGeb_EG Eingang Barcode Lotnr ~
  69. Nummer_2 ProduktionsNr Eing_Dat Verfall GGebKto GGeb_Cd KGebKto KGeb_Cd ~
  70. VGebKto VGeb_Cd lEingelagert lEtiDrucken lEtiGedruckt lGesammelt lVerbucht
  71. &Scoped-Define MANDATORY-FIELDS Firma
  72. &Scoped-Define APPLICATION-SERVICE
  73. &Scoped-Define ASSIGN-LIST
  74. &Scoped-Define DATA-FIELD-DEFS "d-beseing.i"
  75. &Scoped-Define DATA-TABLE-NO-UNDO NO-UNDO
  76. &Scoped-define QUERY-STRING-Query-Main FOR EACH BesEing NO-LOCK INDEXED-REPOSITION
  77. {&DB-REQUIRED-START}
  78. &Scoped-define OPEN-QUERY-Query-Main OPEN QUERY Query-Main FOR EACH BesEing NO-LOCK INDEXED-REPOSITION.
  79. {&DB-REQUIRED-END}
  80. &Scoped-define TABLES-IN-QUERY-Query-Main BesEing
  81. &Scoped-define FIRST-TABLE-IN-QUERY-Query-Main BesEing
  82. /* Custom List Definitions */
  83. /* List-1,List-2,List-3,List-4,List-5,List-6 */
  84. /* _UIB-PREPROCESSOR-BLOCK-END */
  85. &ANALYZE-RESUME
  86. /* ************************ Function Prototypes ********************** */
  87. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD getArtikelBez dTables
  88. FUNCTION getArtikelBez RETURNS CHARACTER
  89. ( ) FORWARD.
  90. /* _UIB-CODE-BLOCK-END */
  91. &ANALYZE-RESUME
  92. {&DB-REQUIRED-START}
  93. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD getBeszeDaten dTables _DB-REQUIRED
  94. FUNCTION getBeszeDaten RETURNS CHARACTER
  95. ( /* parameter-definitions */ ) FORWARD.
  96. /* _UIB-CODE-BLOCK-END */
  97. &ANALYZE-RESUME
  98. {&DB-REQUIRED-END}
  99. {&DB-REQUIRED-START}
  100. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD getCurrentRecid dTables _DB-REQUIRED
  101. FUNCTION getCurrentRecid RETURNS RECID
  102. ( /* parameter-definitions */ ) FORWARD.
  103. /* _UIB-CODE-BLOCK-END */
  104. &ANALYZE-RESUME
  105. {&DB-REQUIRED-END}
  106. {&DB-REQUIRED-START}
  107. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD getQueryBuffer dTables _DB-REQUIRED
  108. FUNCTION getQueryBuffer RETURNS HANDLE
  109. ( /* parameter-definitions */ ) FORWARD.
  110. /* _UIB-CODE-BLOCK-END */
  111. &ANALYZE-RESUME
  112. {&DB-REQUIRED-END}
  113. {&DB-REQUIRED-START}
  114. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD openQuery dTables _DB-REQUIRED
  115. FUNCTION openQuery RETURNS LOGICAL
  116. ( /* parameter-definitions */ ) FORWARD.
  117. /* _UIB-CODE-BLOCK-END */
  118. &ANALYZE-RESUME
  119. {&DB-REQUIRED-END}
  120. /* *********************** Control Definitions ********************** */
  121. {&DB-REQUIRED-START}
  122. /* Query definitions */
  123. &ANALYZE-SUSPEND
  124. DEFINE QUERY Query-Main FOR
  125. BesEing SCROLLING.
  126. &ANALYZE-RESUME
  127. {&DB-REQUIRED-END}
  128. /* ************************ Frame Definitions *********************** */
  129. /* *********************** Procedure Settings ************************ */
  130. &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
  131. /* Settings for THIS-PROCEDURE
  132. Type: SmartDataObject
  133. Allow: Query
  134. Frames: 0
  135. Add Fields to: Neither
  136. Other Settings: PERSISTENT-ONLY COMPILE APPSERVER DB-AWARE
  137. */
  138. /* This procedure should always be RUN PERSISTENT. Report the error, */
  139. /* then cleanup and return. */
  140. IF NOT THIS-PROCEDURE:PERSISTENT THEN DO:
  141. MESSAGE "{&FILE-NAME} should only be RUN PERSISTENT.":U
  142. VIEW-AS ALERT-BOX ERROR BUTTONS OK.
  143. RETURN.
  144. END.
  145. &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
  146. /* ************************* Create Window ************************** */
  147. &ANALYZE-SUSPEND _CREATE-WINDOW
  148. /* DESIGN Window definition (used by the UIB)
  149. CREATE WINDOW dTables ASSIGN
  150. HEIGHT = 1.62
  151. WIDTH = 77.8.
  152. /* END WINDOW DEFINITION */
  153. */
  154. &ANALYZE-RESUME
  155. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB dTables
  156. /* ************************* Included-Libraries *********************** */
  157. {src/adm2/data.i}
  158. /* _UIB-CODE-BLOCK-END */
  159. &ANALYZE-RESUME
  160. /* *********** Runtime Attributes and AppBuilder Settings *********** */
  161. &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES
  162. /* SETTINGS FOR WINDOW dTables
  163. VISIBLE,,RUN-PERSISTENT */
  164. /* _RUN-TIME-ATTRIBUTES-END */
  165. &ANALYZE-RESUME
  166. /* Setting information for Queries and Browse Widgets fields */
  167. &ANALYZE-SUSPEND _QUERY-BLOCK QUERY Query-Main
  168. /* Query rebuild information for SmartDataObject Query-Main
  169. _TblList = "AnaDat.BesEing"
  170. _Options = "NO-LOCK INDEXED-REPOSITION"
  171. _FldNameList[1] > AnaDat.BesEing.Firma
  172. "Firma" "Firma" ? ? "character" ? ? ? ? ? ? yes ? yes 8 yes ?
  173. _FldNameList[2] > AnaDat.BesEing.Besnr
  174. "Besnr" "Besnr" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ?
  175. _FldNameList[3] > AnaDat.BesEing.Pos
  176. "Pos" "Pos" ? ? "integer" ? ? ? ? ? ? yes ? no 4.8 yes ?
  177. _FldNameList[4] > AnaDat.BesEing.SubPos
  178. "SubPos" "SubPos" ? ? "integer" ? ? ? ? ? ? yes ? no 7.4 yes ?
  179. _FldNameList[5] > AnaDat.BesEing.Artnr
  180. "Artnr" "Artnr" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ?
  181. _FldNameList[6] > AnaDat.BesEing.Inhalt
  182. "Inhalt" "Inhalt" ? ? "integer" ? ? ? ? ? ? yes ? no 5.2 yes ?
  183. _FldNameList[7] > AnaDat.BesEing.Jahr
  184. "Jahr" "Jahr" ? ? "integer" ? ? ? ? ? ? yes ? no 4.8 yes ?
  185. _FldNameList[8] > AnaDat.BesEing.Lager
  186. "Lager" "Lager" ? ? "integer" ? ? ? ? ? ? yes ? no 5.4 yes ?
  187. _FldNameList[9] > AnaDat.BesEing.lLotnr
  188. "lLotnr" "lLotnr" ? ? "logical" ? ? ? ? ? ? yes ? no 5.2 yes ?
  189. _FldNameList[10] > AnaDat.BesEing.lVerfall
  190. "lVerfall" "lVerfall" ? ? "logical" ? ? ? ? ? ? yes ? no 6.2 yes ?
  191. _FldNameList[11] > AnaDat.BesEing.GGeb_EG
  192. "GGeb_EG" "GGeb_EG" ? ? "decimal" ? ? ? ? ? ? yes ? no 10.4 yes ?
  193. _FldNameList[12] > AnaDat.BesEing.VGeb_EG
  194. "VGeb_EG" "VGeb_EG" ? ? "decimal" ? ? ? ? ? ? yes ? no 10.4 yes ?
  195. _FldNameList[13] > AnaDat.BesEing.KGeb_EG
  196. "KGeb_EG" "KGeb_EG" ? ? "decimal" ? ? ? ? ? ? yes ? no 10.4 yes ?
  197. _FldNameList[14] > AnaDat.BesEing.Eingang
  198. "Eingang" "Eingang" ? ? "decimal" ? ? ? ? ? ? yes ? no 8.8 yes ?
  199. _FldNameList[15] > AnaDat.BesEing.Barcode
  200. "Barcode" "Barcode" ? ? "character" ? ? ? ? ? ? yes ? no 60 yes ?
  201. _FldNameList[16] > "_<CALC>"
  202. "DYNAMIC-FUNCTION('getArtikelBez':U IN THIS-PROCEDURE)" "Bezeichnung" "Artikel" "x(50)" "character" ? ? ? ? ? ? yes ? no 50 no ?
  203. _FldNameList[17] > AnaDat.BesEing.Lotnr
  204. "Lotnr" "Lotnr" ? ? "character" ? ? ? ? ? ? yes ? no 30 yes ?
  205. _FldNameList[18] > AnaDat.BesEing.Nummer_2
  206. "Nummer_2" "Nummer_2" ? ? "character" ? ? ? ? ? ? yes ? no 20 yes ?
  207. _FldNameList[19] > AnaDat.BesEing.ProduktionsNr
  208. "ProduktionsNr" "ProduktionsNr" ? ? "character" ? ? ? ? ? ? yes ? no 30 yes ?
  209. _FldNameList[20] > AnaDat.BesEing.Eing_Dat
  210. "Eing_Dat" "Eing_Dat" ? ? "date" ? ? ? ? ? ? yes ? no 10.8 yes ?
  211. _FldNameList[21] > AnaDat.BesEing.Verfall
  212. "Verfall" "Verfall" ? ? "date" ? ? ? ? ? ? yes ? no 10.8 yes ?
  213. _FldNameList[22] > "_<CALC>"
  214. """""" "GGebinde" "GGebinde" "x(20)" "character" ? ? ? ? ? ? yes ? no 20 no ?
  215. _FldNameList[23] > "_<CALC>"
  216. """""" "VGebinde" "VGebinde" "x(20)" "character" ? ? ? ? ? ? yes ? no 20 no ?
  217. _FldNameList[24] > "_<CALC>"
  218. """""" "KGebinde" "KGebinde" "x(20)" "character" ? ? ? ? ? ? yes ? no 20 no ?
  219. _FldNameList[25] > AnaDat.BesEing.GGebKto
  220. "GGebKto" "GGebKto" ? ? "character" ? ? ? ? ? ? yes ? no 8.8 yes ?
  221. _FldNameList[26] > AnaDat.BesEing.GGeb_Cd
  222. "GGeb_Cd" "GGeb_Cd" ? ? "character" ? ? ? ? ? ? yes ? no 9.4 yes ?
  223. _FldNameList[27] > AnaDat.BesEing.KGebKto
  224. "KGebKto" "KGebKto" ? ? "character" ? ? ? ? ? ? yes ? no 8.6 yes ?
  225. _FldNameList[28] > AnaDat.BesEing.KGeb_Cd
  226. "KGeb_Cd" "KGeb_Cd" ? ? "character" ? ? ? ? ? ? yes ? no 9.2 yes ?
  227. _FldNameList[29] > AnaDat.BesEing.VGebKto
  228. "VGebKto" "VGebKto" ? ? "character" ? ? ? ? ? ? yes ? no 8.6 yes ?
  229. _FldNameList[30] > AnaDat.BesEing.VGeb_Cd
  230. "VGeb_Cd" "VGeb_Cd" ? ? "character" ? ? ? ? ? ? yes ? no 9.2 yes ?
  231. _FldNameList[31] > "_<CALC>"
  232. "0.00" "GGeb_Me" "GGeb Best" "zzz,zz9.99-" "Decimal" ? ? ? ? ? ? yes ? no 10.4 no ?
  233. _FldNameList[32] > "_<CALC>"
  234. "0.00" "VGeb_Me" "VGeb Best" "zzz,zz9.99-" "Decimal" ? ? ? ? ? ? yes ? no 10.4 no ?
  235. _FldNameList[33] > "_<CALC>"
  236. "0.00" "KGeb_Me" "KGeb Best" "zzz,zz9.99-" "Decimal" ? ? ? ? ? ? yes ? no 10.4 no ?
  237. _FldNameList[34] > "_<CALC>"
  238. "0.00" "MRuek" "Offen" "zzz,zz9.99-" "Decimal" ? ? ? ? ? ? yes ? no 10.4 no ?
  239. _FldNameList[35] > "_<CALC>"
  240. "0.00" "TotEingang" "Eingang Total" "zzz,zz9.99-" "Decimal" ? ? ? ? ? ? yes ? no 13.2 no ?
  241. _FldNameList[36] > AnaDat.BesEing.lEingelagert
  242. "lEingelagert" "lEingelagert" ? ? "logical" ? ? ? ? ? ? yes ? no 11 yes ?
  243. _FldNameList[37] > AnaDat.BesEing.lEtiDrucken
  244. "lEtiDrucken" "lEtiDrucken" ? ? "logical" ? ? ? ? ? ? yes ? no 11 yes ?
  245. _FldNameList[38] > AnaDat.BesEing.lEtiGedruckt
  246. "lEtiGedruckt" "lEtiGedruckt" ? ? "logical" ? ? ? ? ? ? yes ? no 11.6 yes ?
  247. _FldNameList[39] > AnaDat.BesEing.lGesammelt
  248. "lGesammelt" "lGesammelt" ? ? "logical" ? ? ? ? ? ? yes ? no 10.8 yes ?
  249. _FldNameList[40] > AnaDat.BesEing.lVerbucht
  250. "lVerbucht" "lVerbucht" ? ? "logical" ? ? ? ? ? ? yes ? no 9 yes ?
  251. _FldNameList[41] > "_<CALC>"
  252. """""" "Lagerort" "Lagerort" "x(12)" "character" ? ? ? ? ? ? yes ? no 12 no ?
  253. _FldNameList[42] > "_<CALC>"
  254. "DYNAMIC-FUNCTION('getBeszeDaten':U IN THIS-PROCEDURE)" "zDummy" ? "X(8)" "Character" ? ? ? ? ? ? yes ? no 8 no ?
  255. _Design-Parent is WINDOW dTables @ ( 1.14 , 2.6 )
  256. */ /* QUERY Query-Main */
  257. &ANALYZE-RESUME
  258. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK dTables
  259. /* *************************** Main Block *************************** */
  260. { incl/datmainblock.i }
  261. &IF DEFINED(UIB_IS_RUNNING) <> 0 &THEN
  262. RUN initializeObject.
  263. &ENDIF
  264. /* _UIB-CODE-BLOCK-END */
  265. &ANALYZE-RESUME
  266. /* ********************** Internal Procedures *********************** */
  267. {&DB-REQUIRED-START}
  268. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE DATA.CALCULATE dTables DATA.CALCULATE _DB-REQUIRED
  269. PROCEDURE DATA.CALCULATE :
  270. /*------------------------------------------------------------------------------
  271. Purpose: Calculate all the Calculated Expressions found in the
  272. SmartDataObject.
  273. Parameters: <none>
  274. ------------------------------------------------------------------------------*/
  275. ASSIGN
  276. rowObject.Bezeichnung = (DYNAMIC-FUNCTION('getArtikelBez':U IN THIS-PROCEDURE))
  277. rowObject.GGebinde = ("")
  278. rowObject.GGeb_Me = (0.00)
  279. rowObject.KGebinde = ("")
  280. rowObject.KGeb_Me = (0.00)
  281. rowObject.Lagerort = ("")
  282. rowObject.MRuek = (0.00)
  283. rowObject.TotEingang = (0.00)
  284. rowObject.VGebinde = ("")
  285. rowObject.VGeb_Me = (0.00)
  286. rowObject.zDummy = (DYNAMIC-FUNCTION('getBeszeDaten':U IN THIS-PROCEDURE))
  287. .
  288. END PROCEDURE.
  289. /* _UIB-CODE-BLOCK-END */
  290. &ANALYZE-RESUME
  291. {&DB-REQUIRED-END}
  292. {&DB-REQUIRED-START}
  293. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE dataAvailable dTables _DB-REQUIRED
  294. PROCEDURE dataAvailable :
  295. /*------------------------------------------------------------------------------
  296. Purpose: Super Override
  297. Parameters:
  298. Notes:
  299. ------------------------------------------------------------------------------*/
  300. { incl/datdataavailable.i }
  301. END PROCEDURE.
  302. /* _UIB-CODE-BLOCK-END */
  303. &ANALYZE-RESUME
  304. {&DB-REQUIRED-END}
  305. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI dTables _DEFAULT-DISABLE
  306. PROCEDURE disable_UI :
  307. /*------------------------------------------------------------------------------
  308. Purpose: DISABLE the User Interface
  309. Parameters: <none>
  310. Notes: Here we clean-up the user-interface by deleting
  311. dynamic widgets we have created and/or hide
  312. frames. This procedure is usually called when
  313. we are ready to "clean-up" after running.
  314. ------------------------------------------------------------------------------*/
  315. /* Hide all frames. */
  316. IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE.
  317. END PROCEDURE.
  318. /* _UIB-CODE-BLOCK-END */
  319. &ANALYZE-RESUME
  320. {&DB-REQUIRED-START}
  321. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE INAKTIVIEREN dTables _DB-REQUIRED
  322. PROCEDURE INAKTIVIEREN :
  323. /*------------------------------------------------------------------------------
  324. Purpose:
  325. Parameters: <none>
  326. Notes:
  327. ------------------------------------------------------------------------------*/
  328. { incl/datinaktivieren.i }
  329. END PROCEDURE.
  330. /* _UIB-CODE-BLOCK-END */
  331. &ANALYZE-RESUME
  332. {&DB-REQUIRED-END}
  333. {&DB-REQUIRED-START}
  334. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE initializeObject dTables _DB-REQUIRED
  335. PROCEDURE initializeObject :
  336. /*------------------------------------------------------------------------------
  337. Purpose: Super Override
  338. Parameters:
  339. Notes:
  340. ------------------------------------------------------------------------------*/
  341. { incl/datinitialize.i }
  342. END PROCEDURE.
  343. /* _UIB-CODE-BLOCK-END */
  344. &ANALYZE-RESUME
  345. {&DB-REQUIRED-END}
  346. {&DB-REQUIRED-START}
  347. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE REAKTIVIEREN dTables _DB-REQUIRED
  348. PROCEDURE REAKTIVIEREN :
  349. /*------------------------------------------------------------------------------
  350. Purpose:
  351. Parameters: <none>
  352. Notes:
  353. ------------------------------------------------------------------------------*/
  354. { incl/datreaktivieren.i }
  355. END PROCEDURE.
  356. /* _UIB-CODE-BLOCK-END */
  357. &ANALYZE-RESUME
  358. {&DB-REQUIRED-END}
  359. {&DB-REQUIRED-START}
  360. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE REPOS_TABELLE dTables _DB-REQUIRED
  361. PROCEDURE REPOS_TABELLE :
  362. /*------------------------------------------------------------------------------
  363. Purpose:
  364. Parameters: <none>
  365. Notes:
  366. ------------------------------------------------------------------------------*/
  367. { incl/datrepos.i }
  368. END PROCEDURE.
  369. /* _UIB-CODE-BLOCK-END */
  370. &ANALYZE-RESUME
  371. {&DB-REQUIRED-END}
  372. {&DB-REQUIRED-START}
  373. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE SET_FILTER dTables _DB-REQUIRED
  374. PROCEDURE SET_FILTER :
  375. /*------------------------------------------------------------------------------
  376. Purpose:
  377. Parameters: <none>
  378. Notes:
  379. ------------------------------------------------------------------------------*/
  380. { incl/datsetfilter.i }
  381. END PROCEDURE.
  382. /* _UIB-CODE-BLOCK-END */
  383. &ANALYZE-RESUME
  384. {&DB-REQUIRED-END}
  385. {&DB-REQUIRED-START}
  386. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE SET_OPENFLAG dTables _DB-REQUIRED
  387. PROCEDURE SET_OPENFLAG :
  388. /*------------------------------------------------------------------------------
  389. Purpose:
  390. Parameters: <none>
  391. Notes:
  392. ------------------------------------------------------------------------------*/
  393. { incl/datsetopenflag.i }
  394. END PROCEDURE.
  395. /* _UIB-CODE-BLOCK-END */
  396. &ANALYZE-RESUME
  397. {&DB-REQUIRED-END}
  398. {&DB-REQUIRED-START}
  399. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE SET_SORT dTables _DB-REQUIRED
  400. PROCEDURE SET_SORT :
  401. /*------------------------------------------------------------------------------
  402. Purpose:
  403. Parameters: <none>
  404. Notes:
  405. ------------------------------------------------------------------------------*/
  406. { incl/datsetsort.i }
  407. END PROCEDURE.
  408. /* _UIB-CODE-BLOCK-END */
  409. &ANALYZE-RESUME
  410. {&DB-REQUIRED-END}
  411. /* ************************ Function Implementations ***************** */
  412. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION getArtikelBez dTables
  413. FUNCTION getArtikelBez RETURNS CHARACTER
  414. ( ):
  415. /*------------------------------------------------------------------------------
  416. Purpose:
  417. Notes:
  418. ------------------------------------------------------------------------------*/
  419. DEFINE VARIABLE cBez AS CHARACTER NO-UNDO.
  420. cBez = DYNAMIC-FUNCTION ('getArtikelBezeichnung':U, rowObject.Artnr, rowObject.Inhalt, rowObject.Jahr ) NO-ERROR.
  421. IF cBez = ? THEN cBez = ''.
  422. RETURN cBez.
  423. END FUNCTION.
  424. /* _UIB-CODE-BLOCK-END */
  425. &ANALYZE-RESUME
  426. {&DB-REQUIRED-START}
  427. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION getBeszeDaten dTables _DB-REQUIRED
  428. FUNCTION getBeszeDaten RETURNS CHARACTER
  429. ( /* parameter-definitions */ ) :
  430. /*------------------------------------------------------------------------------
  431. Purpose:
  432. Notes:
  433. ------------------------------------------------------------------------------*/
  434. DEFINE VARIABLE cRetVal AS CHARACTER NO-UNDO.
  435. IF rowObject.Artnr = 0 THEN RETURN ''.
  436. FIND Artst NO-LOCK
  437. WHERE Artst.Firma = rowObject.Firma
  438. AND Artst.Artnr = rowObject.Artnr
  439. AND Artst.Inhalt = rowObject.Inhalt
  440. AND Artst.Jahr = rowObject.Jahr.
  441. FIND ArtLager NO-LOCK
  442. WHERE ArtLager.Firma = rowObject.Firma
  443. AND ArtLager.Artnr = rowObject.Artnr
  444. AND ArtLager.Inhalt = rowObject.Inhalt
  445. AND ArtLager.Jahr = rowObject.Jahr
  446. AND ArtLager.Lager = rowObject.Lager.
  447. FIND Besze NO-LOCK
  448. WHERE Besze.Firma = rowObject.Firma
  449. AND Besze.Besnr = rowObject.Besnr
  450. AND Besze.Pos = rowObject.Pos.
  451. FIND GGebinde NO-LOCK
  452. WHERE GGebinde.Firma = Firma
  453. AND GGebinde.Geb_Cd = Artst.GGeb_Cd NO-ERROR.
  454. rowObject.GGebinde = (IF AVAILABLE GGebinde THEN GGebinde.KBez ELSE '').
  455. FIND VGebinde NO-LOCK
  456. WHERE VGebinde.Firma = Firma
  457. AND VGebinde.Geb_Cd = Artst.VGeb_Cd NO-ERROR.
  458. rowObject.VGebinde = (IF AVAILABLE VGebinde THEN VGebinde.KBez ELSE '').
  459. FIND KGebinde NO-LOCK
  460. WHERE KGebinde.Firma = Firma
  461. AND KGebinde.Geb_Cd = Artst.KGeb_Cd NO-ERROR.
  462. rowObject.KGebinde = (IF AVAILABLE KGebinde THEN KGebinde.KBez ELSE '').
  463. ASSIGN
  464. rowObject.GGeb_Me = Besze.GGeb_Me
  465. rowObject.VGeb_Me = Besze.VGeb_Me
  466. rowObject.KGeb_Me = Besze.KGeb_Me
  467. rowObject.TotEingang = Besze.Eingang
  468. rowObject.MRuek = Besze.MRuek
  469. rowObject.Lagerort = ArtLager.Ort.
  470. RELEASE GGebinde.
  471. RELEASE VGebinde.
  472. RELEASE KGebinde.
  473. RELEASE Artst .
  474. RELEASE Besze .
  475. cRetVal = SUBSTITUTE('&1;&2;&3;&4;&5;&6', rowObject.GGebinde, rowObject.VGebinde, rowObject.KGebinde, rowObject.GGeb_Me, rowObject.VGeb_Me, rowObject.KGeb_Me).
  476. RETURN cRetVal.
  477. END FUNCTION.
  478. /* _UIB-CODE-BLOCK-END */
  479. &ANALYZE-RESUME
  480. {&DB-REQUIRED-END}
  481. {&DB-REQUIRED-START}
  482. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION getCurrentRecid dTables _DB-REQUIRED
  483. FUNCTION getCurrentRecid RETURNS RECID
  484. ( /* parameter-definitions */ ) :
  485. /*------------------------------------------------------------------------------
  486. Purpose:
  487. Notes:
  488. ------------------------------------------------------------------------------*/
  489. { incl/datgetcurrentrecid.i }
  490. END FUNCTION.
  491. /* _UIB-CODE-BLOCK-END */
  492. &ANALYZE-RESUME
  493. {&DB-REQUIRED-END}
  494. {&DB-REQUIRED-START}
  495. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION getQueryBuffer dTables _DB-REQUIRED
  496. FUNCTION getQueryBuffer RETURNS HANDLE
  497. ( /* parameter-definitions */ ) :
  498. /*------------------------------------------------------------------------------
  499. Purpose:
  500. Notes:
  501. ------------------------------------------------------------------------------*/
  502. RETURN BUFFER rowObject:HANDLE.
  503. END FUNCTION.
  504. /* _UIB-CODE-BLOCK-END */
  505. &ANALYZE-RESUME
  506. {&DB-REQUIRED-END}
  507. {&DB-REQUIRED-START}
  508. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION openQuery dTables _DB-REQUIRED
  509. FUNCTION openQuery RETURNS LOGICAL
  510. ( /* parameter-definitions */ ) :
  511. /*------------------------------------------------------------------------------
  512. Purpose: Super Override
  513. Notes:
  514. ------------------------------------------------------------------------------*/
  515. DEFINE VARIABLE Felder AS CHARACTER NO-UNDO.
  516. DEFINE VARIABLE Inhalt AS CHARACTER NO-UNDO.
  517. DEFINE VARIABLE ix AS INTEGER NO-UNDO.
  518. DEFINE VARIABLE cFeld AS CHARACTER NO-UNDO.
  519. DEFINE VARIABLE hQuery AS HANDLE NO-UNDO.
  520. /* IF NOT fOpen THEN RETURN FALSE. */
  521. xString = ''.
  522. xWhere = ''.
  523. xSort = ''.
  524. Felder = DYNAMIC-FUNCTION('getForeignFields':U) NO-ERROR.
  525. Inhalt = DYNAMIC-FUNCTION('getForeignValues':U) NO-ERROR.
  526. /* ix = LOOKUP('Feld', Felder, ',') / 2. */
  527. /* cFeld = ENTRY (ix , Inhalt, CHR(01)). */
  528. /* xWhere = 'Aufko.Firma = ' + QUOTER(Firma) + ' AND ' */
  529. /* + 'Aufko.Auf_Sta = ' + STRING(Auf_Sta) + ' '. */
  530. /* xString = 'FOR EACH Debop ' + xSort + 'WHERE ' */
  531. /* + 'Debop.Firma = "' + Firma + '" AND ' */
  532. /* + 'Debop.Knr = ' + STRING(Knr) + ' ' */
  533. /* + 'NO-LOCK BY Debop.FakDat DESCENDING INDEXED-REPOSITION '. */
  534. { incl/datopenquery.i }
  535. IF xWhere <> '' THEN DYNAMIC-FUNCTION('setQueryWhere':U , INPUT xWhere ).
  536. IF xString <> '' THEN DYNAMIC-FUNCTION('setQueryString':U, INPUT xString).
  537. IF xSort <> '' THEN DYNAMIC-FUNCTION('setQuerySort':U , INPUT xSort ).
  538. RETURN SUPER( ).
  539. END FUNCTION.
  540. /* _UIB-CODE-BLOCK-END */
  541. &ANALYZE-RESUME
  542. {&DB-REQUIRED-END}