cancel
Showing results for 
Search instead for 
Did you mean: 

Attaching table values to a dropdown

Former Member
0 Kudos

Hi All,

I have successfully created a dropdown field for static values. Values are being assigned to the dropdown field by creating a simple type and assigning the values in the Enumeration tab.

But how do I create dropdown for dynamic values that come from R/3. RFC returns the list of values in a table. Now how do I attach the table values to the dropdown field.

Thanks,

Tom

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

What do you mean with "table"? If you have the values as elements of a context node, you can use a DropDownByIndex element.

Armin

Former Member
0 Kudos

Armin,

RFC is called when the page is first loaded....RFC returns a table that has a list of values......these list of values need to be attached to the dropdown field.....for example....list of countries are returned by an RFC in the form of a table when the page is first loaded....and these values need to be assigned to a dropdown field...how do I accomplish this ??

Thanks,

Tom

suresh_krishnamoorthy
Active Contributor
0 Kudos

Hi TOM,

See this thread:

Regards, Suresh KB

abhijeet_mukkawar
Active Contributor
0 Kudos

hi,

take a look at this code

IPublicGetList.IIt_Team_Lst3Node team_node = wdContext.nodeIt_Team_Lst3(); // this node holds the data from backend

team_node.moveFirst();

int size = team_node.size();

for (int i = 0; i < size ; i++)

{

IPublicGetList.ICtx_vn_teamsNode teams = wdContext.nodeCtx_vn_teams(); .//this is the context node in which you will

// populate the backend data and one of its attribute is mapped

//with dropdownbyindex ui element , so that ui element will show all

//populated values.

teams.moveFirst();

exists = false;

IPublicGetList.ICtx_vn_teamsElement iteamtab_element = wdContext.nodeCtx_vn_teams().createCtx_vn_teamsElement();

iteamtab_element.setCtx_va_team_desc(team_node.currentIt_Team_Lst3Element().getTeam_Desc());

iteamtab_element.setCtx_va_team_id(team_node.currentIt_Team_Lst3Element().getTeam_Id());

wdContext.nodeCtx_vn_teams().addElement(iteamtab_element);

team_node.moveNext();

}

create on dropdownbyindex UI element in layout and set its property to one of the value attribute of context value node Ctx_vn_teams(it has two value attrib "id" and its "desc.")

hope it helps

regards,