cancel
Showing results for 
Search instead for 
Did you mean: 

Calling an interface METHOD of another abap web dynpro application

mahesh_jagnani
Participant
0 Kudos

Hi Experts,

Can u plz tell how we can Call an interface METHOD of another abap web dynpro application in main WD Component.

Thanks

Mahesh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi ,,

Example ALV interface method calling GET_MODEL interface method

View attribute declaration : M_WD_ALV type IWCI_SALV_WD_TABLE

DATA lo_INTERFACECONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE .

wd_this->M_WD_ALV = wd_this->wd_cpifc_alv( ). "ALV is the usage name

DATA lv_value TYPE ref to cl_salv_wd_config_table.

lv_value = wd_this->M_WD_ALV->get_model( ). " interface method calling in ALV component usage.....

Regards,

Devi

mahesh_jagnani
Participant
0 Kudos

Hi ,,

Here both the WD are custom one.So what type "IWCI_SALV_WD_TABLE" we should opt for.

Regards,

Mahesh

Former Member
0 Kudos

I would suggest to get some knowledge about webdynpro used components concept.

see [http://help.sap.com/saphelp_nw70ehp1/helpdata/en/b9/b82c4142aef623e10000000a155106/content.htm|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/b9/b82c4142aef623e10000000a155106/content.htm]

in the main component , create a usage for your custom component.

Use this usage as required controller of your component controller or view controller.

use the webdynpro code generator to generate the code for

a) creating instance for the used component

b)calling the interface controller of the used component.

ashish_shah
Contributor
0 Kudos

Hi,

As Bhaskaran suggested , understand the concept and then implement it.

Follow these steps.

1) Declare the usage of Component B in Component A, by doble clicking on component name and on tab used Components.

2) In the controller where you need to call Component B method , Declare the usage of this used component in Properties tab.

3) Using the code wizard --> Method Call in Used Controller option --> Specify the details

Component Name

Component Use

Controller Name

Method Name

And you will get the needed code and the data declaration.

Ashish

Answers (1)

Answers (1)

former_member463524
Contributor
0 Kudos

Hi Mahesh,

component 1 - where the interfaced method need to be called

component 2 - where the interface method defined

1. Declare the component 2 as used used component in the component 1.

click on the component header(component name), in used component tab declare the component using create button

2. Define usage in the comp controller or view whether u need to call the method

click on comp controller, properties tab, click on create button then select the corresponding component

3. Then call the methods using the code wizard.

Regards,

Meera