on 12-22-2006 8:41 AM
Hi all,
I have a problem with a drop-down list from the "Web Dynpro Native" tab with Web Dynpro for Java.
The problem:
I can't get the selected value from the drop-down list in my Web Dynpro project, only the first value appears.
The approach:
For a drop-down list from the Standard tablad you can use the tutorial:
https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/98af7acd-0401-0010-f697-bfa06971b65e
Because this isn't working for the Native drop-down I bound my values directly to my Context node.
See my last post in this toppic:
This is working fine and I can see my Context values in my drop-down.
But now when I select a value from that drop-down and press the submit button, just the first value from the
context node appears in my drop-down.
Another question related to this toppic:
How can I set a default value in a native drop-down? Set the default value in your webdynpro project like with a
standard dropdown does not work.
Does anyone has an idea?
Message was edited by:
B. van Prooijen
Hi ,
Please confirm my understanding .
If you are using a Value help to bind values to drop down box then you will get the index of your selection to the webdynpro project for each select event you trigger.
Please find the code snippet for reference
Get the index of the element selected -
================================
pCnt =Integer.parseInt(wdContext.nodeMaterialData().currentMaterialDataElement().getPlantCode());
Use Index to retrive the value from the bapi structure which used for pulling data from R/3 ( same data used to set as Value Help to the drop down list )
========================================================
Z_Bapi_Mat_List_Input matlist = new Z_Bapi_Mat_List_Input();
wdContext.nodeZ_Bapi_Mat_List_Input().bind(matlist);
Zbapi_Plant_Import plantimport = new Zbapi_Plant_Import();
wdContext.nodeI_Bapi_Plant_Import().bind(plantimport);
plantimport.setPlant(wdContext.nodeOutputPlant().nodeT_Bapi_Werks().getElementAt(pCnt).getAttributeAsText("Plant"));
Please try this if you are facing issue as same and let me know if you need any further information.
Regards,
Nanda
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nanda,
I have a value node in my web dynpro project (1..n).
I've bound this multiple value node to my drop-down as explained in my startpost.
Now when I choose a value from this drop-down and I press the "Submit" button in the IF, I don't retrieve this value in my project.
I've set the propertie "onSubmit" from the interactive form so that's what I mean with I expect to retrieve the choosen value.
I'm not calling a BAPI afterwards but I still need this choosen value.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.