on 07-27-2007 11:10 AM
Hi Everybody
I have a Z bapi that returns a table wit a single field. I want the contents of this single field to be displayed in Dropdown by key. Please don t ask me to create a node as I think that thats not required. Everything is properly mapped and mapping creates the nodes. Please tell me the code that I must write in doInit of my view to get values in the dropdown.
Thanx in advance
Saptarshi
Hi
Just chk the following code.......
Bapi_Flight_Getlist_Input bapiinput = new Bapi_Flight_Getlist_Input();
wdContext.nodeBapi_Flight_Getlist_Input().bind(bapiinput);
wdContext.nodeAirlineValue().addElement(wdContext.nodeAirlineValue().createElement());
wdContext.currentBapi_Flight_Getlist_InputElement().modelObject().execute();
wdContext.nodeOutput().invalidate();
int size = wdContext.nodeFlight_List().size();
IWDMessageManager msg = wdComponentAPI.getMessageManager();
//String compAirlineid = "AA";
IPrivateTestComponentView.IAirlineValueElement airlineelem = wdContext.createAirlineValueElement();
List retval = new ArrayList();
final IModifiableSimpleValueSet ValueSet =
wdThis
.wdGetTestComponentController()
.wdGetContext()
.getNodeInfo()
.getChild("AirlineValue")
.getAttribute("AirlineID")
.getModifiableSimpleType()
.getSVServices()
.getModifiableSimpleValueSet();
for (int indx=0;indx < size ; indx++)
{
ValueSet.put(wdContext.nodeFlight_List().getElementAt(indx).getAttributeValue("Airlineid"),"Airlineid" + indx);
}
wdContext.nodeAirlineValue().addElement(airlineelem);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
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.