cancel
Showing results for 
Search instead for 
Did you mean: 

Setting view context elements into the input parameters

Former Member
0 Kudos

I have imported an RFC program in ABAP into the Models used in my project.

I am doing this referring to the tutorial on how to access ABAP functions in Web Dynpro (using the sample Flight BAPI). However the RFC im using is a different one

So in the example I see:

Bapi_Flight_Getlist_Input input = new Bapi_Flight_Getlist_Input();

wdContext.nodeBapi_Flight_Getlist_Input().bind(input);

input.setDestination_From(new Bapisfldst());

What exactly is <b>Bapifldst()?</b>

And in my example I have:

I have only <b>2 model classes</b> for Input and Output

the set methods of the input parameters are <b>expecting a variable of type short</b>. How do I put my values here from my Input fields.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Bapifldst() is a structure/table in the backend.

Whenever you import the model you will get 2 classes i., input and output but you do the context mapping to input class as it id <b>Executeble Model Class</b>.

And if you want to set the value to an input filed then you can do it in this way:

wdContext.current<NodeElement()>.set<Attribute>(<value>);

Regards,

Jhansi

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi ,

>>Bapi_Flight_Getlist_Input input = new Bapi_Flight_Getlist_Input();

>>wdContext.nodeBapi_Flight_Getlist_Input().bind(input);

>>input.setDestination_From(new Bapisfldst());

>>What exactly is Bapifldst()?

Do u mean setDestination_Form setter method is expecting a table as parameter ?

If you want to fill the bapi input parameters from the poratl screen then you need to have a context straucture will all input values binded to it . If the setter methods expect a short value - define all value attributes as short variables and fill the input fileds of the BAPI( Function module ) and call a execute method on it .

You will get all reponse values into the output structure of the bapi ( which includes all export and tables structure defined in R/3 function module )

Bapi_Flight_Getlist_Input input = new Bapi_Flight_Getlist_Input();

wdContext.nodeBapi_Flight_Getlist_Input().bind(input);

input.setDestination_From(new Bapisfldst());

input.execute();

Nanda