on 12-18-2008 1:52 PM
Hi experts,
I have DropdownbyIndex in my webdynpro screen. The values are coming from (BAPI.Using Jco connection)
In BAPI values are displayed in the BAPI side the following ways
1.ABAP
2.XI
3.EP
4.BI
in My webdynpro dropdown values are displayed in the same order. Is there any possiblity to change the order?If yes How to change the order of the values(without chaging from BAPI side) and how to display the different order in the dropdown?
Regards,
P.Manivannan.
Hi,
Create a simple type . n give values n coressponding text in ur desired order.
now create a value node in context of vew . map the value prperty wid this simpletype,whch u hv created.
hpe it will solve ur problm.
Regards
Khushboo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Khushboo,
Thanks for your reply. I have different portal user like ABAP,XI,EP,BI
If ABAP user login into the portal my dropdown value shown in the below order . the first value of the dropdown is "ABAP"
1.ABAP
2.XI
3.EP
4.BI
similiarly if XI user logged in portal dropdown should be (the first value of the dropdown is "XI"
)
1.XI
2..ABAP
3.EP
4.BI
similiarly if EP user logged in portal dropdown should be (the first value of the dropdown is "EP"
)
1.EP
2.XI
3.ABAP
4.BI
similiarly if BI user logged in portal dropdown should be (the first value of the dropdown is "BI"
)
1.BI
2.XI
3.EP
4.ABAP
Regards,
P.Manivannan.
Hi.
it just tht u want to set default value accoding to user role.
like if user's role is abaper thn first value in dropdown will b ABAP..
If i'm getting u right.
then first get role of user in Wdinit()
for role fetahing u cn go through :
[role|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/80ef07f8-3e6c-2b10-9cb7-81d4ef2e294a]
then hold this role in varible n apply a condition like
If (var.equalsIgnoreCase("
{
wdcontext.current<Valuenodeforsimpletype>.set
}
likewise u cn apply conditions for each n every role.
hope it'll hlp u
Regards
Khushboo
hi Khushboo,
As per the P.Manivannan. written in above note
he has 4 differenet user. whenever the user (optional) we have to get the current user and we can change the dropdown list accroding to it
/message/553298#553298 [original link is broken]
we can store in list..later we can assign the list to dropdown index
let me know u need any further info
bvr
Hi all,
If i use this code
If (var.equalsIgnoreCase("<abaprole>)
{
wdcontext.current<Valuenodeforsimpletype>.set<attribute>("ABAP");
}
the corresponding value is coming in the top of the dropdown list. But my scenario was the
"Dropdown values coming from BAPI"
If i use above code additionally one value is added in my dropdown
For eg: If i choose EP following order will come
1.EP
2.XI
3.ABAP
4.BI
5.EP
EP displayed twice? any other suggestions
Regards,
P.Manivannan.
Hi manivannan,
1. Loop trough the node using the node.size() method.
2. Read the element from the node using get.....ElementAt(i)
3. Check if it is the element you are looking for then use:
4. Deselect any element that might be selected: node.setLeadSelection(IWDNode.NO_SELECTION)
5. Select the element you found: node.setSelected(index, true);
That's it.
Jeschael
Hi,
As u said EP is displayed twice ..thn I wud like to tell u that first EP is ur defult selected value in drop down.
2nd EP is drop down value..u dnt hav to wrry bout it..
If u select any value frm dropdown, it doesnt mean tht it'll be removed from dropdown.
this is d scenerio..
hope it solves ur problm..
Regards
Khushboo
hi,
create a context node and attribute of type String .
copy the model data from the model node to a collection(for eg List) and sort it in what ever order you want.
use the below code to populate the node .
wdContext.node<ValueNode>.bind(<Collection>);
bind the attribute to the text property of drop down by index.
Thanks and Regards
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.