06-27-2013 5:30 AM
Hi all,
I'd like too seek for your help on the following issue. I have to do a SAP security audit report based on SM20 and schedule it in background.
The approach I'm using currently is to record sm20 in bdc and wrap it to call it through 'CALL TRANSACTION'. Enhancement
is then implemented within SM20 program and export the output table to my report for further manipulation.
The selection inputs I'm passing in are the standard options displayed in screen 300 and the subscreen on the main screen.
The report runs perfectly in foreground now. However when I schedule it as background job, it failed. By checking on the
returned bdcmsgcoll message, I got the message saying 'Termination due to errors in method create objectA with returncode 3B'.
The sy-subrc after call transaction is 1001.
When I debug the finished background job in SM37 using JBDG, the bdc is successful and subrc is 0 instead of the 1001 I'm getting.
So my questions are:
1. What caused this discrepancy between the foreground's, background's and debugging of background job's performances.
2.How can I find out the exact error happening behind.
3.How should I solve the issue?
Thank you so much for your help in advance!
Regard,
Nana
06-27-2013 6:18 AM
Hi Nana,
There are some functionalities that behave differently in foreground and background.
You can create a new recording in SHDB (make sure to check the "Simulate Background Processing" checkbox) to spot the error.
Do try this and let ms know the result. Once we have the exact error, we can fix the recording.
Thanks,
Sreekanth
06-27-2013 7:31 AM
Hi Sreekanth,
Thanks for your reply.
I've tried and compared both recording with & without 'Simulate Background Processing'. However I didn't manage to see much difference except in background option, it has few more lines for the back navigation from report display to the SHDB screen.
The screen I'm recording is just the first screen displayed in SM20.
06-27-2013 10:33 AM
Hi Nana,
Was there any error messages when you tried to recod with the "Simulate background Processing" check. Please confirm.
Thanks,
Sreekanth
06-27-2013 10:49 AM
Hi Sreekanth,
There was no error message when I was recording with the 'Simulate background Processing' option for the screen I attached above.
However when I tried to record a further step, the 'Detail sel' at right hand side, the recording was automatically stopped and it said 'Recording complete'. I suspect it is this screen which caused the bdc failure in background. But I'm not very sure if it's really the case or how to debug on this part.
Regards,
Nana
06-27-2013 11:35 AM
Hi Nana,
If the error persists, try using this BAPI RSAU_READ_AUDITLOG_EXTERNAL.
Thanks,
Sreekanth
06-27-2013 7:54 AM
Hi Nana,
There could be 2 reasons for your issue.
1. There might be some popup screen which is being called in between. Since you have not handled that screen in your recording that transaction is giving return code as '1001'. Moreover if you process BDC in A or E mode, then that screen gets suppressed and everything goes fine.
2. You haven't selected the checkbox "Simulate Background Mode" in your recording as it will help you to identify differences in foreground and background.
Thanks
Gangadhar
06-27-2013 10:58 AM
Hi Gangadhar,
Thanks for your help.
I'm processing the BDC using the options : dismode = 'N', updmode = 'S' and racommit = 'X'. The checkbox 'Simulate Background Mode' is also checked when recording the BDC.
However regarding the first point you suggested, I think the failure might be highly possibly due to it. Since my recording only involved the first screen of SM20 and BDC recording didn't go well when I tried to click & record the 'Detail Sel' button , the problem might due to the 'Detail Sel' option which dealt with ALV objects.
Do you have any suggestion in how to solve this problem?
Thanks.
Regards,
Nana
06-27-2013 11:53 AM
Hi Nana,
It seems in recording, you are handling the button "Detail Sel" which displays the ALV report with the "List of Possible Audit Events" and having the provison either to Accept Changes or Not Accept Changes.
Since the ALV grids run on the presentation server (your GUI) not on the application server as other reports do. So do not use the ALV grid for reports that run in the background.
Please revert if you have any other options.
Thanks
Gangadhar
06-27-2013 3:38 PM
For background execution, better look at reports like RSAU_SELECT_EVENTS than transaction which can use controls requiring a GUI.
Check also package SECU for other reports like RSAU_READ_AUDITLOG_EXTERNAL which use BAPI to read audit log.
Regards,
Raymond