<?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: Difficulty while Appending Struct... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-while-appending-struct/m-p/1363694#M180236</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ya  it  show  only  one   value  becoz  u have  one  value  of strn in struct1 . but  98in internal table  u have  many  value  for perticular strn in struct1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;solution...&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;make struct2  same  as struct1.&lt;/P&gt;&lt;P&gt;loop at struct1.&lt;/P&gt;&lt;P&gt;ind = sy-tabix.&lt;/P&gt;&lt;P&gt;loop at itabstpo where stlnr = struct1-stlnr.&lt;/P&gt;&lt;P&gt;struct2-stlnr = struct1-stlnr.&lt;/P&gt;&lt;P&gt;struct2-menge = itabstpo-menge .&lt;/P&gt;&lt;P&gt;struct2-nlfzt = itabstpo-nlfzt .&lt;/P&gt;&lt;P&gt;struct2-roms1 = itabstpo-roms1 .&lt;/P&gt;&lt;P&gt;struct2-idnrk = itabstpo-idnrk .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND struct2 .&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now  it  is  fine  just try  it...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Jun 2006 06:49:33 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-06-02T06:49:33Z</dc:date>
    <item>
      <title>Difficulty while Appending Struct...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-while-appending-struct/m-p/1363690#M180232</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 m Retreiving reocord from Table and appending in Struct but it is going in infinite loop..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my code is :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at struct1.&lt;/P&gt;&lt;P&gt;ind = sy-tabix.&lt;/P&gt;&lt;P&gt;loop at itabstpo where stlnr = struct1-stlnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;struct1-menge = itabstpo-menge .&lt;/P&gt;&lt;P&gt;struct1-nlfzt = itabstpo-nlfzt .&lt;/P&gt;&lt;P&gt;struct1-roms1 = itabstpo-roms1 .&lt;/P&gt;&lt;P&gt;struct1-idnrk = itabstpo-idnrk .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND struct1 .&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls Help...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;yunus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jun 2006 06:24:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-while-appending-struct/m-p/1363690#M180232</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-02T06:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulty while Appending Struct...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-while-appending-struct/m-p/1363691#M180233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi yunus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. The reason is&lt;/P&gt;&lt;P&gt;   we are using LOOP at STRUCT,&lt;/P&gt;&lt;P&gt;   and inside this loop only,&lt;/P&gt;&lt;P&gt;   we are using APPEND STRUCT1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; (we should never code like this,&lt;/P&gt;&lt;P&gt;  bcos the results are unpredictable)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Its better to APPEND&lt;/P&gt;&lt;P&gt;   in another similar internal table&lt;/P&gt;&lt;P&gt;  (similar to STRUCT1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Then after this loop completes,&lt;/P&gt;&lt;P&gt;   use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT NEWITAB.&lt;/P&gt;&lt;P&gt;  STRUCT1 = NEWITAB.&lt;/P&gt;&lt;P&gt;  APPEND STRUCT1.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. In this way, u won't have any problem !!!&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;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jun 2006 06:26:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-while-appending-struct/m-p/1363691#M180233</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-02T06:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulty while Appending Struct...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-while-appending-struct/m-p/1363692#M180234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use only..&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;modify struct1 .&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itabstpo where stlnr = struct1-stlnr.&lt;/P&gt;&lt;P&gt;this  line  means  there  are previously  value  in struct1.and  when  u  append  value  on it  again  it  goes  to   infinie loop.&lt;/P&gt;&lt;P&gt;and  for  performance  point   of   view  avoid  nested loop. use  read statment inside  loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jun 2006 06:30:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-while-appending-struct/m-p/1363692#M180234</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-02T06:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulty while Appending Struct...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-while-appending-struct/m-p/1363693#M180235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;when i m using modify it is giving me only last record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Regards,&lt;/P&gt;&lt;P&gt;yunus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jun 2006 06:44:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-while-appending-struct/m-p/1363693#M180235</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-02T06:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulty while Appending Struct...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-while-appending-struct/m-p/1363694#M180236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ya  it  show  only  one   value  becoz  u have  one  value  of strn in struct1 . but  98in internal table  u have  many  value  for perticular strn in struct1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;solution...&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;make struct2  same  as struct1.&lt;/P&gt;&lt;P&gt;loop at struct1.&lt;/P&gt;&lt;P&gt;ind = sy-tabix.&lt;/P&gt;&lt;P&gt;loop at itabstpo where stlnr = struct1-stlnr.&lt;/P&gt;&lt;P&gt;struct2-stlnr = struct1-stlnr.&lt;/P&gt;&lt;P&gt;struct2-menge = itabstpo-menge .&lt;/P&gt;&lt;P&gt;struct2-nlfzt = itabstpo-nlfzt .&lt;/P&gt;&lt;P&gt;struct2-roms1 = itabstpo-roms1 .&lt;/P&gt;&lt;P&gt;struct2-idnrk = itabstpo-idnrk .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND struct2 .&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now  it  is  fine  just try  it...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jun 2006 06:49:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-while-appending-struct/m-p/1363694#M180236</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-02T06:49:33Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulty while Appending Struct...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-while-appending-struct/m-p/1363695#M180237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;structure can hold only one value at any time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if u want all the records to be appended then append in internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inside loop use read statement to improve performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can u give the exact requirement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds,&lt;/P&gt;&lt;P&gt;latheesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jun 2006 06:56:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-while-appending-struct/m-p/1363695#M180237</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-02T06:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulty while Appending Struct...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-while-appending-struct/m-p/1363696#M180238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tables:mast,stpo,vbap,mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF struct occurs 100,&lt;/P&gt;&lt;P&gt;MATNR type VBAP-MATNR,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END OF struct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF struct1 occurs 100,&lt;/P&gt;&lt;P&gt;stlnr type mast-stlnr,&lt;/P&gt;&lt;P&gt;idnrk type stpo-idnrk,&lt;/P&gt;&lt;P&gt;menge type stpo-menge,&lt;/P&gt;&lt;P&gt;nlfzt type stpo-nlfzt,&lt;/P&gt;&lt;P&gt;roms1 type stpo-roms1,&lt;/P&gt;&lt;P&gt;EXTWG type MARA-EXTWG,&lt;/P&gt;&lt;P&gt;END OF struct1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: itab4 like VBAP occurs 1 with header line.&lt;/P&gt;&lt;P&gt;data: itab1 like MARA occurs 1 with header line.&lt;/P&gt;&lt;P&gt;data: itabstpo like stpo occurs 1 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from mara into table itab1.&lt;/P&gt;&lt;P&gt;select * from VBAP into table itab4. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at struct.&lt;/P&gt;&lt;P&gt;ind = sy-tabix.&lt;/P&gt;&lt;P&gt;read table itab4 with key vbeln = struct-vbeln.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;move itab4-MATNR to struct-MATNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;modify struct index ind transporting matnr.&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;select * from mast into corresponding fields of table struct1 where matnr = struct-matnr and WERKS = company &lt;/P&gt;&lt;P&gt;and stlan = '5' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from stpo into table itabstpo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// this loop is firing three time and data also showing me at breakpoint but at tha time of printing it is giving me only one record..&lt;/P&gt;&lt;P&gt;loop at struct1.&lt;/P&gt;&lt;P&gt;loop at itabstpo where stlnr = struct1-stlnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move itabstpo-menge to struct1-menge.&lt;/P&gt;&lt;P&gt;MODIFY struct1 INDEX SY-TABIX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move itabstpo-nlfzt to struct1-nlfzt.&lt;/P&gt;&lt;P&gt;MODIFY struct1 INDEX SY-TABIX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move itabstpo-roms1 to struct1-roms1.&lt;/P&gt;&lt;P&gt;MODIFY struct1 INDEX SY-TABIX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move itabstpo-idnrk to struct1-idnrk.&lt;/P&gt;&lt;P&gt;MODIFY struct1 INDEX SY-TABIX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&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 struct1.&lt;/P&gt;&lt;P&gt;write: / struct1-roms1, struct1-nlfzt ,struct1-menge ,struct1-idnrk.&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;yunus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jun 2006 09:29:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-while-appending-struct/m-p/1363696#M180238</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-02T09:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulty while Appending Struct...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-while-appending-struct/m-p/1363697#M180239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;b&amp;gt;data: struct2 like struct1  occurs 0 with header line.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;select * from stpo into table itabstpo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// this loop is firing three time and data also showing me at breakpoint but at tha time of printing it is giving me only one record..&lt;/P&gt;&lt;P&gt;loop at struct1.&lt;/P&gt;&lt;P&gt;loop at itabstpo where stlnr = struct1-stlnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move itabstpo-menge to struct2-menge.&lt;/P&gt;&lt;P&gt;move itabstpo-nlfzt to struct2-nlfzt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move itabstpo-roms1 to struct2-roms1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move itabstpo-idnrk to struct2-idnrk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append struct2.&lt;/P&gt;&lt;P&gt;endloop.&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 struct2.&lt;/P&gt;&lt;P&gt;write: / struct2-roms1, struct2-nlfzt ,struct2-menge ,struct2-idnrk.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jun 2006 09:33:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-while-appending-struct/m-p/1363697#M180239</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-02T09:33:25Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulty while Appending Struct...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-while-appending-struct/m-p/1363698#M180240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Yunus,&lt;/P&gt;&lt;P&gt;                MODIFY would help. use Modify STRUCT INDEX ind(as stored by you) or use extension TRANSPORTING field1,field2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also the alternate solution is loop at struct then use READ itabstpo with key stlnr = struct1-stlnr.&lt;/P&gt;&lt;P&gt;This would also serve the purpose I think.&lt;/P&gt;&lt;P&gt;Reward if useful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jun 2006 09:49:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-while-appending-struct/m-p/1363698#M180240</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-02T09:49:45Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulty while Appending Struct...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-while-appending-struct/m-p/1363699#M180241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi kishan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for ur help now i m getting all the records in struct2 but when i m passing one the struct2 value in another loop it is giving me last record in that loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but while diaplying through write it is displaying all the record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my code is :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at struct1.&lt;/P&gt;&lt;P&gt;ind = sy-tabix.&lt;/P&gt;&lt;P&gt;loop at itabstpo where stlnr = struct1-stlnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;struct2-menge = itabstpo-menge .&lt;/P&gt;&lt;P&gt;struct2-nlfzt = itabstpo-nlfzt .&lt;/P&gt;&lt;P&gt;struct2-roms1 = itabstpo-roms1 .&lt;/P&gt;&lt;P&gt;struct2-idnrk = itabstpo-idnrk .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND struct2 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here i m passing struct2-idnrk in the below loop but it is not giving me first value of idnrk it is giving me last value of idnrk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at struct1.&lt;/P&gt;&lt;P&gt;ind = sy-tabix.&lt;/P&gt;&lt;P&gt;    loop at itab1 WHERE matnr = struct2-idnrk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;struct2-EXTWG = itab1-EXTWG .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  APPEND struct2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pls help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;yunus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jun 2006 10:23:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-while-appending-struct/m-p/1363699#M180241</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-02T10:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulty while Appending Struct...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-while-appending-struct/m-p/1363700#M180242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;b&amp;gt;loop at struct2.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;ind = sy-tabix.&lt;/P&gt;&lt;P&gt;loop at itab1 WHERE matnr = struct2-idnrk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;struct2-EXTWG = itab1-EXTWG .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;modify struct2.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;endloop.&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;&amp;lt;b&amp;gt;note...&amp;lt;/b&amp;gt;plz   don't  use  nested  loop it  decrease  ur  programm performance....&lt;/P&gt;&lt;P&gt;use  read ststment inside loop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like this...&lt;/P&gt;&lt;P&gt;sort itab1.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;loop at struct2.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;ind = sy-tabix.&lt;/P&gt;&lt;P&gt;read table  itab1 binary search with key matnr = struct2-idnrk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;struct2-EXTWG = itab1-EXTWG .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;modify struct2.&amp;lt;/b&amp;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;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jun 2006 10:29:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-while-appending-struct/m-p/1363700#M180242</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-02T10:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulty while Appending Struct...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-while-appending-struct/m-p/1363701#M180243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;kishan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;below code is giving last record twice. means dulpicate record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at struct1.&lt;/P&gt;&lt;P&gt;ind = sy-tabix.&lt;/P&gt;&lt;P&gt;loop at itabstpo where stlnr = struct1-stlnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;struct2-menge = itabstpo-menge .&lt;/P&gt;&lt;P&gt;struct2-nlfzt = itabstpo-nlfzt .&lt;/P&gt;&lt;P&gt;struct2-roms1 = itabstpo-roms1 .&lt;/P&gt;&lt;P&gt;struct2-idnrk = itabstpo-idnrk .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND struct2 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in table itspstpo only three records r there but after appending struct2. when i m displaying record it displaying four record in that it is displaying last record two times.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt; yunus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jun 2006 10:38:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-while-appending-struct/m-p/1363701#M180243</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-02T10:38:15Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulty while Appending Struct...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-while-appending-struct/m-p/1363702#M180244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;loop at struct1.&lt;/P&gt;&lt;P&gt;ind = sy-tabix.&lt;/P&gt;&lt;P&gt;loop at itabstpo where stlnr = struct1-stlnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;struct2-menge = itabstpo-menge .&lt;/P&gt;&lt;P&gt;struct2-nlfzt = itabstpo-nlfzt .&lt;/P&gt;&lt;P&gt;struct2-roms1 = itabstpo-roms1 .&lt;/P&gt;&lt;P&gt;struct2-idnrk = itabstpo-idnrk .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND struct2 .&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;clear: struct2.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;delete adjacent duplicates from struct2.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jun 2006 10:41:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-while-appending-struct/m-p/1363702#M180244</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-02T10:41:03Z</dc:date>
    </item>
  </channel>
</rss>

