cancel
Showing results for 
Search instead for 
Did you mean: 

Problems writing to backend table vis aRFC call

Former Member
0 Kudos

Hello All,

I am trying to write the values in my table to the backend via aRFC call. Problem is, I am only able to transfer values that are outside the tables eg: UserID, Name, Address ... etc . Information in the table for some reason, is not able to be written to the backend.

The table on my screen consists of 9 columns and 5 rows :

1) Departure Date (inputfield)

2) Departure Time (inputfield)

3) Arrival Date (inputfield)

4) Arrival Time (inputfield)

5) From City (inputfield)

6) To City (inputfield)

7) Carrier (dropdown by key)

😎 Flight Number (inputfield)

9) TravelClass (dropdown by key)

I am able to see the contents prior to executing the BAPI call by using this syntax (for verification purpose, I am only printing out the departure time):

"for (int i =0; i<wdContext.nodeTrans().size();i++)

{

Date printBegdat = wdContext.nodeZ_Xbtr_Create_Trip_Input().nodeTrans().getTransElementAt(i).getBegdat();

wdComponentAPI.getMessageManager().reportSuccess("The is the written printBegdat : " + printBegdat);

}"

Can someone advise where I may have gone wrong ? Thnak you.

from

Kwok Wei

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Please let us know the complete Model structure once.

Regards, Anilkumar

Answers (2)

Answers (2)

Former Member
0 Kudos

hello Kwok,

I think u have to add code like:

ZTable tab = new ZTable();

tab.set<val>("Name");

<loop>

input.add<Ztable>(tab);

</loop>

execute RFC.

regards,

Piyush.

Former Member
0 Kudos

Hi Kwok,

Are you trying to populate the data to a table in the backend?

If so please go through the following article.

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/li... rfc to web dynpro.pdf

If that is not the case check out whether you are setting the values from the table correctly as the input to the RFC.

Hope this helps you.

Regards,

Vijith

Former Member
0 Kudos

Hello Vijith ,

That document is indeed very informative. Thank you very much. The problem was solved by Anilkumar but the link that you provided is really great (to a certain extend , it did contribute to the solution too). Thank you.

from

Kwok Wei