Skip to Content
author's profile photo Former Member
Former Member

What exactly happens in controller???

Hi ,

I am new to web I am developing the Webdynpro application for the Creating the POC(Purchase order creation).So before that I was going trogh the example "Accessing ABAP Functions in Web Dynpro (4)" in didn/t understood the following code in the controller Like why is he creating an input node.And Kindly even mention what are the methods to be implemented for the transaction application for eg.Purchase Order creation.

public void wdDoInit()


//@@begin wdDoInit()

// Create a new element in the Bapi_Flight_Getlist_Input node

Bapi_Flight_Getlist_Input input = new Bapi_Flight_Getlist_Input();


// Create new elements in the Destination_From and Destination_To nodes

input.setDestination_From(new Bapisfldst());

input.setDestination_To(new Bapisfldst());



public void executeBapi_Flight_Getlist_Input( ) {

//@@begin executeBapi_Getlist_Input()



// Calls remote function module BAPI_FLIGHT_GETLIST


// Synchronise the data in the context with the data in the model



catch (Exception ex)


// If an exception is thrown, then the stack trace will be printed







Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Aug 02, 2006 at 03:05 PM

    Hi Kumar,

    First of all, welcome to the magic world of WebDynpro 😉

    Second, i'm gonna to explain you thoses lines.

    <i>Bapi_Flight_Getlist_Input input = new Bapi_Flight_Getlist_Input();


    You have to understand the difference between an adding element and the binding element. Adding process, as the name said, it used for adding a new element in the node. The binding process, is used to replace the existing elements to the elements you want to bind. Thus, in the above two lines, we set an element to the bapi's node (this is usefull if you don't know what there is inside the node, it is a kind of eraseall function). We have to do that, because unfortunatly, webdynpro can initialize itself.

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

    input.setDestination_To(new Bapisfldst());</i>

    Ok, now you have to initialize the inputs. Keep in mind the "input" is an instance of the current element of the bapi's node (because you had bind it above).

    Add a comment
    10|10000 characters needed characters exceeded

    • Hello,

      I'm not sure to get your request, but nevermind...

      To make a transaction, you have to create a node to your "context". This node is binded to the model.

      Example :

      in your MODEL :







      in your CONTEXT :







      the names are not neceserly the same between the model and the context but <b>it has to be bind to each other</b>.

      The result is stored in the return node or whatever the name you have choosen.

      To conclude, you have to create a node to put en retreiuve data from your BAPI.


      ps : hope I answer to your question ?!

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.