‎2006 Apr 17 11:17 PM
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.
‎2006 Apr 18 4:46 AM
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
‎2006 Apr 18 6:20 PM
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
‎2006 Apr 18 7:17 PM
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
‎2006 Apr 18 5:09 AM
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
‎2006 Apr 18 7:23 PM
Hi Bala,
Thanks for your suggestion. I will try it out.
Would you have a sample of using this technique?
Regards,
Debbie