Skip to Content
author's profile photo
Former Member

wda: call method from a component interface definition (cid)


I created the following scenario:

- I have a Main-component "m"

- "L" is a component interface definition (cid) which force both cid-L-implementating components "L1" and "L2" to extend and fill the method "set_COMP_USAGES()".

- I have other cid´s (A-C) too

- at runtime only one of the components "L1" or "L2" is created and the mother-component M holds component-usages (ref to) of the chosen variants of A-C and L as an attribute in the component-controller of m.

now my problem: my aim is to call a method in m at runtime which is defined at designtime in my cid L (set_COMP_USAGES() )and decided at runtime which variant of this method is chosen (the one from L1 or L2). in this method the references of comp_usages other cid´s should be passed to L1 or L2.

or short: how can I call a method from a cid-implementating component at runtime via a IF_WD_COMPONENT_USAGE reference (ref to) to this component?

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • author's profile photo
    Former Member
    Posted on Aug 23, 2007 at 07:59 AM

    I got the solution:

     data: L_INTF_CONTROLLER         type ref to ZIWCI_Z_ITF_CID_L.
      CALL METHOD l_intf_controller->set_comp_usages
          comp_usage_a = wd_this->COMPONENT_USAGE_a
          comp_usage_b = wd_this->COMPONENT_USAGE_b
          comp_usage_c = wd_this->COMPONENT_USAGE_c.

    Add comment
    10|10000 characters needed characters exceeded