cancel
Showing results for 
Search instead for 
Did you mean: 

RFC excuting twice

Former Member
0 Kudos

Hi,

I have one custom RFC, with few input ports,say, form1(say this is a normal structure),table1,table2

one of the input port is just a structure and other are tables

from all this input ports i dragged the forms and table view, when i do this i got submit links for all this table views and form. ..which is connect to RFC input ports.

now my secenario is to use only submit button once, by which the data from the form,table view must be saved with single click of submit button,

for this i have made one link as just submit(without *) and remaining submit links which are coming from different tables view to a input ports , i made the submit link as *submit.

it it working well and fine....when i click a submit (without *).

but the RFC is excuting twice.., means instead of saving data once ina a one single record, it is aving twice with two records, what could be the reason..

can any one help to solve up this issue

rgds

srinivas

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Srinivas,

This is so because, there are 2 submits which is happening: One with * and one without *.

To avoid multiple submits, you can keep submit in one of the form and connect all the other forms and tables with this input form. Then connect the input form with submit button to rfc doing the data mapping.The data from all the different forms would flow to RFC via the imput form on click of the submit button.

Regards

Nidhi

PS: Award points if helpful

Former Member
0 Kudos

can u explain clearly

Former Member
0 Kudos

Hi Srinu,

The RFC is executed twice because in background the submit is done twice. Once when the submit event is triggered when u click on submit button. Second time by the subsequent *submit event.

Lets say you have 2 table forms: Table1and Table 2 and 1 input form: Input Form A. One of the way to avoid that problem is: You keep the submit button in Input Form A and connect this input form to RFC. Connect the output port of Table 1 and Table 2 to Input port of Input form A. Do the data mapping of Input form A to RFC. You will find all the fields from the table forms and input forms available for data mapping. Now in this scenario, when you click submit, the event is triggered only once so the RFC would be executed only once. Please let me know if you need further help on this.

Regards

Nidhi

Former Member
0 Kudos

Hi Nidhi,

What you explained in this link is correct. But could you tell us how can we link the table data from the other two forms to the first form??

Thanks,

kavitha

Former Member
0 Kudos

Hi Kavitha,

Just Link the output port of the table form to the input port of the input form. You need not do any mapping in this stage. When you are mapping the input form( one connected to the 2 table forms) to rfc, you should be able to see the fields from the table form available for mapping.

Regards

Nidhi Malik