d-steunr.w 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310
  1. &ANALYZE-SUSPEND _VERSION-NUMBER AB_v9r12 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 INIT FALSE.
  33. /* _UIB-CODE-BLOCK-END */
  34. &ANALYZE-RESUME
  35. &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
  36. /* ******************** Preprocessor Definitions ******************** */
  37. &Scoped-define PROCEDURE-TYPE SmartDataObject
  38. &Scoped-define DB-AWARE yes
  39. &Scoped-define ADM-SUPPORTED-LINKS Data-Source,Data-Target,Navigation-Target,Update-Target,Commit-Target,Filter-Target
  40. /* Db-Required definitions. */
  41. &IF DEFINED(DB-REQUIRED) = 0 &THEN
  42. &GLOBAL-DEFINE DB-REQUIRED TRUE
  43. &ENDIF
  44. &GLOBAL-DEFINE DB-REQUIRED-START &IF {&DB-REQUIRED} &THEN
  45. &GLOBAL-DEFINE DB-REQUIRED-END &ENDIF
  46. &Scoped-define QUERY-NAME Query-Main
  47. /* Internal Tables (found by Frame, Query & Browse Queries) */
  48. &Scoped-define INTERNAL-TABLES SteuNr
  49. /* Definitions for QUERY Query-Main */
  50. &Scoped-Define ENABLED-FIELDS Firma Konto_AKonto Konto_Debit Konto_Ertrag Konto_Gebinde Konto_Porto~
  51. Konto_Res1 Konto_Res2 Konto_Res3 Konto_Res4 Konto_Skonto Konto_Transp~
  52. Konto_Verpack Konto_Wust_H Konto_Wust_S Nr1 Nr2 Nr3 Nr4 Nr5 SK_Tol_%~
  53. SK_Tol_Max
  54. &Scoped-define ENABLED-FIELDS-IN-SteuNr Firma Konto_AKonto Konto_Debit ~
  55. Konto_Ertrag Konto_Gebinde Konto_Porto Konto_Res1 Konto_Res2 Konto_Res3 ~
  56. Konto_Res4 Konto_Skonto Konto_Transp Konto_Verpack Konto_Wust_H ~
  57. Konto_Wust_S Nr1 Nr2 Nr3 Nr4 Nr5 SK_Tol_% SK_Tol_Max
  58. &Scoped-Define DATA-FIELDS Firma Konto_AKonto Konto_Debit Konto_Ertrag Konto_Gebinde Konto_Porto~
  59. Konto_Res1 Konto_Res2 Konto_Res3 Konto_Res4 Konto_Skonto Konto_Transp~
  60. Konto_Verpack Konto_Wust_H Konto_Wust_S Nr1 Nr2 Nr3 Nr4 Nr5 SK_Tol_%~
  61. SK_Tol_Max
  62. &Scoped-define DATA-FIELDS-IN-SteuNr Firma Konto_AKonto Konto_Debit ~
  63. Konto_Ertrag Konto_Gebinde Konto_Porto Konto_Res1 Konto_Res2 Konto_Res3 ~
  64. Konto_Res4 Konto_Skonto Konto_Transp Konto_Verpack Konto_Wust_H ~
  65. Konto_Wust_S Nr1 Nr2 Nr3 Nr4 Nr5 SK_Tol_% SK_Tol_Max
  66. &Scoped-Define MANDATORY-FIELDS Firma
  67. &Scoped-Define APPLICATION-SERVICE
  68. &Scoped-Define ASSIGN-LIST
  69. &Scoped-Define DATA-FIELD-DEFS "d-steunr.i"
  70. {&DB-REQUIRED-START}
  71. &Scoped-define OPEN-QUERY-Query-Main OPEN QUERY Query-Main FOR EACH SteuNr NO-LOCK INDEXED-REPOSITION.
  72. {&DB-REQUIRED-END}
  73. &Scoped-define TABLES-IN-QUERY-Query-Main SteuNr
  74. &Scoped-define FIRST-TABLE-IN-QUERY-Query-Main SteuNr
  75. /* Custom List Definitions */
  76. /* List-1,List-2,List-3,List-4,List-5,List-6 */
  77. /* _UIB-PREPROCESSOR-BLOCK-END */
  78. &ANALYZE-RESUME
  79. /* ************************ Function Prototypes ********************** */
  80. {&DB-REQUIRED-START}
  81. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD openQuery dTables _DB-REQUIRED
  82. FUNCTION openQuery RETURNS LOGICAL
  83. ( /* parameter-definitions */ ) FORWARD.
  84. /* _UIB-CODE-BLOCK-END */
  85. &ANALYZE-RESUME
  86. {&DB-REQUIRED-END}
  87. /* *********************** Control Definitions ********************** */
  88. {&DB-REQUIRED-START}
  89. /* Query definitions */
  90. &ANALYZE-SUSPEND
  91. DEFINE QUERY Query-Main FOR
  92. SteuNr SCROLLING.
  93. &ANALYZE-RESUME
  94. {&DB-REQUIRED-END}
  95. /* ************************ Frame Definitions *********************** */
  96. /* *********************** Procedure Settings ************************ */
  97. &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
  98. /* Settings for THIS-PROCEDURE
  99. Type: SmartDataObject
  100. Allow: Query
  101. Frames: 0
  102. Add Fields to: Neither
  103. Other Settings: PERSISTENT-ONLY COMPILE APPSERVER DB-AWARE
  104. */
  105. /* This procedure should always be RUN PERSISTENT. Report the error, */
  106. /* then cleanup and return. */
  107. IF NOT THIS-PROCEDURE:PERSISTENT THEN DO:
  108. MESSAGE "{&FILE-NAME} should only be RUN PERSISTENT.":U
  109. VIEW-AS ALERT-BOX ERROR BUTTONS OK.
  110. RETURN.
  111. END.
  112. &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
  113. /* ************************* Create Window ************************** */
  114. &ANALYZE-SUSPEND _CREATE-WINDOW
  115. /* DESIGN Window definition (used by the UIB)
  116. CREATE WINDOW dTables ASSIGN
  117. HEIGHT = 1.62
  118. WIDTH = 46.6.
  119. /* END WINDOW DEFINITION */
  120. */
  121. &ANALYZE-RESUME
  122. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB dTables
  123. /* ************************* Included-Libraries *********************** */
  124. {src/adm2/data.i}
  125. /* _UIB-CODE-BLOCK-END */
  126. &ANALYZE-RESUME
  127. /* *********** Runtime Attributes and AppBuilder Settings *********** */
  128. &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES
  129. /* SETTINGS FOR WINDOW dTables
  130. VISIBLE,,RUN-PERSISTENT */
  131. /* _RUN-TIME-ATTRIBUTES-END */
  132. &ANALYZE-RESUME
  133. /* Setting information for Queries and Browse Widgets fields */
  134. &ANALYZE-SUSPEND _QUERY-BLOCK QUERY Query-Main
  135. /* Query rebuild information for SmartDataObject Query-Main
  136. _TblList = "AnaDat.SteuNr"
  137. _Options = "NO-LOCK INDEXED-REPOSITION"
  138. _FldNameList[1] > AnaDat.SteuNr.Firma
  139. "Firma" "Firma" ? ? "character" ? ? ? ? ? ? yes ? yes 8 yes
  140. _FldNameList[2] > AnaDat.SteuNr.Konto_AKonto
  141. "Konto_AKonto" "Konto_AKonto" ? ? "character" ? ? ? ? ? ? yes ? no 13.8 yes
  142. _FldNameList[3] > AnaDat.SteuNr.Konto_Debit
  143. "Konto_Debit" "Konto_Debit" ? ? "character" ? ? ? ? ? ? yes ? no 12 yes
  144. _FldNameList[4] > AnaDat.SteuNr.Konto_Ertrag
  145. "Konto_Ertrag" "Konto_Ertrag" ? ? "character" ? ? ? ? ? ? yes ? no 12.4 yes
  146. _FldNameList[5] > AnaDat.SteuNr.Konto_Gebinde
  147. "Konto_Gebinde" "Konto_Gebinde" ? ? "character" ? ? ? ? ? ? yes ? no 14.8 yes
  148. _FldNameList[6] > AnaDat.SteuNr.Konto_Porto
  149. "Konto_Porto" "Konto_Porto" ? ? "character" ? ? ? ? ? ? yes ? no 12 yes
  150. _FldNameList[7] > AnaDat.SteuNr.Konto_Res1
  151. "Konto_Res1" "Konto_Res1" ? ? "character" ? ? ? ? ? ? yes ? no 12 yes
  152. _FldNameList[8] > AnaDat.SteuNr.Konto_Res2
  153. "Konto_Res2" "Konto_Res2" ? ? "character" ? ? ? ? ? ? yes ? no 12 yes
  154. _FldNameList[9] > AnaDat.SteuNr.Konto_Res3
  155. "Konto_Res3" "Konto_Res3" ? ? "character" ? ? ? ? ? ? yes ? no 12 yes
  156. _FldNameList[10] > AnaDat.SteuNr.Konto_Res4
  157. "Konto_Res4" "Konto_Res4" ? ? "character" ? ? ? ? ? ? yes ? no 12 yes
  158. _FldNameList[11] > AnaDat.SteuNr.Konto_Skonto
  159. "Konto_Skonto" "Konto_Skonto" ? ? "character" ? ? ? ? ? ? yes ? no 13.6 yes
  160. _FldNameList[12] > AnaDat.SteuNr.Konto_Transp
  161. "Konto_Transp" "Konto_Transp" ? ? "character" ? ? ? ? ? ? yes ? no 13.4 yes
  162. _FldNameList[13] > AnaDat.SteuNr.Konto_Verpack
  163. "Konto_Verpack" "Konto_Verpack" ? ? "character" ? ? ? ? ? ? yes ? no 14.8 yes
  164. _FldNameList[14] > AnaDat.SteuNr.Konto_Wust_H
  165. "Konto_Wust_H" "Konto_Wust_H" ? ? "character" ? ? ? ? ? ? yes ? no 14.6 yes
  166. _FldNameList[15] > AnaDat.SteuNr.Konto_Wust_S
  167. "Konto_Wust_S" "Konto_Wust_S" ? ? "character" ? ? ? ? ? ? yes ? no 14.4 yes
  168. _FldNameList[16] > AnaDat.SteuNr.Nr1
  169. "Nr1" "Nr1" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes
  170. _FldNameList[17] > AnaDat.SteuNr.Nr2
  171. "Nr2" "Nr2" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes
  172. _FldNameList[18] > AnaDat.SteuNr.Nr3
  173. "Nr3" "Nr3" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes
  174. _FldNameList[19] > AnaDat.SteuNr.Nr4
  175. "Nr4" "Nr4" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes
  176. _FldNameList[20] > AnaDat.SteuNr.Nr5
  177. "Nr5" "Nr5" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes
  178. _FldNameList[21] > AnaDat.SteuNr.SK_Tol_%
  179. "SK_Tol_%" "SK_Tol_%" ? ? "decimal" ? ? ? ? ? ? yes ? no 9.8 yes
  180. _FldNameList[22] > AnaDat.SteuNr.SK_Tol_Max
  181. "SK_Tol_Max" "SK_Tol_Max" ? ? "decimal" ? ? ? ? ? ? yes ? no 12.2 yes
  182. _Design-Parent is WINDOW dTables @ ( 1.14 , 2.6 )
  183. */ /* QUERY Query-Main */
  184. &ANALYZE-RESUME
  185. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK dTables
  186. /* *************************** Main Block *************************** */
  187. SAktiv = DYNAMIC-FUNCTION('getSuperAktiv':U) NO-ERROR.
  188. IF SAktiv THEN DO:
  189. Firma = DYNAMIC-FUNCTION('GETMANDANT':U) NO-ERROR.
  190. END.
  191. &IF DEFINED(UIB_IS_RUNNING) <> 0 &THEN
  192. RUN initializeObject.
  193. &ENDIF
  194. /* _UIB-CODE-BLOCK-END */
  195. &ANALYZE-RESUME
  196. /* ********************** Internal Procedures *********************** */
  197. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI dTables _DEFAULT-DISABLE
  198. PROCEDURE disable_UI :
  199. /*------------------------------------------------------------------------------
  200. Purpose: DISABLE the User Interface
  201. Parameters: <none>
  202. Notes: Here we clean-up the user-interface by deleting
  203. dynamic widgets we have created and/or hide
  204. frames. This procedure is usually called when
  205. we are ready to "clean-up" after running.
  206. ------------------------------------------------------------------------------*/
  207. /* Hide all frames. */
  208. IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE.
  209. END PROCEDURE.
  210. /* _UIB-CODE-BLOCK-END */
  211. &ANALYZE-RESUME
  212. /* ************************ Function Implementations ***************** */
  213. {&DB-REQUIRED-START}
  214. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION openQuery dTables _DB-REQUIRED
  215. FUNCTION openQuery RETURNS LOGICAL
  216. ( /* parameter-definitions */ ) :
  217. /*------------------------------------------------------------------------------
  218. Purpose: Super Override
  219. Notes:
  220. ------------------------------------------------------------------------------*/
  221. /* xWhere = ''. */
  222. /* DYNAMIC-FUNCTION('setQueryWhere':U, INPUT xWhere). */
  223. /* xSort = ''. */
  224. /* DYNAMIC-FUNCTION('setQuerySort':U, INPUT xSort). */
  225. /* xWhere = ''. */
  226. /* DYNAMIC-FUNCTION('setQueryString':U, INPUT xWhere). */
  227. RETURN SUPER( ).
  228. END FUNCTION.
  229. /* _UIB-CODE-BLOCK-END */
  230. &ANALYZE-RESUME
  231. {&DB-REQUIRED-END}