<?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 Calling Method with Importing-Parameter &amp;quot;SelectOptions Range-Table&amp;quot; as TYPE any table??? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-method-with-importing-parameter-quot-selectoptions-range-table-quot/m-p/456237#M14143</link>
    <description>&lt;P&gt;Hi at all,&lt;/P&gt;&lt;P&gt;i have a Dynpro with a Select-Options "S_VBELN" and "S_DATE" and iam trying to call a Method "CONVERT_RANGE" with Importing-Parameter IT_TABLE = S_VBELN  and IT_SELOPT_DATE = S_DATE, but it doesnt work.&lt;/P&gt;&lt;P&gt;When iam calling the "dynamic Method" with "S_VBELN" than i got always a Error-Message from Syntax-Check: S_VBELN is not Type-compatible to "IT_TABLE"!!!&lt;/P&gt;&lt;P&gt;I hope anyone can help me with this dynamic Importing-Parameters!&lt;BR /&gt;Thanks in forward.&lt;/P&gt;&lt;P&gt;Kind Regards&lt;BR /&gt;ETN&lt;/P&gt;&lt;P&gt;---------------------------------------------REPORT--------------------------------------------------&lt;/P&gt;&lt;P&gt;DATA: lt_selopt TYPE RSDSSELOPT_T.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS: s_vbeln  TYPE vbeln,&lt;BR /&gt;                                 s_date    TYPE sy-datum.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;lt_selopt_vbeln = convert_range( it_table = s_vbeln ).&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;lt_selopt_date   = convert_range( it_table = s_date ).&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;----------------------------------------------METHOD-------------------------------------------------&lt;BR /&gt;*// IT_TABLE        TYPE    ANY TABLE&lt;BR /&gt;*// RT_SELOPT    TYPE   RSDSSELOPT_T&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; data declaration&lt;BR /&gt;
 DATA: ls_selopt                TYPE rsdsselopt,&lt;BR /&gt;
            lo_dynamic_line    TYPE REF TO data,&lt;BR /&gt;
            lo_dynamic_table  TYPE REF TO data,&lt;BR /&gt;
            lo_struct                TYPE REF TO cl_abap_structdescr.&lt;BR /&gt;
&lt;BR /&gt;
 FIELD-SYMBOLS: &amp;lt;lt_table&amp;gt; TYPE table,&lt;BR /&gt;
                              &amp;lt;ls_table&amp;gt; TYPE any,&lt;BR /&gt;
                              &amp;lt;fs_comp&amp;gt; TYPE abap_compdescr,&lt;BR /&gt;
                              &amp;lt;lv_value&amp;gt; TYPE any,&lt;BR /&gt;
                              &amp;lt;lv_selopt&amp;gt; TYPE any.&lt;BR /&gt;
&lt;BR /&gt;
 CREATE DATA lo_dynamic_table LIKE it_table.&lt;BR /&gt;
 ASSIGN lo_dynamic_table-&amp;gt;* TO &amp;lt;lt_table&amp;gt;.&lt;BR /&gt;
&lt;BR /&gt;
 CREATE DATA lo_dynamic_line LIKE LINE OF &amp;lt;lt_table&amp;gt;.&lt;BR /&gt;
 ASSIGN lo_dynamic_line-&amp;gt;* TO &amp;lt;ls_table&amp;gt;.&lt;BR /&gt;
&lt;BR /&gt;
APPEND LINES OF it_table TO &amp;lt;lt_table&amp;gt;.&lt;BR /&gt;
&lt;BR /&gt;
* Populate the fields of wa_pc_model_data2&lt;BR /&gt;
 lo_struct ?= cl_abap_typedescr=&amp;gt;describe_by_data( &amp;lt;ls_table&amp;gt; ).&lt;BR /&gt;
&lt;BR /&gt;
 IF lo_struct IS BOUND AND lo_struct IS NOT INITIAL.&lt;BR /&gt;
 LOOP AT &amp;lt;lt_table&amp;gt; INTO &amp;lt;ls_table&amp;gt;.&lt;BR /&gt;
 CLEAR ls_selopt.&lt;BR /&gt;
&lt;BR /&gt;
 LOOP AT lo_struct-&amp;gt;components INTO &amp;lt;fs_comp&amp;gt;&lt;BR /&gt;
   WHERE name EQ 'SIGN'&lt;BR /&gt;
           OR name EQ 'OPTION'&lt;BR /&gt;
           OR name EQ 'LOW'&lt;BR /&gt;
           OR name EQ 'HIGH'.&lt;BR /&gt;
