<?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 Re: Select optin in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-optin/m-p/2364151#M523321</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jayanthi.&lt;/P&gt;&lt;P&gt;Now my problem is how to use where clause so that it fetch only those rows which lie in the range of select option.Remember here Table is selected dynamically.so fields and select option ranges is also dynamic according to table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plz Help.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Swati Garg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Jun 2007 06:14:42 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-19T06:14:42Z</dc:date>
    <item>
      <title>Select optin</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-optin/m-p/2364149#M523319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have to perform a dynamic selection of table and it's field. using select option i have to fetch some records and the update them according to my needs.&lt;/P&gt;&lt;P&gt;i am able to fetch the table and its fields dynamically into an internal table. but i am not able to code for the select option i.e how to specify the dynamic table name and field while declaring the select option(please refer to the code below)&lt;/P&gt;&lt;P&gt;also we cannot use function modules.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  z_dynamic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tables: vbak.&lt;/P&gt;&lt;P&gt;TYPE-POOLS : abap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;dyn_table&amp;gt; TYPE standard TABLE,&lt;/P&gt;&lt;P&gt;&amp;lt;dyn_wa&amp;gt;,&lt;/P&gt;&lt;P&gt;&amp;lt;dyn_field&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: dy_table TYPE REF TO data ,&lt;/P&gt;&lt;P&gt;dy_line TYPE REF TO data,&lt;/P&gt;&lt;P&gt;xfc TYPE lvc_s_fcat,&lt;/P&gt;&lt;P&gt;ifc TYPE lvc_t_fcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.&lt;/P&gt;&lt;P&gt;PARAMETERS: p_table(30) TYPE c DEFAULT 'T001'.&lt;/P&gt;&lt;P&gt;PARAMETERS: p_field(10)  TYPE c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Select-options: s_Range for ??????&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK b1.&lt;/P&gt;&lt;P&gt;&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;  PERFORM get_structure.&lt;/P&gt;&lt;P&gt;  PERFORM create_dynamic_itab.&lt;/P&gt;&lt;P&gt;  PERFORM get_data.&lt;/P&gt;&lt;P&gt;  PERFORM write_out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  get_structure&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&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;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&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; --&amp;gt;  p1        text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; &amp;lt;--  p2        text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form get_structure .&lt;/P&gt;&lt;P&gt;data : idetails type abap_compdescr_tab,&lt;/P&gt;&lt;P&gt;       xdetails type abap_compdescr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : ref_table_des type ref to cl_abap_structdescr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get the structure of the table.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ref_table_des ?=&lt;/P&gt;&lt;P&gt;      cl_abap_typedescr=&amp;gt;describe_by_name( p_table ).&lt;/P&gt;&lt;P&gt;  idetails[] = ref_table_des-&amp;gt;components[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at idetails into xdetails.&lt;/P&gt;&lt;P&gt;    clear xfc.&lt;/P&gt;&lt;P&gt;    xfc-fieldname = xdetails-name .&lt;/P&gt;&lt;P&gt;    xfc-datatype = xdetails-type_kind.&lt;/P&gt;&lt;P&gt;    xfc-inttype = xdetails-type_kind.&lt;/P&gt;&lt;P&gt;    xfc-intlen = xdetails-length.&lt;/P&gt;&lt;P&gt;    xfc-decimals = xdetails-decimals.&lt;/P&gt;&lt;P&gt;    append xfc to ifc.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.                    " get_structure&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  create_dynamic_itab&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&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;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&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; --&amp;gt;  p1        text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; &amp;lt;--  p2        text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form create_dynamic_itab .&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create dynamic internal table and assign to FS&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  call method cl_alv_table_create=&amp;gt;create_dynamic_table&lt;/P&gt;&lt;P&gt;               exporting&lt;/P&gt;&lt;P&gt;                  it_fieldcatalog = ifc&lt;/P&gt;&lt;P&gt;               importing&lt;/P&gt;&lt;P&gt;                  ep_table        = dy_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  assign dy_table-&amp;gt;* to &amp;lt;dyn_table&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create dynamic work area and assign to FS&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  create data dy_line like line of &amp;lt;dyn_table&amp;gt;.&lt;/P&gt;&lt;P&gt;  assign dy_line-&amp;gt;* to &amp;lt;dyn_wa&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.                    " create_dynamic_itab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  get_data&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&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;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&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; --&amp;gt;  p1        text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; &amp;lt;--  p2        text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form get_data .&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Select Data from table.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  select * into table &amp;lt;dyn_table&amp;gt;&lt;/P&gt;&lt;P&gt;             from (p_table).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.                    " get_data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  write_out&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&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;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&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; --&amp;gt;  p1        text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; &amp;lt;--  p2        text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form write_out .&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Write out data from table.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  loop at &amp;lt;dyn_table&amp;gt; into &amp;lt;dyn_wa&amp;gt;.&lt;/P&gt;&lt;P&gt;    do.&lt;/P&gt;&lt;P&gt;      assign component  sy-index&lt;/P&gt;&lt;P&gt;         of structure &amp;lt;dyn_wa&amp;gt; to &amp;lt;dyn_field&amp;gt;.&lt;/P&gt;&lt;P&gt;      if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;        exit.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;      if sy-index = 1.&lt;/P&gt;&lt;P&gt;        write:/ &amp;lt;dyn_field&amp;gt;.&lt;/P&gt;&lt;P&gt;      else.&lt;/P&gt;&lt;P&gt;        write: &amp;lt;dyn_field&amp;gt;.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;    enddo.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.                    " write_out&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;Thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Swati Garg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2007 05:20:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-optin/m-p/2364149#M523319</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-19T05:20:17Z</dc:date>
    </item>
    <item>
      <title>Re: Select optin</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-optin/m-p/2364150#M523320</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;data city(50).&lt;/P&gt;&lt;P&gt;Select-options: s_Range for city.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will work.You can read these in F1 Help for select-options.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly reward points if it helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2007 05:36:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-optin/m-p/2364150#M523320</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2007-06-19T05:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: Select optin</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-optin/m-p/2364151#M523321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jayanthi.&lt;/P&gt;&lt;P&gt;Now my problem is how to use where clause so that it fetch only those rows which lie in the range of select option.Remember here Table is selected dynamically.so fields and select option ranges is also dynamic according to table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plz Help.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Swati Garg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2007 06:14:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-optin/m-p/2364151#M523321</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-19T06:14:42Z</dc:date>
    </item>
  </channel>
</rss>

