<?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: Insert data to ZTABLE...How? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-to-ztable-how/m-p/3868529#M929756</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 satructure must be same as z table structure &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ie it_excel should be same like Z table structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;siva chalasani.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 May 2008 05:27:01 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-22T05:27:01Z</dc:date>
    <item>
      <title>Insert data to ZTABLE...How?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-to-ztable-how/m-p/3868528#M929755</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;Can someone show me a code on how to insert a data coming from an upload file? i have this code&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;insert ztbl_cust_no from table it_exel&lt;/STRONG&gt; but the problem is, the system gave a an error like &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The work are IT_EXEL is not long enough&lt;/STRONG&gt;. I dont understand it. &lt;/P&gt;&lt;P&gt;Here's my declaration of IT_EXEL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF it_exel OCCURS 1000,&lt;/P&gt;&lt;P&gt;        lifnr TYPE ztbl_cust_no-lifnr,&lt;/P&gt;&lt;P&gt;        lifnrecc6 TYPE ztbl_cust_no-lifnrecc6,&lt;/P&gt;&lt;P&gt;   END OF it_exel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help! Thanks so much!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mackoy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2008 05:23:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-to-ztable-how/m-p/3868528#M929755</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-22T05:23:28Z</dc:date>
    </item>
    <item>
      <title>Re: Insert data to ZTABLE...How?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-to-ztable-how/m-p/3868529#M929756</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 satructure must be same as z table structure &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ie it_excel should be same like Z table structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;siva chalasani.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2008 05:27:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-to-ztable-how/m-p/3868529#M929756</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-22T05:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: Insert data to ZTABLE...How?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-to-ztable-how/m-p/3868530#M929757</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;I think the field length is not enough&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF it_exel OCCURS 1000,&lt;/P&gt;&lt;P&gt;lifnr TYPE string,&lt;/P&gt;&lt;P&gt;lifnrecc6 TYPE string,&lt;/P&gt;&lt;P&gt;END OF it_exel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if its useful reward points&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2008 05:27:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-to-ztable-how/m-p/3868530#M929757</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-22T05:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: Insert data to ZTABLE...How?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-to-ztable-how/m-p/3868531#M929758</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;first of all one question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is the lt_excel structure similar to the structure of ztbl_cust_no ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to insert the table the structures should be similar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you need to move the field values in the structure of the ztbl_cust_no type and then insert.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="green" __jive_macro_name="color"&gt;
