d-artikel.w 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816
  1. &ANALYZE-SUSPEND _VERSION-NUMBER AB_v10r12 GUI ADM2
  2. &ANALYZE-RESUME
  3. /* Connected Databases
  4. anadat PROGRESS
  5. */
  6. &Scoped-define WINDOW-NAME CURRENT-WINDOW
  7. {adecomm/appserv.i}
  8. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS dTables
  9. /*------------------------------------------------------------------------
  10. File:
  11. Description: from DATA.W - Template For SmartData objects in the ADM
  12. Input Parameters:
  13. <none>
  14. Output Parameters:
  15. <none>
  16. Modified: February 24, 1999
  17. ------------------------------------------------------------------------*/
  18. /* This .W file was created with the Progress AppBuilder. */
  19. /*----------------------------------------------------------------------*/
  20. /* Create an unnamed pool to store all the widgets created
  21. by this procedure. This is a good default which assures
  22. that this procedure's triggers and internal procedures
  23. will execute in this procedure's storage, and that proper
  24. cleanup will occur on deletion of the procedure. */
  25. CREATE WIDGET-POOL.
  26. /* *************************** Definitions ************************** */
  27. /* Parameters Definitions --- */
  28. /* Local Variable Definitions --- */
  29. DEF VAR xWhere AS CHAR NO-UNDO.
  30. DEF VAR xSort AS CHAR NO-UNDO.
  31. DEF VAR Firma AS CHAR NO-UNDO.
  32. DEF VAR SAktiv AS LOG NO-UNDO.
  33. DEF VAR lOpen AS LOG INIT FALSE NO-UNDO.
  34. /* _UIB-CODE-BLOCK-END */
  35. &ANALYZE-RESUME
  36. &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
  37. /* ******************** Preprocessor Definitions ******************** */
  38. &Scoped-define PROCEDURE-TYPE SmartDataObject
  39. &Scoped-define DB-AWARE yes
  40. &Scoped-define ADM-SUPPORTED-LINKS Data-Source,Data-Target,Navigation-Target,Update-Target,Commit-Target,Filter-Target
  41. /* Db-Required definitions. */
  42. &IF DEFINED(DB-REQUIRED) = 0 &THEN
  43. &GLOBAL-DEFINE DB-REQUIRED TRUE
  44. &ENDIF
  45. &GLOBAL-DEFINE DB-REQUIRED-START &IF {&DB-REQUIRED} &THEN
  46. &GLOBAL-DEFINE DB-REQUIRED-END &ENDIF
  47. &Scoped-define QUERY-NAME Query-Main
  48. /* Internal Tables (found by Frame, Query & Browse Queries) */
  49. &Scoped-define INTERNAL-TABLES Artst
  50. /* Definitions for QUERY Query-Main */
  51. &Scoped-Define ENABLED-FIELDS Firma Artnr Inhalt Jahr Suchbe Bez KGeb_Cd VGeb_Cd GGeb_Cd Wg_Grp Prod_Grp~
  52. Art_Grp Rab_Grp Bonus_Grp Farbe Traub_Grp Reg_Grp Herk_Lkz Herst MWSt Netto~
  53. Sk_Ber Lager Leih_Art Ausverk Preisliste Alk_Gehalt Gewicht WHK_Code~
  54. EAV_Code Strichcode Konto Bestand Soll_Bestand Bestellt Reserviert DEP LEP~
  55. Listen_EP Min_Marge Letzt_Ausg Letzt_Eing ErfDat ErfSb MutDat MutSb MutFlag~
  56. Res_c1 Res_c2 Res_i1 Style Aktiv EShop FremdNr iRecid cRowid Mind_Bestand~
  57. Mind_MHD lVerfall lLotnr EShop_2 EP-Intern ArtikelBild
  58. &Scoped-define ENABLED-FIELDS-IN-Artst Firma Artnr Inhalt Jahr Suchbe Bez ~
  59. KGeb_Cd VGeb_Cd GGeb_Cd Wg_Grp Prod_Grp Art_Grp Rab_Grp Bonus_Grp Farbe ~
  60. Traub_Grp Reg_Grp Herk_Lkz Herst MWSt Netto Sk_Ber Lager Leih_Art Ausverk ~
  61. Preisliste Alk_Gehalt Gewicht WHK_Code EAV_Code Strichcode Konto Bestand ~
  62. Soll_Bestand Bestellt Reserviert DEP LEP Listen_EP Min_Marge Letzt_Ausg ~
  63. Letzt_Eing ErfDat ErfSb MutDat MutSb MutFlag Res_c1 Res_c2 Res_i1 Style ~
  64. Aktiv EShop FremdNr Mind_Bestand Mind_MHD lVerfall lLotnr EShop_2 EP-Intern ~
  65. ArtikelBild
  66. &Scoped-Define DATA-FIELDS Firma Artnr Inhalt Jahr Suchbe Bez KGeb_Cd VGeb_Cd GGeb_Cd Wg_Grp Prod_Grp~
  67. Art_Grp Rab_Grp Bonus_Grp Farbe Traub_Grp Reg_Grp Herk_Lkz Herst MWSt Netto~
  68. Sk_Ber Lager Leih_Art Ausverk Preisliste Alk_Gehalt Gewicht WHK_Code~
  69. EAV_Code Strichcode Konto Bestand Soll_Bestand Bestellt Reserviert DEP LEP~
  70. Listen_EP Min_Marge Letzt_Ausg Letzt_Eing ErfDat ErfSb MutDat MutSb MutFlag~
  71. Res_c1 Res_c2 Res_i1 Style Aktiv EShop FremdNr iRecid cRowid Mind_Bestand~
  72. Mind_MHD lVerfall lLotnr EShop_2 EP-Intern ArtikelBild
  73. &Scoped-define DATA-FIELDS-IN-Artst Firma Artnr Inhalt Jahr Suchbe Bez ~
  74. KGeb_Cd VGeb_Cd GGeb_Cd Wg_Grp Prod_Grp Art_Grp Rab_Grp Bonus_Grp Farbe ~
  75. Traub_Grp Reg_Grp Herk_Lkz Herst MWSt Netto Sk_Ber Lager Leih_Art Ausverk ~
  76. Preisliste Alk_Gehalt Gewicht WHK_Code EAV_Code Strichcode Konto Bestand ~
  77. Soll_Bestand Bestellt Reserviert DEP LEP Listen_EP Min_Marge Letzt_Ausg ~
  78. Letzt_Eing ErfDat ErfSb MutDat MutSb MutFlag Res_c1 Res_c2 Res_i1 Style ~
  79. Aktiv EShop FremdNr Mind_Bestand Mind_MHD lVerfall lLotnr EShop_2 EP-Intern ~
  80. ArtikelBild
  81. &Scoped-Define MANDATORY-FIELDS Firma
  82. &Scoped-Define APPLICATION-SERVICE
  83. &Scoped-Define ASSIGN-LIST rowObject.ErfDat = Artst.Edat rowObject.ErfSb = Artst.Esbkb~
  84. rowObject.MutDat = Artst.Mdat rowObject.MutSb = Artst.Msbkb
  85. &Scoped-Define DATA-FIELD-DEFS "d-artikel.i"
  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 openQuery dTables _DB-REQUIRED
  99. FUNCTION openQuery RETURNS LOGICAL
  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 setOpenflag dTables _DB-REQUIRED
  106. FUNCTION setOpenflag RETURNS LOGICAL
  107. ( ipOpen AS LOG ) FORWARD.
  108. /* _UIB-CODE-BLOCK-END */
  109. &ANALYZE-RESUME
  110. {&DB-REQUIRED-END}
  111. /* *********************** Control Definitions ********************** */
  112. {&DB-REQUIRED-START}
  113. /* Query definitions */
  114. &ANALYZE-SUSPEND
  115. DEFINE QUERY Query-Main FOR
  116. Artst SCROLLING.
  117. &ANALYZE-RESUME
  118. {&DB-REQUIRED-END}
  119. /* ************************ Frame Definitions *********************** */
  120. /* *********************** Procedure Settings ************************ */
  121. &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
  122. /* Settings for THIS-PROCEDURE
  123. Type: SmartDataObject
  124. Allow: Query
  125. Frames: 0
  126. Add Fields to: Neither
  127. Other Settings: PERSISTENT-ONLY COMPILE APPSERVER DB-AWARE
  128. */
  129. /* This procedure should always be RUN PERSISTENT. Report the error, */
  130. /* then cleanup and return. */
  131. IF NOT THIS-PROCEDURE:PERSISTENT THEN DO:
  132. MESSAGE "{&FILE-NAME} should only be RUN PERSISTENT.":U
  133. VIEW-AS ALERT-BOX ERROR BUTTONS OK.
  134. RETURN.
  135. END.
  136. &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
  137. /* ************************* Create Window ************************** */
  138. &ANALYZE-SUSPEND _CREATE-WINDOW
  139. /* DESIGN Window definition (used by the UIB)
  140. CREATE WINDOW dTables ASSIGN
  141. HEIGHT = 1.62
  142. WIDTH = 61.8.
  143. /* END WINDOW DEFINITION */
  144. */
  145. &ANALYZE-RESUME
  146. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB dTables
  147. /* ************************* Included-Libraries *********************** */
  148. {src/adm2/data.i}
  149. /* _UIB-CODE-BLOCK-END */
  150. &ANALYZE-RESUME
  151. /* *********** Runtime Attributes and AppBuilder Settings *********** */
  152. &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES
  153. /* SETTINGS FOR WINDOW dTables
  154. VISIBLE,,RUN-PERSISTENT */
  155. /* _RUN-TIME-ATTRIBUTES-END */
  156. &ANALYZE-RESUME
  157. /* Setting information for Queries and Browse Widgets fields */
  158. &ANALYZE-SUSPEND _QUERY-BLOCK QUERY Query-Main
  159. /* Query rebuild information for SmartDataObject Query-Main
  160. _TblList = "AnaDat.Artst"
  161. _Options = "NO-LOCK INDEXED-REPOSITION"
  162. _FldNameList[1] > AnaDat.Artst.Firma
  163. "Firma" "Firma" ? ? "character" ? ? ? ? ? ? yes ? yes 8 yes ""
  164. _FldNameList[2] > AnaDat.Artst.Artnr
  165. "Artnr" "Artnr" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ""
  166. _FldNameList[3] > AnaDat.Artst.Inhalt
  167. "Inhalt" "Inhalt" ? ? "integer" ? ? ? ? ? ? yes ? no 5.2 yes ""
  168. _FldNameList[4] > AnaDat.Artst.Jahr
  169. "Jahr" "Jahr" ? ? "integer" ? ? ? ? ? ? yes ? no 4.8 yes ""
  170. _FldNameList[5] > AnaDat.Artst.Suchbe
  171. "Suchbe" "Suchbe" ? ? "character" ? ? ? ? ? ? yes ? no 15 yes ""
  172. _FldNameList[6] > AnaDat.Artst.Bez
  173. "Bez" "Bez" ? ? "character" ? ? ? ? ? ? yes ? no 30 yes ""
  174. _FldNameList[7] > AnaDat.Artst.KGeb_Cd
  175. "KGeb_Cd" "KGeb_Cd" ? ? "character" ? ? ? ? ? ? yes ? no 10 yes ""
  176. _FldNameList[8] > AnaDat.Artst.VGeb_Cd
  177. "VGeb_Cd" "VGeb_Cd" ? ? "character" ? ? ? ? ? ? yes ? no 10 yes ""
  178. _FldNameList[9] > AnaDat.Artst.GGeb_Cd
  179. "GGeb_Cd" "GGeb_Cd" ? ? "character" ? ? ? ? ? ? yes ? no 10 yes ""
  180. _FldNameList[10] > AnaDat.Artst.Wg_Grp
  181. "Wg_Grp" "Wg_Grp" ? "999999" "integer" ? ? ? ? ? ? yes ? no 8 yes ""
  182. _FldNameList[11] > AnaDat.Artst.Prod_Grp
  183. "Prod_Grp" "Prod_Grp" ? "999999" "integer" ? ? ? ? ? ? yes ? no 9 yes ""
  184. _FldNameList[12] > AnaDat.Artst.Art_Grp
  185. "Art_Grp" "Art_Grp" ? "999999" "integer" ? ? ? ? ? ? yes ? no 7.2 yes ""
  186. _FldNameList[13] > AnaDat.Artst.Rab_Grp
  187. "Rab_Grp" "Rab_Grp" ? ? "integer" ? ? ? ? ? ? yes ? no 8.6 yes ""
  188. _FldNameList[14] > AnaDat.Artst.Bonus_Grp
  189. "Bonus_Grp" "Bonus_Grp" ? ? "integer" ? ? ? ? ? ? yes ? no 10.6 yes ""
  190. _FldNameList[15] > AnaDat.Artst.Farbe
  191. "Farbe" "Farbe" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ""
  192. _FldNameList[16] > AnaDat.Artst.Traub_Grp
  193. "Traub_Grp" "Traub_Grp" ? ? "integer" ? ? ? ? ? ? yes ? no 10.2 yes ""
  194. _FldNameList[17] > AnaDat.Artst.Reg_Grp
  195. "Reg_Grp" "Reg_Grp" ? ? "integer" ? ? ? ? ? ? yes ? no 8.6 yes ""
  196. _FldNameList[18] > AnaDat.Artst.Herk_Lkz
  197. "Herk_Lkz" "Herk_Lkz" ? ? "character" ? ? ? ? ? ? yes ? no 9.2 yes ""
  198. _FldNameList[19] > AnaDat.Artst.Herst
  199. "Herst" "Herst" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ""
  200. _FldNameList[20] > AnaDat.Artst.MWSt
  201. "MWSt" "MWSt" ? ? "integer" ? ? ? ? ? ? yes ? no 6 yes ""
  202. _FldNameList[21] > AnaDat.Artst.Netto
  203. "Netto" "Netto" ? ? "logical" ? ? ? ? ? ? yes ? no 5.2 yes ""
  204. _FldNameList[22] > AnaDat.Artst.Sk_Ber
  205. "Sk_Ber" "Sk_Ber" ? ? "logical" ? ? ? ? ? ? yes ? no 7 yes ""
  206. _FldNameList[23] > AnaDat.Artst.Lager
  207. "Lager" "Lager" ? ? "logical" ? ? ? ? ? ? yes ? no 5.4 yes ""
  208. _FldNameList[24] > AnaDat.Artst.Leih_Art
  209. "Leih_Art" "Leih_Art" ? ? "logical" ? ? ? ? ? ? yes ? no 7.8 yes ""
  210. _FldNameList[25] > AnaDat.Artst.Ausverk
  211. "Ausverk" "Ausverk" ? ? "integer" ? ? ? ? ? ? yes ? no 7.8 yes ""
  212. _FldNameList[26] > AnaDat.Artst.Preisliste
  213. "Preisliste" "Preisliste" ? ? "logical" ? ? ? ? ? ? yes ? no 8.2 yes ""
  214. _FldNameList[27] > AnaDat.Artst.Alk_Gehalt
  215. "Alk_Gehalt" "Alk_Gehalt" ? ? "decimal" ? ? ? ? ? ? yes ? no 10.4 yes ""
  216. _FldNameList[28] > AnaDat.Artst.Gewicht
  217. "Gewicht" "Gewicht" ? ? "decimal" ? ? ? ? ? ? yes ? no 11 yes ""
  218. _FldNameList[29] > AnaDat.Artst.WHK_Code
  219. "WHK_Code" "WHK_Code" ? ? "character" ? ? ? ? ? ? yes ? no 12 yes ""
  220. _FldNameList[30] > AnaDat.Artst.EAV_Code
  221. "EAV_Code" "EAV_Code" ? ? "character" ? ? ? ? ? ? yes ? no 12 yes ""
  222. _FldNameList[31] > AnaDat.Artst.Strichcode
  223. "Strichcode" "Strichcode" ? ? "character" ? ? ? ? ? ? yes ? no 20 yes ""
  224. _FldNameList[32] > AnaDat.Artst.Konto
  225. "Konto" "Konto" ? ? "character" ? ? ? ? ? ? yes ? no 12 yes ""
  226. _FldNameList[33] > AnaDat.Artst.Bestand
  227. "Bestand" "Bestand" ? ? "integer" ? ? ? ? ? ? yes ? no 9.4 yes ""
  228. _FldNameList[34] > AnaDat.Artst.Soll_Bestand
  229. "Soll_Bestand" "Soll_Bestand" ? ? "integer" ? ? ? ? ? ? yes ? no 12.4 yes ""
  230. _FldNameList[35] > AnaDat.Artst.Bestellt
  231. "Bestellt" "Bestellt" ? ? "integer" ? ? ? ? ? ? yes ? no 9.4 yes ""
  232. _FldNameList[36] > AnaDat.Artst.Reserviert
  233. "Reserviert" "Reserviert" ? ? "integer" ? ? ? ? ? ? yes ? no 9.6 yes ""
  234. _FldNameList[37] > AnaDat.Artst.DEP
  235. "DEP" "DEP" ? ? "decimal" ? ? ? ? ? ? yes ? no 12.2 yes ""
  236. _FldNameList[38] > AnaDat.Artst.LEP
  237. "LEP" "LEP" ? ? "decimal" ? ? ? ? ? ? yes ? no 12.2 yes ""
  238. _FldNameList[39] > AnaDat.Artst.Listen_EP
  239. "Listen_EP" "Listen_EP" ? ? "decimal" ? ? ? ? ? ? yes ? no 9.6 yes ""
  240. _FldNameList[40] > AnaDat.Artst.Min_Marge
  241. "Min_Marge" "Min_Marge" ? ? "decimal" ? ? ? ? ? ? yes ? no 10.6 yes ""
  242. _FldNameList[41] > AnaDat.Artst.Letzt_Ausg
  243. "Letzt_Ausg" "Letzt_Ausg" ? ? "date" ? ? ? ? ? ? yes ? no 10.8 yes ""
  244. _FldNameList[42] > AnaDat.Artst.Letzt_Eing
  245. "Letzt_Eing" "Letzt_Eing" ? ? "date" ? ? ? ? ? ? yes ? no 10.8 yes ""
  246. _FldNameList[43] > AnaDat.Artst.Edat
  247. "Edat" "ErfDat" "ErfDat" ? "date" ? ? ? ? ? ? yes ? no 10.8 yes ""
  248. _FldNameList[44] > AnaDat.Artst.Esbkb
  249. "Esbkb" "ErfSb" "ErfSb" ? "character" ? ? ? ? ? ? yes ? no 6 yes ""
  250. _FldNameList[45] > AnaDat.Artst.Mdat
  251. "Mdat" "MutDat" "MutDat" ? "date" ? ? ? ? ? ? yes ? no 10.8 yes ""
  252. _FldNameList[46] > AnaDat.Artst.Msbkb
  253. "Msbkb" "MutSb" "MutSb" ? "character" ? ? ? ? ? ? yes ? no 6.4 yes ""
  254. _FldNameList[47] > AnaDat.Artst.MutFlag
  255. "MutFlag" "MutFlag" ? ? "logical" ? ? ? ? ? ? yes ? no 7.6 yes ""
  256. _FldNameList[48] > AnaDat.Artst.Res_c1
  257. "Res_c1" "Res_c1" ? ? "character" ? ? ? ? ? ? yes ? no 8 yes ""
  258. _FldNameList[49] > AnaDat.Artst.Res_c2
  259. "Res_c2" "Res_c2" ? ? "character" ? ? ? ? ? ? yes ? no 8 yes ""
  260. _FldNameList[50] > AnaDat.Artst.Res_i1
  261. "Res_i1" "Res_i1" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ""
  262. _FldNameList[51] > AnaDat.Artst.Style
  263. "Style" "Style" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ""
  264. _FldNameList[52] > AnaDat.Artst.Aktiv
  265. "Aktiv" "Aktiv" ? ? "logical" ? ? ? ? ? ? yes ? no 4.8 yes ""
  266. _FldNameList[53] > AnaDat.Artst.EShop
  267. "EShop" "EShop" ? ? "logical" ? ? ? ? ? ? yes ? no 6.4 yes ""
  268. _FldNameList[54] > AnaDat.Artst.FremdNr
  269. "FremdNr" "FremdNr" ? ? "character" ? ? ? ? ? ? yes ? no 14 yes ?
  270. _FldNameList[55] > "_<CALC>"
  271. "RECID(Artst)" "iRecid" "ARecid" "->,>>>,>>9" "Integer" ? ? ? ? ? ? yes ? no 10.2 no ?
  272. _FldNameList[56] > "_<CALC>"
  273. "STRING(ROWID(Artst))" "cRowid" "ARowid" "x(8)" "character" ? ? ? ? ? ? yes ? no 8 no ?
  274. _FldNameList[57] > AnaDat.Artst.Mind_Bestand
  275. "Mind_Bestand" "Mind_Bestand" ? ? "integer" ? ? ? ? ? ? yes ? no 13.6 yes ?
  276. _FldNameList[58] > AnaDat.Artst.Mind_MHD
  277. "Mind_MHD" "Mind_MHD" ? ? "integer" ? ? ? ? ? ? yes ? no 14.8 yes ?
  278. _FldNameList[59] > AnaDat.Artst.lVerfall
  279. "lVerfall" "lVerfall" ? ? "logical" ? ? ? ? ? ? yes ? no 6.2 yes ?
  280. _FldNameList[60] > AnaDat.Artst.lLotnr
  281. "lLotnr" "lLotnr" ? ? "logical" ? ? ? ? ? ? yes ? no 5.2 yes ?
  282. _FldNameList[61] > AnaDat.Artst.EShop_2
  283. "EShop_2" "EShop_2" ? ? "logical" ? ? ? ? ? ? yes ? no 8.8 yes ?
  284. _FldNameList[62] > AnaDat.Artst.EP-Intern
  285. "EP-Intern" "EP-Intern" ? ? "decimal" ? ? ? ? ? ? yes ? no 11 yes ?
  286. _FldNameList[63] > AnaDat.Artst.ArtikelBild
  287. "ArtikelBild" "ArtikelBild" ? ? "character" ? ? ? ? ? ? yes ? no 60 yes ?
  288. _Design-Parent is WINDOW dTables @ ( 1.14 , 2.6 )
  289. */ /* QUERY Query-Main */
  290. &ANALYZE-RESUME
  291. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK dTables
  292. /* *************************** Main Block *************************** */
  293. SAktiv = DYNAMIC-FUNCTION('getSuperAktiv':U) NO-ERROR.
  294. IF SAktiv THEN DO:
  295. Firma = DYNAMIC-FUNCTION('GETMANDANT':U) NO-ERROR.
  296. END.
  297. SUBSCRIBE TO 'REFRESH_ARTIKEL' ANYWHERE NO-ERROR.
  298. xWhere = 'FOR EACH Artst USE-INDEX Artst-k1 '
  299. + 'WHERE Artst.Firma = "' + Firma + '" '
  300. + 'NO-LOCK INDEXED-REPOSITION '.
  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.cRowid = (STRING(ROWID(Artst)))
  317. rowObject.iRecid = (RECID(Artst))
  318. .
  319. END PROCEDURE.
  320. /* _UIB-CODE-BLOCK-END */
  321. &ANALYZE-RESUME
  322. {&DB-REQUIRED-END}
  323. {&DB-REQUIRED-START}
  324. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE dataAvailable dTables _DB-REQUIRED
  325. PROCEDURE dataAvailable :
  326. /*------------------------------------------------------------------------------
  327. Purpose: Super Override
  328. Parameters:
  329. Notes:
  330. ------------------------------------------------------------------------------*/
  331. DEFINE INPUT PARAMETER pcRelative AS CHARACTER NO-UNDO.
  332. /* Code placed here will execute PRIOR to standard behavior. */
  333. RUN SUPER( INPUT pcRelative).
  334. IF AVAILABLE rowObject THEN DO:
  335. DYNAMIC-FUNCTION('SETARTNR':U, INPUT rowObject.Artnr ,
  336. INPUT rowObject.Inhalt ,
  337. INPUT rowObject.Jahr ) NO-ERROR.
  338. END.
  339. END PROCEDURE.
  340. /* _UIB-CODE-BLOCK-END */
  341. &ANALYZE-RESUME
  342. {&DB-REQUIRED-END}
  343. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI dTables _DEFAULT-DISABLE
  344. PROCEDURE disable_UI :
  345. /*------------------------------------------------------------------------------
  346. Purpose: DISABLE the User Interface
  347. Parameters: <none>
  348. Notes: Here we clean-up the user-interface by deleting
  349. dynamic widgets we have created and/or hide
  350. frames. This procedure is usually called when
  351. we are ready to "clean-up" after running.
  352. ------------------------------------------------------------------------------*/
  353. /* Hide all frames. */
  354. IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE.
  355. END PROCEDURE.
  356. /* _UIB-CODE-BLOCK-END */
  357. &ANALYZE-RESUME
  358. {&DB-REQUIRED-START}
  359. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE fetchFirst dTables _DB-REQUIRED
  360. PROCEDURE fetchFirst :
  361. /*------------------------------------------------------------------------------
  362. Purpose: Super Override
  363. Parameters:
  364. Notes:
  365. ------------------------------------------------------------------------------*/
  366. /* Code placed here will execute PRIOR to standard behavior. */
  367. RUN SUPER.
  368. IF AVAILABLE rowObject THEN DO:
  369. DYNAMIC-FUNCTION('SETARTNR':U, INPUT rowObject.Artnr ,
  370. INPUT rowObject.Inhalt ,
  371. INPUT rowObject.Jahr ) NO-ERROR.
  372. END.
  373. END PROCEDURE.
  374. /* _UIB-CODE-BLOCK-END */
  375. &ANALYZE-RESUME
  376. {&DB-REQUIRED-END}
  377. {&DB-REQUIRED-START}
  378. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE fetchLast dTables _DB-REQUIRED
  379. PROCEDURE fetchLast :
  380. /*------------------------------------------------------------------------------
  381. Purpose: Super Override
  382. Parameters:
  383. Notes:
  384. ------------------------------------------------------------------------------*/
  385. /* Code placed here will execute PRIOR to standard behavior. */
  386. RUN SUPER.
  387. IF AVAILABLE rowObject THEN DO:
  388. DYNAMIC-FUNCTION('SETARTNR':U, INPUT rowObject.Artnr ,
  389. INPUT rowObject.Inhalt ,
  390. INPUT rowObject.Jahr ) NO-ERROR.
  391. END.
  392. END PROCEDURE.
  393. /* _UIB-CODE-BLOCK-END */
  394. &ANALYZE-RESUME
  395. {&DB-REQUIRED-END}
  396. {&DB-REQUIRED-START}
  397. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE fetchNext dTables _DB-REQUIRED
  398. PROCEDURE fetchNext :
  399. /*------------------------------------------------------------------------------
  400. Purpose: Super Override
  401. Parameters:
  402. Notes:
  403. ------------------------------------------------------------------------------*/
  404. /* Code placed here will execute PRIOR to standard behavior. */
  405. RUN SUPER.
  406. IF AVAILABLE rowObject THEN DO:
  407. DYNAMIC-FUNCTION('SETARTNR':U, INPUT rowObject.Artnr ,
  408. INPUT rowObject.Inhalt ,
  409. INPUT rowObject.Jahr ) NO-ERROR.
  410. END.
  411. END PROCEDURE.
  412. /* _UIB-CODE-BLOCK-END */
  413. &ANALYZE-RESUME
  414. {&DB-REQUIRED-END}
  415. {&DB-REQUIRED-START}
  416. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE fetchPrev dTables _DB-REQUIRED
  417. PROCEDURE fetchPrev :
  418. /*------------------------------------------------------------------------------
  419. Purpose: Super Override
  420. Parameters:
  421. Notes:
  422. ------------------------------------------------------------------------------*/
  423. /* Code placed here will execute PRIOR to standard behavior. */
  424. RUN SUPER.
  425. IF AVAILABLE rowObject THEN DO:
  426. DYNAMIC-FUNCTION('SETARTNR':U, INPUT rowObject.Artnr ,
  427. INPUT rowObject.Inhalt ,
  428. INPUT rowObject.Jahr ) NO-ERROR.
  429. END.
  430. END PROCEDURE.
  431. /* _UIB-CODE-BLOCK-END */
  432. &ANALYZE-RESUME
  433. {&DB-REQUIRED-END}
  434. {&DB-REQUIRED-START}
  435. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE initializeObject dTables _DB-REQUIRED
  436. PROCEDURE initializeObject :
  437. /*------------------------------------------------------------------------------
  438. Purpose: Super Override
  439. Parameters:
  440. Notes:
  441. ------------------------------------------------------------------------------*/
  442. /* Code placed here will execute PRIOR to standard behavior. */
  443. RUN SUPER.
  444. END PROCEDURE.
  445. /* _UIB-CODE-BLOCK-END */
  446. &ANALYZE-RESUME
  447. {&DB-REQUIRED-END}
  448. {&DB-REQUIRED-START}
  449. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE NEUER_ARTIKEL dTables _DB-REQUIRED
  450. PROCEDURE NEUER_ARTIKEL :
  451. /*------------------------------------------------------------------------------
  452. Purpose:
  453. Parameters: <none>
  454. Notes:
  455. ------------------------------------------------------------------------------*/
  456. DEF INPUT PARAMETER ipString AS CHAR NO-UNDO.
  457. DEF VAR Artnr AS INT NO-UNDO.
  458. DEF VAR Inhalt AS INT NO-UNDO.
  459. DEF VAR Jahr AS INT NO-UNDO.
  460. DEF VAR iRecid AS RECID NO-UNDO.
  461. Artnr = INTEGER(ENTRY(1, ipString, CHR(01))).
  462. Inhalt = INTEGER(ENTRY(2, ipString, CHR(01))).
  463. Jahr = INTEGER(ENTRY(3, ipString, CHR(01))).
  464. FIND Artst USE-INDEX Artst-k1
  465. WHERE Artst.Firma = Firma
  466. AND Artst.Artnr = Artnr
  467. AND Artst.Inhalt = Inhalt
  468. AND Artst.Jahr = Jahr NO-LOCK NO-ERROR.
  469. IF NOT AVAILABLE Artst THEN RETURN.
  470. iRecid = RECID(Artst).
  471. DYNAMIC-FUNCTION('openQuery':U).
  472. RUN REPOS ( INPUT iRecid ).
  473. END PROCEDURE.
  474. /* _UIB-CODE-BLOCK-END */
  475. &ANALYZE-RESUME
  476. {&DB-REQUIRED-END}
  477. {&DB-REQUIRED-START}
  478. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE OPENQUERY_FIND dTables _DB-REQUIRED
  479. PROCEDURE OPENQUERY_FIND :
  480. /*------------------------------------------------------------------------------
  481. Purpose:
  482. Parameters: <none>
  483. Notes:
  484. ------------------------------------------------------------------------------*/
  485. DEF INPUT PARAMETER ipSort AS INT NO-UNDO.
  486. xWhere = 'FOR EACH Artst USE-INDEX Artst-k' + STRING(ipSort,'9 ')
  487. + 'WHERE Artst.Firma = "' + Firma + '" '
  488. + 'NO-LOCK INDEXED-REPOSITION '.
  489. DYNAMIC-FUNCTION('openQuery':U).
  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 REFRESH_ARTIKEL dTables _DB-REQUIRED
  496. PROCEDURE REFRESH_ARTIKEL :
  497. /*------------------------------------------------------------------------------
  498. Purpose:
  499. Parameters: <none>
  500. Notes:
  501. ------------------------------------------------------------------------------*/
  502. RUN refreshRow.
  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 REPOS dTables _DB-REQUIRED
  509. PROCEDURE REPOS :
  510. /*------------------------------------------------------------------------------
  511. Purpose:
  512. Parameters: <none>
  513. Notes:
  514. ------------------------------------------------------------------------------*/
  515. DEF INPUT PARAMETER ipRecid AS RECID NO-UNDO.
  516. FIND Artst WHERE RECID(Artst) = ipRecid NO-LOCK NO-ERROR.
  517. IF NOT AVAILABLE Artst THEN RETURN.
  518. DYNAMIC-FUNCTION('SETARTNR':U, INPUT Artst.Artnr,
  519. INPUT Artst.Inhalt,
  520. INPUT Artst.Jahr ) NO-ERROR.
  521. DYNAMIC-FUNCTION('fetchRowIdent':U, INPUT STRING(ROWID(Artst)), INPUT ? ).
  522. END PROCEDURE.
  523. /* _UIB-CODE-BLOCK-END */
  524. &ANALYZE-RESUME
  525. {&DB-REQUIRED-END}
  526. {&DB-REQUIRED-START}
  527. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE SET_QUERYSTRING dTables _DB-REQUIRED
  528. PROCEDURE SET_QUERYSTRING :
  529. /*------------------------------------------------------------------------------
  530. Purpose:
  531. Parameters: <none>
  532. Notes:
  533. ------------------------------------------------------------------------------*/
  534. DEF INPUT PARAMETER ipStart AS CHAR NO-UNDO.
  535. DEF VAR ix AS INT NO-UNDO.
  536. DEF VAR i1 AS INT NO-UNDO.
  537. DEF VAR VSort AS INT NO-UNDO.
  538. DEF VAR xString AS CHAR NO-UNDO.
  539. DEF VAR VArtnr AS CHAR NO-UNDO.
  540. DEF VAR VInhalt AS CHAR NO-UNDO.
  541. DEF VAR VJahr AS CHAR NO-UNDO.
  542. DEF VAR VSuchbe AS CHAR NO-UNDO.
  543. DEF VAR VBez AS CHAR NO-UNDO.
  544. ix = NUM-ENTRIES( ipStart, CHR(01) ).
  545. VArtnr = '0'.
  546. VInhalt = '0'.
  547. VJahr = '0'.
  548. VSuchbe = ''.
  549. VBez = ''.
  550. IF Firma = '' THEN Firma = DYNAMIC-FUNCTION('GETMANDANT':U) NO-ERROR.
  551. DO i1 = 1 TO ix:
  552. CASE i1:
  553. WHEN 1 THEN VArtnr = ENTRY(i1, ipStart, CHR(01) ).
  554. WHEN 2 THEN VInhalt = ENTRY(i1, ipStart, CHR(01) ).
  555. WHEN 3 THEN VJahr = ENTRY(i1, ipStart, CHR(01) ).
  556. WHEN 4 THEN VSuchbe = ENTRY(i1, ipStart, CHR(01) ).
  557. WHEN 5 THEN VBez = ENTRY(i1, ipStart, CHR(01) ).
  558. END CASE.
  559. END.
  560. xWhere = 'WHERE Artst.Firma = "' + Firma + '" '.
  561. IF VArtnr <> '' THEN DO:
  562. VSort = 1.
  563. XString = 'AND Artst.Artnr >= ' + VArtnr + ' '.
  564. xWhere = xWhere + xString.
  565. END.
  566. IF VInhalt <> '' THEN DO:
  567. VSort = 1.
  568. XString = 'AND Artst.Inhalt = ' + VInhalt + ' '.
  569. xWhere = xWhere + xString.
  570. END.
  571. IF VJahr <> '' THEN DO:
  572. VSort = 1.
  573. XString = 'AND Artst.Jahr = ' + VJahr + ' '.
  574. xWhere = xWhere + xString.
  575. END.
  576. IF VSuchbe <> '' THEN DO:
  577. VSort = 2.
  578. XString = 'AND Artst.Suchbe BEGINS "' + VSuchbe + '" '.
  579. xWhere = xWhere + xString.
  580. END.
  581. IF VBez <> '' THEN DO:
  582. VSort = 3.
  583. XString = 'AND Artst.Bez BEGINS "' + VBez + '" '.
  584. xWhere = xWhere + xString.
  585. END.
  586. xWhere = 'FOR EACH Artst USE-INDEX Artst-k' + STRING(VSort,'9 ')
  587. + xWhere
  588. + ' NO-LOCK INDEXED-REPOSITION '.
  589. END PROCEDURE.
  590. /* _UIB-CODE-BLOCK-END */
  591. &ANALYZE-RESUME
  592. {&DB-REQUIRED-END}
  593. /* ************************ Function Implementations ***************** */
  594. {&DB-REQUIRED-START}
  595. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION openQuery dTables _DB-REQUIRED
  596. FUNCTION openQuery RETURNS LOGICAL
  597. ( /* parameter-definitions */ ) :
  598. /*------------------------------------------------------------------------------
  599. Purpose: Super Override
  600. Notes:
  601. ------------------------------------------------------------------------------*/
  602. /* xWhere = 'Firma = "' + Firma + '" '. */
  603. /* DYNAMIC-FUNCTION('setQueryWhere':U, INPUT xWhere). */
  604. /* xSort = ''. */
  605. /* DYNAMIC-FUNCTION('setQuerySort':U, INPUT xSort). */
  606. /* xWhere = ''. */
  607. IF NOT lOpen THEN RETURN NO-APPLY.
  608. IF xWhere = '' THEN RUN SET_QUERYSTRING ('').
  609. DYNAMIC-FUNCTION('setQueryString':U, INPUT xWhere).
  610. RETURN SUPER( ).
  611. END FUNCTION.
  612. /* _UIB-CODE-BLOCK-END */
  613. &ANALYZE-RESUME
  614. {&DB-REQUIRED-END}
  615. {&DB-REQUIRED-START}
  616. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION setOpenflag dTables _DB-REQUIRED
  617. FUNCTION setOpenflag RETURNS LOGICAL
  618. ( ipOpen AS LOG ) :
  619. /*------------------------------------------------------------------------------
  620. Purpose:
  621. Notes:
  622. ------------------------------------------------------------------------------*/
  623. lOpen = ipOpen.
  624. END FUNCTION.
  625. /* _UIB-CODE-BLOCK-END */
  626. &ANALYZE-RESUME
  627. {&DB-REQUIRED-END}