<?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: Inserting data into append structure in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-data-into-append-structure/m-p/5154366#M1194187</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;REPORT  zappend_structure.&lt;/P&gt;&lt;P&gt;TABLES : yspfli, yscarr.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;DATA: BEGIN OF wa,&lt;/P&gt;&lt;P&gt;     include structure yspfli,  &lt;STRONG&gt;workarea should be like that of database table&lt;/STRONG&gt; (it should contain all fields) *&lt;/P&gt;&lt;P&gt;data:   END OF wa.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;DATA itab LIKE STANDARD TABLE OF wa.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;SELECT  c~carrname&lt;/P&gt;&lt;P&gt;       INTO CORRESPONDING FIELDS OF TABLE itab&lt;/P&gt;&lt;P&gt;       FROM  yspfli AS p&lt;/P&gt;&lt;P&gt;         INNER JOIN yscarr AS c ON c&lt;SUB&gt;carrid   = p&lt;/SUB&gt;carrid.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;LOOP AT itab INTO wa.&lt;/P&gt;&lt;P&gt;  WRITE:/ wa-carrname.&lt;/P&gt;&lt;P&gt;  update yspfli from  wa.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; INSERT into yspfli values wa.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 24 Jan 2009 05:12:07 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-01-24T05:12:07Z</dc:date>
    <item>
      <title>Inserting data into append structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-data-into-append-structure/m-p/5154362#M1194183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hiee friends ,&lt;/P&gt;&lt;P&gt;    I inserted a append strucuture into spfli table. I inserted carrname which is of scarr-carrname type .&lt;/P&gt;&lt;P&gt;    Now my requirement is to insert corresponding values in carrname in spfli table from the scarr table .&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;P&gt;     For that i got the corresponding values of spfli-carrname in my internal table . I tried to insert it with insert command but its showing some error ..i.e column type not equal&lt;/P&gt;&lt;P&gt; Friends any ideas how to insert the carrname values into the spfli append strucutre.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: lokesh pattnayak on Jan 23, 2009 1:59 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jan 2009 12:58:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-data-into-append-structure/m-p/5154362#M1194183</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-23T12:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting data into append structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-data-into-append-structure/m-p/5154363#M1194184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why not help us and help yourself, by showing us the actual ABAP you tried, (wrapped in  tags), and the specific error you are getting.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jan 2009 13:04:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-data-into-append-structure/m-p/5154363#M1194184</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2009-01-23T13:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting data into append structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-data-into-append-structure/m-p/5154364#M1194185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is my code that i am using to insert values into carrname field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NB- YSPFLI and YSCARR are copies of tables of spfli and scarr with the respective datas resp. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  zappend_structure.
TABLES : yspfli, yscarr.

DATA: BEGIN OF wa,
         carrid TYPE yspfli-carrid,
         carrname TYPE yscarr-carrname,
      END OF wa.

DATA itab LIKE STANDARD TABLE OF wa.


SELECT  c~carrname
       INTO CORRESPONDING FIELDS OF TABLE itab
       FROM  yspfli AS p
         INNER JOIN yscarr AS c ON c~carrid   = p~carrid.


LOOP AT itab INTO wa.
  WRITE:/ wa-carrname.
  INSERT into yspfli values wa.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ERROR : --- When i am checking the syntax it shows that "The work area wa is not alligned correctly" .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: lokesh pattnayak on Jan 23, 2009 3:58 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jan 2009 14:58:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-data-into-append-structure/m-p/5154364#M1194185</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-23T14:58:14Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting data into append structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-data-into-append-structure/m-p/5154365#M1194186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried with the update table  but still the same error is coming .&lt;/P&gt;&lt;P&gt;i.e "The workarea "WA" is not aligned correctly".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  zappend_structure.
TABLES : yspfli, yscarr.

DATA: BEGIN OF wa,
         carrid TYPE yspfli-carrid,
         carrname TYPE yscarr-carrname,
      END OF wa.

