cancel
Showing results for 
Search instead for 
Did you mean: 

Passing tables as parameter

Former Member
0 Kudos

Hi experts,

Can anyone explain me how to proceed further in detail for the following situation:

I am importing an RFC in SAP. That RFC exports a Table which is defined in 'tables' tab in sap.

In NWDS a class has been created for the table, rfc_input, and rfc_output.

Now I want to display all the records exist in the table on UI.

Thanks & Regards,

Khan

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

A proxy class will be generated with the structure name associated to your table in R3. Instantiate this class and pass the same to your RFC_input.. Lets say RFC_Input is your main proxy class and Tline is the proxy class for your table then the code might be as follows

RFC_Input  inputForRFC  = new RFC_Input ();

<loop through as per ur requirement>
Tline tlineTab = new Tline();
tlineTab.setTdline(commentsLine);
inputForRFC.addI_Tline(tlineTab);
<end loop>

wdContext.nodeRFC_Input().bind(inputForRFC);	
//execute your RFC

Former Member
0 Kudos

Hi Ali,

Your Bapi is returning output as table Parameter.

When import the model and bind it to the componet controller u will get this node under <bapi name>-output.

Make context mapping between view and componet controller,

In the layout of view right click on Root Ui container > Apply template>table->here bind the output table node.

When u execute the Bapi all the values will be displayed in the table.

Regards,

srikanth