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

Using SUBMIT and getting the results back

Former Member
0 Likes
446

Hi,

I need to call a BAPI on-line (not in the background) using a different User ID as the one that's logged in. I read from the threads the use of SUBMIT ...VIA JOB.

CALL FUNTION 'OPEN JOB'...

SUBMIT zsubmitted_program

VIA JOB l_jobname

NUMBER l_jobcount

USER i_user ====> changed User ID

TO SAP-SPOOL WITHOUT SPOOL DYNPRO

SPOOL PARAMETERS ls_params

AND RETURN.

CALL FUNTION 'JOB_CLOSE'...

Questions:

1. How would I know that the job is finished?

2. How do I retrieve the messages returned by the BAPI so I can present it on the screen?

Many thanks,

Huntr

2 REPLIES 2
Read only

nirajgadre
Active Contributor
0 Likes
401

Hi,

Which BAPI you are trying to run ?

Read only

Former Member
0 Likes
401

Hi,

I will be wrapping BAPI_MATERIAL_SAVEDATA into a Z program to run it and use the method mentioned above. I need to know by that method when the batch job is done and how to retrieve the results.

Is there a function module to retrieve the job status or log?

Also I think if i write the bapi results in the spool, I should be able to retrieve the spool. What is the function module to do so?

Regards,

Huntr