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

Asynchronous BAPI Call to Custom Transaction

Former Member
0 Likes
914

Hi,

Would anyone know if it is possible to create an async BAPI to run a custom transaaction? I would like to be able to start up a custom report by submitting into a batch queue after receiving a request. This would be a generic BAPI where I can request for any custom report as long as the correct parameters are passed.

5 REPLIES 5
Read only

Former Member
0 Likes
770

Debbie,

If you are planning to call this BAPI (a Reports is embedded ) remotely, it will NOT be possible, as you cannot have write statements inside a remote RFC.

Can you explain in detail, what are you trying to do?

Regards,

Ravi

Note : Please mark the helpful answers

Read only

0 Likes
770

Hi Ravi,

This would be a custom BAPI which then calls a custom report. I would like to be able to create a custom generic BAPI to pass the custom transaction code and relevant parameters. Within the BAPI, I would do a call transaction to the custom report. Would this be feasible?

Regards,

Debbie

Read only

0 Likes
770

HI CHan,

Your approach is almost correct except for the change that a report cannot be called using a call transaction.Instead you have to "submit" the report.

Use the submit report statement to do the same.

Regards,

Ravi

Read only

0 Likes
770

Debbie,

1.) Define the function module as RFC (Attribute->Remote Enabled")

2.) Use the following syntax

CALL FUNCTION <Fn Name>

IN BACKGROUND TASK

AS SEPARATE UNIT

Importing.......

Exporting.......

3.) This is multi-threading and inside the Function Module you can SUBMIT a report which will have the WRITE STATEMENTs or COMMITs.

I used this technique for various User Exits & Spl Functions in NACT.

Thanks,

Bala

Read only

0 Likes
770

Hi Bala,

Thanks for your suggestion. I will try it out.

Would you have a sample of using this technique?

Regards,

Debbie