DATA itab LIKE STANDARD TABLE OF wa.


SELECT  c~carrname
       INTO CORRESPONDING FIELDS OF TABLE itab
       FROM  yspfli AS p
         INNER JOIN yscarr AS c ON c~carrid   = p~carrid.


LOOP AT itab INTO wa.
  WRITE:/ wa-carrname.
  update yspfli from  wa.
*  INSERT into yspfli values wa.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Friends any ideas how to insert the values into the carrname field from the workarea .&lt;/P&gt;&lt;P&gt;thanking you lokesh.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: lokesh pattnayak on Jan 24, 2009 3:49 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jan 2009 15:09:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-data-into-append-structure/m-p/5154365#M1194186</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-23T15:09:46Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting data into append structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-data-into-append-structure/m-p/5154366#M1194187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;REPORT  zappend_structure.&lt;/P&gt;&lt;P&gt;TABLES : yspfli, yscarr.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;DATA: BEGIN OF wa,&lt;/P&gt;&lt;P&gt;     include structure yspfli,  &lt;STRONG&gt;workarea should be like that of database table&lt;/STRONG&gt; (it should contain all fields) *&lt;/P&gt;&lt;P&gt;data:   END OF wa.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;DATA itab LIKE STANDARD TABLE OF wa.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;SELECT  c~carrname&lt;/P&gt;&lt;P&gt;       INTO CORRESPONDING FIELDS OF TABLE itab&lt;/P&gt;&lt;P&gt;       FROM  yspfli AS p&lt;/P&gt;&lt;P&gt;         INNER JOIN yscarr AS c ON c&lt;SUB&gt;carrid   = p&lt;/SUB&gt;carrid.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;LOOP AT itab INTO wa.&lt;/P&gt;&lt;P&gt;  WRITE:/ wa-carrname.&lt;/P&gt;&lt;P&gt;  update yspfli from  wa.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; INSERT into yspfli values wa.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Jan 2009 05:12:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-data-into-append-structure/m-p/5154366#M1194187</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-24T05:12:07Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting data into append structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-data-into-append-structure/m-p/5154367#M1194188</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;REPORT zappend_structure.&lt;/P&gt;&lt;P&gt;TABLES : yspfli, yscarr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA :  itab LIKE STANDARD TABLE OF yspfli.&lt;/P&gt;&lt;P&gt;DATA : wa_itab like line of yspfli.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT c~carrname&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE itab&lt;/P&gt;&lt;P&gt;FROM yspfli AS p&lt;/P&gt;&lt;P&gt;INNER JOIN yscarr AS c ON c&lt;SUB&gt;carrid = p&lt;/SUB&gt;carrid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;insert yspfli from table itab.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2009 09:35:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-data-into-append-structure/m-p/5154367#M1194188</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-27T09:35:56Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting data into append structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-data-into-append-structure/m-p/5154368#M1194189</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;For SQL statements, the work area or rows of the internal table must be at least as long as the database structure and the alignment must match.&lt;/P&gt;&lt;P&gt;So, declare another for inserting in database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L1S52"&gt;DATA : WA2 &lt;SPAN class="L1S52"&gt;TYPE&lt;/SPAN&gt; SPFLI.&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L1S52"&gt;LOOP &lt;SPAN class="L1S52"&gt;AT&lt;/SPAN&gt; itab &lt;SPAN class="L1S52"&gt;INTO&lt;/SPAN&gt; wa2.&lt;BR /&gt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L1S52"&gt;INSERT&lt;/SPAN&gt; &lt;SPAN class="L1S52"&gt;into&lt;/SPAN&gt; spfli VALUES wa2.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L1S52"&gt;&lt;BR /&gt;ENDLOOP.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2012 12:09:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-data-into-append-structure/m-p/5154368#M1194189</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-08-23T12:09:54Z</dc:date>
    </item>
  </channel>
</rss>

