Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Displaying error messages from application log

Hi,

I am using the function module RV_DELIVERY_CREATE for creating delivery in my program. If the sy-subrc is not zero i.e if delivery is not created, i have to display error messages collected inside the application.How can i do this ?

The object nd subobject are existing in SLG0 but when i

tried to see the object and subobject in SLG1 transaction , no logs were found.

Do we need to activate the object and sunobject somewhere before logging can take place??

I am using the following code in my program to display the logs but it is displaying no logs found:

..........

CALL FUNCTION 'APPL_LOG_SET_OBJECT'

EXPORTING

object = 'ZCH_SCL'

subobject = 'DL'

  • LOG_HANDLE = ' '

  • NO_LOG = ' '

  • EXCEPTIONS

  • OBJECT_NOT_FOUND = 1

  • SUBOBJECT_NOT_FOUND = 2

  • OTHERS = 3

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

CALL FUNCTION 'APPL_LOG_INIT'

EXPORTING

OBJECT = 'ZCH_SCL'

SUBOBJECT = 'DL'

  • LOG_HANDLE = ' '

  • EXCEPTIONS

  • OBJECT_NOT_FOUND = 1

  • SUBOBJECT_NOT_FOUND = 2

  • OTHERS = 3

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

PERFORM z_call_rv_delivery_create. " to call fm rv_delivery_create

IF sy-subrc ne 0.

CALL FUNCTION 'APPL_LOG_DISPLAY_INTERN'

EXPORTING

object = 'ZCH_SCL'

subobject = 'DL'

title_list_screen = 'Error Logs'

  • COLUMN_SELECTION = '11112221122 '

  • COLUMN_SELECTION_MSG_JUMP = '1'

  • EXTERNAL_NUMBER_DISPLAY_LENGTH = 20

  • I_S_DISPLAY_PROFILE =

  • IMPORTING

  • NUMBER_OF_PROTOCOLS =

  • EXCEPTIONS

  • OBJECT_NOT_FOUND = 1

  • SUBOBJECT_NOT_FOUND = 2

  • OTHERS = 3

.

...................

thanks,

vartika

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question