Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP first draft BAL-Reader #4

Merged
merged 1 commit into from
Oct 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 5 additions & 40 deletions src/zcl_ale_log_reader.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -5,55 +5,20 @@ CLASS zcl_ale_log_reader DEFINITION

PUBLIC SECTION.

"! read BAL
METHODS read
IMPORTING
object TYPE balobj_d
subobject TYPE balsubobj.

METHODS read.

PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.



CLASS zcl_ale_log_reader IMPLEMENTATION.
CLASS ZCL_ALE_LOG_READER IMPLEMENTATION.


METHOD read.

DATA header_data TYPE STANDARD TABLE OF balhdr.
DATA header_parameters TYPE STANDARD TABLE OF balhdrp.
DATA messages TYPE STANDARD TABLE OF balm.
DATA message_parameters TYPE STANDARD TABLE OF balmp.
DATA contexts TYPE STANDARD TABLE OF balc.
DATA exceptions TYPE STANDARD TABLE OF bal_s_exception.


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
* log_class = '4' " Problem class
* program_name = '*' " Program name
* transaction_code = '*' " Transaction name
* user_id = space " User name
* mode = '+' " Operating mode
* put_into_memory = space
* IMPORTING
* number_of_logs = " Number of logs read
TABLES
header_data = header_data
header_parameters = header_parameters
messages = messages
message_parameters = message_parameters
contexts = contexts
t_exceptions = exceptions.

ENDMETHOD.

ENDMETHOD.
ENDCLASS.
58 changes: 58 additions & 0 deletions src/zcl_ale_log_reader_bal.clas.abap
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
class ZCL_ALE_LOG_READER_BAL definition
public
final
create public .

public section.

"! read BAL
methods READ
importing
!OBJECT type BALOBJ_D
!SUBOBJECT type BALSUBOBJ .
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.



CLASS ZCL_ALE_LOG_READER_BAL IMPLEMENTATION.


METHOD READ.

DATA header_data TYPE STANDARD TABLE OF balhdr.
DATA header_parameters TYPE STANDARD TABLE OF balhdrp.
DATA messages TYPE STANDARD TABLE OF balm.
DATA message_parameters TYPE STANDARD TABLE OF balmp.
DATA contexts TYPE STANDARD TABLE OF balc.
DATA exceptions TYPE STANDARD TABLE OF bal_s_exception.


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
* log_class = '4' " Problem class
* program_name = '*' " Program name
* transaction_code = '*' " Transaction name
* user_id = space " User name
* mode = '+' " Operating mode
* put_into_memory = space
* IMPORTING
* number_of_logs = " Number of logs read
TABLES
header_data = header_data
header_parameters = header_parameters
messages = messages
message_parameters = message_parameters
contexts = contexts
t_exceptions = exceptions.

ENDMETHOD.
ENDCLASS.
16 changes: 16 additions & 0 deletions src/zcl_ale_log_reader_bal.clas.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<abapGit version="v1.0.0" serializer="LCL_OBJECT_CLAS" serializer_version="v1.0.0">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<VSEOCLASS>
<CLSNAME>ZCL_ALE_LOG_READER_BAL</CLSNAME>
<LANGU>E</LANGU>
<DESCRIPT>Log Reader</DESCRIPT>
<STATE>1</STATE>
<CLSCCINCL>X</CLSCCINCL>
<FIXPT>X</FIXPT>
<UNICODE>X</UNICODE>
</VSEOCLASS>
</asx:values>
</asx:abap>
</abapGit>