‎2008 Nov 11 3:31 PM
Hi All,
My task is. Develop a report, in background it has to create a log with all details in report.
ie online display in screen, background put it in log file.
How to create application log with report informationt.
Thanks,
Balamurugan.R
‎2008 Nov 11 3:38 PM
You need the Business Application Log. Look at the function modules in SBAL. They are fully documented. Also read the posts in these forums, plus blog, plus SAP help, plus in the library for information on how to use them.
matt
‎2008 Nov 11 4:03 PM
please follow the below stpes.
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.
‎2010 Feb 17 10:48 AM