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

Sending Errors to Application Logging (SLG1)

Former Member
0 Likes
2,755

Its been awhile since I used this process to capture interface errors. I remember there were three basic steps:

1)Init App Log

2)Write Errors

3)Close App Log

The Function Mdules I used awhile back ago seem obsolete. Can anyone tell me the basic steps to App Logging? Is there a better way? Anycode would also be appreciated.

Thank-You.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,900

Hi,

You can try using the data set stattements.

Open data set

transfer dataset and close dataset.

Open the file in the application server and transfer the log internal table data to the dataset and finally close the dataset.

Hope u got this.

Regadrs

Abhilash.

5 REPLIES 5
Read only

Former Member
0 Likes
1,901

Hi,

You can try using the data set stattements.

Open data set

transfer dataset and close dataset.

Open the file in the application server and transfer the log internal table data to the dataset and finally close the dataset.

Hope u got this.

Regadrs

Abhilash.

Read only

0 Likes
1,900

I am looking for App Log (SLG1) Development Function Modules to send the errors to the App Log, or sample code....Thank-You.

Read only

Former Member
0 Likes
1,900

Check the Function group CCMSV:

CCMSV_INIT_APPL_LOG - Initialize appl logs

CCMSV_ADD_MSG_ALOG - add messages to app log.

******Reward points if useful

Regards,

Kiran Bobbala

Read only

0 Likes
1,900

Hello Kiran,

Thank-You but unfortunately we are in 4.6C and I do not see tis Function Group.

Also, if you weant to use a log variant for App Logging what can be used. I use to use this:

  • If you are running a batch program, be sure to log the variant

  • information. Do not log the variant if you are not using one.

if not sy-slset is initial.

move sy-repid to report.

CALL FUNCTION 'Z_GNU_LOG_VARIANT'

EXPORTING

REPORT = report

VARIANT = SY-SLSET

EXCEPTIONS

VARIANT_NON_EXISTENT = 1

VARIANT_OBSOLETE = 2

REPORT_NOT_EXISTENT = 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.

endif.

Thank-You.

Read only

Maciej_DomagaBa
Contributor
0 Likes
1,900

See function modules in function group SBAL (for example fm BAL_LOG_CREATE).

There's a quite good documentation for these modules in the system (SE37).

Check this too:

[http://help.sap.com/saphelp_46c/helpdata/en/2a/fa023d493111d182b70000e829fbfe/frameset.htm]

regards