on 04-12-2007 10:53 PM
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
What do you mean with "table"? If you have the values as elements of a context node, you can use a DropDownByIndex element.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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,
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.