on 02-25-2008 4:32 AM
hi
I have desinged a form using NWDS in that it consists of a UI element DROP DOWN BY KEY for this the values must get populated as soon as the user runs the application.
the values to be populated must come from a table which is present in the SAP R/3..
can anyone tell me the code how to do this
thanks in advance
Hey,
if you populate the values in input screen side then the varaible should have contain key-value pair of values then only u can bind to DDK.
if your variable coming with KEY-VALUE pair of values u can bind to your UI Element DDK in Input form.
If it is O/P
itterate the output node values and bind to ur DDK.
Thanks,
Lohi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
To Populate values into Dropdown by Key ........
IWDAttributeInfo attr = wdContext.getNodeInfo().getAttribute(<attributename>);
ISimpleTypeModifiable sim = attr.getModifiableSimpleType();
IModifiableSimpleValueSet vs = sim.getSVServices().getModifiableSimpleValueSet();
for(int i=0; i<wdContxt.node><outputnode>().sixe();i++)
{
String temp = wdContext.node<outputnode>().getElementAt(i).get<attribute>();
vs.put(temp,temp);
wdContext.currentContextElement().set<attribute>(<value>);
}
Thanks
Sunitha Hari.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sunitha,
I'm having the same scenario as what you have mentioned. I'm having some 25 names and 5 dropdowns. i'm populating 5 names in each dropdowns based on their user group respectively.
I'm getting all the 25 names in a single attribute and user group in the another attribute. i'm looping it out and binding it to the appropriate dropdown.
And its working fine.
Now i need to save the selected name from each dropdown along with their respective user group. The same way i need to pass all the 5 selected names to the single attribute along eith their user group. the same format with which i got the input.
Help me with detailed procedure.
Thanks & Regards,
Suresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
To access a table in R/3, you hav to create one RFC which can give you the contents of the table,
for that RFC you can create an Adaptive RFC Model in Webdynpro Project and access it in your application.
Refer to the link below
[https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/11c3b051-0401-0010-fe9a-9eabd9c216de|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/11c3b051-0401-0010-fe9a-9eabd9c216de]
Regards
Deepak
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hai,
try
{
IPrivateKv_bus.IKvnodeNode kvlevel=wdContext.nodeKvnode();
List lis=new ArrayList();
for(int i=0;i<4;i++)
{
if(i==0)
{
IPrivateKv_bus.IKvnodeElement el11 = kvlevel.createKvnodeElement();
el11.setKvlevel("Select kvlevel");
lis.add(el11);
}
if(i!=0)
{
IPrivateKv_bus.IKvnodeElement el11 = kvlevel.createKvnodeElement();
el11.setKvlevel("kvlevel"+i);
lis.add(el11);
}
}
kvlevel.bind(lis);
}
catch(Exception e)
{
}
I have hard coded the values here instead you run a for loop for the size of table in database and get the values and set in in el11.setkvlevel("your value").
Thanks n Regards
Sharanya.R
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.