d-artlief.w 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637
  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. DEFINE VARIABLE iLager AS INTEGER NO-UNDO INIT 0.
  30. &SCOPED-DEFINE Tabelle ArtLief
  31. &SCOPED-DEFINE TabWhere /* USE-INDEX Benutzer-k1 ~
  32. WHERE {&Tabelle}.Benutzer = tRowObject.Benutzer
  33. */
  34. { incl/datdefinition.i }
  35. DEFINE BUFFER bArtst FOR Artst.
  36. DEFINE BUFFER bArtLager FOR ArtLager.
  37. /* _UIB-CODE-BLOCK-END */
  38. &ANALYZE-RESUME
  39. &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
  40. /* ******************** Preprocessor Definitions ******************** */
  41. &Global-define DATA-LOGIC-PROCEDURE .p
  42. &Scoped-define PROCEDURE-TYPE SmartDataObject
  43. &Scoped-define DB-AWARE yes
  44. &Scoped-define ADM-SUPPORTED-LINKS Data-Source,Data-Target,Navigation-Target,Update-Target,Commit-Target,Filter-Target
  45. /* Db-Required definitions. */
  46. &IF DEFINED(DB-REQUIRED) = 0 &THEN
  47. &GLOBAL-DEFINE DB-REQUIRED TRUE
  48. &ENDIF
  49. &GLOBAL-DEFINE DB-REQUIRED-START &IF {&DB-REQUIRED} &THEN
  50. &GLOBAL-DEFINE DB-REQUIRED-END &ENDIF
  51. &Scoped-define QUERY-NAME Query-Main
  52. /* Internal Tables (found by Frame, Query & Browse Queries) */
  53. &Scoped-define INTERNAL-TABLES ArtLief
  54. /* Definitions for QUERY Query-Main */
  55. &Scoped-Define ENABLED-FIELDS Firma Artnr Inhalt Jahr Knr S_Artnr S_Bez1 S_Bez2 S_Preis L_EP Min_Menge~
  56. S_Preis_FRW L_EP_FRW Min_Betrag Rabatt L_Rabatt SpesenArt Spesen Haupt~
  57. Strichcode_GGeb Strichcode_KGeb Strichcode_VGeb VGeb_Cd Lieferant~
  58. Mind_Bestand Soll_Bestand Meld_Bestand Min_GGebinde Min_KGebinde~
  59. Min_VGebinde ZusRab GGeb_Inhalt VGeb_Inhalt KGeb_Inhalt xDummy
  60. &Scoped-define ENABLED-FIELDS-IN-ArtLief Firma Artnr Inhalt Jahr Knr ~
  61. S_Artnr S_Bez1 S_Bez2 S_Preis L_EP Min_Menge S_Preis_FRW L_EP_FRW ~
  62. Min_Betrag Rabatt L_Rabatt SpesenArt Spesen Haupt Strichcode_GGeb ~
  63. Strichcode_KGeb Strichcode_VGeb VGeb_Cd Min_GGebinde Min_KGebinde ~
  64. Min_VGebinde ZusRab
  65. &Scoped-Define DATA-FIELDS Firma Artnr Inhalt Jahr Knr S_Artnr S_Bez1 S_Bez2 S_Preis L_EP Min_Menge~
  66. S_Preis_FRW L_EP_FRW Min_Betrag Rabatt L_Rabatt SpesenArt Spesen Haupt~
  67. Strichcode_GGeb Strichcode_KGeb Strichcode_VGeb VGeb_Cd Lieferant~
  68. Mind_Bestand Soll_Bestand Meld_Bestand Min_GGebinde Min_KGebinde~
  69. Min_VGebinde ZusRab GGeb_Inhalt VGeb_Inhalt KGeb_Inhalt xDummy
  70. &Scoped-define DATA-FIELDS-IN-ArtLief Firma Artnr Inhalt Jahr Knr S_Artnr ~
  71. S_Bez1 S_Bez2 S_Preis L_EP Min_Menge S_Preis_FRW L_EP_FRW Min_Betrag Rabatt ~
  72. L_Rabatt SpesenArt Spesen Haupt Strichcode_GGeb Strichcode_KGeb ~
  73. Strichcode_VGeb VGeb_Cd Min_GGebinde Min_KGebinde Min_VGebinde ZusRab
  74. &Scoped-Define MANDATORY-FIELDS Firma Knr
  75. &Scoped-Define APPLICATION-SERVICE
  76. &Scoped-Define ASSIGN-LIST
  77. &Scoped-Define DATA-FIELD-DEFS "d-artlief.i"
  78. &Scoped-Define DATA-TABLE-NO-UNDO NO-UNDO
  79. &Scoped-define QUERY-STRING-Query-Main FOR EACH ArtLief NO-LOCK INDEXED-REPOSITION
  80. {&DB-REQUIRED-START}
  81. &Scoped-define OPEN-QUERY-Query-Main OPEN QUERY Query-Main FOR EACH ArtLief NO-LOCK INDEXED-REPOSITION.
  82. {&DB-REQUIRED-END}
  83. &Scoped-define TABLES-IN-QUERY-Query-Main ArtLief
  84. &Scoped-define FIRST-TABLE-IN-QUERY-Query-Main ArtLief
  85. /* Custom List Definitions */
  86. /* List-1,List-2,List-3,List-4,List-5,List-6 */
  87. /* _UIB-PREPROCESSOR-BLOCK-END */
  88. &ANALYZE-RESUME
  89. /* ************************ Function Prototypes ********************** */
  90. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD getFremdDaten dTables
  91. FUNCTION getFremdDaten RETURNS CHARACTER
  92. ( ) FORWARD.
  93. /* _UIB-CODE-BLOCK-END */
  94. &ANALYZE-RESUME
  95. {&DB-REQUIRED-START}
  96. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD getQueryBuffer dTables _DB-REQUIRED
  97. FUNCTION getQueryBuffer RETURNS HANDLE
  98. ( /* parameter-definitions */ ) FORWARD.
  99. /* _UIB-CODE-BLOCK-END */
  100. &ANALYZE-RESUME
  101. {&DB-REQUIRED-END}
  102. {&DB-REQUIRED-START}
  103. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD openQuery dTables _DB-REQUIRED
  104. FUNCTION openQuery RETURNS LOGICAL
  105. ( /* parameter-definitions */ ) FORWARD.
  106. /* _UIB-CODE-BLOCK-END */
  107. &ANALYZE-RESUME
  108. {&DB-REQUIRED-END}
  109. /* *********************** Control Definitions ********************** */
  110. {&DB-REQUIRED-START}
  111. /* Query definitions */
  112. &ANALYZE-SUSPEND
  113. DEFINE QUERY Query-Main FOR
  114. ArtLief SCROLLING.
  115. &ANALYZE-RESUME
  116. {&DB-REQUIRED-END}
  117. /* ************************ Frame Definitions *********************** */
  118. /* *********************** Procedure Settings ************************ */
  119. &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
  120. /* Settings for THIS-PROCEDURE
  121. Type: SmartDataObject
  122. Allow: Query
  123. Frames: 0
  124. Add Fields to: Neither
  125. Other Settings: PERSISTENT-ONLY COMPILE APPSERVER DB-AWARE
  126. */
  127. /* This procedure should always be RUN PERSISTENT. Report the error, */
  128. /* then cleanup and return. */
  129. IF NOT THIS-PROCEDURE:PERSISTENT THEN DO:
  130. MESSAGE "{&FILE-NAME} should only be RUN PERSISTENT.":U
  131. VIEW-AS ALERT-BOX ERROR BUTTONS OK.
  132. RETURN.
  133. END.
  134. &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
  135. /* ************************* Create Window ************************** */
  136. &ANALYZE-SUSPEND _CREATE-WINDOW
  137. /* DESIGN Window definition (used by the UIB)
  138. CREATE WINDOW dTables ASSIGN
  139. HEIGHT = 1.62
  140. WIDTH = 70.4.
  141. /* END WINDOW DEFINITION */
  142. */
  143. &ANALYZE-RESUME
  144. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB dTables
  145. /* ************************* Included-Libraries *********************** */
  146. {src/adm2/data.i}
  147. /* _UIB-CODE-BLOCK-END */
  148. &ANALYZE-RESUME
  149. /* *********** Runtime Attributes and AppBuilder Settings *********** */
  150. &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES
  151. /* SETTINGS FOR WINDOW dTables
  152. VISIBLE,,RUN-PERSISTENT */
  153. /* _RUN-TIME-ATTRIBUTES-END */
  154. &ANALYZE-RESUME
  155. /* Setting information for Queries and Browse Widgets fields */
  156. &ANALYZE-SUSPEND _QUERY-BLOCK QUERY Query-Main
  157. /* Query rebuild information for SmartDataObject Query-Main
  158. _TblList = "AnaDat.ArtLief"
  159. _Options = "NO-LOCK INDEXED-REPOSITION"
  160. _FldNameList[1] > AnaDat.ArtLief.Firma
  161. "Firma" "Firma" ? ? "character" ? ? ? ? ? ? yes ? yes 8 yes ?
  162. _FldNameList[2] > AnaDat.ArtLief.Artnr
  163. "Artnr" "Artnr" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ?
  164. _FldNameList[3] > AnaDat.ArtLief.Inhalt
  165. "Inhalt" "Inhalt" ? ? "integer" ? ? ? ? ? ? yes ? no 5.2 yes ?
  166. _FldNameList[4] > AnaDat.ArtLief.Jahr
  167. "Jahr" "Jahr" ? ? "integer" ? ? ? ? ? ? yes ? no 4.8 yes ?
  168. _FldNameList[5] > AnaDat.ArtLief.Knr
  169. "Knr" "Knr" ? ? "integer" ? ? ? ? ? ? yes ? yes 7.2 yes ?
  170. _FldNameList[6] > AnaDat.ArtLief.S_Artnr
  171. "S_Artnr" "S_Artnr" ? ? "character" ? ? ? ? ? ? yes ? no 12 yes ?
  172. _FldNameList[7] > AnaDat.ArtLief.S_Bez1
  173. "S_Bez1" "S_Bez1" ? ? "character" ? ? ? ? ? ? yes ? no 30 yes ?
  174. _FldNameList[8] > AnaDat.ArtLief.S_Bez2
  175. "S_Bez2" "S_Bez2" ? ? "character" ? ? ? ? ? ? yes ? no 30 yes ?
  176. _FldNameList[9] > AnaDat.ArtLief.S_Preis
  177. "S_Preis" "S_Preis" ? ? "decimal" ? ? ? ? ? ? yes ? no 12.2 yes ?
  178. _FldNameList[10] > AnaDat.ArtLief.L_EP
  179. "L_EP" "L_EP" ? ? "decimal" ? ? ? ? ? ? yes ? no 12.2 yes ?
  180. _FldNameList[11] > AnaDat.ArtLief.Min_Menge
  181. "Min_Menge" "Min_Menge" ? ? "decimal" ? ? ? ? ? ? yes ? no 11.2 yes ?
  182. _FldNameList[12] > AnaDat.ArtLief.S_Preis_FRW
  183. "S_Preis_FRW" "S_Preis_FRW" ? ? "decimal" ? ? ? ? ? ? yes ? no 15.8 yes ?
  184. _FldNameList[13] > AnaDat.ArtLief.L_EP_FRW
  185. "L_EP_FRW" "L_EP_FRW" ? ? "decimal" ? ? ? ? ? ? yes ? no 15.8 yes ?
  186. _FldNameList[14] > AnaDat.ArtLief.Min_Betrag
  187. "Min_Betrag" "Min_Betrag" ? ? "decimal" ? ? ? ? ? ? yes ? no 10.8 yes ?
  188. _FldNameList[15] > AnaDat.ArtLief.Rabatt
  189. "Rabatt" "Rabatt" ? ? "decimal" ? ? ? ? ? ? yes ? no 6.4 yes ?
  190. _FldNameList[16] > AnaDat.ArtLief.L_Rabatt
  191. "L_Rabatt" "L_Rabatt" ? ? "decimal" ? ? ? ? ? ? yes ? no 8.8 yes ?
  192. _FldNameList[17] > AnaDat.ArtLief.SpesenArt
  193. "SpesenArt" "SpesenArt" ? ? "integer" ? ? ? ? ? ? yes ? no 9.8 yes ?
  194. _FldNameList[18] > AnaDat.ArtLief.Spesen
  195. "Spesen" "Spesen" ? ? "decimal" ? ? ? ? ? ? yes ? no 7.2 yes ?
  196. _FldNameList[19] > AnaDat.ArtLief.Haupt
  197. "Haupt" "Haupt" ? ? "logical" ? ? ? ? ? ? yes ? no 5.8 yes ?
  198. _FldNameList[20] > AnaDat.ArtLief.Strichcode_GGeb
  199. "Strichcode_GGeb" "Strichcode_GGeb" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes ?
  200. _FldNameList[21] > AnaDat.ArtLief.Strichcode_KGeb
  201. "Strichcode_KGeb" "Strichcode_KGeb" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes ?
  202. _FldNameList[22] > AnaDat.ArtLief.Strichcode_VGeb
  203. "Strichcode_VGeb" "Strichcode_VGeb" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes ?
  204. _FldNameList[23] > AnaDat.ArtLief.VGeb_Cd
  205. "VGeb_Cd" "VGeb_Cd" ? ? "character" ? ? ? ? ? ? yes ? no 9.2 yes ?
  206. _FldNameList[24] > "_<CALC>"
  207. "IF sAktiv THEN DYNAMIC-FUNCTION('getAdressAnzeige':U, RowObject.Knr) ELSE ''" "Lieferant" "Lieferant" "x(80)" "character" ? ? ? ? ? ? yes ? no 80 no ?
  208. _FldNameList[25] > "_<CALC>"
  209. "0" "Mind_Bestand" "Mind. Best." "zzz,zz9" "Integer" ? ? ? ? ? ? yes ? no 11.6 no ?
  210. _FldNameList[26] > "_<CALC>"
  211. "0" "Soll_Bestand" "Soll. Best." "zzz,zz9" "Integer" ? ? ? ? ? ? yes ? no 11 no ?
  212. _FldNameList[27] > "_<CALC>"
  213. "0" "Meld_Bestand" "Meld. Best." "zzz,zz9" "Integer" ? ? ? ? ? ? yes ? no 10.6 no ?
  214. _FldNameList[28] > AnaDat.ArtLief.Min_GGebinde
  215. "Min_GGebinde" "Min_GGebinde" ? ? "integer" ? ? ? ? ? ? yes ? no 14.2 yes ?
  216. _FldNameList[29] > AnaDat.ArtLief.Min_KGebinde
  217. "Min_KGebinde" "Min_KGebinde" ? ? "integer" ? ? ? ? ? ? yes ? no 14 yes ?
  218. _FldNameList[30] > AnaDat.ArtLief.Min_VGebinde
  219. "Min_VGebinde" "Min_VGebinde" ? ? "integer" ? ? ? ? ? ? yes ? no 14 yes ?
  220. _FldNameList[31] > AnaDat.ArtLief.ZusRab
  221. "ZusRab" "ZusRab" ? ? "decimal" ? ? ? ? ? ? yes ? no 7.6 yes ?
  222. _FldNameList[32] > "_<CALC>"
  223. "0" "GGeb_Inhalt" ? "zzz,zz9" "Integer" ? ? ? ? ? ? yes ? no 6.8 no ?
  224. _FldNameList[33] > "_<CALC>"
  225. "0" "VGeb_Inhalt" ? "zzz,zz9" "Integer" ? ? ? ? ? ? yes ? no 6.8 no ?
  226. _FldNameList[34] > "_<CALC>"
  227. "0" "KGeb_Inhalt" ? "zzz,zz9" "Integer" ? ? ? ? ? ? yes ? no 6.8 no ?
  228. _FldNameList[35] > "_<CALC>"
  229. "DYNAMIC-FUNCTION('getFremdDaten':U IN THIS-PROCEDURE)" "xDummy" ? "x(8)" "character" ? ? ? ? ? ? yes ? no 8 no ?
  230. _Design-Parent is WINDOW dTables @ ( 1.14 , 2.6 )
  231. */ /* QUERY Query-Main */
  232. &ANALYZE-RESUME
  233. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK dTables
  234. /* *************************** Main Block *************************** */
  235. { incl/datmainblock.i }
  236. &IF DEFINED(UIB_IS_RUNNING) <> 0 &THEN
  237. RUN initializeObject.
  238. &ENDIF
  239. /* _UIB-CODE-BLOCK-END */
  240. &ANALYZE-RESUME
  241. /* ********************** Internal Procedures *********************** */
  242. {&DB-REQUIRED-START}
  243. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE DATA.CALCULATE dTables DATA.CALCULATE _DB-REQUIRED
  244. PROCEDURE DATA.CALCULATE :
  245. /*------------------------------------------------------------------------------
  246. Purpose: Calculate all the Calculated Expressions found in the
  247. SmartDataObject.
  248. Parameters: <none>
  249. ------------------------------------------------------------------------------*/
  250. ASSIGN
  251. rowObject.GGeb_Inhalt = (0)
  252. rowObject.KGeb_Inhalt = (0)
  253. rowObject.Lieferant = (IF sAktiv THEN DYNAMIC-FUNCTION('getAdressAnzeige':U, RowObject.Knr) ELSE '')
  254. rowObject.Meld_Bestand = (0)
  255. rowObject.Mind_Bestand = (0)
  256. rowObject.Soll_Bestand = (0)
  257. rowObject.VGeb_Inhalt = (0)
  258. rowObject.xDummy = (DYNAMIC-FUNCTION('getFremdDaten':U IN THIS-PROCEDURE))
  259. .
  260. END PROCEDURE.
  261. /* _UIB-CODE-BLOCK-END */
  262. &ANALYZE-RESUME
  263. {&DB-REQUIRED-END}
  264. {&DB-REQUIRED-START}
  265. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE dataAvailable dTables _DB-REQUIRED
  266. PROCEDURE dataAvailable :
  267. /*------------------------------------------------------------------------------
  268. Purpose: Super Override
  269. Parameters:
  270. Notes:
  271. ------------------------------------------------------------------------------*/
  272. { incl/datdataavailable.i }
  273. END PROCEDURE.
  274. /* _UIB-CODE-BLOCK-END */
  275. &ANALYZE-RESUME
  276. {&DB-REQUIRED-END}
  277. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI dTables _DEFAULT-DISABLE
  278. PROCEDURE disable_UI :
  279. /*------------------------------------------------------------------------------
  280. Purpose: DISABLE the User Interface
  281. Parameters: <none>
  282. Notes: Here we clean-up the user-interface by deleting
  283. dynamic widgets we have created and/or hide
  284. frames. This procedure is usually called when
  285. we are ready to "clean-up" after running.
  286. ------------------------------------------------------------------------------*/
  287. /* Hide all frames. */
  288. IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE.
  289. END PROCEDURE.
  290. /* _UIB-CODE-BLOCK-END */
  291. &ANALYZE-RESUME
  292. {&DB-REQUIRED-START}
  293. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE INAKTIVIEREN dTables _DB-REQUIRED
  294. PROCEDURE INAKTIVIEREN :
  295. /*------------------------------------------------------------------------------
  296. Purpose:
  297. Parameters: <none>
  298. Notes:
  299. ------------------------------------------------------------------------------*/
  300. { incl/datinaktivieren.i }
  301. END PROCEDURE.
  302. /* _UIB-CODE-BLOCK-END */
  303. &ANALYZE-RESUME
  304. {&DB-REQUIRED-END}
  305. {&DB-REQUIRED-START}
  306. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE initializeObject dTables _DB-REQUIRED
  307. PROCEDURE initializeObject :
  308. /*------------------------------------------------------------------------------
  309. Purpose: Super Override
  310. Parameters:
  311. Notes:
  312. ------------------------------------------------------------------------------*/
  313. { incl/datinitialize.i }
  314. END PROCEDURE.
  315. /* _UIB-CODE-BLOCK-END */
  316. &ANALYZE-RESUME
  317. {&DB-REQUIRED-END}
  318. {&DB-REQUIRED-START}
  319. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE REAKTIVIEREN dTables _DB-REQUIRED
  320. PROCEDURE REAKTIVIEREN :
  321. /*------------------------------------------------------------------------------
  322. Purpose:
  323. Parameters: <none>
  324. Notes:
  325. ------------------------------------------------------------------------------*/
  326. { incl/datreaktivieren.i }
  327. END PROCEDURE.
  328. /* _UIB-CODE-BLOCK-END */
  329. &ANALYZE-RESUME
  330. {&DB-REQUIRED-END}
  331. {&DB-REQUIRED-START}
  332. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE REPOS_TABELLE dTables _DB-REQUIRED
  333. PROCEDURE REPOS_TABELLE :
  334. /*------------------------------------------------------------------------------
  335. Purpose:
  336. Parameters: <none>
  337. Notes:
  338. ------------------------------------------------------------------------------*/
  339. { incl/datrepos.i }
  340. END PROCEDURE.
  341. /* _UIB-CODE-BLOCK-END */
  342. &ANALYZE-RESUME
  343. {&DB-REQUIRED-END}
  344. {&DB-REQUIRED-START}
  345. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE SET_FILTER dTables _DB-REQUIRED
  346. PROCEDURE SET_FILTER :
  347. /*------------------------------------------------------------------------------
  348. Purpose:
  349. Parameters: <none>
  350. Notes:
  351. ------------------------------------------------------------------------------*/
  352. { incl/datsetfilter.i }
  353. END PROCEDURE.
  354. /* _UIB-CODE-BLOCK-END */
  355. &ANALYZE-RESUME
  356. {&DB-REQUIRED-END}
  357. {&DB-REQUIRED-START}
  358. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE SET_OPENFLAG dTables _DB-REQUIRED
  359. PROCEDURE SET_OPENFLAG :
  360. /*------------------------------------------------------------------------------
  361. Purpose:
  362. Parameters: <none>
  363. Notes:
  364. ------------------------------------------------------------------------------*/
  365. { incl/datsetopenflag.i }
  366. END PROCEDURE.
  367. /* _UIB-CODE-BLOCK-END */
  368. &ANALYZE-RESUME
  369. {&DB-REQUIRED-END}
  370. {&DB-REQUIRED-START}
  371. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE SET_SORT dTables _DB-REQUIRED
  372. PROCEDURE SET_SORT :
  373. /*------------------------------------------------------------------------------
  374. Purpose:
  375. Parameters: <none>
  376. Notes:
  377. ------------------------------------------------------------------------------*/
  378. { incl/datsetsort.i }
  379. END PROCEDURE.
  380. /* _UIB-CODE-BLOCK-END */
  381. &ANALYZE-RESUME
  382. {&DB-REQUIRED-END}
  383. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE viewObject dTables
  384. PROCEDURE viewObject :
  385. /*------------------------------------------------------------------------------*/
  386. /* Purpose: */
  387. /* Notes: */
  388. /*------------------------------------------------------------------------------*/
  389. RUN SUPER.
  390. PUBLISH 'GET-LAGER-IN-ARTIKEL' ( OUTPUT iLager ).
  391. IF iLager = ? THEN iLager = 0.
  392. END PROCEDURE.
  393. /* _UIB-CODE-BLOCK-END */
  394. &ANALYZE-RESUME
  395. /* ************************ Function Implementations ***************** */
  396. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION getFremdDaten dTables
  397. FUNCTION getFremdDaten RETURNS CHARACTER
  398. ( ):
  399. /*------------------------------------------------------------------------------*/
  400. /* Purpose: */
  401. /* Notes: */
  402. /*------------------------------------------------------------------------------*/
  403. FIND bArtLager NO-LOCK
  404. WHERE bArtLager.Firma = rowObject.Firma
  405. AND bArtLager.Artnr = rowObject.Artnr
  406. AND bArtLager.Inhalt = rowObject.Inhalt
  407. AND bArtLager.Jahr = rowObject.Jahr
  408. AND bArtLager.Lager = iLager.
  409. ASSIGN
  410. RowObject.Mind_Bestand = bArtLager.Mind_Bestand
  411. RowObject.Soll_Bestand = bArtLager.Soll_Bestand
  412. RowObject.Meld_Bestand = bArtLager.Meld_Bestand.
  413. FIND bArtst NO-LOCK
  414. WHERE bArtst.Firma = rowObject.Firma
  415. AND bArtst.Artnr = rowObject.Artnr
  416. AND bArtst.Inhalt = rowObject.Inhalt
  417. AND bArtst.Jahr = rowObject.Jahr.
  418. ASSIGN rowObject.GGeb_Inhalt = DYNAMIC-FUNCTION ('getGGebindeInhalt':U, bArtst.GGeb_Cd)
  419. rowObject.VGeb_Inhalt = DYNAMIC-FUNCTION ('getVGebindeInhalt':U, bArtst.VGeb_Cd)
  420. rowObject.KGeb_Inhalt = DYNAMIC-FUNCTION ('getKGebindeInhalt':U, bArtst.KGeb_Cd).
  421. RETURN ''.
  422. END FUNCTION.
  423. /* _UIB-CODE-BLOCK-END */
  424. &ANALYZE-RESUME
  425. {&DB-REQUIRED-START}
  426. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION getQueryBuffer dTables _DB-REQUIRED
  427. FUNCTION getQueryBuffer RETURNS HANDLE
  428. ( /* parameter-definitions */ ) :
  429. /*------------------------------------------------------------------------------
  430. Purpose:
  431. Notes:
  432. ------------------------------------------------------------------------------*/
  433. RETURN BUFFER rowObject:HANDLE.
  434. END FUNCTION.
  435. /* _UIB-CODE-BLOCK-END */
  436. &ANALYZE-RESUME
  437. {&DB-REQUIRED-END}
  438. {&DB-REQUIRED-START}
  439. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION openQuery dTables _DB-REQUIRED
  440. FUNCTION openQuery RETURNS LOGICAL
  441. ( /* parameter-definitions */ ) :
  442. /*------------------------------------------------------------------------------
  443. Purpose: Super Override
  444. Notes:
  445. ------------------------------------------------------------------------------*/
  446. DEFINE VARIABLE Felder AS CHARACTER NO-UNDO.
  447. DEFINE VARIABLE Inhalt AS CHARACTER NO-UNDO.
  448. DEFINE VARIABLE ix AS INTEGER NO-UNDO.
  449. DEFINE VARIABLE cFeld AS CHARACTER NO-UNDO.
  450. /* IF NOT fOpen 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 = 'Aufko.Firma = ' + QUOTER(Firma) + ' AND ' */
  459. /* + 'Aufko.Auf_Sta = ' + STRING(Auf_Sta) + ' '. */
  460. /* xString = 'FOR EACH Debop ' + xSort + 'WHERE ' */
  461. /* + 'Debop.Firma = "' + Firma + '" AND ' */
  462. /* + 'Debop.Knr = ' + STRING(Knr) + ' ' */
  463. /* + 'NO-LOCK BY Debop.FakDat DESCENDING INDEXED-REPOSITION '. */
  464. { incl/datopenquery.i }
  465. IF xWhere <> '' THEN DYNAMIC-FUNCTION('setQueryWhere':U , INPUT xWhere ).
  466. IF xString <> '' THEN DYNAMIC-FUNCTION('setQueryString':U, INPUT xString).
  467. IF xSort <> '' THEN DYNAMIC-FUNCTION('setQuerySort':U , INPUT xSort ).
  468. RETURN SUPER( ).
  469. END FUNCTION.
  470. /* _UIB-CODE-BLOCK-END */
  471. &ANALYZE-RESUME
  472. {&DB-REQUIRED-END}