on 11-11-2010 11:23 PM
Helllo Everyone,
I need your help: How to set values (from RFC) in a DropDown type column of a table. Could anyone please advise with some sample code. (i.e. the table:is zTable; the datasource is ValueNode vNode; the dropdown column is zDP)
Thank you in advance, Jin
Hi,
1. Create a context node with the attributes required for a Table
2. Create a context attribute under the Node say "DDValue"
3. Write the following code to populate value to the DD
IWDAttributeInfo attrDD = wdContext().node<ContextNode>().getNodeInfo().getAttribute("DDValue");
ISimpleTypeModifiable simpDD = attrDD.getModifiableSimpleType();
IModifiableValueSet valueDD = simpDD.getSVServices().getModifiableSimpleValueSet();
valueDD.clear();
int RFCTableSize = wdContext().node<ZtableDDValues>().size();
for(int i = 0; i < RFCTableSize; i++)
{
I<ZtableDDValues>Element obj = wdContext().node<ZtableDDValues>().get<ZtableDDValues>ElementAt(i);
valueDD.put(obj.get<key>(), obj.get<value>());
}
Hope this helps you
Regards,
Poojith MV
Edited by: Poojith M V on Nov 12, 2010 6:00 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Jin,
Normal procedure is nothing but, bind the output node of the BAPI directly to the DropDownByIndex.
But i dont think DropDownByIndex will work on Tables. Because if we change in any one of the Elements then all the elements in the table will take the same value. So we need to use DropDownByKey only in Tables.
Revert for any queries.
Regards
Nizamudeen SM
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.