Quantcast
Channel: Web Dynpro ABAP
Viewing all articles
Browse latest Browse all 141

Call the other component from ur component

$
0
0

Create one webdynpro component in se80 like below screen shot

 

1w.PNG

then create one button in your view controller layout->for that button create one custom action.

then click on that action write the following code.

 

9.PNG

DATA LO_WINDOW_MANAGER TYPE REF TO IF_WD_WINDOW_MANAGER.

DATA LO_API_COMPONENT  TYPE REF TO IF_WD_COMPONENT.

DATA LO_WINDOW         TYPE REF TO IF_WD_WINDOW.

data lv_str type string .

 

 

LO_API_COMPONENT  = WD_COMP_CONTROLLER->WD_GET_API( ).

LO_WINDOW_MANAGER = LO_API_COMPONENT->GET_WINDOW_MANAGER( ).

 

CALL METHOD CL_WD_UTILITIES=>CONSTRUCT_WD_URL

   EXPORTING

     APPLICATION_NAME              = 'ZWD_TRAINING_FEEDBACK'

   IMPORTING

     OUT_ABSOLUTE_URL              = lv_str.

 

In the above screen shot mention your webdynpro component name and defined variable name to hold the component url.

4.PNG

CALL METHOD LO_WINDOW_MANAGER->CREATE_EXTERNAL_WINDOW

     EXPORTING

       URL            = lv_str

       MODAL          = ABAP_true

       HAS_MENUBAR    = ABAP_TRUE

       IS_RESIZABLE   = ABAP_TRUE

       HAS_SCROLLBARS = ABAP_TRUE

       HAS_STATUSBAR  = ABAP_TRUE

       HAS_TOOLBAR    = ABAP_TRUE

       HAS_LOCATION   = ABAP_TRUE

     RECEIVING

       WINDOW         = LO_WINDOW

       .

 

LO_WINDOW->OPEN( ).

 

In the above screen shot call external popup window and also pass the  component url.

then right on your webdynpro component->webdynpro application.

save, active and test your application it will call the other component.


Viewing all articles
Browse latest Browse all 141

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>