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

BAPI is writing Job log in background mode using SUBMIT program

arpita_churi3
Active Participant
0 Likes
2,549

Hi All,

I am submitting a custom report via submit and Job in background to create reservations and goods movement by calling BAPI BAPI_RESERVATION_CREATE1 and BAPI_GOODSMVT_CREATE . after execution of both BAPi , preparing one internal table with BAPI return parameter to show into internal table. at the end i am calling ALV factory method to show output as spool in SM37 job log. The issue is BAPI return parameters messages are coming into Job log ( submit program job).

How to supres this job log.

SUBMIT ztest_bapi VIA JOB lv_jobname NUMBER lv_jobcount AND RETURN.

Thanks,

Arpita

6 REPLIES 6
Read only

former_member1716
Active Contributor
0 Likes
2,027

You need not explicitly write a code as above, Follow the above steps.

Prepare the report to display the required fields using factory method.

Once you execute this method in background, your Job will already Hold the result in spool you are trying to display VIA report.

Regards

Read only

0 Likes
2,027

I am calling factory method. and spool has generated with final output table but job logs shows error/warning messages from BAPI return parameters. I dont want that in job log. Please help.

Read only

0 Likes
2,027

Can you paste a Screen shot of the same, want to understand what you are actually trying to ignore.

Regards

Read only

0 Likes
2,027

See above screen shot of job log. spool has generated with internal table data which i am passing to factory method. i want to omit this warning/error messages from BAPI return to be written to job log.

Read only

0 Likes
2,027

Unless You explicitly displaying the same either using write method or using factory method it will never appear in the output. If you don't need explicitly display the same it wont appear in the Log.

Still if you are facing the issue, Kindly give the code snippet followed

Read only

Sandra_Rossi
Active Contributor
0 Likes
2,027

The messages which appear in the job log are due to the fact you execute the statement MESSAGE without INTO. So, don't. I doubt that BAPIs can be responsible of that, but if so, open a ticket at SAP support.