2008 Jun 24 8:21 AM
Hi Experts,
I need to call Different transactions from a RFC.
I am looking for different approaches to achieve this.
One Idea is RFC will take input parameters as
-Transaction name
-Field names to be updated with its values (as a table)
Now in RFC, it should be able to update this transactionu2019s fields with the values provided in table parameter.
RFC will fill up the BDC table with the needed data, and will call the needed transaction to update the data.
Once the execution is complete, RFC will send back the different messages (error, info, and warning) through Table parameter.
Now, I do not have much of ABAP experience so I need your help in following
1) Should I use BDC recording in RFC?
2) Can BDC send back all the messages encountered while calling the transaction?
3) Is there any other way to approach this requirement?
Thank you in advance.
Regards,
Ashish Shah
2008 Jun 24 8:32 AM
u can do BDC within Call transaction..... but use it with options..... and without commit....
2008 Jun 24 10:39 AM
Hi Amitava,
This RFC might be called from any WebBased application , like Portal , Visual Composer or WebDynpro for Java.
One more idea , may be an extension to my current idea is:
To add one more input parameter to RFC, a table with single field of type string.
Populate this table with entire BDC recording for one particular transaction, and pass it as an input parameter of RFC.
Once in RFC , this BDC recording can be used to populate BDC table and then pass this table to call transaction statement.
Do you see any sense in this logic?
Regards,
Ashish Shah
2008 Jun 24 2:54 PM
Hi Amitava,
u can do BDC within Call transaction..... but use it with options..... and without commit....
can you give me an example of how to use Options?
Ashish
2008 Jun 24 2:58 PM
DATA l_opt TYPE ctu_params.
l_opt-dismode = 'N'.
l_opt-racommit = 'X'.
l_opt-updmode = 'S'.
-
CALL TRANSACTION 'PA30' USING i_bdc
OPTIONS FROM l_opt MESSAGES INTO i_msg.
2008 Jun 24 3:05 PM
My suggestion is better to find relevant BAPI's and use that in the RFC. BDC's will not work in Web DynPro's and also EnjoySAP transactions BDC will not work within RFC.
a®
2008 Jun 25 7:26 AM
Hi a@s,
Thanks for the suggestion,
but for these transactions BAPI does not exist.
So if BAPI does not exist and i should not use BDC as well, what is the other option?
Can you please suggest.
Regards,
Ashish
2008 Jun 26 3:23 PM