d-rabsumm.w 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  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 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 RabSumm
  49. /* Definitions for QUERY Query-Main */
  50. &Scoped-Define ENABLED-FIELDS Firma Rab_Summ Bez Menge Betrag Inhalt F_Rab_Art F_Proz_Betr F_Wert~
  51. A_Rab_Art A_Proz_Betr A_Wert
  52. &Scoped-define ENABLED-FIELDS-IN-RabSumm Firma Rab_Summ Bez Menge Betrag ~
  53. Inhalt F_Rab_Art F_Proz_Betr F_Wert A_Rab_Art A_Proz_Betr A_Wert
  54. &Scoped-Define DATA-FIELDS Firma Rab_Summ Bez Menge Betrag Inhalt F_Rab_Art F_Proz_Betr F_Wert~
  55. A_Rab_Art A_Proz_Betr A_Wert
  56. &Scoped-define DATA-FIELDS-IN-RabSumm Firma Rab_Summ Bez Menge Betrag ~
  57. Inhalt F_Rab_Art F_Proz_Betr F_Wert A_Rab_Art A_Proz_Betr A_Wert
  58. &Scoped-Define MANDATORY-FIELDS
  59. &Scoped-Define APPLICATION-SERVICE
  60. &Scoped-Define ASSIGN-LIST
  61. &Scoped-Define DATA-FIELD-DEFS "d-rabsumm.i"
  62. &Scoped-define QUERY-STRING-Query-Main FOR EACH RabSumm NO-LOCK INDEXED-REPOSITION
  63. {&DB-REQUIRED-START}
  64. &Scoped-define OPEN-QUERY-Query-Main OPEN QUERY Query-Main FOR EACH RabSumm NO-LOCK INDEXED-REPOSITION.
  65. {&DB-REQUIRED-END}
  66. &Scoped-define TABLES-IN-QUERY-Query-Main RabSumm
  67. &Scoped-define FIRST-TABLE-IN-QUERY-Query-Main RabSumm
  68. /* Custom List Definitions */
  69. /* List-1,List-2,List-3,List-4,List-5,List-6 */
  70. /* _UIB-PREPROCESSOR-BLOCK-END */
  71. &ANALYZE-RESUME
  72. /* ************************ Function Prototypes ********************** */
  73. {&DB-REQUIRED-START}
  74. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD openQuery dTables _DB-REQUIRED
  75. FUNCTION openQuery RETURNS LOGICAL
  76. ( /* parameter-definitions */ ) FORWARD.
  77. /* _UIB-CODE-BLOCK-END */
  78. &ANALYZE-RESUME
  79. {&DB-REQUIRED-END}
  80. /* *********************** Control Definitions ********************** */
  81. {&DB-REQUIRED-START}
  82. /* Query definitions */
  83. &ANALYZE-SUSPEND
  84. DEFINE QUERY Query-Main FOR
  85. RabSumm SCROLLING.
  86. &ANALYZE-RESUME
  87. {&DB-REQUIRED-END}
  88. /* ************************ Frame Definitions *********************** */
  89. /* *********************** Procedure Settings ************************ */
  90. &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
  91. /* Settings for THIS-PROCEDURE
  92. Type: SmartDataObject
  93. Allow: Query
  94. Frames: 0
  95. Add Fields to: Neither
  96. Other Settings: PERSISTENT-ONLY COMPILE APPSERVER DB-AWARE
  97. */
  98. /* This procedure should always be RUN PERSISTENT. Report the error, */
  99. /* then cleanup and return. */
  100. IF NOT THIS-PROCEDURE:PERSISTENT THEN DO:
  101. MESSAGE "{&FILE-NAME} should only be RUN PERSISTENT.":U
  102. VIEW-AS ALERT-BOX ERROR BUTTONS OK.
  103. RETURN.
  104. END.
  105. &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
  106. /* ************************* Create Window ************************** */
  107. &ANALYZE-SUSPEND _CREATE-WINDOW
  108. /* DESIGN Window definition (used by the UIB)
  109. CREATE WINDOW dTables ASSIGN
  110. HEIGHT = 1.62
  111. WIDTH = 83.4.
  112. /* END WINDOW DEFINITION */
  113. */
  114. &ANALYZE-RESUME
  115. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB dTables
  116. /* ************************* Included-Libraries *********************** */
  117. {src/adm2/data.i}
  118. /* _UIB-CODE-BLOCK-END */
  119. &ANALYZE-RESUME
  120. /* *********** Runtime Attributes and AppBuilder Settings *********** */
  121. &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES
  122. /* SETTINGS FOR WINDOW dTables
  123. VISIBLE,,RUN-PERSISTENT */
  124. /* _RUN-TIME-ATTRIBUTES-END */
  125. &ANALYZE-RESUME
  126. /* Setting information for Queries and Browse Widgets fields */
  127. &ANALYZE-SUSPEND _QUERY-BLOCK QUERY Query-Main
  128. /* Query rebuild information for SmartDataObject Query-Main
  129. _TblList = "AnaDat.RabSumm"
  130. _Options = "NO-LOCK INDEXED-REPOSITION"
  131. _FldNameList[1] > AnaDat.RabSumm.Firma
  132. "Firma" "Firma" ? ? "character" ? ? ? ? ? ? yes ? no 8 yes ""
  133. _FldNameList[2] > AnaDat.RabSumm.Rab_Summ
  134. "Rab_Summ" "Rab_Summ" "Grp" ? "integer" ? ? ? ? ? ? yes ? no 11 yes ""
  135. _FldNameList[3] > AnaDat.RabSumm.Bez
  136. "Bez" "Bez" "Bezeichnung" ? "character" ? ? ? ? ? ? yes ? no 20 yes ""
  137. _FldNameList[4] > AnaDat.RabSumm.Menge
  138. "Menge" "Menge" "ab Menge" ? "decimal" ? ? ? ? ? ? yes ? no 14 yes ""
  139. _FldNameList[5] > AnaDat.RabSumm.Betrag
  140. "Betrag" "Betrag" "ab Betrag" ? "decimal" ? ? ? ? ? ? yes ? no 14 yes ""
  141. _FldNameList[6] > AnaDat.RabSumm.Inhalt
  142. "Inhalt" "Inhalt" "ab Hl" ? "decimal" ? ? ? ? ? ? yes ? no 14 yes ""
  143. _FldNameList[7] > AnaDat.RabSumm.F_Rab_Art
  144. "F_Rab_Art" "F_Rab_Art" "Art" ? "integer" ? ? ? ? ? ? yes ? no 10.2 yes ""
  145. _FldNameList[8] > AnaDat.RabSumm.F_Proz_Betr
  146. "F_Proz_Betr" "F_Proz_Betr" "B/P" ? "logical" ? ? ? ? ? ? yes ? no 11.6 yes ""
  147. _FldNameList[9] > AnaDat.RabSumm.F_Wert
  148. "F_Wert" "F_Wert" "Wert" ? "decimal" ? ? ? ? ? ? yes ? no 7 yes ""
  149. _FldNameList[10] > AnaDat.RabSumm.A_Rab_Art
  150. "A_Rab_Art" "A_Rab_Art" "Art" ? "integer" ? ? ? ? ? ? yes ? no 10.4 yes ""
  151. _FldNameList[11] > AnaDat.RabSumm.A_Proz_Betr
  152. "A_Proz_Betr" "A_Proz_Betr" "P/B" ? "logical" ? ? ? ? ? ? yes ? no 11.8 yes ""
  153. _FldNameList[12] > AnaDat.RabSumm.A_Wert
  154. "A_Wert" "A_Wert" "Wert" ? "decimal" ? ? ? ? ? ? yes ? no 7.2 yes ""
  155. _Design-Parent is WINDOW dTables @ ( 1.14 , 2.6 )
  156. */ /* QUERY Query-Main */
  157. &ANALYZE-RESUME
  158. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK dTables
  159. /* *************************** Main Block *************************** */
  160. SAktiv = DYNAMIC-FUNCTION('getSuperAktiv':U) NO-ERROR.
  161. IF SAktiv THEN DO:
  162. Firma = DYNAMIC-FUNCTION('GETMANDANT':U) NO-ERROR.
  163. END.
  164. &IF DEFINED(UIB_IS_RUNNING) <> 0 &THEN
  165. RUN initializeObject.
  166. &ENDIF
  167. /* _UIB-CODE-BLOCK-END */
  168. &ANALYZE-RESUME
  169. /* ********************** Internal Procedures *********************** */
  170. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI dTables _DEFAULT-DISABLE
  171. PROCEDURE disable_UI :
  172. /*------------------------------------------------------------------------------
  173. Purpose: DISABLE the User Interface
  174. Parameters: <none>
  175. Notes: Here we clean-up the user-interface by deleting
  176. dynamic widgets we have created and/or hide
  177. frames. This procedure is usually called when
  178. we are ready to "clean-up" after running.
  179. ------------------------------------------------------------------------------*/
  180. /* Hide all frames. */
  181. IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE.
  182. END PROCEDURE.
  183. /* _UIB-CODE-BLOCK-END */
  184. &ANALYZE-RESUME
  185. /* ************************ Function Implementations ***************** */
  186. {&DB-REQUIRED-START}
  187. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION openQuery dTables _DB-REQUIRED
  188. FUNCTION openQuery RETURNS LOGICAL
  189. ( /* parameter-definitions */ ) :
  190. /*------------------------------------------------------------------------------
  191. Purpose: Super Override
  192. Notes:
  193. ------------------------------------------------------------------------------*/
  194. xWhere = 'RabSumm.Firma = "' + Firma + '" '.
  195. DYNAMIC-FUNCTION('setQueryWhere':U, INPUT xWhere).
  196. /* xSort = ''. */
  197. /* DYNAMIC-FUNCTION('setQuerySort':U, INPUT xSort). */
  198. /* xWhere = ''. */
  199. /* DYNAMIC-FUNCTION('setQueryString':U, INPUT xWhere). */
  200. RETURN SUPER( ).
  201. END FUNCTION.
  202. /* _UIB-CODE-BLOCK-END */
  203. &ANALYZE-RESUME
  204. {&DB-REQUIRED-END}