Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Application Log Issue

Former Member
0 Kudos
2,797

Hello all,

I need to get the application log data into an internal table.

I have the following parameters with me: 1) OBJECT ID

2) SUBOBJECT

3) EXTERNAL ID

When i enter the same in SLG1 i get the information.

How do i get the entire message into an Internal table in my program.I n

Regards,

Arun

1 ACCEPTED SOLUTION
Read only

Former Member
0 Kudos
962

Hello Arun,

Using function module 'APPL_LOG_READ_DB' u can read the application log.

DATA: P_NUMBER_OF_LOGS LIKE SY-TABIX.

  • Log header data

DATA: BEGIN OF P_HEADER_DATA_TAB OCCURS 0.

INCLUDE STRUCTURE BALHDR.

DATA: END OF P_HEADER_DATA_TAB.

  • Log parameters

DATA: BEGIN OF P_HEADER_PARA_TAB OCCURS 0.

INCLUDE STRUCTURE BALHDRP.

DATA: END OF P_HEADER_PARA_TAB.

  • Log messages

DATA: BEGIN OF P_MESSAGE_TAB OCCURS 0.

INCLUDE STRUCTURE BALM.

DATA: END OF P_MESSAGE_TAB.

  • Message parameters

DATA: BEGIN OF P_MESSAGE_PARA_TAB OCCURS 0.

INCLUDE STRUCTURE BALMP.

DATA: END OF P_MESSAGE_PARA_TAB.

CALL FUNCTION 'APPL_LOG_READ_DB'

EXPORTING

OBJECT = 'ZTEST'

SUBOBJECT = 'ZTEST01'

EXTERNAL_NUMBER = 'Application Log Demo'

IMPORTING

NUMBER_OF_LOGS = P_NUMBER_OF_LOGS

TABLES

HEADER_DATA = P_HEADER_DATA_TAB

HEADER_PARAMETERS = P_HEADER_PARA_TAB

MESSAGES = P_MESSAGE_TAB

MESSAGE_PARAMETERS = P_MESSAGE_PARA_TAB.

Please let me know any help needed further.

3 REPLIES 3
Read only

Former Member
0 Kudos
962

Hi

Try using Function Module : SD_GET_MESSAGES_FROM_APPL_LOG.

Regards,

Raghu.

Read only

Former Member
962

Hi Arun,

Use BAPI_APPLICATIONLOG_GETDETAIL , it contains all the parameters you need.

Regards

Abhii

Read only

Former Member
0 Kudos
963

Hello Arun,

Using function module 'APPL_LOG_READ_DB' u can read the application log.

DATA: P_NUMBER_OF_LOGS LIKE SY-TABIX.

  • Log header data

DATA: BEGIN OF P_HEADER_DATA_TAB OCCURS 0.

INCLUDE STRUCTURE BALHDR.

DATA: END OF P_HEADER_DATA_TAB.

  • Log parameters

DATA: BEGIN OF P_HEADER_PARA_TAB OCCURS 0.

INCLUDE STRUCTURE BALHDRP.

DATA: END OF P_HEADER_PARA_TAB.

  • Log messages

DATA: BEGIN OF P_MESSAGE_TAB OCCURS 0.

INCLUDE STRUCTURE BALM.

DATA: END OF P_MESSAGE_TAB.

  • Message parameters

DATA: BEGIN OF P_MESSAGE_PARA_TAB OCCURS 0.

INCLUDE STRUCTURE BALMP.

DATA: END OF P_MESSAGE_PARA_TAB.

CALL FUNCTION 'APPL_LOG_READ_DB'

EXPORTING

OBJECT = 'ZTEST'

SUBOBJECT = 'ZTEST01'

EXTERNAL_NUMBER = 'Application Log Demo'

IMPORTING

NUMBER_OF_LOGS = P_NUMBER_OF_LOGS

TABLES

HEADER_DATA = P_HEADER_DATA_TAB

HEADER_PARAMETERS = P_HEADER_PARA_TAB

MESSAGES = P_MESSAGE_TAB

MESSAGE_PARAMETERS = P_MESSAGE_PARA_TAB.

Please let me know any help needed further.