on 11-06-2007 7:04 AM
Hi All,
I have a code requirement where in i need to populate a drop down from a R/3 table.The drop down values are based on value in an input field,i.e based on the value entered in the input field accordingly the drop down should fill in by fetching data brom R/3.
Any Pointers??
Regards
Radhika Kuthiala
Hi Radhika,
1. Get the value of the input field using :
String str = wdContext.currentContextElement().get<attribute name>();
Here <attribute name> is the value attribute binded to your input field.
2. Pass this value to your BAPI's input parameter
<input model node> input = new <input model node>();
wdContext.node<input model node>().bind(input);
input.set<input parameter>(str);
wdContext.node<input model node>().current<input model node>Element().modelObject().execute();
This will return you the output in the output node.
Invalidate the output node to get the updated value and then read its value
wdContext.node<output node>().invalidate();
wdContext.current<output node>Element().get<attribute name>();
If there are multiple values returned by output node you can bind your output node to table to display them all.
Warm Regards,
Murtuza
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Murtuza,
This is perfectly fine but what i require is that as soon as the user enters the input field value ,value should goto backend and the drop down should fill in....
The problem is that after entering the value in input field if the user clicks on drop down values accordingly should be present in drop down fetched from backend......So as such no event is being fired.where do mention the coding as in which hook method...??
Regards
Radhika
Message was edited by:
Radhika Kuthiala
Hi
Write the coding inthe event 'onSelect' of the dropdownbykey.
Regards
Smitha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Ya you are right but what if the user does not hit enter...There is a new API added in NETweaver 7.1 release WDDoBefore Action...Any pointes regarding the action associated with it....
Regards
Radhika Kuthiala
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
<b>WDDoBeforeAction</b>
Before an action is triggered, you can perform your own validations using this method. The method can only be used for view controllers. It is used for all visible views of the component assigned to the current phase model instance. These include all embedded components.
But, will this make sense for you because you need the action to be fired while you move to dropdown from your input and I think there is no event fired while doing so.
Regards,
Murtuza
Hi Murtuza,
Thsi is what iam thinking that i can get the value of input field attribute and send it to backend ,and fill the drop down accordingly in this action.So that before any action takes place the input field value is checked and drop down filled...
It should work ??
Regards
Radhika Kuthiala
User | Count |
---|---|
93 | |
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.