‎2008 Nov 20 1:40 PM
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 ?
‎2008 Nov 20 2:38 PM
‎2008 Nov 20 2:40 PM
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.
‎2008 Nov 20 3:02 PM
Check this blog post: [Generate Application Log|http://help-abap.blogspot.com/2008/10/generate-application-log.html].
Regards,
Naimesh Patel