Skip to Content

In this example, I will detail all the steps required to call a method of one ABAP WebDynpro application from within another ABAP WebDynpro application.

Part 1:

Step 1:  Create an ABAP WebDynpro component with a method to share with other WD apps.

ABAP DynPro Name: ZWD_CMP_SHARED_METHODS

/wp-content/uploads/2013/04/p_205621.jpg

Step 2:  Create a method (check as Interface) on the Component Controller.

/wp-content/uploads/2013/04/p_205621.jpg

/wp-content/uploads/2013/04/p_205621.jpg

This WD application is complete and looks something like this:

/wp-content/uploads/2013/04/p_205621.jpg

Step 3:  Create another ABAP WebDynpro component which we will use to call the method above.

ABAP DynPro Name: ZWD_CMP_CALL_SHARED_METHODS

/wp-content/uploads/2013/04/p_205621.jpg

On the Used Components tab, add an entry for your ZWD_CMP_SHARED_METHODS component

/wp-content/uploads/2013/04/p_205621.jpg

Step 4:  In the main view, create a Component Usage for both the Shared Component and the Shared Component’s Interface Controller.

/wp-content/uploads/2013/04/p_205621.jpg

Step 5:  In the main view, add the following code to the hook method: WDDOINIT.

/wp-content/uploads/2013/04/p_205621.jpg

That’s it!  It’s that simple.  In debug mode, you will see the call to the method in the component and the value “HELLO_WORLD” is returned.

/wp-content/uploads/2013/04/p_205621.jpg

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply