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. Report

0 Likes
448

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

3 REPLIES 3
Read only

matt
Active Contributor
0 Likes
390

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

Read only

Former Member
0 Likes
390

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.

Read only

0 Likes
390

resolved.