<?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: help for &amp;quot;insert data to variable tables&amp;quot; in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-for-quot-insert-data-to-variable-tables-quot/m-p/2400741#M534783</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot very much!!!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U all r so KIND &lt;SUP&gt;o&lt;/SUP&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Jun 2007 05:57:47 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-15T05:57:47Z</dc:date>
    <item>
      <title>help for "insert data to variable tables"</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-for-quot-insert-data-to-variable-tables-quot/m-p/2400737#M534779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi, guys.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I want to make a tool to upload mass-data then insert the data to tables of SAP for integrative test.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; for example, to input the object tablename "AAAA" from screen, the program willl find the information of this table then input the data to the "AAAA" tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; But i have no idea how to define the internal table to suit various tables ( by define dynamic table? or any other ways) ,could you kindly give me some advice?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks a lot in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        huijuan zhao&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2007 05:10:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-for-quot-insert-data-to-variable-tables-quot/m-p/2400737#M534779</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-15T05:10:01Z</dc:date>
    </item>
    <item>
      <title>Re: help for "insert data to variable tables"</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-for-quot-insert-data-to-variable-tables-quot/m-p/2400738#M534780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi zhao,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;welcome to sdn,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for your requirement u can use bdc to upload file to internal table then u can update these internal table fileds to sap tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use &amp;lt;b&amp;gt;gui_upload&amp;lt;/b&amp;gt; function module to upload data to internal table then u can use just &amp;lt;b&amp;gt;insert&amp;lt;/b&amp;gt; keyword to update sap tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;see this sample code to update the database table &amp;lt;b&amp;gt;edpar&amp;lt;/b&amp;gt;,&lt;/P&gt;&lt;P&gt;report  zsd_edpar_update no standard page heading.&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;Purpose:&lt;/P&gt;&lt;P&gt;*&amp;amp;        program will be used to update EDAPR table on a daily basis.&lt;/P&gt;&lt;P&gt;*&amp;amp;        This update will be based on Customer Sold To / Ship To partner&lt;/P&gt;&lt;P&gt;*&amp;amp;        functions assignment. Ship To customer(s) will be linked to&lt;/P&gt;&lt;P&gt;*&amp;amp;        the appropriate Sold To customer using the ?Acct at Cust?&lt;/P&gt;&lt;P&gt;*&amp;amp;        number as a reference.  Then, Ship To customer(s) will be&lt;/P&gt;&lt;P&gt;*&amp;amp;        set up withthe appropriate partner function with the Sold&lt;/P&gt;&lt;P&gt;*&amp;amp;        To customer.it updated the DB tabel and gives the information&lt;/P&gt;&lt;P&gt;*&amp;amp;        of customer level visibility t account receivable.&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;&lt;/P&gt;&lt;P&gt;*define database tables...&lt;/P&gt;&lt;P&gt;tables: edpar,&lt;/P&gt;&lt;P&gt;        knvv,&lt;/P&gt;&lt;P&gt;        knvp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*define types...&lt;/P&gt;&lt;P&gt;types: begin of t_tab_edpar,&lt;/P&gt;&lt;P&gt;       mandt type mandt,&lt;/P&gt;&lt;P&gt;       kunnr type kunnr,&lt;/P&gt;&lt;P&gt;       parvw type parvw,&lt;/P&gt;&lt;P&gt;       expnr type edi_expnr,&lt;/P&gt;&lt;P&gt;       inpnr type edi_inpnr.&lt;/P&gt;&lt;P&gt;types: end of t_tab_edpar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of t_tab_knvv,&lt;/P&gt;&lt;P&gt;       kunnr type kunnr,&lt;/P&gt;&lt;P&gt;       vkorg type vkorg,&lt;/P&gt;&lt;P&gt;       vtweg type vtweg,&lt;/P&gt;&lt;P&gt;       spart type spart,&lt;/P&gt;&lt;P&gt;       eikto type eikto.&lt;/P&gt;&lt;P&gt;types: end of t_tab_knvv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of t_tab_knvp,&lt;/P&gt;&lt;P&gt;       kunnr type kunnr,&lt;/P&gt;&lt;P&gt;       vkorg type vkorg,&lt;/P&gt;&lt;P&gt;       vtweg type vtweg,&lt;/P&gt;&lt;P&gt;       spart type spart,&lt;/P&gt;&lt;P&gt;       parvw type parvw,&lt;/P&gt;&lt;P&gt;       kunn2 type kunn2.&lt;/P&gt;&lt;P&gt;types: end of t_tab_knvp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;type-pools: slis.&lt;/P&gt;&lt;P&gt;*define data statments...&lt;/P&gt;&lt;P&gt;data: g_tab_edpar type standard table of t_tab_edpar,&lt;/P&gt;&lt;P&gt;      g_wa_edpar  like line of g_tab_edpar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: g_tab_edpar1 type standard table of t_tab_edpar,&lt;/P&gt;&lt;P&gt;      g_wa_edpar1  like line of g_tab_edpar1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: g_tab_edpar2 type standard table of t_tab_edpar,&lt;/P&gt;&lt;P&gt;      g_wa_edpar2  like line of g_tab_edpar2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: g_tab_knvv type standard table of t_tab_knvv,&lt;/P&gt;&lt;P&gt;      g_wa_knvv  like line of g_tab_knvv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: g_tab_knvp type standard table of t_tab_knvp,&lt;/P&gt;&lt;P&gt;      g_wa_knvp  like line of g_tab_knvp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: repid like sy-repid,&lt;/P&gt;&lt;P&gt;      l_tab_fieldcat  type slis_t_fieldcat_alv,&lt;/P&gt;&lt;P&gt;      l_tab_fieldcat1 type slis_t_fieldcat_alv,&lt;/P&gt;&lt;P&gt;      l_tab_fieldcat2 type slis_t_fieldcat_alv,&lt;/P&gt;&lt;P&gt;      layout type slis_layout_alv,&lt;/P&gt;&lt;P&gt;      events  type slis_t_event,&lt;/P&gt;&lt;P&gt;      events1 type slis_t_event,&lt;/P&gt;&lt;P&gt;      wa_events  like line of events,&lt;/P&gt;&lt;P&gt;      l_pos type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*selection screen...&lt;/P&gt;&lt;P&gt;selection-screen begin of block b1 with frame title text-001.&lt;/P&gt;&lt;P&gt;select-options: s_cust for knvv-kunnr obligatory,&lt;/P&gt;&lt;P&gt;                s_sorg for knvv-vkorg,&lt;/P&gt;&lt;P&gt;                s_dcha for knvv-vtweg,&lt;/P&gt;&lt;P&gt;                s_divi for knvv-spart,&lt;/P&gt;&lt;P&gt;                s_parf for knvp-parvw.&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;perform get_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*to update the db table edpar...&lt;/P&gt;&lt;P&gt;perform update_edpar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*display alv block...&lt;/P&gt;&lt;P&gt;perform alv_block.&lt;/P&gt;&lt;P&gt;&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;P&gt;  select kunnr&lt;/P&gt;&lt;P&gt;         vkorg&lt;/P&gt;&lt;P&gt;         vtweg&lt;/P&gt;&lt;P&gt;         spart&lt;/P&gt;&lt;P&gt;         parvw&lt;/P&gt;&lt;P&gt;         kunn2&lt;/P&gt;&lt;P&gt;         from knvp&lt;/P&gt;&lt;P&gt;         into table g_tab_knvp&lt;/P&gt;&lt;P&gt;         where&lt;/P&gt;&lt;P&gt;         kunnr in s_cust&lt;/P&gt;&lt;P&gt;         and&lt;/P&gt;&lt;P&gt;         vkorg in s_sorg&lt;/P&gt;&lt;P&gt;         and&lt;/P&gt;&lt;P&gt;         vtweg in s_dcha&lt;/P&gt;&lt;P&gt;         and&lt;/P&gt;&lt;P&gt;         spart in s_divi&lt;/P&gt;&lt;P&gt;         and&lt;/P&gt;&lt;P&gt;         parvw in s_parf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at g_tab_knvp into g_wa_knvp.&lt;/P&gt;&lt;P&gt;    move: g_wa_knvp-kunnr to g_wa_edpar-kunnr,&lt;/P&gt;&lt;P&gt;          g_wa_knvp-kunn2 to g_wa_edpar-inpnr,&lt;/P&gt;&lt;P&gt;          g_wa_knvp-parvw to g_wa_edpar-parvw.&lt;/P&gt;&lt;P&gt;    append g_wa_edpar to g_tab_edpar.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if not g_tab_knvp[] is initial.&lt;/P&gt;&lt;P&gt;    select kunnr&lt;/P&gt;&lt;P&gt;           vkorg&lt;/P&gt;&lt;P&gt;           vtweg&lt;/P&gt;&lt;P&gt;           spart&lt;/P&gt;&lt;P&gt;           eikto&lt;/P&gt;&lt;P&gt;           from knvv&lt;/P&gt;&lt;P&gt;           into table g_tab_knvv&lt;/P&gt;&lt;P&gt;           for all entries in g_tab_knvp&lt;/P&gt;&lt;P&gt;           where&lt;/P&gt;&lt;P&gt;           kunnr eq g_tab_knvp-kunnr&lt;/P&gt;&lt;P&gt;           and&lt;/P&gt;&lt;P&gt;           vkorg eq g_tab_knvp-vkorg&lt;/P&gt;&lt;P&gt;           and&lt;/P&gt;&lt;P&gt;           vtweg eq g_tab_knvp-vtweg&lt;/P&gt;&lt;P&gt;           and&lt;/P&gt;&lt;P&gt;           spart eq g_tab_knvp-spart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    loop at g_tab_knvp into g_wa_knvp .&lt;/P&gt;&lt;P&gt;      sort g_tab_knvv by kunnr.&lt;/P&gt;&lt;P&gt;      clear g_wa_knvv-eikto.&lt;/P&gt;&lt;P&gt;      read table g_tab_knvv into g_wa_knvv with key kunnr = g_wa_knvp-kunnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;        move: g_wa_knvv-eikto to g_wa_edpar-expnr.&lt;/P&gt;&lt;P&gt;        modify g_tab_edpar from g_wa_edpar transporting expnr where kunnr eq g_wa_knvp-kunnr.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;    endloop.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;  sort g_tab_edpar by kunnr.&lt;/P&gt;&lt;P&gt;  delete adjacent duplicates from g_tab_edpar comparing kunnr parvw.&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  update_edpar&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 update_edpar .&lt;/P&gt;&lt;P&gt;  delete from edpar." FROM TABLE g_tab_delete.&lt;/P&gt;&lt;P&gt;  call function 'DB_COMMIT'.&lt;/P&gt;&lt;P&gt;  loop at g_tab_edpar into g_wa_edpar.&lt;/P&gt;&lt;P&gt;    insert into edpar values g_wa_edpar.&lt;/P&gt;&lt;P&gt;    if sy-subrc  eq 0.&lt;/P&gt;&lt;P&gt;      move-corresponding g_wa_edpar to g_wa_edpar1.&lt;/P&gt;&lt;P&gt;      append g_wa_edpar1 to g_tab_edpar1.&lt;/P&gt;&lt;P&gt;    else.&lt;/P&gt;&lt;P&gt;      move-corresponding g_wa_edpar to g_wa_edpar2.&lt;/P&gt;&lt;P&gt;      append g_wa_edpar2 to g_tab_edpar2.&lt;/P&gt;&lt;P&gt;    endif.&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;reward points if helpful,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;seshu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2007 05:15:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-for-quot-insert-data-to-variable-tables-quot/m-p/2400738#M534780</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-15T05:15:53Z</dc:date>
    </item>
    <item>
      <title>Re: help for "insert data to variable tables"</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-for-quot-insert-data-to-variable-tables-quot/m-p/2400739#M534781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;dear sesu.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Thanks a lot for yr kind reply!!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Sorry, I re-edit my post.....if you have idea,plese kindly notice me..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2007 05:17:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-for-quot-insert-data-to-variable-tables-quot/m-p/2400739#M534781</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-15T05:17:58Z</dc:date>
    </item>
    <item>
      <title>Re: help for "insert data to variable tables"</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-for-quot-insert-data-to-variable-tables-quot/m-p/2400740#M534782</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 this link for a sample code to create dynamic internal table for the given table name in the selection screen..&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="3573430"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2007 05:18:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-for-quot-insert-data-to-variable-tables-quot/m-p/2400740#M534782</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-15T05:18:09Z</dc:date>
    </item>
    <item>
      <title>Re: help for "insert data to variable tables"</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-for-quot-insert-data-to-variable-tables-quot/m-p/2400741#M534783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot very much!!!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U all r so KIND &lt;SUP&gt;o&lt;/SUP&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2007 05:57:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-for-quot-insert-data-to-variable-tables-quot/m-p/2400741#M534783</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-15T05:57:47Z</dc:date>
    </item>
  </channel>
</rss>

