on 07-21-2005 7:39 AM
Hi All,
As i am new to this Webdynpro and SAP,I want to know how should I populate the value in Dropdown list box by Accesing Bapi Functions.I want to show all of my available networks (BAPI_NETWORK_GETLIST) in Dropdown list.Is there any document for that,Could anyone plz suggest me some pdfs.
Thankx in Advance.
Shakthi
Hi Shakthi,
If u want to populate values using a DropDownByKey UI Element this code will help you.
IWDAttributeInfo ainfo = wdContext.node<<NodeName>>().getNodeInfo().getAttribute("<<Value Attribute that is bound to the Drop Down by Key element>>");
ISimpleTypeModifiable st = aiinfo.getModifiableSimpleType();
IModifiableSimpleValueSet vs = st.getSVServices().getModifiableSimpleValueSet();
for(int i=0;i<wdContext.node<<name of the node>>().size();i++)
{
vs.put(Key,Value}
}
Also go through the following link to know more about Drop Down by key element.
http://help.sap.com/saphelp_nw04/helpdata/en/08/13dbfb6e779743bb2ca641ebcb3411/frameset.htm
Check this for a sample application using Drop Down by key UI element.
http://help.sap.com/saphelp_nw04/helpdata/en/c6/a5d4a523bf4b4c9085a114e46c6ed3/frameset.htm
Also check out the following discussion in forum :
Hope this helps.
Regards,
Vijith
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shakthi,
If you execute the BAPI with only these three ilnes(i.e without giving any input data),all the avaialble networks will be returned.
If you want to specify some input parameters like max_rows or any table, you can do so by setting it using input.set....().
Execute the BAPI by writing the following three lines :
1) Bapi_Network_Getlist_Input input = new Bapi_Network_Getlist_Input();
************
You can specify the input parameters here eg: max_rows
input.setMax_Rows(10);
*************
2) wdContext.nodeBapi_Network_Getlist_Input().bind(input);
3) wdContext.currentBapi_Network_Getlist_InputElement().modelObject().execute();
Hope this helps,
Regards,
Nibu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vijith Kumar,
Thanks for your timely help.The problem is almost solved I think.If I have any Doubt moreover I'll get in touch.
Thankx again.Thanks for all.
With Luv,
Shakthi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Sorry, I do not have any documents to refer for you. But to implement the said functionality, create a Dropdown by index UI element, map the "texts" property to the BAPI's return node's attribute (Bapi_Network_Getlist_Input.Output.Network_List.Network). When the BAPI is executed, the dropdown will be automatically populated. Hope this helps
1) Create a model out of Bapi_Network_Getlist.
2) Map the Bapi_Network_Getlist_Input node across the model,controller & the view.
3) Create a dropdown by index UI element & map it's "texts" property to Bapi_Network_Getlist_Input.Output.Network_List.Network or Bapi_Network_Getlist_Input.Output.Network_List.Short_Texts whichever you want.
4) Execute the BAPI by writing the following three lines :
Bapi_Network_Getlist_Input input = new Bapi_Network_Getlist_Input();
wdContext.nodeBapi_Network_Getlist_Input().bind(input);
wdContext.currentBapi_Network_Getlist_InputElement().modelObject().execute();
The dropdown will be populated with the result.
Regards,
Nibu
Message was edited by: Nibu Wilson
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
get a drop down by index UI and map the node of the BAPI (which has the data to be populated)to the "texts" property of the drop down UI. that should do. hope it helps.
regards,
shyam.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
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.