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

Former Member
0 Likes
535

Hi all,

Can someone please tell me what is an application log ?

How is it different from normal ALV or list display of messages ?

Why application log is preferred ?

3 REPLIES 3
Read only

Former Member
0 Likes
489

Please try this link....

Read only

Former Member
0 Likes
489

Hi,

pls go through below steps

you can create object and subobject in SLGO tcode

you can able to see the log in SLG1 tcode

DATA: lt_obj_long_no TYPE STANDARD TABLE OF balnri,

lt_messages TYPE STANDARD TABLE OF balmi,

lwa_message TYPE balmi.

REFRESH lt_messages.

lwa_message-msgty = 'E'.

lwa_message-msgid = 'YCA_DATA_MIGRATION'.

lwa_message-msgno = '110'.

lwa_message-msgv1 = wa_as91-aibn1.

lwa_message-msgv2 = wa_as91-aibn2.

APPEND lwa_message TO lt_messages.

CLEAR lwa_message.

CALL FUNCTION 'APPL_LOG_WRITE_MESSAGES'

EXPORTING

object = 'YFICC006'

subobject = 'YFICC006'

update_or_insert = 'I'

TABLES

messages = lt_messages

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_WRITE_DB'

EXPORTING

object = 'YFICC006'

subobject = 'YFICC006'

TABLES

object_with_lognumber = lt_obj_long_no

EXCEPTIONS

object_not_found = 1

subobject_not_found = 2

internal_error = 3

OTHERS = 4.

IF sy-subrc 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

Regards,

Venkat.

Read only

naimesh_patel
Active Contributor
0 Likes
489

Check this blog post: [Generate Application Log|http://help-abap.blogspot.com/2008/10/generate-application-log.html].

Regards,

Naimesh Patel