<?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 Need help on Dynamic Internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-dynamic-internal-table/m-p/1205719#M132151</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 need some help regarding dynamic internal table.&lt;/P&gt;&lt;P&gt;I am using BAPI_SALESORDER_SIMULATE for price simulation and the BAPI returns&lt;/P&gt;&lt;P&gt;the conditions for the customer, it will be identified in runtime only. Now i need to create a table in dynamic&lt;/P&gt;&lt;P&gt;and its displayed to ALV according to the BAPI return condition. Please help any one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks all.&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Mar 2006 12:35:50 GMT</pubDate>
    <dc:creator>alex_m</dc:creator>
    <dc:date>2006-03-01T12:35:50Z</dc:date>
    <item>
      <title>Need help on Dynamic Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-dynamic-internal-table/m-p/1205719#M132151</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 need some help regarding dynamic internal table.&lt;/P&gt;&lt;P&gt;I am using BAPI_SALESORDER_SIMULATE for price simulation and the BAPI returns&lt;/P&gt;&lt;P&gt;the conditions for the customer, it will be identified in runtime only. Now i need to create a table in dynamic&lt;/P&gt;&lt;P&gt;and its displayed to ALV according to the BAPI return condition. Please help any one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks all.&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Mar 2006 12:35:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-dynamic-internal-table/m-p/1205719#M132151</guid>
      <dc:creator>alex_m</dc:creator>
      <dc:date>2006-03-01T12:35:50Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on Dynamic Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-dynamic-internal-table/m-p/1205720#M132152</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;try this it will print it in ALV&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  Z_DYNAMIC_TABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;type-pools: slis.&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;&lt;/P&gt;&lt;P&gt;data: alv_fldcat type slis_t_fieldcat_alv,&lt;/P&gt;&lt;P&gt;      it_fldcat type lvc_t_fcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen begin of block b1 with frame title text-001.&lt;/P&gt;&lt;P&gt;parameters: p_flds(5) type c.&lt;/P&gt;&lt;P&gt;selection-screen end of block b1.&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;build the dynamic internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  perform build_dyn_itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;write 5 records to the alv grid&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  do 5 times.&lt;/P&gt;&lt;P&gt;    perform build_report.&lt;/P&gt;&lt;P&gt;  enddo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;call the alv grid.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  perform call_alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; Build_dyn_itab&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;form build_dyn_itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data: new_table type ref to data,&lt;/P&gt;&lt;P&gt;        new_line  type ref to data,&lt;/P&gt;&lt;P&gt;        wa_it_fldcat type lvc_s_fcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create fields .&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  do p_flds times.&lt;/P&gt;&lt;P&gt;    clear wa_it_fldcat.&lt;/P&gt;&lt;P&gt;    wa_it_fldcat-fieldname = sy-index.&lt;/P&gt;&lt;P&gt;    wa_it_fldcat-datatype = 'CHAR'.&lt;/P&gt;&lt;P&gt;    wa_it_fldcat-intlen = 5.&lt;/P&gt;&lt;P&gt;    append wa_it_fldcat to it_fldcat .&lt;/P&gt;&lt;P&gt;  enddo.&lt;/P&gt;&lt;P&gt;&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 = it_fldcat&lt;/P&gt;&lt;P&gt;               importing&lt;/P&gt;&lt;P&gt;                  ep_table        = new_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  assign new_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 new_line like line of &amp;lt;dyn_table&amp;gt;.&lt;/P&gt;&lt;P&gt;  assign new_line-&amp;gt;* to &amp;lt;dyn_wa&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*********************************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     Form  build_report&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*********************************************************************&lt;/P&gt;&lt;P&gt;form build_report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data: fieldname(20) type c.&lt;/P&gt;&lt;P&gt;  data: fieldvalue(5) type c.&lt;/P&gt;&lt;P&gt;  data: index(3) type c.&lt;/P&gt;&lt;P&gt;  field-symbols: &amp;lt;fs1&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  do p_flds times.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    index = sy-index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Set up fieldvalue&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    concatenate 'FLD' index into&lt;/P&gt;&lt;P&gt;             fieldvalue.&lt;/P&gt;&lt;P&gt;    condense   fieldvalue no-gaps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    assign component  index  of structure &amp;lt;dyn_wa&amp;gt; to &amp;lt;fs1&amp;gt;.&lt;/P&gt;&lt;P&gt;    &amp;lt;fs1&amp;gt; =  fieldvalue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  enddo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Append to the dynamic internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  append &amp;lt;dyn_wa&amp;gt; to &amp;lt;dyn_table&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; CALL_ALV&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;form call_alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data: wa_cat like line of alv_fldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  do p_flds times.&lt;/P&gt;&lt;P&gt;    clear wa_cat.&lt;/P&gt;&lt;P&gt;    wa_cat-fieldname = sy-index.&lt;/P&gt;&lt;P&gt;    wa_cat-seltext_s = sy-index.&lt;/P&gt;&lt;P&gt;    wa_cat-outputlen = '5'.&lt;/P&gt;&lt;P&gt;    append wa_cat to alv_fldcat.&lt;/P&gt;&lt;P&gt;  enddo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Call ABAP List Viewer (ALV)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  call function 'REUSE_ALV_GRID_DISPLAY'&lt;/P&gt;&lt;P&gt;       exporting&lt;/P&gt;&lt;P&gt;            it_fieldcat = alv_fldcat&lt;/P&gt;&lt;P&gt;       tables&lt;/P&gt;&lt;P&gt;            t_outtab    = &amp;lt;dyn_table&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;plz close the thread if your problem is solved&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;kishore&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Harikishore Sreenivasulu&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Mar 2006 12:37:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-dynamic-internal-table/m-p/1205720#M132152</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-01T12:37:49Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on Dynamic Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-dynamic-internal-table/m-p/1205721#M132153</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;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="1178953"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Shekhar Kulkarni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Mar 2006 13:01:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-dynamic-internal-table/m-p/1205721#M132153</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-01T13:01:58Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on Dynamic Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-dynamic-internal-table/m-p/1205722#M132154</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 these link :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/ab030.htm" target="test_blank"&gt;http://www.sap-img.com/ab030.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Mar 2006 13:29:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-dynamic-internal-table/m-p/1205722#M132154</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-01T13:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on Dynamic Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-dynamic-internal-table/m-p/1205723#M132155</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;Your answer really helpful for my problem, but still i am getting some error, can u please look it. This statement is giving dump ( &amp;lt;fs1&amp;gt; =  t_order_condition1-COND_VALUE.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*t_order_condition1 this table contain runtime condition type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT t_order_condition1.&lt;/P&gt;&lt;P&gt;clear wa_it_fldcat.&lt;/P&gt;&lt;P&gt;wa_it_fldcat-fieldname = t_order_condition1-COND_TYPE.&lt;/P&gt;&lt;P&gt;wa_it_fldcat-datatype = 'CHAR'.&lt;/P&gt;&lt;P&gt;wa_it_fldcat-intlen = 5.&lt;/P&gt;&lt;P&gt;append wa_it_fldcat to it_fldcat .&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&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 = it_fldcat&lt;/P&gt;&lt;P&gt;importing&lt;/P&gt;&lt;P&gt;ep_table = new_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;assign new_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 new_line like line of &amp;lt;dyn_table&amp;gt;.&lt;/P&gt;&lt;P&gt;assign new_line-&amp;gt;* to &amp;lt;dyn_wa&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: fieldname(20) type c.&lt;/P&gt;&lt;P&gt;data: fieldvalue(25) type c.&lt;/P&gt;&lt;P&gt;data: index(28) type c.&lt;/P&gt;&lt;P&gt;field-symbols: &amp;lt;fs1&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT t_order_condition1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;index = t_order_condition1-cond_value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Set up fieldvalue&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*concatenate t_order_condition1-COND_VALUE into&lt;/P&gt;&lt;P&gt;*fieldvalue.&lt;/P&gt;&lt;P&gt;*condense fieldvalue no-gaps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;assign component index of structure &amp;lt;dyn_wa&amp;gt; to &amp;lt;fs1&amp;gt;.&lt;/P&gt;&lt;P&gt;&amp;lt;fs1&amp;gt; =  t_order_condition1-COND_VALUE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Append to the dynamic internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;append &amp;lt;dyn_wa&amp;gt; to &amp;lt;dyn_table&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: wa_cat like line of alv_fldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT t_order_condition1.&lt;/P&gt;&lt;P&gt;clear wa_cat.&lt;/P&gt;&lt;P&gt;wa_cat-fieldname = t_order_condition1-COND_TYPE.&lt;/P&gt;&lt;P&gt;*wa_cat-seltext_s = sy-index.&lt;/P&gt;&lt;P&gt;wa_cat-outputlen = '5'.&lt;/P&gt;&lt;P&gt;append wa_cat to alv_fldcat.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Call ABAP List Viewer (ALV)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;call function 'REUSE_ALV_GRID_DISPLAY'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;it_fieldcat = alv_fldcat&lt;/P&gt;&lt;P&gt;tables&lt;/P&gt;&lt;P&gt;t_outtab = &amp;lt;dyn_table&amp;gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Mar 2006 06:16:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-on-dynamic-internal-table/m-p/1205723#M132155</guid>
      <dc:creator>alex_m</dc:creator>
      <dc:date>2006-03-02T06:16:10Z</dc:date>
    </item>
  </channel>
</rss>