&lt;BR /&gt;
 ASSIGN COMPONENT &amp;lt;fs_comp&amp;gt;-name OF STRUCTURE &amp;lt;ls_table&amp;gt; TO &amp;lt;lv_value&amp;gt;.&lt;BR /&gt;
 ASSIGN COMPONENT &amp;lt;fs_comp&amp;gt;-name OF STRUCTURE ls_selopt TO &amp;lt;lv_selopt&amp;gt;.&lt;BR /&gt;
 &amp;lt;lv_selopt&amp;gt; = &amp;lt;lv_value&amp;gt;.&lt;BR /&gt;
 ENDLOOP.&lt;BR /&gt;
&lt;BR /&gt;
 IF ls_selopt IS NOT INITIAL.&lt;BR /&gt;
    APPEND ls_selopt TO rt_selopt.&lt;BR /&gt;
 ENDIF.&lt;BR /&gt;
 ENDLOOP.&lt;BR /&gt;
 ENDIF.&lt;/P&gt;</description>
    <pubDate>Thu, 06 Apr 2017 14:42:40 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2017-04-06T14:42:40Z</dc:date>
    <item>
      <title>Calling Method with Importing-Parameter "SelectOptions Range-Table" as TYPE any table???</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-method-with-importing-parameter-quot-selectoptions-range-table-quot/m-p/456237#M14143</link>
      <description>&lt;P&gt;Hi at all,&lt;/P&gt;&lt;P&gt;i have a Dynpro with a Select-Options "S_VBELN" and "S_DATE" and iam trying to call a Method "CONVERT_RANGE" with Importing-Parameter IT_TABLE = S_VBELN  and IT_SELOPT_DATE = S_DATE, but it doesnt work.&lt;/P&gt;&lt;P&gt;When iam calling the "dynamic Method" with "S_VBELN" than i got always a Error-Message from Syntax-Check: S_VBELN is not Type-compatible to "IT_TABLE"!!!&lt;/P&gt;&lt;P&gt;I hope anyone can help me with this dynamic Importing-Parameters!&lt;BR /&gt;Thanks in forward.&lt;/P&gt;&lt;P&gt;Kind Regards&lt;BR /&gt;ETN&lt;/P&gt;&lt;P&gt;---------------------------------------------REPORT--------------------------------------------------&lt;/P&gt;&lt;P&gt;DATA: lt_selopt TYPE RSDSSELOPT_T.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS: s_vbeln  TYPE vbeln,&lt;BR /&gt;                                 s_date    TYPE sy-datum.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;lt_selopt_vbeln = convert_range( it_table = s_vbeln ).&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;lt_selopt_date   = convert_range( it_table = s_date ).&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;----------------------------------------------METHOD-------------------------------------------------&lt;BR /&gt;*// IT_TABLE        TYPE    ANY TABLE&lt;BR /&gt;*// RT_SELOPT    TYPE   RSDSSELOPT_T&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; data declaration&lt;BR /&gt;
 DATA: ls_selopt                TYPE rsdsselopt,&lt;BR /&gt;
            lo_dynamic_line    TYPE REF TO data,&lt;BR /&gt;
            lo_dynamic_table  TYPE REF TO data,&lt;BR /&gt;
            lo_struct                TYPE REF TO cl_abap_structdescr.&lt;BR /&gt;
&lt;BR /&gt;
 FIELD-SYMBOLS: &amp;lt;lt_table&amp;gt; TYPE table,&lt;BR /&gt;
                              &amp;lt;ls_table&amp;gt; TYPE any,&lt;BR /&gt;
                              &amp;lt;fs_comp&amp;gt; TYPE abap_compdescr,&lt;BR /&gt;
                              &amp;lt;lv_value&amp;gt; TYPE any,&lt;BR /&gt;
                              &amp;lt;lv_selopt&amp;gt; TYPE any.&lt;BR /&gt;
&lt;BR /&gt;
 CREATE DATA lo_dynamic_table LIKE it_table.&lt;BR /&gt;
 ASSIGN lo_dynamic_table-&amp;gt;* TO &amp;lt;lt_table&amp;gt;.&lt;BR /&gt;
&lt;BR /&gt;
 CREATE DATA lo_dynamic_line LIKE LINE OF &amp;lt;lt_table&amp;gt;.&lt;BR /&gt;
 ASSIGN lo_dynamic_line-&amp;gt;* TO &amp;lt;ls_table&amp;gt;.&lt;BR /&gt;
