<?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: Records are not inserted into Z table using dynamic internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/records-are-not-inserted-into-z-table-using-dynamic-internal-table/m-p/8301753#M1635731</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;Following is my code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;lt;removed by moderator&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amruta.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Moderator message: once again, please post only relevant code parts, your posts must contain less than 5000 characters to preserve readable formatting, always check the appearance of your posts.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Thomas Zloch on Nov 7, 2011 9:49 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Nov 2011 05:25:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-11-07T05:25:09Z</dc:date>
    <item>
      <title>Records are not inserted into Z table using dynamic internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/records-are-not-inserted-into-z-table-using-dynamic-internal-table/m-p/8301751#M1635729</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;My requirement is to upload data from the CSV file into dynamic internal table, as the structure of the file is not know.&lt;/P&gt;&lt;P&gt;After this there are some manipulations in the dynamic internal table ( entries are splitted into several entries if there are comma's in the test field of the records). This part is working properly.&lt;/P&gt;&lt;P&gt;Once all manipulation are done I have to insert those records an Z table which is specified in the selection screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the problem is that the records are upating into the z table, but not in corresponding fields .. all fields of the table upadted into first field of the records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Following is my code.&lt;/P&gt;&lt;P&gt;Kindly give me solution for this .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amruta&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;lt;Garbled code removed&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Moderator Message: Post only the relevant portions of your code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Suhas Saha on Nov 7, 2011 10:36 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Nov 2011 04:50:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/records-are-not-inserted-into-z-table-using-dynamic-internal-table/m-p/8301751#M1635729</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-07T04:50:18Z</dc:date>
    </item>
    <item>
      <title>Re: Records are not inserted into Z table using dynamic internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/records-are-not-inserted-into-z-table-using-dynamic-internal-table/m-p/8301752#M1635730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Amrutha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you send me your code to know how you are inserting values in to Z table.&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;Dhanunjaya Reddy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Nov 2011 05:20:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/records-are-not-inserted-into-z-table-using-dynamic-internal-table/m-p/8301752#M1635730</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-07T05:20:32Z</dc:date>
    </item>
    <item>
      <title>Re: Records are not inserted into Z table using dynamic internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/records-are-not-inserted-into-z-table-using-dynamic-internal-table/m-p/8301753#M1635731</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;Following is my code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;lt;removed by moderator&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amruta.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Moderator message: once again, please post only relevant code parts, your posts must contain less than 5000 characters to preserve readable formatting, always check the appearance of your posts.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Thomas Zloch on Nov 7, 2011 9:49 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Nov 2011 05:25:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/records-are-not-inserted-into-z-table-using-dynamic-internal-table/m-p/8301753#M1635731</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-07T05:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: Records are not inserted into Z table using dynamic internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/records-are-not-inserted-into-z-table-using-dynamic-internal-table/m-p/8301754#M1635732</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;Fill CONTROL_PARAMETERS and OUTPUT_OPTIONS parameters of smartform. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dhanunjaya Reddy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Nov 2011 05:44:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/records-are-not-inserted-into-z-table-using-dynamic-internal-table/m-p/8301754#M1635732</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-07T05:44:53Z</dc:date>
    </item>
    <item>
      <title>Re: Records are not inserted into Z table using dynamic internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/records-are-not-inserted-into-z-table-using-dynamic-internal-table/m-p/8301755#M1635733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;????&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Nov 2011 05:50:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/records-are-not-inserted-into-z-table-using-dynamic-internal-table/m-p/8301755#M1635733</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-07T05:50:30Z</dc:date>
    </item>
    <item>
      <title>Re: Records are not inserted into Z table using dynamic internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/records-are-not-inserted-into-z-table-using-dynamic-internal-table/m-p/8301756#M1635734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Amrutha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In SPLIT_ENTRIES subroutine, what is lv_field? why you are assigning count it it? if ITAB has filed LINE, then do the following changes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 Loop at &amp;lt;dyn_table&amp;gt; assigning &amp;lt;dyn_wa&amp;gt;.
*   lv_field = Count.

 *  ASSIGN COMPONENT lv_field OF STRUCTURE &amp;lt;dyn_wa&amp;gt; TO &amp;lt;fs_value&amp;gt;.

   refresh itab.
   split &amp;lt;fs_value&amp;gt; at P_sep into table itab.

   loop at itab.

     ASSIGN itab-line TO &amp;lt;lv_field&amp;gt;.
    .
* assign other fields of the source package to new splited table.
     ASSIGN &amp;lt;dyn_wa&amp;gt; TO &amp;lt;dyn_wa1&amp;gt;.
     ASSIGN COMPONENT &amp;lt;lv_field&amp;gt; OF STRUCTURE &amp;lt;dyn_wa1&amp;gt; to &amp;lt;fs_value&amp;gt;.
*     &amp;lt;fs_value&amp;gt; = itab-line.
    append &amp;lt;fs_value&amp;gt; to &amp;lt;dyn_table1&amp;gt;.
   endloop.
 endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Nov 2011 05:53:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/records-are-not-inserted-into-z-table-using-dynamic-internal-table/m-p/8301756#M1635734</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-07T05:53:11Z</dc:date>
    </item>
    <item>
      <title>Re: Records are not inserted into Z table using dynamic internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/records-are-not-inserted-into-z-table-using-dynamic-internal-table/m-p/8301757#M1635735</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;Transfer dynamic internal table data to static internal table data as below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;ITAB[] = &amp;lt;ITAB&amp;gt; .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Now insert/modify Z table from this static internal table.&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;modify ZITAB from TABLE ITAB.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, if your CSV file structure and ztable structure are different then declare two static tables and copy CSV data into daynamic table, subsequantly assign this Dynamic table to the static internal table having structure as CSV file and after that you can do move corrosponding to internal table as ZTABLE structre.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See below expample.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;types : begin of ty_csv,

           a1 type char3,
           b1 type char4,
         end of ty_csv.

data : IT_CSV type table of ty_csv,
         wa_csv type ty_csv.
FIELD SYMBOLS : &amp;lt;ITAB&amp;gt; TYPE any.
Data : ITAB type table of ZTABLE,
          wa type ztable.

START-OF-SELECTION.

****Fetch DAta in to &amp;lt;ITAB&amp;gt; as per your logic

IT_CSV[] = &amp;lt;ITAB&amp;gt;. " dynamic table data assigned

loop at it_csv into wa_csv.
move-corrosponding wa_csv to wa.
append wa to itab.
clear: wa, wa_csv.
endloop.


modify ZTABLE from table itab.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Nov 2011 06:05:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/records-are-not-inserted-into-z-table-using-dynamic-internal-table/m-p/8301757#M1635735</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-07T06:05:48Z</dc:date>
    </item>
  </channel>
</rss>

