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

Error handling from a background program storing XML data in Application Server?

former_member308418
Participant
0 Likes
1,365

Dear All,

Good day.

I have some reports which will be running in the background and send XML data to the Application Server at a scheduled time. These XML files will be accessed and used by third-party software. Please give me an idea to handle any kind of data loss or error while transporting the files to Appl Server, as those will be running in the background.

Thanks & regards.

1 ACCEPTED SOLUTION
Read only

Sandra_Rossi
Active Contributor
0 Likes
1,265

I guess you want to store the log in database or something like that, so that to later view the log. It's also something which can be useful in foreground.

One possible solution is to use the API of Business Application Log, that you can later view with transaction code SLG1.

CALL FUNCTION 'BAL_LOG_CREATE'
...
CALL FUNCTION 'BAL_LOG_MSG_ADD' " to repeat for each message
...
CALL FUNCTION 'BAL_DB_SAVE'
...

You can find more information in the forum for each function module, even complete code, each function module has its own documentation, and SAP Library also provides complete Business Application Log documentation about the concept.

4 REPLIES 4
Read only

Sandra_Rossi
Active Contributor
0 Likes
1,265

There could be tens of valid answers for such a general question. Could you provide more details about what "send" mean you use, what you already have in mind as possible solutions? Moreover, is your question more about sending, more about XML generation, or more about logging the errors?

Read only

former_member308418
Participant
0 Likes
1,265

Hi,

I want to get the error logs. In foreground, I can get the error but don't know how to handle background errors. It should be an automated process. Like, if any data loss happens system will resend data. Please share me some ideas.

Thanks.

Read only

Sandra_Rossi
Active Contributor
0 Likes
1,266

I guess you want to store the log in database or something like that, so that to later view the log. It's also something which can be useful in foreground.

One possible solution is to use the API of Business Application Log, that you can later view with transaction code SLG1.

CALL FUNCTION 'BAL_LOG_CREATE'
...
CALL FUNCTION 'BAL_LOG_MSG_ADD' " to repeat for each message
...
CALL FUNCTION 'BAL_DB_SAVE'
...

You can find more information in the forum for each function module, even complete code, each function module has its own documentation, and SAP Library also provides complete Business Application Log documentation about the concept.

Read only

0 Likes
1,265

Thanks for the information. I will check these FMs.

Best ragards.