on 05-20-2011 1:59 AM
How can I add values on a Drop Down by Index Webdynpro Element with a Model RFC?
..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thaks for your help, it helped me
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The code given by fellow SDNER (Sunitha) is applicable for Drop Down by Key , not for Drop Down by Index. It might even not work with that as well depending on when you are trying to popultae.
When do you want to populate the drop down..?
1. If you want to do it on the first screen, ie before model is executed. Use value nodes, create elements for the drop down and pass the value to the model while executing.
2. If it's after executing the model I will suggest to modify the RFC and include the additional values as adding the value from the WD JAVA side can lead to confusion. RFC when executed from backend giving different result from when executed from frontend.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jesus,
Please use the below code for DropDownByIndex Elements :-
Suppose you have model node ABC and attribute xyz. Now you have created custom node CustNode and attribute CustAtt.
ICustNodeElement ele = null;
if(wdContext.nodeABC().size > 0)
{
for(int i=0; i< CustNode< wdContext.nodeABC().size; i++
{
ele = wdContext. createCustNode();
ele.setCustAtt(wdContext.nodeABC().getABCElementAt(i).getXYZ)
wdContext.nodeCustNode.add(ele);
}
}
Refer to http://help.sap.com/saphelp_nw70/helpdata/en/3b/f1754276e4c153e10000000a1550b0/frameset.htm
Best Regards
Arun Jaiswal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
You can add values from a model node to dropdown by Index
check this code
IWDAttributeInfo attinfo = wdContext.node<>().getNodeInfo().getAttribute("XXX");
ISimpleTypeModifiable type = attinfo.getModifiableSimpleType();
IModifiableSimpleValueSet valuset =type.getSVServices().getModifiableSimpleValueSet();
for(int i = 0 ;i<wdContext.node<> .size();i++)
{
wdContext.node<>().setLeadSelection(i);
valuset.put(wdContext.current<>().get<code>(),wdContext.current<>().get<desc>());
}
Regards,
Sunitha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.