The line to be inserted is taken from the work area wa and the data read from left to right according to the line structure of the database table dbtab.
&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use the same complete structure and that will solve the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if usefull&lt;/P&gt;&lt;P&gt;taher&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2008 05:29:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-to-ztable-how/m-p/3868531#M929758</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-22T05:29:50Z</dc:date>
    </item>
    <item>
      <title>Re: Insert data to ZTABLE...How?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-to-ztable-how/m-p/3868532#M929759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DATA: BEGIN OF it_exel OCCURS 0,&lt;/P&gt;&lt;P&gt;lifnr TYPE ztbl_cust_no-lifnr,&lt;/P&gt;&lt;P&gt;lifnrecc6 TYPE ztbl_cust_no-lifnrecc6,&lt;/P&gt;&lt;P&gt;END OF it_exel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you are using a excel file to upload data check the example code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;the fm 'ALSM_EXCEL_TO_INTERNAL_TABLE' uses a internal table of structure different from that of your flat file. check the strtucture&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF ty_mara,&lt;/P&gt;&lt;P&gt;         matnr LIKE mara-matnr,&lt;/P&gt;&lt;P&gt;         mbrsh LIKE mara-mbrsh,&lt;/P&gt;&lt;P&gt;         mtart LIKE mara-mtart,&lt;/P&gt;&lt;P&gt;         maktx LIKE makt-maktx,&lt;/P&gt;&lt;P&gt;         meins LIKE mara-meins,&lt;/P&gt;&lt;P&gt;      END OF ty_mara.&lt;/P&gt;&lt;P&gt;**&lt;/P&gt;&lt;P&gt;DATA: it_mara TYPE table of ty_mara WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;parameters : p_file like RLGRAP-FILENAME.&lt;/P&gt;&lt;P&gt;data : itab type table of ALSMEX_TABLINE WITH HEADER LINE.&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;CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    filename                      = p_file&lt;/P&gt;&lt;P&gt;    i_begin_col                   = 1&lt;/P&gt;&lt;P&gt;    i_begin_row                   = 1&lt;/P&gt;&lt;P&gt;    i_end_col                     = 5&lt;/P&gt;&lt;P&gt;    i_end_row                     = 4&lt;/P&gt;&lt;P&gt;  tables&lt;/P&gt;&lt;P&gt;    intern                        = itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CASE ITAB-COL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WHEN '1'.&lt;/P&gt;&lt;P&gt;      it_mara-matnr = ITAB-VALUE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WHEN '2'.&lt;/P&gt;&lt;P&gt;     it_mara-mbrsh = ITAB-VALUE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WHEN '3'.&lt;/P&gt;&lt;P&gt;      it_mara-mbrsh = ITAB-VALUE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WHEN '4'.&lt;/P&gt;&lt;P&gt;     it_mara-maktx  = ITAB-VALUE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WHEN '5'.&lt;/P&gt;&lt;P&gt;      it_mara-meins = ITAB-VALUE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; AT END OF ROW.&lt;/P&gt;&lt;P&gt;  APPEND it_mara.&lt;/P&gt;&lt;P&gt;  CLEAR it_mara.&lt;/P&gt;&lt;P&gt; ENDAT.&lt;/P&gt;&lt;P&gt;&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;loop at it_mara.&lt;/P&gt;&lt;P&gt;write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; it_mara-matnr.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;prasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2008 05:30:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-to-ztable-how/m-p/3868532#M929759</guid>
      <dc:creator>prasanth_kasturi</dc:creator>
      <dc:date>2008-05-22T05:30:27Z</dc:date>
    </item>
    <item>
      <title>Re: Insert data to ZTABLE...How?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-to-ztable-how/m-p/3868533#M929760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mackoy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF it_exel OCCURS 0,&lt;/P&gt;&lt;P&gt;lifnr TYPE ztbl_cust_no-lifnr,&lt;/P&gt;&lt;P&gt;lifnrecc6 TYPE ztbl_cust_no-lifnrecc6,&lt;/P&gt;&lt;P&gt;END OF it_exel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rewad if useful,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;S.Suresh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2008 05:32:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-to-ztable-how/m-p/3868533#M929760</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-22T05:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: Insert data to ZTABLE...How?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-to-ztable-how/m-p/3868534#M929761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How many records you have in your file??????If your file have more than 1000 records then in that case you have to define it as OCCURS 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: phanisreedhar lakamsani on May 22, 2008 7:41 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2008 05:37:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-to-ztable-how/m-p/3868534#M929761</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-22T05:37:44Z</dc:date>
    </item>
    <item>
      <title>Re: Insert data to ZTABLE...How?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-to-ztable-how/m-p/3868535#M929762</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data : it_ztable like ztable occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF it_exel OCCURS 1000,&lt;/P&gt;&lt;P&gt;lifnr TYPE ztbl_cust_no-lifnr,&lt;/P&gt;&lt;P&gt;lifnrecc6 TYPE ztbl_cust_no-lifnrecc6,&lt;/P&gt;&lt;P&gt;END OF it_exel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_exel.&lt;/P&gt;&lt;P&gt;it_ztable-field1 = it_exel-field1.&lt;/P&gt;&lt;P&gt;it_ztable-field2 = it_exel-field2.&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;append it_ztable.&lt;/P&gt;&lt;P&gt;clear it&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;modify ztable from table it_ztable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Madan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2008 06:36:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-to-ztable-how/m-p/3868535#M929762</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-22T06:36:55Z</dc:date>
    </item>
  </channel>
</rss>

