-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ALV table for BAL message details
Adds the possibility to show a ALV table for message details of a BAL message
- Loading branch information
Showing
8 changed files
with
444 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FUNCTION-POOL ZALOG. "MESSAGE-ID .. | ||
|
||
* INCLUDE LZALOGD... " Local class definition |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<abapGit version="v1.0.0"> | ||
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0"> | ||
<asx:values> | ||
<PROGDIR> | ||
<NAME>LZALOGTOP</NAME> | ||
<DBAPL>S</DBAPL> | ||
<DBNA>D$</DBNA> | ||
<SUBC>I</SUBC> | ||
<APPL>S</APPL> | ||
<FIXPT>X</FIXPT> | ||
<LDBNAME>D$S</LDBNAME> | ||
<UCCHECK>X</UCCHECK> | ||
</PROGDIR> | ||
</asx:values> | ||
</asx:abap> | ||
</abapGit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
******************************************************************* | ||
* System-defined Include-files. * | ||
******************************************************************* | ||
INCLUDE LZALOGTOP. " Global Declarations | ||
INCLUDE LZALOGUXX. " Function Modules | ||
|
||
******************************************************************* | ||
* User-defined Include-files (if necessary). * | ||
******************************************************************* | ||
* INCLUDE LZALOGF... " Subroutines | ||
* INCLUDE LZALOGO... " PBO-Modules | ||
* INCLUDE LZALOGI... " PAI-Modules | ||
* INCLUDE LZALOGE... " Events | ||
* INCLUDE LZALOGP... " Local class implement. | ||
* INCLUDE LZALOGT99. " ABAP Unit tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<abapGit version="v1.0.0"> | ||
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0"> | ||
<asx:values> | ||
<PROGDIR> | ||
<NAME>SAPLZALOG</NAME> | ||
<DBAPL>S</DBAPL> | ||
<DBNA>D$</DBNA> | ||
<SUBC>F</SUBC> | ||
<APPL>S</APPL> | ||
<RLOAD>D</RLOAD> | ||
<FIXPT>X</FIXPT> | ||
<LDBNAME>D$S</LDBNAME> | ||
<UCCHECK>X</UCCHECK> | ||
</PROGDIR> | ||
</asx:values> | ||
</asx:abap> | ||
</abapGit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<abapGit version="v1.0.0" serializer="LCL_OBJECT_FUGR" serializer_version="v1.0.0"> | ||
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0"> | ||
<asx:values> | ||
<INCLUDES> | ||
<SOBJ_NAME>LZALOGTOP</SOBJ_NAME> | ||
<SOBJ_NAME>SAPLZALOG</SOBJ_NAME> | ||
</INCLUDES> | ||
<FUNCTIONS> | ||
<item> | ||
<FUNCNAME>ZALOG_MSG_CALLBACK</FUNCNAME> | ||
<TABLES> | ||
<RSTBL> | ||
<PARAMETER>I_T_PARAMS</PARAMETER> | ||
<TYP>SPAR</TYP> | ||
</RSTBL> | ||
</TABLES> | ||
<DOCUMENTATION> | ||
<RSFDO> | ||
<PARAMETER>I_T_PARAMS</PARAMETER> | ||
<KIND>P</KIND> | ||
</RSFDO> | ||
</DOCUMENTATION> | ||
</item> | ||
</FUNCTIONS> | ||
</asx:values> | ||
</asx:abap> | ||
</abapGit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
FUNCTION zalog_msg_callback. | ||
*"---------------------------------------------------------------------- | ||
*"*"Lokale Schnittstelle: | ||
*" TABLES | ||
*" I_T_PARAMS STRUCTURE SPAR | ||
*"---------------------------------------------------------------------- | ||
DATA(lv_lognumber) = i_t_params[ param = '%LOGNUMBER' ]-value. | ||
IF lv_lognumber(1) = '$'. | ||
" This is not possible because message details table is not exported if log is not saved to database | ||
RETURN. | ||
ENDIF. | ||
|
||
DATA(lv_msgnr) = CONV balmnr( i_t_params[ param = 'MSGNR' ]-value ). | ||
|
||
DATA lt_table_types TYPE string_table. | ||
LOOP AT i_t_params REFERENCE INTO DATA(lr_param) WHERE param CP 'TS_*'. | ||
APPEND lr_param->*-value TO lt_table_types. | ||
ENDLOOP. | ||
|
||
zcl_alog_bal_logger=>get_msg_details_abap_descr( EXPORTING it_table_struc_type_names = lt_table_types | ||
IMPORTING eo_table_def = DATA(lo_table_def) ). | ||
FIELD-SYMBOLS <lt_msg_details> TYPE ANY TABLE. | ||
DATA lt_msg_details TYPE REF TO data. | ||
CREATE DATA lt_msg_details TYPE HANDLE lo_table_def. | ||
ASSIGN lt_msg_details->* TO <lt_msg_details>. | ||
|
||
IMPORT mt_msg_details TO <lt_msg_details> FROM DATABASE bal_indx(al) ID lv_lognumber. | ||
IF sy-subrc <> 0. | ||
CLEAR <lt_msg_details>. | ||
RETURN. | ||
ENDIF. | ||
|
||
zcl_alog_bal_logger=>show_message_alv( iv_msgnr = lv_msgnr | ||
it_message_details = <lt_msg_details> ). | ||
ENDFUNCTION. |
Oops, something went wrong.