‎2021 Oct 04 10:13 AM
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.
‎2021 Oct 05 4:58 AM
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.
‎2021 Oct 04 11:18 AM
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?
‎2021 Oct 05 3:58 AM
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.
‎2021 Oct 05 4:58 AM
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.
‎2021 Oct 05 5:53 AM
Thanks for the information. I will check these FMs.
Best ragards.