<?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 dynamic class loading and abap_parmbind in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-class-loading-and-abap-parmbind/m-p/777564#M38907</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using dynamic class loading with a&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE OBJECT obj TYPE (&amp;lt;classname&amp;gt;)&lt;/P&gt;&lt;P&gt;PARAMETER-TABLE &amp;lt;param_table&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;statement. The objects I am trying to create have a constructor which expect a parameter called 'model' of type ref to cl_bsp_model, i.e. a simple object reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, as the structure of the parameter table is abap_parmbind, the value of a parameter needs to be of type ref to data - that is not a object reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I transfer my model object now to the class' constructor?&lt;/P&gt;&lt;P&gt;To put it more general: how can one transfer constructor parameters in dynamic class loading, when the parameters are not simple types (but references)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sebastian Kamp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Jun 2004 13:58:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2004-06-07T13:58:09Z</dc:date>
    <item>
      <title>dynamic class loading and abap_parmbind</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-class-loading-and-abap-parmbind/m-p/777564#M38907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using dynamic class loading with a&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE OBJECT obj TYPE (&amp;lt;classname&amp;gt;)&lt;/P&gt;&lt;P&gt;PARAMETER-TABLE &amp;lt;param_table&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;statement. The objects I am trying to create have a constructor which expect a parameter called 'model' of type ref to cl_bsp_model, i.e. a simple object reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, as the structure of the parameter table is abap_parmbind, the value of a parameter needs to be of type ref to data - that is not a object reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I transfer my model object now to the class' constructor?&lt;/P&gt;&lt;P&gt;To put it more general: how can one transfer constructor parameters in dynamic class loading, when the parameters are not simple types (but references)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sebastian Kamp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jun 2004 13:58:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-class-loading-and-abap-parmbind/m-p/777564#M38907</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-06-07T13:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic class loading and abap_parmbind</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-class-loading-and-abap-parmbind/m-p/777565#M38908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sebastian,&lt;/P&gt;&lt;P&gt;You can take the reference of the object to a data reference variable using command GET REFERENCE OF lv_object_ref INTO lv_data_ref.You can find a small program as an example below.I hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT YREF_TEST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE-POOLS: abap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: ls_parmbind TYPE abap_parmbind,&lt;/P&gt;&lt;P&gt;      lt_parmbind LIKE HASHED TABLE OF ls_parmbind&lt;/P&gt;&lt;P&gt;                    WITH UNIQUE KEY name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      CLASS lcl_test DEFINITION&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;CLASS lcl_test DEFINITION.&lt;/P&gt;&lt;P&gt;  PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;    DATA: av_int TYPE i VALUE 4 READ-ONLY.&lt;/P&gt;&lt;P&gt;ENDCLASS.                    "lcl_test DEFINITION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      CLASS lcl_main DEFINITION&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;CLASS lcl_main DEFINITION.&lt;/P&gt;&lt;P&gt;  PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;    METHODS: constructor&lt;/P&gt;&lt;P&gt;                IMPORTING iv_obj TYPE REF TO lcl_test.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    DATA: av_main_int TYPE i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDCLASS.                    "lcl_main DEFINITION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      CLASS lcl_main IMPLEMENTATION&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;CLASS lcl_main IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;  METHOD constructor.&lt;/P&gt;&lt;P&gt;    av_main_int = iv_obj-&amp;gt;av_int.&lt;/P&gt;&lt;P&gt;    write av_main_int.&lt;/P&gt;&lt;P&gt;  ENDMETHOD.                    "constructor&lt;/P&gt;&lt;P&gt;ENDCLASS.                    "lcl_main IMPLEMENTATION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: lv_dref TYPE REF TO data.&lt;/P&gt;&lt;P&gt;  DATA: lv_objref TYPE REF TO lcl_test,&lt;/P&gt;&lt;P&gt;        lv_obj_dynref TYPE REF TO object,&lt;/P&gt;&lt;P&gt;        lv_class_name TYPE string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CREATE OBJECT lv_objref.&lt;/P&gt;&lt;P&gt;  GET REFERENCE OF lv_objref INTO lv_dref.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  lv_class_name = 'LCL_MAIN'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ls_parmbind-name = 'IV_OBJ'.&lt;/P&gt;&lt;P&gt;  ls_parmbind-kind = 'E'.&lt;/P&gt;&lt;P&gt;  ls_parmbind-value     = lv_dref.&lt;/P&gt;&lt;P&gt;  INSERT ls_parmbind INTO TABLE lt_parmbind.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CREATE OBJECT lv_obj_dynref TYPE (lv_class_name)&lt;/P&gt;&lt;P&gt;     PARAMETER-TABLE lt_parmbind .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sükrü&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jun 2004 17:44:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-class-loading-and-abap-parmbind/m-p/777565#M38908</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-06-09T17:44:58Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic class loading and abap_parmbind</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-class-loading-and-abap-parmbind/m-p/777566#M38909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sükrü,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your answer. I had tested a variant of your solution, but it did not work and I think I know why. &lt;/P&gt;&lt;P&gt;The GET REFERENCE OF  command will return a data reference to the variable - regardless of the type of this variable. If the variable is an object reference itself, the GET REFERENCE will return a data reference to this reference and not the actual object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sebastian&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jun 2004 11:54:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-class-loading-and-abap-parmbind/m-p/777566#M38909</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-06-10T11:54:17Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic class loading and abap_parmbind</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-class-loading-and-abap-parmbind/m-p/13891298#M2031306</link>
      <description>&lt;P&gt;Hello Sukru,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please tell me what exactly the kind 'E' refers to in this,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ls_parmbind-kind = 'E'.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2024 17:06:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-class-loading-and-abap-parmbind/m-p/13891298#M2031306</guid>
      <dc:creator>Vani_SR</dc:creator>
      <dc:date>2024-10-07T17:06:30Z</dc:date>
    </item>
  </channel>
</rss>

