on 08-27-2009 6:05 AM
Hi Experts,
I have a 2 column(no,text)in a table in bapi like
01 - one
02 - two
03- three
.. ...
.. ...
in my Webdynpro Screen i have DropdownbyKey based on no i can display the text. for eg: If i select two it indicatiing no 2
for current selected value (wdContext.current<node>element.getno)
How to do that?
Regards,
Manivannan P
Hi,
Follow this procedure,
Create a parameter of type string to onSelect action, lets say "key"
Go to the outline view
select the drop down by key right click and select parameter mapping.
from the right side drag the "key" previously created to the left side "key"
access this parameter from code this will return you the selected key.
Ex your method signature will look as follows
public void onActionTest(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, java.lang.String key )
{
//@@begin onActionTt(ServerEvent)
wdComponentAPI.getMessageManager().reportSuccess(key);
//@@end
}
Regards,
Sunaina Reddy T
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
instead of the DropDownBykey you can use the DropBownByIndex UI element.
fthis element has the property "texts" just bind this with the attribute of the rfc.
Regards,
Ramesh Babu.v
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
instead of the DropDownBykey you can use the DropBownByIndex UI element.
fthis element has the property "texts" just bind this with the attribute of the rfc.
Regards,
Ramesh Babu.v
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
You can try the below code insie the method which is assigned to on Select property of drop down:
int noSelected = wdContext.nodeXYZ().getLeadSelection();//XYZ is the node name to which dropdown is mapped
String text = wdContext.nodeXYZ().getXYZElementAt(noSelected).getText();//Text the attribute of drop down
Thanks
Susmita
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
IWDAttributeInfo attributeInfo = wdContext.getNodeInfo().getAttribute(IPrivateMain.IContextElement.text);
ISimpleTypeModifiable textType = attributeInfo.getModifiableSimpleType();
// Set field label and populate valueset
textType.setFieldLabel("text");
IModifiableSimpleValueSet valueSet =
textType.getSVServices().getModifiableSimpleValueSet();
for (int i = 0; i < 40; i++){
valueSet.put("Key_"i,"text "i);
}
// initialize context value attribute 'text'
wdContext.currentContextElement().settext("Key_0");
refer the following link
http://help.sap.com/saphelp_nw04/helpdata/en/b3/f68e4ab25d7549888eb612bcb359f1/content.htm
and there was another thread posted in sdn for the similar question
Regards
Manohar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.