on 09-21-2005 6:09 PM
Dear all,
I'm creating a simple webdynpro project. I have four import parameters in the rfc which will act as search criterion in the search view. Now at the step of writing code in the Implementation tab of the controler. In the method <b>public void wdDoInit()</b>, How will i create element fo these parameters??
for example in the demo example for the flightlist for the input parameter destination_from it is give:-
Bapi_Flight_Getlist_Input input = new Bapi_Flight_Getlist_Input();
wdContext.nodeBapi_Flight_Getlist_Input().bind(input);
Bapisfldst bapisfldstFrom = new Bapisfldst();
input.setDestination_From(bapisfldstFrom);
<b>how wud i do same for my input parameter docdate_from??</b>
please suggest.
Thanks,
Anup.
Hi Anup,
If docdate_from is your model attribute direclty under your root model node then, no need to initialize for this.
Bapi_Flight_Getlist_Input input = new Bapi_Flight_Getlist_Input();
wdContext.nodeBapi_Flight_Getlist_Input().bind(input);
Bapisfldst bapisfldstFrom = new Bapisfldst();
input.setDestination_From(bapisfldstFrom);
In above code, first two lines are for initializing yoor main model node. And, second two lines are for child model node under your root model node.
If your input parameters are inside such child nodes, then only your need third and forth line.
But, if you want to set some default value for your attribute, then you can use set method as given below.
input.setDestination_From(<default value>);
Regards,
Bhavik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anup,
The following statement will intialize all your input elements
Bapi_Flight_Getlist_Input input = new Bapi_Flight_Getlist_Input();
You can trype input.seXXX() to set the default values for your input attributes.
Regards, Anilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
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.