on 03-17-2008 12:30 PM
I to take the results from a function module and put them in a drop down (piece of cake type coding from my .Net/C# days). Is there a tutorial, blog, or sample code from you that shows me how to build a drop down by key from data returned from a function module (it's a key/value pairing of key -course code and value-course description)? The sample code I has does things hardcoded.
Regards,
Diane
Hi
Check this [tutorial |https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/user-interface-technology/webdynpro/wd%20java/wdjava%20archive/value%20help%20in%20web%20dynpro%20applications.pdf]
In page 16 you can see the sample code
If you are getting the data from RFC, you can just bind the model attribute which has the descriptions to texts property of DDByIndex.
If the data is in R/3 and the field in R/3 has check table, you can just bind the model attribute to DDByKey
regards,
Siva
Edited by: Siva Rama Krushna on Mar 17, 2008 6:19 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Diane,
You can use DDbyIndex. Bind Stext to texts property of DDbyIndex.
You can get the key of the selected value like this:
//get the leadselection of the node
int i = wdContext.nodeEventtype_List_Output().getLeadSelection();
// get the corresponding key of the selected element
wdContext.nodeEventtype_List_Output().getEventtype_List_OutputElementAt(i).getObjid ()
regards,
Siva
How does the output structure of the FM looks like? Why do you want to use DDByKey?
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.