Application Development 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: 

How Can I execute BAPI in background

former_member226520
Participant
0 Kudos

Dear Friends,

I have a requirement , I have to execute BAPI in background but my requirment is something differnt , Let me

specify , I have created a BAPI in which I am passing the data from SAP to java and Vice versa,

so in that case my BAPI is taking a lot of time to execute , then for that if I am running BAPI in background using

report program my requirement is not full filled, Hope you have got me .

Please suggest

Regards,

Rihan

SAP-abaper    

3 REPLIES 3

former_member189779
Active Contributor
0 Kudos

Try using call function in background task.... in your report.

http://help.sap.com/saphelp_nw04/helpdata/en/8f/53b67ad30be445b0ccc968d69bc6ff/content.htm

Former Member
0 Kudos

Hi ,

After calling your Bapi in the report call thi bapi BAPI_TRANSACTION_COMMIT.

So by the wait status parameter will execute your program shortly and you can some values for this wait parameter.

If your Bapi fails then you should have to call the following bapi

BAPI_TRANSACTION_ROLLBACK.

That would Rollback your Bapi again. Changes Will not be done.

Hope will help.

Thanks,

Pradeep.

wa_ramaekers
Explorer
0 Kudos

Hi Rihan,

So far, you received good suggestions.

One more thing.

How do you pass your data? Should be 'pass by value' not 'pass by reference'.

Hope this will help.

Regards,

Wiel