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: 

Call transaction from RFC?

ashish_shah
Contributor
0 Kudos
229

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

7 REPLIES 7

Former Member
0 Kudos
102

u can do BDC within Call transaction..... but use it with options..... and without commit....

0 Kudos
102

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

0 Kudos
102

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

0 Kudos
102

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.

former_member194669
Active Contributor
0 Kudos
102

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.

0 Kudos
102

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

0 Kudos
102

Any suggestion guys?