d-artst-auftrag.w 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865
  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 Artst
  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 Artst
  51. /* Definitions for QUERY Query-Main */
  52. &Scoped-Define ENABLED-FIELDS Aktiv Alk_Gehalt Artnr Art_Grp Ausverk Bestand Bestellt Mind_Bestand Bez~
  53. Bonus_Grp DEP EAV_Code ErfDat ErfSB EShop Farbe Firma FremdNr Gewicht~
  54. GGeb_Cd Herk_Lkz Herst Inhalt Jahr KGeb_Cd Konto Lager Leih_Art LEP~
  55. Letzt_Ausg Letzt_Eing Listen_EP MutDat Min_Marge MutSB MutFlag MWSt Netto~
  56. Preisliste Prod_Grp Rab_Grp Reg_Grp Reserviert Res_c1 Res_c2 Res_i1 Sk_Ber~
  57. Soll_Bestand Strichcode Style Suchbe Traub_Grp VGeb_Cd Wg_Grp WHK_Code~
  58. KGebinde VGebinde GGebinde Artikel
  59. &Scoped-define ENABLED-FIELDS-IN-Artst Aktiv Alk_Gehalt Artnr Art_Grp ~
  60. Ausverk Bestand Bestellt Mind_Bestand Bez Bonus_Grp DEP EAV_Code ErfDat ErfSB ~
  61. EShop Farbe Firma FremdNr Gewicht GGeb_Cd Herk_Lkz Herst Inhalt Jahr ~
  62. KGeb_Cd Konto Lager Leih_Art LEP Letzt_Ausg Letzt_Eing Listen_EP MutDat ~
  63. Min_Marge MutSB MutFlag MWSt Netto Preisliste Prod_Grp Rab_Grp Reg_Grp ~
  64. Reserviert Res_c1 Res_c2 Res_i1 Sk_Ber Soll_Bestand Strichcode Style Suchbe ~
  65. Traub_Grp VGeb_Cd Wg_Grp WHK_Code
  66. &Scoped-Define DATA-FIELDS Aktiv Alk_Gehalt Artnr Art_Grp Ausverk Bestand Bestellt Mind_Bestand Bez~
  67. Bonus_Grp DEP EAV_Code ErfDat ErfSB EShop Farbe Firma FremdNr Gewicht~
  68. GGeb_Cd Herk_Lkz Herst Inhalt Jahr KGeb_Cd Konto Lager Leih_Art LEP~
  69. Letzt_Ausg Letzt_Eing Listen_EP MutDat Min_Marge MutSB MutFlag MWSt Netto~
  70. Preisliste Prod_Grp Rab_Grp Reg_Grp Reserviert Res_c1 Res_c2 Res_i1 Sk_Ber~
  71. Soll_Bestand Strichcode Style Suchbe Traub_Grp VGeb_Cd Wg_Grp WHK_Code~
  72. KGebinde VGebinde GGebinde Artikel
  73. &Scoped-define DATA-FIELDS-IN-Artst Aktiv Alk_Gehalt Artnr Art_Grp Ausverk ~
  74. Bestand Bestellt Mind_Bestand Bez Bonus_Grp DEP EAV_Code ErfDat ErfSB EShop ~
  75. Farbe Firma FremdNr Gewicht GGeb_Cd Herk_Lkz Herst Inhalt Jahr KGeb_Cd ~
  76. Konto Lager Leih_Art LEP Letzt_Ausg Letzt_Eing Listen_EP MutDat Min_Marge ~
  77. MutSB MutFlag MWSt Netto Preisliste Prod_Grp Rab_Grp Reg_Grp Reserviert ~
  78. Res_c1 Res_c2 Res_i1 Sk_Ber Soll_Bestand Strichcode Style Suchbe Traub_Grp ~
  79. VGeb_Cd Wg_Grp WHK_Code
  80. &Scoped-Define MANDATORY-FIELDS Firma
  81. &Scoped-Define APPLICATION-SERVICE
  82. &Scoped-Define ASSIGN-LIST rowObject.ErfDat = Artst.Edat rowObject.ErfSB = Artst.Esbkb~
  83. rowObject.MutDat = Artst.Mdat rowObject.MutSB = Artst.Msbkb
  84. &Scoped-Define DATA-FIELD-DEFS "d-artst-auftrag.i"
  85. &Scoped-Define DATA-TABLE-NO-UNDO NO-UNDO
  86. &Scoped-define QUERY-STRING-Query-Main FOR EACH Artst NO-LOCK INDEXED-REPOSITION
  87. {&DB-REQUIRED-START}
  88. &Scoped-define OPEN-QUERY-Query-Main OPEN QUERY Query-Main FOR EACH Artst NO-LOCK INDEXED-REPOSITION.
  89. {&DB-REQUIRED-END}
  90. &Scoped-define TABLES-IN-QUERY-Query-Main Artst
  91. &Scoped-define FIRST-TABLE-IN-QUERY-Query-Main Artst
  92. /* Custom List Definitions */
  93. /* List-1,List-2,List-3,List-4,List-5,List-6 */
  94. /* _UIB-PREPROCESSOR-BLOCK-END */
  95. &ANALYZE-RESUME
  96. /* ************************ Function Prototypes ********************** */
  97. {&DB-REQUIRED-START}
  98. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD getCurrentRecid dTables _DB-REQUIRED
  99. FUNCTION getCurrentRecid RETURNS RECID
  100. ( /* parameter-definitions */ ) FORWARD.
  101. /* _UIB-CODE-BLOCK-END */
  102. &ANALYZE-RESUME
  103. {&DB-REQUIRED-END}
  104. {&DB-REQUIRED-START}
  105. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD getQueryBuffer dTables _DB-REQUIRED
  106. FUNCTION getQueryBuffer RETURNS HANDLE
  107. ( /* parameter-definitions */ ) FORWARD.
  108. /* _UIB-CODE-BLOCK-END */
  109. &ANALYZE-RESUME
  110. {&DB-REQUIRED-END}
  111. {&DB-REQUIRED-START}
  112. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD openQuery dTables _DB-REQUIRED
  113. FUNCTION openQuery RETURNS LOGICAL
  114. ( /* parameter-definitions */ ) FORWARD.
  115. /* _UIB-CODE-BLOCK-END */
  116. &ANALYZE-RESUME
  117. {&DB-REQUIRED-END}
  118. {&DB-REQUIRED-START}
  119. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD putArtstToSuperproc dTables _DB-REQUIRED
  120. FUNCTION putArtstToSuperproc RETURNS LOGICAL
  121. ( /* parameter-definitions */ ) FORWARD.
  122. /* _UIB-CODE-BLOCK-END */
  123. &ANALYZE-RESUME
  124. {&DB-REQUIRED-END}
  125. /* *********************** Control Definitions ********************** */
  126. {&DB-REQUIRED-START}
  127. /* Query definitions */
  128. &ANALYZE-SUSPEND
  129. DEFINE QUERY Query-Main FOR
  130. Artst SCROLLING.
  131. &ANALYZE-RESUME
  132. {&DB-REQUIRED-END}
  133. /* ************************ Frame Definitions *********************** */
  134. /* *********************** Procedure Settings ************************ */
  135. &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
  136. /* Settings for THIS-PROCEDURE
  137. Type: SmartDataObject
  138. Allow: Query
  139. Frames: 0
  140. Add Fields to: Neither
  141. Other Settings: PERSISTENT-ONLY COMPILE APPSERVER DB-AWARE
  142. */
  143. /* This procedure should always be RUN PERSISTENT. Report the error, */
  144. /* then cleanup and return. */
  145. IF NOT THIS-PROCEDURE:PERSISTENT THEN DO:
  146. MESSAGE "{&FILE-NAME} should only be RUN PERSISTENT.":U
  147. VIEW-AS ALERT-BOX ERROR BUTTONS OK.
  148. RETURN.
  149. END.
  150. &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
  151. /* ************************* Create Window ************************** */
  152. &ANALYZE-SUSPEND _CREATE-WINDOW
  153. /* DESIGN Window definition (used by the UIB)
  154. CREATE WINDOW dTables ASSIGN
  155. HEIGHT = 1.62
  156. WIDTH = 56.2.
  157. /* END WINDOW DEFINITION */
  158. */
  159. &ANALYZE-RESUME
  160. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB dTables
  161. /* ************************* Included-Libraries *********************** */
  162. {src/adm2/data.i}
  163. /* _UIB-CODE-BLOCK-END */
  164. &ANALYZE-RESUME
  165. /* *********** Runtime Attributes and AppBuilder Settings *********** */
  166. &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES
  167. /* SETTINGS FOR WINDOW dTables
  168. VISIBLE,,RUN-PERSISTENT */
  169. /* _RUN-TIME-ATTRIBUTES-END */
  170. &ANALYZE-RESUME
  171. /* Setting information for Queries and Browse Widgets fields */
  172. &ANALYZE-SUSPEND _QUERY-BLOCK QUERY Query-Main
  173. /* Query rebuild information for SmartDataObject Query-Main
  174. _TblList = "AnaDat.Artst"
  175. _Options = "NO-LOCK INDEXED-REPOSITION"
  176. _FldNameList[1] > AnaDat.Artst.Aktiv
  177. "Aktiv" "Aktiv" ? ? "logical" ? ? ? ? ? ? yes ? no 4.8 yes ?
  178. _FldNameList[2] > AnaDat.Artst.Alk_Gehalt
  179. "Alk_Gehalt" "Alk_Gehalt" ? ? "decimal" ? ? ? ? ? ? yes ? no 10.4 yes ?
  180. _FldNameList[3] > AnaDat.Artst.Artnr
  181. "Artnr" "Artnr" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ?
  182. _FldNameList[4] > AnaDat.Artst.Art_Grp
  183. "Art_Grp" "Art_Grp" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ?
  184. _FldNameList[5] > AnaDat.Artst.Ausverk
  185. "Ausverk" "Ausverk" ? ? "integer" ? ? ? ? ? ? yes ? no 7.8 yes ?
  186. _FldNameList[6] > AnaDat.Artst.Bestand
  187. "Bestand" "Bestand" ? ? "integer" ? ? ? ? ? ? yes ? no 9.4 yes ?
  188. _FldNameList[7] > AnaDat.Artst.Bestellt
  189. "Bestellt" "Bestellt" ? ? "integer" ? ? ? ? ? ? yes ? no 9.4 yes ?
  190. _FldNameList[8] > AnaDat.Artst.Mind_Bestand
  191. "Mind_Bestand" "Mind_Bestand" ? ? "integer" ? ? ? ? ? ? yes ? no 11 yes ?
  192. _FldNameList[9] > AnaDat.Artst.Bez
  193. "Bez" "Bez" ? ? "character" ? ? ? ? ? ? yes ? no 30 yes ?
  194. _FldNameList[10] > AnaDat.Artst.Bonus_Grp
  195. "Bonus_Grp" "Bonus_Grp" ? ? "integer" ? ? ? ? ? ? yes ? no 10.6 yes ?
  196. _FldNameList[11] > AnaDat.Artst.DEP
  197. "DEP" "DEP" ? ? "decimal" ? ? ? ? ? ? yes ? no 12.2 yes ?
  198. _FldNameList[12] > AnaDat.Artst.EAV_Code
  199. "EAV_Code" "EAV_Code" ? ? "character" ? ? ? ? ? ? yes ? no 12 yes ?
  200. _FldNameList[13] > AnaDat.Artst.Edat
  201. "Edat" "ErfDat" "erfasst" ? "date" ? ? ? ? ? ? yes ? no 10.8 yes ?
  202. _FldNameList[14] > AnaDat.Artst.Esbkb
  203. "Esbkb" "ErfSB" "ErfSB" "x(20)" "character" ? ? ? ? ? ? yes ? no 20 yes ?
  204. _FldNameList[15] > AnaDat.Artst.EShop
  205. "EShop" "EShop" ? ? "logical" ? ? ? ? ? ? yes ? no 6.4 yes ?
  206. _FldNameList[16] > AnaDat.Artst.Farbe
  207. "Farbe" "Farbe" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ?
  208. _FldNameList[17] > AnaDat.Artst.Firma
  209. "Firma" "Firma" ? ? "character" ? ? ? ? ? ? yes ? yes 8 yes ?
  210. _FldNameList[18] > AnaDat.Artst.FremdNr
  211. "FremdNr" "FremdNr" ? ? "character" ? ? ? ? ? ? yes ? no 14 yes ?
  212. _FldNameList[19] > AnaDat.Artst.Gewicht
  213. "Gewicht" "Gewicht" ? ? "decimal" ? ? ? ? ? ? yes ? no 11 yes ?
  214. _FldNameList[20] > AnaDat.Artst.GGeb_Cd
  215. "GGeb_Cd" "GGeb_Cd" ? ? "character" ? ? ? ? ? ? yes ? no 10 yes ?
  216. _FldNameList[21] > AnaDat.Artst.Herk_Lkz
  217. "Herk_Lkz" "Herk_Lkz" ? ? "character" ? ? ? ? ? ? yes ? no 9.2 yes ?
  218. _FldNameList[22] > AnaDat.Artst.Herst
  219. "Herst" "Herst" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ?
  220. _FldNameList[23] > AnaDat.Artst.Inhalt
  221. "Inhalt" "Inhalt" ? ? "integer" ? ? ? ? ? ? yes ? no 5.2 yes ?
  222. _FldNameList[24] > AnaDat.Artst.Jahr
  223. "Jahr" "Jahr" ? ? "integer" ? ? ? ? ? ? yes ? no 4.8 yes ?
  224. _FldNameList[25] > AnaDat.Artst.KGeb_Cd
  225. "KGeb_Cd" "KGeb_Cd" ? ? "character" ? ? ? ? ? ? yes ? no 10 yes ?
  226. _FldNameList[26] > AnaDat.Artst.Konto
  227. "Konto" "Konto" ? ? "character" ? ? ? ? ? ? yes ? no 12 yes ?
  228. _FldNameList[27] > AnaDat.Artst.Lager
  229. "Lager" "Lager" ? ? "logical" ? ? ? ? ? ? yes ? no 5.4 yes ?
  230. _FldNameList[28] > AnaDat.Artst.Leih_Art
  231. "Leih_Art" "Leih_Art" ? ? "logical" ? ? ? ? ? ? yes ? no 7.8 yes ?
  232. _FldNameList[29] > AnaDat.Artst.LEP
  233. "LEP" "LEP" ? ? "decimal" ? ? ? ? ? ? yes ? no 12.2 yes ?
  234. _FldNameList[30] > AnaDat.Artst.Letzt_Ausg
  235. "Letzt_Ausg" "Letzt_Ausg" ? ? "date" ? ? ? ? ? ? yes ? no 10.8 yes ?
  236. _FldNameList[31] > AnaDat.Artst.Letzt_Eing
  237. "Letzt_Eing" "Letzt_Eing" ? ? "date" ? ? ? ? ? ? yes ? no 10.8 yes ?
  238. _FldNameList[32] > AnaDat.Artst.Listen_EP
  239. "Listen_EP" "Listen_EP" ? ? "decimal" ? ? ? ? ? ? yes ? no 9.6 yes ?
  240. _FldNameList[33] > AnaDat.Artst.Mdat
  241. "Mdat" "MutDat" "MutDat" ? "date" ? ? ? ? ? ? yes ? no 10.8 yes ?
  242. _FldNameList[34] > AnaDat.Artst.Min_Marge
  243. "Min_Marge" "Min_Marge" ? ? "decimal" ? ? ? ? ? ? yes ? no 10.6 yes ?
  244. _FldNameList[35] > AnaDat.Artst.Msbkb
  245. "Msbkb" "MutSB" "MutSB" "x(20)" "character" ? ? ? ? ? ? yes ? no 20 yes ?
  246. _FldNameList[36] > AnaDat.Artst.MutFlag
  247. "MutFlag" "MutFlag" ? ? "logical" ? ? ? ? ? ? yes ? no 7.6 yes ?
  248. _FldNameList[37] > AnaDat.Artst.MWSt
  249. "MWSt" "MWSt" ? ? "integer" ? ? ? ? ? ? yes ? no 6 yes ?
  250. _FldNameList[38] > AnaDat.Artst.Netto
  251. "Netto" "Netto" ? ? "logical" ? ? ? ? ? ? yes ? no 5.2 yes ?
  252. _FldNameList[39] > AnaDat.Artst.Preisliste
  253. "Preisliste" "Preisliste" ? ? "logical" ? ? ? ? ? ? yes ? no 8.2 yes ?
  254. _FldNameList[40] > AnaDat.Artst.Prod_Grp
  255. "Prod_Grp" "Prod_Grp" ? ? "integer" ? ? ? ? ? ? yes ? no 9 yes ?
  256. _FldNameList[41] > AnaDat.Artst.Rab_Grp
  257. "Rab_Grp" "Rab_Grp" ? ? "integer" ? ? ? ? ? ? yes ? no 8.6 yes ?
  258. _FldNameList[42] > AnaDat.Artst.Reg_Grp
  259. "Reg_Grp" "Reg_Grp" ? ? "integer" ? ? ? ? ? ? yes ? no 8.6 yes ?
  260. _FldNameList[43] > AnaDat.Artst.Reserviert
  261. "Reserviert" "Reserviert" ? ? "integer" ? ? ? ? ? ? yes ? no 9.6 yes ?
  262. _FldNameList[44] > AnaDat.Artst.Res_c1
  263. "Res_c1" "Res_c1" ? ? "character" ? ? ? ? ? ? yes ? no 8 yes ?
  264. _FldNameList[45] > AnaDat.Artst.Res_c2
  265. "Res_c2" "Res_c2" ? ? "character" ? ? ? ? ? ? yes ? no 8 yes ?
  266. _FldNameList[46] > AnaDat.Artst.Res_i1
  267. "Res_i1" "Res_i1" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ?
  268. _FldNameList[47] > AnaDat.Artst.Sk_Ber
  269. "Sk_Ber" "Sk_Ber" ? ? "logical" ? ? ? ? ? ? yes ? no 7 yes ?
  270. _FldNameList[48] > AnaDat.Artst.Soll_Bestand
  271. "Soll_Bestand" "Soll_Bestand" ? ? "integer" ? ? ? ? ? ? yes ? no 12.4 yes ?
  272. _FldNameList[49] > AnaDat.Artst.Strichcode
  273. "Strichcode" "Strichcode" ? ? "character" ? ? ? ? ? ? yes ? no 20 yes ?
  274. _FldNameList[50] > AnaDat.Artst.Style
  275. "Style" "Style" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ?
  276. _FldNameList[51] > AnaDat.Artst.Suchbe
  277. "Suchbe" "Suchbe" ? ? "character" ? ? ? ? ? ? yes ? no 15 yes ?
  278. _FldNameList[52] > AnaDat.Artst.Traub_Grp
  279. "Traub_Grp" "Traub_Grp" ? ? "integer" ? ? ? ? ? ? yes ? no 10.2 yes ?
  280. _FldNameList[53] > AnaDat.Artst.VGeb_Cd
  281. "VGeb_Cd" "VGeb_Cd" ? ? "character" ? ? ? ? ? ? yes ? no 10 yes ?
  282. _FldNameList[54] > AnaDat.Artst.Wg_Grp
  283. "Wg_Grp" "Wg_Grp" ? ? "integer" ? ? ? ? ? ? yes ? no 8 yes ?
  284. _FldNameList[55] > AnaDat.Artst.WHK_Code
  285. "WHK_Code" "WHK_Code" ? ? "character" ? ? ? ? ? ? yes ? no 12 yes ?
  286. _FldNameList[56] > "_<CALC>"
  287. "DYNAMIC-FUNCTION('getKGebindeKBez':U, RowObject.KGeb_Cd)" "KGebinde" "KGebinde" "x(12)" "character" ? ? ? ? ? ? yes ? no 12 no ?
  288. _FldNameList[57] > "_<CALC>"
  289. "DYNAMIC-FUNCTION('getVGebindeKBez':U, RowObject.VGeb_Cd)" "VGebinde" "VGebinde" "x(12)" "character" ? ? ? ? ? ? yes ? no 12 no ?
  290. _FldNameList[58] > "_<CALC>"
  291. "DYNAMIC-FUNCTION('getGGebindeKBez':U, RowObject.GGeb_Cd)" "GGebinde" "GGebinde" "x(12)" "character" ? ? ? ? ? ? yes ? no 12 no ?
  292. _FldNameList[59] > "_<CALC>"
  293. "DYNAMIC-FUNCTION('getArtikelBezeichnung':U, RowObject.Artnr, RowObject.Inhalt, RowObject.Jahr)" "Artikel" ? "x(60)" "character" ? ? ? ? ? ? yes ? no 60 no ?
  294. _Design-Parent is WINDOW dTables @ ( 1.14 , 2.6 )
  295. */ /* QUERY Query-Main */
  296. &ANALYZE-RESUME
  297. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK dTables
  298. /* *************************** Main Block *************************** */
  299. { incl/datmainblock.i }
  300. fOpen = FALSE.
  301. &IF DEFINED(UIB_IS_RUNNING) <> 0 &THEN
  302. RUN initializeObject.
  303. &ENDIF
  304. /* _UIB-CODE-BLOCK-END */
  305. &ANALYZE-RESUME
  306. /* ********************** Internal Procedures *********************** */
  307. {&DB-REQUIRED-START}
  308. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE DATA.CALCULATE dTables DATA.CALCULATE _DB-REQUIRED
  309. PROCEDURE DATA.CALCULATE :
  310. /*------------------------------------------------------------------------------
  311. Purpose: Calculate all the Calculated Expressions found in the
  312. SmartDataObject.
  313. Parameters: <none>
  314. ------------------------------------------------------------------------------*/
  315. ASSIGN
  316. rowObject.Artikel = (DYNAMIC-FUNCTION('getArtikelBezeichnung':U, RowObject.Artnr, RowObject.Inhalt, RowObject.Jahr))
  317. rowObject.GGebinde = (DYNAMIC-FUNCTION('getGGebindeKBez':U, RowObject.GGeb_Cd))
  318. rowObject.KGebinde = (DYNAMIC-FUNCTION('getKGebindeKBez':U, RowObject.KGeb_Cd))
  319. rowObject.VGebinde = (DYNAMIC-FUNCTION('getVGebindeKBez':U, RowObject.VGeb_Cd))
  320. .
  321. END PROCEDURE.
  322. /* _UIB-CODE-BLOCK-END */
  323. &ANALYZE-RESUME
  324. {&DB-REQUIRED-END}
  325. {&DB-REQUIRED-START}
  326. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE dataAvailable dTables _DB-REQUIRED
  327. PROCEDURE dataAvailable :
  328. /*------------------------------------------------------------------------------
  329. Purpose: Super Override
  330. Parameters:
  331. Notes:
  332. ------------------------------------------------------------------------------*/
  333. { incl/datdataavailable.i }
  334. END PROCEDURE.
  335. /* _UIB-CODE-BLOCK-END */
  336. &ANALYZE-RESUME
  337. {&DB-REQUIRED-END}
  338. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI dTables _DEFAULT-DISABLE
  339. PROCEDURE disable_UI :
  340. /*------------------------------------------------------------------------------
  341. Purpose: DISABLE the User Interface
  342. Parameters: <none>
  343. Notes: Here we clean-up the user-interface by deleting
  344. dynamic widgets we have created and/or hide
  345. frames. This procedure is usually called when
  346. we are ready to "clean-up" after running.
  347. ------------------------------------------------------------------------------*/
  348. /* Hide all frames. */
  349. IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE.
  350. END PROCEDURE.
  351. /* _UIB-CODE-BLOCK-END */
  352. &ANALYZE-RESUME
  353. {&DB-REQUIRED-START}
  354. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE fetchFirst dTables _DB-REQUIRED
  355. PROCEDURE fetchFirst :
  356. /*------------------------------------------------------------------------------
  357. Purpose: Super Override
  358. Parameters:
  359. Notes:
  360. ------------------------------------------------------------------------------*/
  361. /* Code placed here will execute PRIOR to standard behavior. */
  362. RUN SUPER.
  363. DYNAMIC-FUNCTION('putArtstToSuperproc':U) NO-ERROR.
  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 fetchLast dTables _DB-REQUIRED
  370. PROCEDURE fetchLast :
  371. /*------------------------------------------------------------------------------
  372. Purpose: Super Override
  373. Parameters:
  374. Notes:
  375. ------------------------------------------------------------------------------*/
  376. /* Code placed here will execute PRIOR to standard behavior. */
  377. RUN SUPER.
  378. DYNAMIC-FUNCTION('putArtstToSuperproc':U) NO-ERROR.
  379. END PROCEDURE.
  380. /* _UIB-CODE-BLOCK-END */
  381. &ANALYZE-RESUME
  382. {&DB-REQUIRED-END}
  383. {&DB-REQUIRED-START}
  384. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE fetchNext dTables _DB-REQUIRED
  385. PROCEDURE fetchNext :
  386. /*------------------------------------------------------------------------------
  387. Purpose: Super Override
  388. Parameters:
  389. Notes:
  390. ------------------------------------------------------------------------------*/
  391. /* Code placed here will execute PRIOR to standard behavior. */
  392. RUN SUPER.
  393. DYNAMIC-FUNCTION('putArtstToSuperproc':U) NO-ERROR.
  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 fetchPrev dTables _DB-REQUIRED
  400. PROCEDURE fetchPrev :
  401. /*------------------------------------------------------------------------------
  402. Purpose: Super Override
  403. Parameters:
  404. Notes:
  405. ------------------------------------------------------------------------------*/
  406. /* Code placed here will execute PRIOR to standard behavior. */
  407. RUN SUPER.
  408. DYNAMIC-FUNCTION('putArtstToSuperproc':U) NO-ERROR.
  409. END PROCEDURE.
  410. /* _UIB-CODE-BLOCK-END */
  411. &ANALYZE-RESUME
  412. {&DB-REQUIRED-END}
  413. {&DB-REQUIRED-START}
  414. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE INAKTIVIEREN dTables _DB-REQUIRED
  415. PROCEDURE INAKTIVIEREN :
  416. /*------------------------------------------------------------------------------
  417. Purpose:
  418. Parameters: <none>
  419. Notes:
  420. ------------------------------------------------------------------------------*/
  421. RETURN 'LOESCHEN'.
  422. /*
  423. { incl/datinaktivieren.i }
  424. */
  425. END PROCEDURE.
  426. /* _UIB-CODE-BLOCK-END */
  427. &ANALYZE-RESUME
  428. {&DB-REQUIRED-END}
  429. {&DB-REQUIRED-START}
  430. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE initializeObject dTables _DB-REQUIRED
  431. PROCEDURE initializeObject :
  432. /*------------------------------------------------------------------------------
  433. Purpose: Super Override
  434. Parameters:
  435. Notes:
  436. ------------------------------------------------------------------------------*/
  437. cSort = 'Artnr'.
  438. fDesc = FALSE.
  439. DYNAMIC-FUNCTION('getArtikelSort':U, INPUT-OUTPUT cSort, INPUT-OUTPUT fDesc ).
  440. { incl/datinitialize.i }
  441. END PROCEDURE.
  442. /* _UIB-CODE-BLOCK-END */
  443. &ANALYZE-RESUME
  444. {&DB-REQUIRED-END}
  445. {&DB-REQUIRED-START}
  446. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE NEUER_ARTIKEL dTables _DB-REQUIRED
  447. PROCEDURE NEUER_ARTIKEL :
  448. /*------------------------------------------------------------------------------
  449. Purpose:
  450. Parameters: <none>
  451. Notes:
  452. ------------------------------------------------------------------------------*/
  453. DEF INPUT PARAMETER ipString AS CHAR NO-UNDO.
  454. DEF VAR Artnr AS INT NO-UNDO.
  455. DEF VAR Inhalt AS INT NO-UNDO.
  456. DEF VAR Jahr AS INT NO-UNDO.
  457. DEF VAR iRecid AS RECID NO-UNDO.
  458. Artnr = INTEGER(ENTRY(1, ipString, CHR(01))).
  459. Inhalt = INTEGER(ENTRY(2, ipString, CHR(01))).
  460. Jahr = INTEGER(ENTRY(3, ipString, CHR(01))).
  461. FIND Artst USE-INDEX Artst-k1
  462. WHERE Artst.Firma = Firma
  463. AND Artst.Artnr = Artnr
  464. AND Artst.Inhalt = Inhalt
  465. AND Artst.Jahr = Jahr NO-LOCK NO-ERROR.
  466. IF NOT AVAILABLE Artst THEN RETURN.
  467. iRecid = RECID(Artst).
  468. DYNAMIC-FUNCTION('openQuery':U).
  469. RUN REPOS ( INPUT iRecid ).
  470. END PROCEDURE.
  471. /* _UIB-CODE-BLOCK-END */
  472. &ANALYZE-RESUME
  473. {&DB-REQUIRED-END}
  474. {&DB-REQUIRED-START}
  475. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE REAKTIVIEREN dTables _DB-REQUIRED
  476. PROCEDURE REAKTIVIEREN :
  477. /*------------------------------------------------------------------------------
  478. Purpose:
  479. Parameters: <none>
  480. Notes:
  481. ------------------------------------------------------------------------------*/
  482. { incl/datreaktivieren.i }
  483. END PROCEDURE.
  484. /* _UIB-CODE-BLOCK-END */
  485. &ANALYZE-RESUME
  486. {&DB-REQUIRED-END}
  487. {&DB-REQUIRED-START}
  488. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE REPOS dTables _DB-REQUIRED
  489. PROCEDURE REPOS :
  490. /*------------------------------------------------------------------------------
  491. Purpose:
  492. Parameters: <none>
  493. Notes:
  494. ------------------------------------------------------------------------------*/
  495. DEF INPUT PARAMETER ipRecid AS RECID NO-UNDO.
  496. FIND Artst WHERE RECID(Artst) = ipRecid NO-LOCK NO-ERROR.
  497. IF NOT AVAILABLE Artst THEN RETURN.
  498. DYNAMIC-FUNCTION('fetchRowIdent':U, INPUT STRING(ROWID(Artst)), INPUT ? ).
  499. DYNAMIC-FUNCTION('putArtstToSuperproc':U) NO-ERROR.
  500. END PROCEDURE.
  501. /* _UIB-CODE-BLOCK-END */
  502. &ANALYZE-RESUME
  503. {&DB-REQUIRED-END}
  504. {&DB-REQUIRED-START}
  505. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE REPOS_TABELLE dTables _DB-REQUIRED
  506. PROCEDURE REPOS_TABELLE :
  507. /*------------------------------------------------------------------------------
  508. Purpose:
  509. Parameters: <none>
  510. Notes:
  511. ------------------------------------------------------------------------------*/
  512. { incl/datrepos.i }
  513. END PROCEDURE.
  514. /* _UIB-CODE-BLOCK-END */
  515. &ANALYZE-RESUME
  516. {&DB-REQUIRED-END}
  517. {&DB-REQUIRED-START}
  518. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE SET_FILTER dTables _DB-REQUIRED
  519. PROCEDURE SET_FILTER :
  520. /*------------------------------------------------------------------------------
  521. Purpose:
  522. Parameters: <none>
  523. Notes:
  524. ------------------------------------------------------------------------------*/
  525. { incl/datsetfilter.i }
  526. END PROCEDURE.
  527. /* _UIB-CODE-BLOCK-END */
  528. &ANALYZE-RESUME
  529. {&DB-REQUIRED-END}
  530. {&DB-REQUIRED-START}
  531. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE SET_OPENFLAG dTables _DB-REQUIRED
  532. PROCEDURE SET_OPENFLAG :
  533. /*------------------------------------------------------------------------------
  534. Purpose:
  535. Parameters: <none>
  536. Notes:
  537. ------------------------------------------------------------------------------*/
  538. { incl/datsetopenflag.i }
  539. END PROCEDURE.
  540. /* _UIB-CODE-BLOCK-END */
  541. &ANALYZE-RESUME
  542. {&DB-REQUIRED-END}
  543. {&DB-REQUIRED-START}
  544. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE SET_SORT dTables _DB-REQUIRED
  545. PROCEDURE SET_SORT :
  546. /*------------------------------------------------------------------------------
  547. Purpose:
  548. Parameters: <none>
  549. Notes:
  550. ------------------------------------------------------------------------------*/
  551. { incl/datsetsort.i }
  552. DYNAMIC-FUNCTION('setArtikelSort':U, cSort, fDesc ) NO-ERROR.
  553. END PROCEDURE.
  554. /* _UIB-CODE-BLOCK-END */
  555. &ANALYZE-RESUME
  556. {&DB-REQUIRED-END}
  557. /* ************************ Function Implementations ***************** */
  558. {&DB-REQUIRED-START}
  559. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION getCurrentRecid dTables _DB-REQUIRED
  560. FUNCTION getCurrentRecid RETURNS RECID
  561. ( /* parameter-definitions */ ) :
  562. /*------------------------------------------------------------------------------
  563. Purpose:
  564. Notes:
  565. ------------------------------------------------------------------------------*/
  566. { incl/datgetcurrentrecid.i }
  567. END FUNCTION.
  568. /* _UIB-CODE-BLOCK-END */
  569. &ANALYZE-RESUME
  570. {&DB-REQUIRED-END}
  571. {&DB-REQUIRED-START}
  572. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION getQueryBuffer dTables _DB-REQUIRED
  573. FUNCTION getQueryBuffer RETURNS HANDLE
  574. ( /* parameter-definitions */ ) :
  575. /*------------------------------------------------------------------------------
  576. Purpose:
  577. Notes:
  578. ------------------------------------------------------------------------------*/
  579. RETURN BUFFER rowObject:HANDLE.
  580. END FUNCTION.
  581. /* _UIB-CODE-BLOCK-END */
  582. &ANALYZE-RESUME
  583. {&DB-REQUIRED-END}
  584. {&DB-REQUIRED-START}
  585. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION openQuery dTables _DB-REQUIRED
  586. FUNCTION openQuery RETURNS LOGICAL
  587. ( /* parameter-definitions */ ) :
  588. /*------------------------------------------------------------------------------
  589. Purpose: Super Override
  590. Notes:
  591. ------------------------------------------------------------------------------*/
  592. DEF VAR Felder AS CHAR NO-UNDO.
  593. DEF VAR Inhalt AS CHAR NO-UNDO.
  594. DEF VAR ix AS INT NO-UNDO.
  595. DEF VAR cFeld AS CHAR NO-UNDO.
  596. DEF VAR lInaktiv AS LOG NO-UNDO.
  597. /*
  598. IF NOT fOpen THEN RETURN FALSE.
  599. */
  600. xWhere = ''.
  601. xSort = ''.
  602. xString = ''.
  603. Felder = DYNAMIC-FUNCTION('getForeignFields':U) NO-ERROR.
  604. Inhalt = DYNAMIC-FUNCTION('getForeignValues':U) NO-ERROR.
  605. /* ix = LOOKUP('Feld', Felder, ',') / 2. */
  606. /* cFeld = ENTRY (ix , Inhalt, CHR(01)). */
  607. lInaktiv = DYNAMIC-FUNCTION('getAnzeigeArtikelInaktiv':U) NO-ERROR.
  608. IF lInaktiv = ? THEN lInaktiv = TRUE.
  609. xWhere = 'Artst.Firma = ' + QUOTER(Firma) + ' '.
  610. IF NOT lInaktiv THEN xWhere = xWhere + 'AND Artst.Aktiv = TRUE '.
  611. /* xString = 'FOR EACH Debop ' + xSort + 'WHERE ' */
  612. /* + 'Debop.Firma = "' + Firma + '" AND ' */
  613. /* + 'Debop.Knr = ' + STRING(Knr) + ' ' */
  614. /* + 'NO-LOCK BY Debop.FakDat DESCENDING INDEXED-REPOSITION '. */
  615. { incl/datopenquery.i }
  616. IF xWhere <> '' THEN DYNAMIC-FUNCTION('setQueryWhere':U , INPUT xWhere ).
  617. IF xString <> '' THEN DYNAMIC-FUNCTION('setQueryString':U, INPUT xString).
  618. IF xSort <> '' THEN DYNAMIC-FUNCTION('setQuerySort':U , INPUT xSort ).
  619. RETURN SUPER( ).
  620. END FUNCTION.
  621. /* _UIB-CODE-BLOCK-END */
  622. &ANALYZE-RESUME
  623. {&DB-REQUIRED-END}
  624. {&DB-REQUIRED-START}
  625. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION putArtstToSuperproc dTables _DB-REQUIRED
  626. FUNCTION putArtstToSuperproc RETURNS LOGICAL
  627. ( /* parameter-definitions */ ) :
  628. /*------------------------------------------------------------------------------
  629. Purpose:
  630. Notes:
  631. ------------------------------------------------------------------------------*/
  632. DEF VAR lOK AS LOG NO-UNDO.
  633. fData = TRUE.
  634. RUN dataAvailable ('SAME').
  635. FIND FIRST tRowObject NO-ERROR.
  636. lOK = DYNAMIC-FUNCTION('setArtstInSuperproc':U, TEMP-TABLE tRowObject:DEFAULT-BUFFER-HANDLE ).
  637. RETURN lOK.
  638. END FUNCTION.
  639. /* _UIB-CODE-BLOCK-END */
  640. &ANALYZE-RESUME
  641. {&DB-REQUIRED-END}