&lt;BR /&gt;
APPEND LINES OF it_table TO &amp;lt;lt_table&amp;gt;.&lt;BR /&gt;
&lt;BR /&gt;
* Populate the fields of wa_pc_model_data2&lt;BR /&gt;
 lo_struct ?= cl_abap_typedescr=&amp;gt;describe_by_data( &amp;lt;ls_table&amp;gt; ).&lt;BR /&gt;
&lt;BR /&gt;
 IF lo_struct IS BOUND AND lo_struct IS NOT INITIAL.&lt;BR /&gt;
 LOOP AT &amp;lt;lt_table&amp;gt; INTO &amp;lt;ls_table&amp;gt;.&lt;BR /&gt;
 CLEAR ls_selopt.&lt;BR /&gt;
&lt;BR /&gt;
 LOOP AT lo_struct-&amp;gt;components INTO &amp;lt;fs_comp&amp;gt;&lt;BR /&gt;
   WHERE name EQ 'SIGN'&lt;BR /&gt;
           OR name EQ 'OPTION'&lt;BR /&gt;
           OR name EQ 'LOW'&lt;BR /&gt;
           OR name EQ 'HIGH'.&lt;BR /&gt;
&lt;BR /&gt;
 ASSIGN COMPONENT &amp;lt;fs_comp&amp;gt;-name OF STRUCTURE &amp;lt;ls_table&amp;gt; TO &amp;lt;lv_value&amp;gt;.&lt;BR /&gt;
 ASSIGN COMPONENT &amp;lt;fs_comp&amp;gt;-name OF STRUCTURE ls_selopt TO &amp;lt;lv_selopt&amp;gt;.&lt;BR /&gt;
 &amp;lt;lv_selopt&amp;gt; = &amp;lt;lv_value&amp;gt;.&lt;BR /&gt;
 ENDLOOP.&lt;BR /&gt;
&lt;BR /&gt;
 IF ls_selopt IS NOT INITIAL.&lt;BR /&gt;
    APPEND ls_selopt TO rt_selopt.&lt;BR /&gt;
 ENDIF.&lt;BR /&gt;
 ENDLOOP.&lt;BR /&gt;
 ENDIF.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Apr 2017 14:42:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-method-with-importing-parameter-quot-selectoptions-range-table-quot/m-p/456237#M14143</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-04-06T14:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Method with Importing-Parameter "SelectOptions Range-Table" as TYPE any table???</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-method-with-importing-parameter-quot-selectoptions-range-table-quot/m-p/456238#M14144</link>
      <description>&lt;P&gt;Is it as simple as follows?&lt;/P&gt;&lt;P&gt;Selection tables have infamous header lines. You pass the header lines and not the table body. Append [] to the names and it should be fine!&lt;/P&gt;</description>
      <pubDate>Thu, 06 Apr 2017 16:13:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-method-with-importing-parameter-quot-selectoptions-range-table-quot/m-p/456238#M14144</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2017-04-06T16:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Method with Importing-Parameter "SelectOptions Range-Table" as TYPE any table???</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-method-with-importing-parameter-quot-selectoptions-range-table-quot/m-p/456239#M14145</link>
      <description>&lt;P&gt;It's a bit offtopic but if I correctly understand your logic you can replace all your code with just one line of code:&lt;/P&gt;&lt;P&gt;lt_selopt_vbeln = corresponding #( s_vbeln[] ).&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2017 05:00:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-method-with-importing-parameter-quot-selectoptions-range-table-quot/m-p/456239#M14145</guid>
      <dc:creator>former_member210008</dc:creator>
      <dc:date>2017-04-07T05:00:58Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Method with Importing-Parameter "SelectOptions Range-Table" as TYPE any table???</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-method-with-importing-parameter-quot-selectoptions-range-table-quot/m-p/456240#M14146</link>
      <description>&lt;P&gt;It is as simple as that.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2017 09:04:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-method-with-importing-parameter-quot-selectoptions-range-table-quot/m-p/456240#M14146</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2017-04-07T09:04:52Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Method with Importing-Parameter "SelectOptions Range-Table" as TYPE any table???</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-method-with-importing-parameter-quot-selectoptions-range-table-quot/m-p/456241#M14147</link>
      <description>&lt;P&gt;Hello Evgeniy,&lt;/P&gt;&lt;P&gt;thanks you too, your Answer is also correct.&lt;BR /&gt;My Solution is a bit offtopic, but the Problem was, that i forgot, that Select-Options has "Header-Lines"!!!&lt;/P&gt;&lt;P&gt;Kind Regards&lt;BR /&gt;ETN&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2017 14:22:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-method-with-importing-parameter-quot-selectoptions-range-table-quot/m-p/456241#M14147</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-04-11T14:22:03Z</dc:date>
    </item>
  </channel>
</rss>

