Skip to content

Commit

Permalink
bal export with timeframes added (#59)
Browse files Browse the repository at this point in the history
* bal export with timeframes added

* abaplint rule for local variable names removed
  • Loading branch information
JohannesKonings committed Feb 21, 2021
1 parent 726cca0 commit 0a5defd
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 20 deletions.
15 changes: 0 additions & 15 deletions abaplint.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,6 @@
"exclude": [],
"reason": ""
},
"check_comments": {
"exclude": [],
"reason": "",
"allowEndOfLine": false
},
"check_ddic": {
"exclude": [],
"reason": ""
Expand Down Expand Up @@ -257,16 +252,6 @@
"exclude": [],
"reason": ""
},
"local_variable_names": {
"exclude": [],
"reason": "",
"patternKind": "required",
"ignoreNames": [],
"ignorePatterns": [],
"expectedData": "\\w",
"expectedConstant": "^LC_.+$",
"expectedFS": "^<L._.+>$"
},
"main_file_contents": {
"exclude": [],
"reason": ""
Expand Down
17 changes: 16 additions & 1 deletion src/zale_export_log_bal.prog.abap
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,29 @@ REPORT zale_export_log_bal.
PARAMETERS scenario TYPE zale_config-ale_scenario OBLIGATORY.
PARAMETERS object TYPE balhdr-object OBLIGATORY.
PARAMETERS suobject TYPE balhdr-subobject OBLIGATORY.
PARAMETERS fromdat TYPE dats OBLIGATORY.
PARAMETERS fromtim TYPE tims OBLIGATORY.
PARAMETERS todat TYPE dats OBLIGATORY.
PARAMETERS totim TYPE tims OBLIGATORY.
PARAMETERS test TYPE flag DEFAULT 'X'.

INITIALIZATION.

fromdat = sy-datum.
fromtim = sy-uzeit - 900. " 15 minutes
todat = sy-datum.
totim = sy-uzeit.

START-OF-SELECTION.

DATA filter_values TYPE zif_ale_log_reader=>ty_filter_values.

filter_values = VALUE #( ( key = 'OBJECT' value = object )
( key = 'SUBOBJECT' value = suobject ) ).
( key = 'SUBOBJECT' value = suobject )
( key = 'DATE_FROM' value = fromdat )
( key = 'TIME_FROM' value = fromtim )
( key = 'DATE_TO' value = todat )
( key = 'TIME_TO' value = totim ) ).

"set customzing
DATA(customizing) = NEW zcl_ale_customizing_base( scenario ).
Expand Down
24 changes: 24 additions & 0 deletions src/zale_export_log_bal.prog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@
<ENTRY>Exports the logs of BAL</ENTRY>
<LENGTH>23</LENGTH>
</item>
<item>
<ID>S</ID>
<KEY>FROMDAT</KEY>
<ENTRY>from date</ENTRY>
<LENGTH>17</LENGTH>
</item>
<item>
<ID>S</ID>
<KEY>FROMTIM</KEY>
<ENTRY>from time</ENTRY>
<LENGTH>17</LENGTH>
</item>
<item>
<ID>S</ID>
<KEY>OBJECT</KEY>
Expand Down Expand Up @@ -42,6 +54,18 @@
<ENTRY>Test</ENTRY>
<LENGTH>12</LENGTH>
</item>
<item>
<ID>S</ID>
<KEY>TODAT</KEY>
<ENTRY>to date</ENTRY>
<LENGTH>15</LENGTH>
</item>
<item>
<ID>S</ID>
<KEY>TOTIM</KEY>
<ENTRY>to time</ENTRY>
<LENGTH>15</LENGTH>
</item>
</TPOOL>
</asx:values>
</asx:abap>
Expand Down
12 changes: 8 additions & 4 deletions src/zcl_ale_log_reader_bal.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,21 @@ CLASS zcl_ale_log_reader_bal IMPLEMENTATION.

DATA(object) = VALUE balobj_d( filter_values[ key = 'OBJECT' ]-value ).
DATA(subobject) = VALUE balsubobj( filter_values[ key = 'SUBOBJECT' ]-value ).
DATA(date_from) = VALUE baldate( filter_values[ key = 'DATE_FROM' ]-value ).
DATA(time_from) = VALUE baltime( filter_values[ key = 'TIME_FROM' ]-value ).
DATA(date_to) = VALUE baldate( filter_values[ key = 'DATE_TO' ]-value ).
DATA(time_to) = VALUE baltime( filter_values[ key = 'TIME_TO' ]-value ).


CALL FUNCTION 'APPL_LOG_READ_DB'
EXPORTING
object = object
subobject = subobject
* external_number = space " external number
* date_from = '00000000' " Read-from date
* date_to = SY-DATUM " Read-by date
* time_from = '000000' " Read-from time
* time_to = SY-UZEIT " Read-by time
date_from = date_from
date_to = date_to
time_from = time_from
time_to = time_to
* log_class = '4' " Problem class
* program_name = '*' " Program name
* transaction_code = '*' " Transaction name
Expand Down

0 comments on commit 0a5defd

Please sign in to comment.