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_PO_CREATE1 in background

Former Member
0 Likes
1,373

Hi,

How to suppress the E and A type messages from BAPI_PO_CREATE1 in the background to avoid that messages in Job log?

Ie. I want to avoid those messages which is automatically written to Job log in background mode.

I will process the return table and then will write the relevant messages to the job log.

Can anyone help?

Deepu

7 REPLIES 7
Read only

Former Member
0 Likes
1,076

Hi!

- You have to loop at the bapi return table, right after the BAPI_PO_CREATE1 function call.

- WRITE out all of the errors

- You sheduled this program as a jobstep. In SM37 select your job and choose Job - Modify menu. Click on jobsteps. Select the program and click on the pencil (modify). On the popup, you have to click on the print data window. Here you can set that the printed list will remain in the spool, and so on...

Regards

Tamá

Read only

0 Likes
1,076

Hi,

Thanks for you answer.

But actually my problem is not regarding handling the return message table from the BAPI.

What currently happening is i have used this BAPI_PO_CREATE1 in one program.

We can excecute the program either in foreground or background.

In foreground the errors are written to a list.

In backgroung the errors are written to the Job log from the program, but what is actually happening is from BAPI_PO_CREATE1 all the E and A type messages are automatically logged into Job log and I wanted to avoid that.

I will write the error log depending on my requirement.

now irrespective of my error log some other messages are also comming in the error log from BAPI_PO_CREATE1 in background.

I wanted to avoid those messages populating from the BAPI in the background.

Regards,

Deepu

Read only

0 Likes
1,076

What currently happening is i have used this BAPI_PO_CREATE1 in one program.

We can excecute the program either in foreground or background.

In foreground the errors are written to a list.<b>--->good</b>

In backgroung the errors are written to the Job log from the program, but what is actually happening is from BAPI_PO_CREATE1 all the E and A type messages are automatically logged into Job log and I wanted to avoid that.--->u can skip if it is back ground

<b>if sy-batch = 'X'.

dont display errors.

else.

errors.

endif.</b>

I will write the error log depending on my requirement.

now irrespective of my error log some other messages are also comming in the error log from BAPI_PO_CREATE1 in background.

I wanted to avoid those messages populating from the BAPI in the background.

<b>But question is : how to u come to know which records got uploaded into SAP ? how to u recorrect errrors?</b>

Regards

Prabhu

Read only

0 Likes
1,076

Hi,

I think you did not got my question correctly.

See I have a program with BAPI_PO_CREATE1.

I am not handling the errors the return table.

If I excecute the program in forgroung no messages will come.

If I excecute the program in background all the error messages will be automatically written to Job Log but I dont want that. ie. it shound not log any messages in log in background.

You can see the difference in FG and BG!!

Can we suppress these messages in background??

Deepu.

Read only

Former Member
0 Likes
1,076

hi

Read only

Former Member
0 Likes
1,076

Hello -

I am currently facing the same issue. Is there any way you found to suppress the job log messages in background?

Read only

0 Likes
1,076

Hello,

I have the same problem but with the BAPI_PR_CREATE. The return table does not return any message errors but when executing in backgroud the error messages are displayed. Could you solve this problem?

Thank you very much and best regards.

Laiz S. Martins