<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic object created dynamically. how to call a method or interface from it in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/object-created-dynamically-how-to-call-a-method-or-interface-from-it/m-p/7855783#M1592446</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've just created an abap proxy dynamically&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   FIELD-SYMBOLS &amp;lt;ref&amp;gt; TYPE any.&lt;/P&gt;&lt;P&gt;    CREATE DATA dref TYPE REF TO&lt;/P&gt;&lt;P&gt;               (ld_class).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ASSIGN dref-&amp;gt;* TO &amp;lt;ref&amp;gt;.&lt;/P&gt;&lt;P&gt;    CREATE OBJECT &amp;lt;ref&amp;gt;&lt;/P&gt;&lt;P&gt;      TYPE&lt;/P&gt;&lt;P&gt;        (ld_class)&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        logical_port_name =logicalport.&lt;/P&gt;&lt;P&gt;This runs OK&lt;/P&gt;&lt;P&gt;But I  can't call an Interface of the object proxy that belongs to ld_class &lt;/P&gt;&lt;P&gt;  ld_prot ?=   &amp;lt;ref&amp;gt;-&amp;gt;if_proxy_basis~get_protocol( if_wsprotocol=&amp;gt;sequence ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;because the object &amp;lt;ref&amp;gt; is type any, it doesen't runs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This work' s fine&lt;/P&gt;&lt;P&gt;    MOVE  &amp;lt;ref&amp;gt; ?TO proxy1.&lt;/P&gt;&lt;P&gt;    ld_prot ?= proxy-&amp;gt;if_proxy_basis~get_protocol( if_wsprotocol=&amp;gt;sequence )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if proxy is explicity declarated like class proxy&lt;/P&gt;&lt;P&gt;But I don't want do it. I want do it dynamically to avoid write data declaration explicity&lt;/P&gt;&lt;P&gt;I think this is a problem for every data that must be declarated by the form TYPE REF TO&lt;/P&gt;&lt;P&gt;What must I do ?&lt;/P&gt;&lt;P&gt;thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 May 2011 13:27:45 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-05-25T13:27:45Z</dc:date>
    <item>
      <title>object created dynamically. how to call a method or interface from it</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/object-created-dynamically-how-to-call-a-method-or-interface-from-it/m-p/7855783#M1592446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've just created an abap proxy dynamically&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   FIELD-SYMBOLS &amp;lt;ref&amp;gt; TYPE any.&lt;/P&gt;&lt;P&gt;    CREATE DATA dref TYPE REF TO&lt;/P&gt;&lt;P&gt;               (ld_class).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ASSIGN dref-&amp;gt;* TO &amp;lt;ref&amp;gt;.&lt;/P&gt;&lt;P&gt;    CREATE OBJECT &amp;lt;ref&amp;gt;&lt;/P&gt;&lt;P&gt;      TYPE&lt;/P&gt;&lt;P&gt;        (ld_class)&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        logical_port_name =logicalport.&lt;/P&gt;&lt;P&gt;This runs OK&lt;/P&gt;&lt;P&gt;But I  can't call an Interface of the object proxy that belongs to ld_class &lt;/P&gt;&lt;P&gt;  ld_prot ?=   &amp;lt;ref&amp;gt;-&amp;gt;if_proxy_basis~get_protocol( if_wsprotocol=&amp;gt;sequence ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;because the object &amp;lt;ref&amp;gt; is type any, it doesen't runs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This work' s fine&lt;/P&gt;&lt;P&gt;    MOVE  &amp;lt;ref&amp;gt; ?TO proxy1.&lt;/P&gt;&lt;P&gt;    ld_prot ?= proxy-&amp;gt;if_proxy_basis~get_protocol( if_wsprotocol=&amp;gt;sequence )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if proxy is explicity declarated like class proxy&lt;/P&gt;&lt;P&gt;But I don't want do it. I want do it dynamically to avoid write data declaration explicity&lt;/P&gt;&lt;P&gt;I think this is a problem for every data that must be declarated by the form TYPE REF TO&lt;/P&gt;&lt;P&gt;What must I do ?&lt;/P&gt;&lt;P&gt;thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 May 2011 13:27:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/object-created-dynamically-how-to-call-a-method-or-interface-from-it/m-p/7855783#M1592446</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-25T13:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: object created dynamically. how to call a method or interface from it</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/object-created-dynamically-how-to-call-a-method-or-interface-from-it/m-p/7855784#M1592447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this help Document : [Dynamic Method Call in ABAP Objects|http://help.sap.com/abapdocu_70/en/ABENNEWS-46-OBJECTS-DYNAMIC.htm]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aslo  [Dynamic method call|&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1000510"&gt;&lt;/A&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps u.,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 May 2011 13:34:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/object-created-dynamically-how-to-call-a-method-or-interface-from-it/m-p/7855784#M1592447</guid>
      <dc:creator>Kiran_Valluru</dc:creator>
      <dc:date>2011-05-25T13:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: object created dynamically. how to call a method or interface from it</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/object-created-dynamically-how-to-call-a-method-or-interface-from-it/m-p/7855785#M1592448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 May 2011 14:25:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/object-created-dynamically-how-to-call-a-method-or-interface-from-it/m-p/7855785#M1592448</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-25T14:25:25Z</dc:date>
    </item>
    <item>
      <title>Re: object created dynamically. how to call a method or interface from it</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/object-created-dynamically-how-to-call-a-method-or-interface-from-it/m-p/7855786#M1592449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Get the name of the method into a string - l_method, say. Then use: CALL METHOD &amp;lt;ref&amp;gt;-&amp;gt;(l_method) EXPORTING... I'm not sure you need to use a field symbol though - consider this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: lr_proxy TYPE REF TO OBJECT, "Maybe CL_PROXY_BASIS instead of OBJECT???
      l_method TYPE string.

CREATE OBJECT lr_proxy TYPE (ld_class).
CALL METHOD lr_proxy-&amp;gt;(l_method) EXPORTING.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Thread moved to ABAP Object forum)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 May 2011 07:50:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/object-created-dynamically-how-to-call-a-method-or-interface-from-it/m-p/7855786#M1592449</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2011-05-27T07:50:07Z</dc:date>
    </item>
  </channel>
</rss>

