d-besze.w 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799
  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. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DECLARATIONS dTables
  8. USING classes.Artst FROM PROPATH.
  9. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS dTables
  10. /*------------------------------------------------------------------------
  11. File:
  12. Description: from DATA.W - Template For SmartData objects in the ADM
  13. Input Parameters:
  14. <none>
  15. Output Parameters:
  16. <none>
  17. Modified: February 24, 1999
  18. ------------------------------------------------------------------------*/
  19. /* This .W file was created with the Progress AppBuilder. */
  20. /*----------------------------------------------------------------------*/
  21. /* Create an unnamed pool to store all the widgets created
  22. by this procedure. This is a good default which assures
  23. that this procedure's triggers and internal procedures
  24. will execute in this procedure's storage, and that proper
  25. cleanup will occur on deletion of the procedure. */
  26. CREATE WIDGET-POOL.
  27. /* *************************** Definitions ************************** */
  28. /* Parameters Definitions --- */
  29. /* Local Variable Definitions --- */
  30. &SCOPED-DEFINE Tabelle Besze
  31. &SCOPED-DEFINE TabWhere USE-INDEX Besze-k1 ~
  32. WHERE {&Tabelle}.Firma = tRowObject.Firma ~
  33. AND {&Tabelle}.Besnr = tRowObject.Besnr ~
  34. AND {&Tabelle}.Pos = tRowObject.Pos
  35. { incl/datdefinition.i }
  36. /* _UIB-CODE-BLOCK-END */
  37. &ANALYZE-RESUME
  38. {adecomm/appserv.i}
  39. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS dTables
  40. /*------------------------------------------------------------------------
  41. File:
  42. Description:
  43. Input Parameters:
  44. <none>
  45. Output Parameters:
  46. <none>
  47. Author:
  48. Created: 16/09/21 - 2:48 pm
  49. ------------------------------------------------------------------------*/
  50. /* This .W file was created with the Progress AppBuilder. */
  51. /*----------------------------------------------------------------------*/
  52. /* *************************** Definitions ************************** */
  53. /* Parameters Definitions --- */
  54. /* Local Variable Definitions --- */
  55. /* _UIB-CODE-BLOCK-END */
  56. &ANALYZE-RESUME
  57. &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
  58. /* ******************** Preprocessor Definitions ******************** */
  59. &Global-define DATA-LOGIC-PROCEDURE .p
  60. &Scoped-define PROCEDURE-TYPE SmartDataObject
  61. &Scoped-define DB-AWARE yes
  62. &Scoped-define ADM-SUPPORTED-LINKS Data-Source,Data-Target,Navigation-Target,Update-Target,Commit-Target,Filter-Target
  63. /* Db-Required definitions. */
  64. &IF DEFINED(DB-REQUIRED) = 0 &THEN
  65. &GLOBAL-DEFINE DB-REQUIRED TRUE
  66. &ENDIF
  67. &GLOBAL-DEFINE DB-REQUIRED-START &IF {&DB-REQUIRED} &THEN
  68. &GLOBAL-DEFINE DB-REQUIRED-END &ENDIF
  69. &Scoped-define QUERY-NAME Query-Main
  70. /* Internal Tables (found by Frame, Query & Browse Queries) */
  71. &Scoped-define INTERNAL-TABLES Besze
  72. /* Definitions for QUERY Query-Main */
  73. &Scoped-Define ENABLED-FIELDS Aktion Alter_EP Alter_Listen_EP Artnr Besnr Bez1 Bez2 EP Faktor Firma FRW~
  74. Gewicht GGebKto GGeb_Cd GGeb_Me Inhalt Jahr KGebKto KGeb_Cd KGeb_Me Kurs~
  75. Lager Liter lLotnr lVerfall L_EP L_EP_FRW L_Rabatt MBest MGeli MRuek Pos~
  76. Preis Rabatt Rueckstand Spesen S_Artnr S_Bez1 S_Bez2 S_Preis S_Preis_FRW~
  77. Trnr Verbrauch Verbucht VGebKto VGeb_Cd VGeb_Me Zustext1 Zustext2 Zustext3~
  78. Zustext4 Zustext5 Zustext6 Zustext7 Zustext8 Zustext9 Zustext10 Bezeichnung~
  79. SeineBez GGebinde VGebinde KGebinde Bestand LagerOrt Netto SpesenBetr~
  80. ZusRab Netto_Bas Spesen_Bas Best_Sta GGeb_EG KGeb_EG VGeb_EG Eingang
  81. &Scoped-define ENABLED-FIELDS-IN-Besze Aktion Alter_EP Alter_Listen_EP ~
  82. Artnr Besnr Bez1 Bez2 EP Faktor Firma FRW Gewicht GGebKto GGeb_Cd GGeb_Me ~
  83. Inhalt Jahr KGebKto KGeb_Cd KGeb_Me Kurs Lager Liter lLotnr lVerfall L_EP ~
  84. L_EP_FRW L_Rabatt MBest MGeli MRuek Pos Preis Rabatt Rueckstand Spesen ~
  85. S_Artnr S_Bez1 S_Bez2 S_Preis S_Preis_FRW Trnr Verbrauch Verbucht VGebKto ~
  86. VGeb_Cd VGeb_Me Zustext1 Zustext2 Zustext3 Zustext4 Zustext5 Zustext6 ~
  87. Zustext7 Zustext8 Zustext9 Zustext10 Netto SpesenBetr ZusRab Best_Sta ~
  88. GGeb_EG KGeb_EG VGeb_EG Eingang
  89. &Scoped-Define DATA-FIELDS Aktion Alter_EP Alter_Listen_EP Artnr Besnr Bez1 Bez2 EP Faktor Firma FRW~
  90. Gewicht GGebKto GGeb_Cd GGeb_Me Inhalt Jahr KGebKto KGeb_Cd KGeb_Me Kurs~
  91. Lager Liter lLotnr lVerfall L_EP L_EP_FRW L_Rabatt MBest MGeli MRuek Pos~
  92. Preis Rabatt Rueckstand Spesen S_Artnr S_Bez1 S_Bez2 S_Preis S_Preis_FRW~
  93. Trnr Verbrauch Verbucht VGebKto VGeb_Cd VGeb_Me Zustext1 Zustext2 Zustext3~
  94. Zustext4 Zustext5 Zustext6 Zustext7 Zustext8 Zustext9 Zustext10 Bezeichnung~
  95. SeineBez GGebinde VGebinde KGebinde Bestand LagerOrt Netto SpesenBetr~
  96. ZusRab Netto_Bas Spesen_Bas Best_Sta GGeb_EG KGeb_EG VGeb_EG Eingang~
  97. zzDUMMY
  98. &Scoped-define DATA-FIELDS-IN-Besze Aktion Alter_EP Alter_Listen_EP Artnr ~
  99. Besnr Bez1 Bez2 EP Faktor Firma FRW Gewicht GGebKto GGeb_Cd GGeb_Me Inhalt ~
  100. Jahr KGebKto KGeb_Cd KGeb_Me Kurs Lager Liter lLotnr lVerfall L_EP L_EP_FRW ~
  101. L_Rabatt MBest MGeli MRuek Pos Preis Rabatt Rueckstand Spesen S_Artnr ~
  102. S_Bez1 S_Bez2 S_Preis S_Preis_FRW Trnr Verbrauch Verbucht VGebKto VGeb_Cd ~
  103. VGeb_Me Zustext1 Zustext2 Zustext3 Zustext4 Zustext5 Zustext6 Zustext7 ~
  104. Zustext8 Zustext9 Zustext10 Netto SpesenBetr ZusRab Best_Sta GGeb_EG ~
  105. KGeb_EG VGeb_EG Eingang
  106. &Scoped-Define MANDATORY-FIELDS Firma
  107. &Scoped-Define APPLICATION-SERVICE
  108. &Scoped-Define ASSIGN-LIST rowObject.Zustext1 = Besze.Zustext[1]~
  109. rowObject.Zustext2 = Besze.Zustext[2]~
  110. rowObject.Zustext3 = Besze.Zustext[3]~
  111. rowObject.Zustext4 = Besze.Zustext[4]~
  112. rowObject.Zustext5 = Besze.Zustext[5]~
  113. rowObject.Zustext6 = Besze.Zustext[6]~
  114. rowObject.Zustext7 = Besze.Zustext[7]~
  115. rowObject.Zustext8 = Besze.Zustext[8]~
  116. rowObject.Zustext9 = Besze.Zustext[9]~
  117. rowObject.Zustext10 = Besze.Zustext[10]
  118. &Scoped-Define DATA-FIELD-DEFS "d-besze.i"
  119. &Scoped-Define DATA-TABLE-NO-UNDO NO-UNDO
  120. &Scoped-define QUERY-STRING-Query-Main FOR EACH Besze NO-LOCK INDEXED-REPOSITION
  121. {&DB-REQUIRED-START}
  122. &Scoped-define OPEN-QUERY-Query-Main OPEN QUERY Query-Main FOR EACH Besze NO-LOCK INDEXED-REPOSITION.
  123. {&DB-REQUIRED-END}
  124. &Scoped-define TABLES-IN-QUERY-Query-Main Besze
  125. &Scoped-define FIRST-TABLE-IN-QUERY-Query-Main Besze
  126. /* Custom List Definitions */
  127. /* List-1,List-2,List-3,List-4,List-5,List-6 */
  128. /* _UIB-PREPROCESSOR-BLOCK-END */
  129. &ANALYZE-RESUME
  130. /* ************************ Function Prototypes ********************** */
  131. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD getArtikelDaten dTables
  132. FUNCTION getArtikelDaten RETURNS LOGICAL
  133. ( ) FORWARD.
  134. /* _UIB-CODE-BLOCK-END */
  135. &ANALYZE-RESUME
  136. {&DB-REQUIRED-START}
  137. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD getCurrentRecid dTables _DB-REQUIRED
  138. FUNCTION getCurrentRecid RETURNS RECID
  139. ( /* parameter-definitions */ ) FORWARD.
  140. /* _UIB-CODE-BLOCK-END */
  141. &ANALYZE-RESUME
  142. {&DB-REQUIRED-END}
  143. {&DB-REQUIRED-START}
  144. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD getQueryBuffer dTables _DB-REQUIRED
  145. FUNCTION getQueryBuffer RETURNS HANDLE
  146. ( /* parameter-definitions */ ) FORWARD.
  147. /* _UIB-CODE-BLOCK-END */
  148. &ANALYZE-RESUME
  149. {&DB-REQUIRED-END}
  150. {&DB-REQUIRED-START}
  151. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD openQuery dTables _DB-REQUIRED
  152. FUNCTION openQuery RETURNS LOGICAL
  153. ( /* parameter-definitions */ ) FORWARD.
  154. /* _UIB-CODE-BLOCK-END */
  155. &ANALYZE-RESUME
  156. {&DB-REQUIRED-END}
  157. /* *********************** Control Definitions ********************** */
  158. {&DB-REQUIRED-START}
  159. /* Query definitions */
  160. &ANALYZE-SUSPEND
  161. DEFINE QUERY Query-Main FOR
  162. Besze SCROLLING.
  163. &ANALYZE-RESUME
  164. {&DB-REQUIRED-END}
  165. /* ************************ Frame Definitions *********************** */
  166. /* *********************** Procedure Settings ************************ */
  167. &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
  168. /* Settings for THIS-PROCEDURE
  169. Type: SmartDataObject
  170. Allow: Query
  171. Frames: 0
  172. Add Fields to: Neither
  173. Other Settings: PERSISTENT-ONLY COMPILE APPSERVER DB-AWARE
  174. */
  175. /* This procedure should always be RUN PERSISTENT. Report the error, */
  176. /* then cleanup and return. */
  177. IF NOT THIS-PROCEDURE:PERSISTENT THEN DO:
  178. MESSAGE "{&FILE-NAME} should only be RUN PERSISTENT.":U
  179. VIEW-AS ALERT-BOX ERROR BUTTONS OK.
  180. RETURN.
  181. END.
  182. &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
  183. /* ************************* Create Window ************************** */
  184. &ANALYZE-SUSPEND _CREATE-WINDOW
  185. /* DESIGN Window definition (used by the UIB)
  186. CREATE WINDOW dTables ASSIGN
  187. HEIGHT = 1.62
  188. WIDTH = 83.4.
  189. /* END WINDOW DEFINITION */
  190. */
  191. &ANALYZE-RESUME
  192. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB dTables
  193. /* ************************* Included-Libraries *********************** */
  194. {src/adm2/data.i}
  195. /* _UIB-CODE-BLOCK-END */
  196. &ANALYZE-RESUME
  197. /* *********** Runtime Attributes and AppBuilder Settings *********** */
  198. &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES
  199. /* SETTINGS FOR WINDOW dTables
  200. VISIBLE,,RUN-PERSISTENT */
  201. /* _RUN-TIME-ATTRIBUTES-END */
  202. &ANALYZE-RESUME
  203. /* Setting information for Queries and Browse Widgets fields */
  204. &ANALYZE-SUSPEND _QUERY-BLOCK QUERY Query-Main
  205. /* Query rebuild information for SmartDataObject Query-Main
  206. _TblList = "AnaDat.Besze"
  207. _Options = "NO-LOCK INDEXED-REPOSITION"
  208. _FldNameList[1] > AnaDat.Besze.Aktion
  209. "Aktion" "Aktion" ? ? "logical" ? ? ? ? ? ? yes ? no 6 yes ?
  210. _FldNameList[2] > AnaDat.Besze.Alter_EP
  211. "Alter_EP" "Alter_EP" ? ? "decimal" ? ? ? ? ? ? yes ? no 12.2 yes ?
  212. _FldNameList[3] > AnaDat.Besze.Alter_Listen_EP
  213. "Alter_Listen_EP" "Alter_Listen_EP" ? ? "decimal" ? ? ? ? ? ? yes ? no 15 yes ?
  214. _FldNameList[4] > AnaDat.Besze.Artnr
  215. "Artnr" "Artnr" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ?
  216. _FldNameList[5] > AnaDat.Besze.Besnr
  217. "Besnr" "Besnr" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ?
  218. _FldNameList[6] > AnaDat.Besze.Bez1
  219. "Bez1" "Bez1" ? ? "character" ? ? ? ? ? ? yes ? no 30 yes ?
  220. _FldNameList[7] > AnaDat.Besze.Bez2
  221. "Bez2" "Bez2" ? ? "character" ? ? ? ? ? ? yes ? no 30 yes ?
  222. _FldNameList[8] > AnaDat.Besze.EP
  223. "EP" "EP" ? ? "decimal" ? ? ? ? ? ? yes ? no 12.2 yes ?
  224. _FldNameList[9] > AnaDat.Besze.Faktor
  225. "Faktor" "Faktor" ? ? "integer" ? ? ? ? ? ? yes ? no 6 yes ?
  226. _FldNameList[10] > AnaDat.Besze.Firma
  227. "Firma" "Firma" ? ? "character" ? ? ? ? ? ? yes ? yes 8 yes ?
  228. _FldNameList[11] > AnaDat.Besze.FRW
  229. "FRW" "FRW" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes ?
  230. _FldNameList[12] > AnaDat.Besze.Gewicht
  231. "Gewicht" "Gewicht" ? ? "decimal" ? ? ? ? ? ? yes ? no 11.6 yes ?
  232. _FldNameList[13] > AnaDat.Besze.GGebKto
  233. "GGebKto" "GGebKto" ? ? "character" ? ? ? ? ? ? yes ? no 8.8 yes ?
  234. _FldNameList[14] > AnaDat.Besze.GGeb_Cd
  235. "GGeb_Cd" "GGeb_Cd" ? ? "character" ? ? ? ? ? ? yes ? no 9.4 yes ?
  236. _FldNameList[15] > AnaDat.Besze.GGeb_Me
  237. "GGeb_Me" "GGeb_Me" ? ? "decimal" ? ? ? ? ? ? yes ? no 10.4 yes ?
  238. _FldNameList[16] > AnaDat.Besze.Inhalt
  239. "Inhalt" "Inhalt" ? ? "integer" ? ? ? ? ? ? yes ? no 5.2 yes ?
  240. _FldNameList[17] > AnaDat.Besze.Jahr
  241. "Jahr" "Jahr" ? ? "integer" ? ? ? ? ? ? yes ? no 4.8 yes ?
  242. _FldNameList[18] > AnaDat.Besze.KGebKto
  243. "KGebKto" "KGebKto" ? ? "character" ? ? ? ? ? ? yes ? no 8.6 yes ?
  244. _FldNameList[19] > AnaDat.Besze.KGeb_Cd
  245. "KGeb_Cd" "KGeb_Cd" ? ? "character" ? ? ? ? ? ? yes ? no 9.2 yes ?
  246. _FldNameList[20] > AnaDat.Besze.KGeb_Me
  247. "KGeb_Me" "KGeb_Me" ? ? "decimal" ? ? ? ? ? ? yes ? no 10.4 yes ?
  248. _FldNameList[21] > AnaDat.Besze.Kurs
  249. "Kurs" "Kurs" ? ? "decimal" ? ? ? ? ? ? yes ? no 13.6 yes ?
  250. _FldNameList[22] > AnaDat.Besze.Lager
  251. "Lager" "Lager" ? ? "integer" ? ? ? ? ? ? yes ? no 5.4 yes ?
  252. _FldNameList[23] > AnaDat.Besze.Liter
  253. "Liter" "Liter" ? ? "decimal" ? ? ? ? ? ? yes ? no 11.6 yes ?
  254. _FldNameList[24] > AnaDat.Besze.lLotnr
  255. "lLotnr" "lLotnr" ? ? "logical" ? ? ? ? ? ? yes ? no 5.2 yes ?
  256. _FldNameList[25] > AnaDat.Besze.lVerfall
  257. "lVerfall" "lVerfall" ? ? "logical" ? ? ? ? ? ? yes ? no 6.2 yes ?
  258. _FldNameList[26] > AnaDat.Besze.L_EP
  259. "L_EP" "L_EP" ? ? "decimal" ? ? ? ? ? ? yes ? no 12.2 yes ?
  260. _FldNameList[27] > AnaDat.Besze.L_EP_FRW
  261. "L_EP_FRW" "L_EP_FRW" ? ? "decimal" ? ? ? ? ? ? yes ? no 15.8 yes ?
  262. _FldNameList[28] > AnaDat.Besze.L_Rabatt
  263. "L_Rabatt" "L_Rabatt" ? ? "decimal" ? ? ? ? ? ? yes ? no 8.8 yes ?
  264. _FldNameList[29] > AnaDat.Besze.MBest
  265. "MBest" "MBest" ? ? "decimal" ? ? ? ? ? ? yes ? no 8.8 yes ?
  266. _FldNameList[30] > AnaDat.Besze.MGeli
  267. "MGeli" "MGeli" ? ? "decimal" ? ? ? ? ? ? yes ? no 8.8 yes ?
  268. _FldNameList[31] > AnaDat.Besze.MRuek
  269. "MRuek" "MRuek" ? ? "decimal" ? ? ? ? ? ? yes ? no 8.8 yes ?
  270. _FldNameList[32] > AnaDat.Besze.Pos
  271. "Pos" "Pos" ? ? "integer" ? ? ? ? ? ? yes ? no 4.8 yes ?
  272. _FldNameList[33] > AnaDat.Besze.Preis
  273. "Preis" "Preis" ? ? "decimal" ? ? ? ? ? ? yes ? no 11 yes ?
  274. _FldNameList[34] > AnaDat.Besze.Rabatt
  275. "Rabatt" "Rabatt" ? ? "decimal" ? ? ? ? ? ? yes ? no 6.4 yes ?
  276. _FldNameList[35] > AnaDat.Besze.Rueckstand
  277. "Rueckstand" "Rueckstand" ? ? "decimal" ? ? ? ? ? ? yes ? no 14 yes ?
  278. _FldNameList[36] > AnaDat.Besze.Spesen
  279. "Spesen" "Spesen" ? ? "decimal" ? ? ? ? ? ? yes ? no 7.2 yes ?
  280. _FldNameList[37] > AnaDat.Besze.S_Artnr
  281. "S_Artnr" "S_Artnr" ? ? "character" ? ? ? ? ? ? yes ? no 12 yes ?
  282. _FldNameList[38] > AnaDat.Besze.S_Bez1
  283. "S_Bez1" "S_Bez1" ? ? "character" ? ? ? ? ? ? yes ? no 30 yes ?
  284. _FldNameList[39] > AnaDat.Besze.S_Bez2
  285. "S_Bez2" "S_Bez2" ? ? "character" ? ? ? ? ? ? yes ? no 30 yes ?
  286. _FldNameList[40] > AnaDat.Besze.S_Preis
  287. "S_Preis" "S_Preis" ? ? "decimal" ? ? ? ? ? ? yes ? no 12.2 yes ?
  288. _FldNameList[41] > AnaDat.Besze.S_Preis_FRW
  289. "S_Preis_FRW" "S_Preis_FRW" ? ? "decimal" ? ? ? ? ? ? yes ? no 15.8 yes ?
  290. _FldNameList[42] > AnaDat.Besze.Trnr
  291. "Trnr" "Trnr" ? ? "integer" ? ? ? ? ? ? yes ? no 9.6 yes ?
  292. _FldNameList[43] > AnaDat.Besze.Verbrauch
  293. "Verbrauch" "Verbrauch" ? ? "decimal" ? ? ? ? ? ? yes ? no 14 yes ?
  294. _FldNameList[44] > AnaDat.Besze.Verbucht
  295. "Verbucht" "Verbucht" ? ? "logical" ? ? ? ? ? ? yes ? no 8.6 yes ?
  296. _FldNameList[45] > AnaDat.Besze.VGebKto
  297. "VGebKto" "VGebKto" ? ? "character" ? ? ? ? ? ? yes ? no 8.6 yes ?
  298. _FldNameList[46] > AnaDat.Besze.VGeb_Cd
  299. "VGeb_Cd" "VGeb_Cd" ? ? "character" ? ? ? ? ? ? yes ? no 9.2 yes ?
  300. _FldNameList[47] > AnaDat.Besze.VGeb_Me
  301. "VGeb_Me" "VGeb_Me" ? ? "decimal" ? ? ? ? ? ? yes ? no 10.4 yes ?
  302. _FldNameList[48] > AnaDat.Besze.Zustext[1]
  303. "Zustext[1]" "Zustext1" ? ? "character" ? ? ? ? ? ? yes ? no 30 yes ?
  304. _FldNameList[49] > AnaDat.Besze.Zustext[2]
  305. "Zustext[2]" "Zustext2" ? ? "character" ? ? ? ? ? ? yes ? no 30 yes ?
  306. _FldNameList[50] > AnaDat.Besze.Zustext[3]
  307. "Zustext[3]" "Zustext3" ? ? "character" ? ? ? ? ? ? yes ? no 30 yes ?
  308. _FldNameList[51] > AnaDat.Besze.Zustext[4]
  309. "Zustext[4]" "Zustext4" ? ? "character" ? ? ? ? ? ? yes ? no 30 yes ?
  310. _FldNameList[52] > AnaDat.Besze.Zustext[5]
  311. "Zustext[5]" "Zustext5" ? ? "character" ? ? ? ? ? ? yes ? no 30 yes ?
  312. _FldNameList[53] > AnaDat.Besze.Zustext[6]
  313. "Zustext[6]" "Zustext6" ? ? "character" ? ? ? ? ? ? yes ? no 30 yes ?
  314. _FldNameList[54] > AnaDat.Besze.Zustext[7]
  315. "Zustext[7]" "Zustext7" ? ? "character" ? ? ? ? ? ? yes ? no 30 yes ?
  316. _FldNameList[55] > AnaDat.Besze.Zustext[8]
  317. "Zustext[8]" "Zustext8" ? ? "character" ? ? ? ? ? ? yes ? no 30 yes ?
  318. _FldNameList[56] > AnaDat.Besze.Zustext[9]
  319. "Zustext[9]" "Zustext9" ? ? "character" ? ? ? ? ? ? yes ? no 30 yes ?
  320. _FldNameList[57] > AnaDat.Besze.Zustext[10]
  321. "Zustext[10]" "Zustext10" ? ? "character" ? ? ? ? ? ? yes ? no 30 yes ?
  322. _FldNameList[58] > "_<CALC>"
  323. """""" "Bezeichnung" ? "x(50)" "character" ? ? ? ? ? ? yes ? no 50 no ?
  324. _FldNameList[59] > "_<CALC>"
  325. """""" "SeineBez" "Seine Bezeichnung" "x(50)" "character" ? ? ? ? ? ? yes ? no 50 no ?
  326. _FldNameList[60] > "_<CALC>"
  327. """""" "GGebinde" ? "x(12)" "character" ? ? ? ? ? ? yes ? no 12 no ?
  328. _FldNameList[61] > "_<CALC>"
  329. """""" "VGebinde" ? "x(12)" "character" ? ? ? ? ? ? yes ? no 12 no ?
  330. _FldNameList[62] > "_<CALC>"
  331. """""" "KGebinde" ? "x(12)" "character" ? ? ? ? ? ? yes ? no 12 no ?
  332. _FldNameList[63] > "_<CALC>"
  333. "0.00" "Bestand" ? "zzz,zzz,zz9.99-" "Decimal" ? ? ? ? ? ? yes ? no 14 no ?
  334. _FldNameList[64] > "_<CALC>"
  335. """""" "LagerOrt" "LagerOrt" "x(12)" "character" ? ? ? ? ? ? yes ? no 12 no ?
  336. _FldNameList[65] > AnaDat.Besze.Netto
  337. "Netto" "Netto" ? ? "decimal" ? ? ? ? ? ? yes ? no 10.4 yes ?
  338. _FldNameList[66] > AnaDat.Besze.SpesenBetr
  339. "SpesenBetr" "SpesenBetr" ? ? "decimal" ? ? ? ? ? ? yes ? no 11 yes ?
  340. _FldNameList[67] > AnaDat.Besze.ZusRab
  341. "ZusRab" "ZusRab" ? ? "decimal" ? ? ? ? ? ? yes ? no 7.6 yes ?
  342. _FldNameList[68] > "_<CALC>"
  343. "RowObject.Netto * RowObject.Kurs" "Netto_Bas" "Netto CHF" "zzz,zz9.99-" "Decimal" ? ? ? ? ? ? yes ? no 10.4 no ?
  344. _FldNameList[69] > "_<CALC>"
  345. "RowObject.SpesenBetr * RowObject.Kurs" "Spesen_Bas" "Spesen CHF" "zzz,zz9.99-" "Decimal" ? ? ? ? ? ? yes ? no 12 no ?
  346. _FldNameList[70] > AnaDat.Besze.Best_Sta
  347. "Best_Sta" "Best_Sta" ? ? "integer" ? ? ? ? ? ? yes ? no 8.6 yes ?
  348. _FldNameList[71] > AnaDat.Besze.GGeb_EG
  349. "GGeb_EG" "GGeb_EG" ? ? "decimal" ? ? ? ? ? ? yes ? no 10.4 yes ?
  350. _FldNameList[72] > AnaDat.Besze.KGeb_EG
  351. "KGeb_EG" "KGeb_EG" ? ? "decimal" ? ? ? ? ? ? yes ? no 10.4 yes ?
  352. _FldNameList[73] > AnaDat.Besze.VGeb_EG
  353. "VGeb_EG" "VGeb_EG" ? ? "decimal" ? ? ? ? ? ? yes ? no 10.4 yes ?
  354. _FldNameList[74] > AnaDat.Besze.Eingang
  355. "Eingang" "Eingang" ? ? "decimal" ? ? ? ? ? ? yes ? no 8.8 yes ?
  356. _FldNameList[75] > "_<CALC>"
  357. "DYNAMIC-FUNCTION('getArtikelDaten':U IN THIS-PROCEDURE)" "zzDUMMY" "DUMMY" "x(8)" "character" ? ? ? ? ? ? no ? no 8 no ?
  358. _Design-Parent is WINDOW dTables @ ( 1.14 , 2.6 )
  359. */ /* QUERY Query-Main */
  360. &ANALYZE-RESUME
  361. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK dTables
  362. /* *************************** Main Block *************************** */
  363. { incl/datmainblock.i }
  364. SUBSCRIBE TO 'REFRESHBESEING' ANYWHERE.
  365. &IF DEFINED(UIB_IS_RUNNING) <> 0 &THEN
  366. RUN initializeObject.
  367. &ENDIF
  368. /* _UIB-CODE-BLOCK-END */
  369. &ANALYZE-RESUME
  370. /* ********************** Internal Procedures *********************** */
  371. {&DB-REQUIRED-START}
  372. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE DATA.CALCULATE dTables DATA.CALCULATE _DB-REQUIRED
  373. PROCEDURE DATA.CALCULATE :
  374. /*------------------------------------------------------------------------------
  375. Purpose: Calculate all the Calculated Expressions found in the
  376. SmartDataObject.
  377. Parameters: <none>
  378. ------------------------------------------------------------------------------*/
  379. ASSIGN
  380. rowObject.Bestand = (0.00)
  381. rowObject.Bezeichnung = ("")
  382. rowObject.GGebinde = ("")
  383. rowObject.KGebinde = ("")
  384. rowObject.LagerOrt = ("")
  385. rowObject.Netto_Bas = (RowObject.Netto * RowObject.Kurs)
  386. rowObject.SeineBez = ("")
  387. rowObject.Spesen_Bas = (RowObject.SpesenBetr * RowObject.Kurs)
  388. rowObject.VGebinde = ("")
  389. rowObject.zzDUMMY = (DYNAMIC-FUNCTION('getArtikelDaten':U IN THIS-PROCEDURE))
  390. .
  391. END PROCEDURE.
  392. /* _UIB-CODE-BLOCK-END */
  393. &ANALYZE-RESUME
  394. {&DB-REQUIRED-END}
  395. {&DB-REQUIRED-START}
  396. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE dataAvailable dTables _DB-REQUIRED
  397. PROCEDURE dataAvailable :
  398. /*------------------------------------------------------------------------------
  399. Purpose: Super Override
  400. Parameters:
  401. Notes:
  402. ------------------------------------------------------------------------------*/
  403. { incl/datdataavailable.i }
  404. END PROCEDURE.
  405. /* _UIB-CODE-BLOCK-END */
  406. &ANALYZE-RESUME
  407. {&DB-REQUIRED-END}
  408. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI dTables _DEFAULT-DISABLE
  409. PROCEDURE disable_UI :
  410. /*------------------------------------------------------------------------------
  411. Purpose: DISABLE the User Interface
  412. Parameters: <none>
  413. Notes: Here we clean-up the user-interface by deleting
  414. dynamic widgets we have created and/or hide
  415. frames. This procedure is usually called when
  416. we are ready to "clean-up" after running.
  417. ------------------------------------------------------------------------------*/
  418. /* Hide all frames. */
  419. IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE.
  420. END PROCEDURE.
  421. /* _UIB-CODE-BLOCK-END */
  422. &ANALYZE-RESUME
  423. {&DB-REQUIRED-START}
  424. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE INAKTIVIEREN dTables _DB-REQUIRED
  425. PROCEDURE INAKTIVIEREN :
  426. /*------------------------------------------------------------------------------
  427. Purpose:
  428. Parameters: <none>
  429. Notes:
  430. ------------------------------------------------------------------------------*/
  431. { incl/datinaktivieren.i }
  432. END PROCEDURE.
  433. /* _UIB-CODE-BLOCK-END */
  434. &ANALYZE-RESUME
  435. {&DB-REQUIRED-END}
  436. {&DB-REQUIRED-START}
  437. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE initializeObject dTables _DB-REQUIRED
  438. PROCEDURE initializeObject :
  439. /*------------------------------------------------------------------------------
  440. Purpose: Super Override
  441. Parameters:
  442. Notes:
  443. ------------------------------------------------------------------------------*/
  444. { incl/datinitialize.i }
  445. END PROCEDURE.
  446. /* _UIB-CODE-BLOCK-END */
  447. &ANALYZE-RESUME
  448. {&DB-REQUIRED-END}
  449. {&DB-REQUIRED-START}
  450. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE REAKTIVIEREN dTables _DB-REQUIRED
  451. PROCEDURE REAKTIVIEREN :
  452. /*------------------------------------------------------------------------------
  453. Purpose:
  454. Parameters: <none>
  455. Notes:
  456. ------------------------------------------------------------------------------*/
  457. { incl/datreaktivieren.i }
  458. END PROCEDURE.
  459. /* _UIB-CODE-BLOCK-END */
  460. &ANALYZE-RESUME
  461. {&DB-REQUIRED-END}
  462. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE REFRESHBESEING dTables
  463. PROCEDURE REFRESHBESEING :
  464. /*------------------------------------------------------------------------------
  465. Purpose:
  466. Notes:
  467. ------------------------------------------------------------------------------*/
  468. DEFINE VARIABLE rBesze AS RECID NO-UNDO.
  469. DEFINE VARIABLE cRowId AS CHARACTER NO-UNDO.
  470. DEFINE BUFFER bBesze FOR Besze.
  471. rBesze = DYNAMIC-FUNCTION ('getCurrentRecid':U IN THIS-PROCEDURE) NO-ERROR.
  472. IF rBesze = ? OR
  473. rBesze = 0 THEN RETURN.
  474. FIND bBesze NO-LOCK WHERE RECID(bBesze) = rBesze.
  475. cRowId = STRING(ROWID(bBesze)).
  476. DYNAMIC-FUNCTION ('openQuery':U IN THIS-PROCEDURE ) NO-ERROR.
  477. DYNAMIC-FUNCTION ('fetchRowident':U IN THIS-PROCEDURE, cRowId, ?) NO-ERROR.
  478. END PROCEDURE.
  479. /* _UIB-CODE-BLOCK-END */
  480. &ANALYZE-RESUME
  481. {&DB-REQUIRED-START}
  482. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE REPOS_TABELLE dTables _DB-REQUIRED
  483. PROCEDURE REPOS_TABELLE :
  484. /*------------------------------------------------------------------------------
  485. Purpose:
  486. Parameters: <none>
  487. Notes:
  488. ------------------------------------------------------------------------------*/
  489. { incl/datrepos.i }
  490. END PROCEDURE.
  491. /* _UIB-CODE-BLOCK-END */
  492. &ANALYZE-RESUME
  493. {&DB-REQUIRED-END}
  494. {&DB-REQUIRED-START}
  495. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE SET_FILTER dTables _DB-REQUIRED
  496. PROCEDURE SET_FILTER :
  497. /*------------------------------------------------------------------------------
  498. Purpose:
  499. Parameters: <none>
  500. Notes:
  501. ------------------------------------------------------------------------------*/
  502. { incl/datsetfilter.i }
  503. END PROCEDURE.
  504. /* _UIB-CODE-BLOCK-END */
  505. &ANALYZE-RESUME
  506. {&DB-REQUIRED-END}
  507. {&DB-REQUIRED-START}
  508. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE SET_OPENFLAG dTables _DB-REQUIRED
  509. PROCEDURE SET_OPENFLAG :
  510. /*------------------------------------------------------------------------------
  511. Purpose:
  512. Parameters: <none>
  513. Notes:
  514. ------------------------------------------------------------------------------*/
  515. { incl/datsetopenflag.i }
  516. END PROCEDURE.
  517. /* _UIB-CODE-BLOCK-END */
  518. &ANALYZE-RESUME
  519. {&DB-REQUIRED-END}
  520. {&DB-REQUIRED-START}
  521. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE SET_SORT dTables _DB-REQUIRED
  522. PROCEDURE SET_SORT :
  523. /*------------------------------------------------------------------------------
  524. Purpose:
  525. Parameters: <none>
  526. Notes:
  527. ------------------------------------------------------------------------------*/
  528. { incl/datsetsort.i }
  529. END PROCEDURE.
  530. /* _UIB-CODE-BLOCK-END */
  531. &ANALYZE-RESUME
  532. {&DB-REQUIRED-END}
  533. /* ************************ Function Implementations ***************** */
  534. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION getArtikelDaten dTables
  535. FUNCTION getArtikelDaten RETURNS LOGICAL
  536. ( ):
  537. /*------------------------------------------------------------------------------
  538. Purpose:
  539. Notes:
  540. ------------------------------------------------------------------------------*/
  541. DEFINE VARIABLE oArtst AS Artst.
  542. oArtst = NEW Artst ( rowObject.Firma, RowObject.Artnr, RowObject.Inhalt, RowObject.Jahr, RowObject.Lager ).
  543. ASSIGN
  544. rowObject.Bestand = oArtst:Bestand
  545. rowObject.Bezeichnung = TRIM(oArtst:Bez1 + ' ' + oArtst:Bez2)
  546. rowObject.GGebinde = oArtst:GGeb_Cd_KBez + " (" + oArtst:GGeb_Cd + ")"
  547. rowObject.VGebinde = oArtst:VGeb_Cd_KBez + " (" + oArtst:VGeb_Cd + ")"
  548. rowObject.KGebinde = oArtst:KGeb_Cd_KBez + " (" + oArtst:KGeb_Cd + ")"
  549. rowObject.SeineBez = TRIM(oArtst:S_Bez1 + ' ' + oArtst:S_Bez2)
  550. rowObject.LagerOrt = oArtst:LagerOrt.
  551. END FUNCTION.
  552. /* _UIB-CODE-BLOCK-END */
  553. &ANALYZE-RESUME
  554. {&DB-REQUIRED-START}
  555. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION getCurrentRecid dTables _DB-REQUIRED
  556. FUNCTION getCurrentRecid RETURNS RECID
  557. ( /* parameter-definitions */ ) :
  558. /*------------------------------------------------------------------------------
  559. Purpose:
  560. Notes:
  561. ------------------------------------------------------------------------------*/
  562. { incl/datgetcurrentrecid.i }
  563. END FUNCTION.
  564. /* _UIB-CODE-BLOCK-END */
  565. &ANALYZE-RESUME
  566. {&DB-REQUIRED-END}
  567. {&DB-REQUIRED-START}
  568. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION getQueryBuffer dTables _DB-REQUIRED
  569. FUNCTION getQueryBuffer RETURNS HANDLE
  570. ( /* parameter-definitions */ ) :
  571. /*------------------------------------------------------------------------------
  572. Purpose:
  573. Notes:
  574. ------------------------------------------------------------------------------*/
  575. RETURN BUFFER rowObject:HANDLE.
  576. END FUNCTION.
  577. /* _UIB-CODE-BLOCK-END */
  578. &ANALYZE-RESUME
  579. {&DB-REQUIRED-END}
  580. {&DB-REQUIRED-START}
  581. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION openQuery dTables _DB-REQUIRED
  582. FUNCTION openQuery RETURNS LOGICAL
  583. ( /* parameter-definitions */ ) :
  584. /*------------------------------------------------------------------------------
  585. Purpose: Super Override
  586. Notes:
  587. ------------------------------------------------------------------------------*/
  588. DEFINE VARIABLE Felder AS CHARACTER NO-UNDO.
  589. DEFINE VARIABLE Inhalt AS CHARACTER NO-UNDO.
  590. DEFINE VARIABLE cFeld AS CHARACTER NO-UNDO.
  591. /* IF NOT fOpen THEN RETURN FALSE. */
  592. xWhere = ''.
  593. xSort = ''.
  594. xString = ''.
  595. Felder = DYNAMIC-FUNCTION('getForeignFields':U) NO-ERROR.
  596. Inhalt = DYNAMIC-FUNCTION('getForeignValues':U) NO-ERROR.
  597. /* ix = LOOKUP('Feld', Felder, ',') / 2. */
  598. /* cFeld = ENTRY (ix , Inhalt, CHR(01)). */
  599. /* xWhere = 'Aufko.Firma = ' + QUOTER(Firma) + ' AND ' */
  600. /* + 'Aufko.Auf_Sta = ' + STRING(Auf_Sta) + ' '. */
  601. { incl/datopenquery.i }
  602. IF xWhere <> '' THEN DYNAMIC-FUNCTION('setQueryWhere':U , INPUT xWhere ).
  603. IF xString <> '' THEN DYNAMIC-FUNCTION('setQueryString':U, INPUT xString).
  604. IF xSort <> '' THEN DYNAMIC-FUNCTION('setQuerySort':U , INPUT xSort ).
  605. RETURN SUPER( ).
  606. END FUNCTION.
  607. /* _UIB-CODE-BLOCK-END */
  608. &ANALYZE-RESUME
  609. {&DB-REQUIRED-END}