<?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: Problem with logic in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-logic/m-p/3922587#M939714</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I can suggest few steps and you can use which ever is appropriate to your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)check if you really need POSNR, If no, declare a internal table with different structure with all fields of LIPS and lipov and move all the data to that internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2)If you need posnr,check if you have POSNR in LIPOV table and fetch that too, and use POSNR too in WHERE condition of the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These are suggestion, the one to chose depends on your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;removed_by_moderator&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sandeep&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Julius Bussche on Jun 24, 2008 7:20 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 May 2008 10:03:55 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-27T10:03:55Z</dc:date>
    <item>
      <title>Problem with logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-logic/m-p/3922583#M939710</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;following logic is not working pls help me&lt;/P&gt;&lt;P&gt;it_lips have line no(posnr), lt_lipov dont have POSNR.&lt;/P&gt;&lt;P&gt;i need to move all the records from it_lips to lt_lipov.&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 * FROM lips INTO&lt;/P&gt;&lt;P&gt;CORRESPONDING FIELDS OF TABLE  it_lips&lt;/P&gt;&lt;P&gt;for all entries in lt_lipov&lt;/P&gt;&lt;P&gt;            WHERE vbeln = lt_lipov-vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF it_lips[] IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT it_lips where vbeln = lt_lipov-vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*READ TABLE it_lips WITH KEY vbeln = lt_lipov-vbeln.&lt;/P&gt;&lt;P&gt;*IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      lt_lipov1-vbeln    = it_lips-vbeln.&lt;/P&gt;&lt;P&gt;      lt_lipov1-posnr    = it_lips-posnr.&lt;/P&gt;&lt;P&gt;      lt_lipov1-matnr    = it_lips-matnr.&lt;/P&gt;&lt;P&gt;      lt_lipov1-lddat    = it_lips-erdat.&lt;/P&gt;&lt;P&gt;      lt_lipov1-lfimg    = it_lips-lfimg.&lt;/P&gt;&lt;P&gt;      lt_lipov1-ernam    = it_lips-ernam.&lt;/P&gt;&lt;P&gt;      lt_lipov1-werks    = it_lips-werks.&lt;/P&gt;&lt;P&gt;      lt_lipov1-vgbel    = it_lips-vgbel.&lt;/P&gt;&lt;P&gt;      lt_lipov1-ebeln    = it_lips-vgbel.&lt;/P&gt;&lt;P&gt;      lt_lipov1-vgpos    = it_lips-vgpos.&lt;/P&gt;&lt;P&gt;      lt_lipov1-bolnr    = lt_lipov-bolnr.&lt;/P&gt;&lt;P&gt;      lt_lipov1-komau    = lt_lipov-komau.&lt;/P&gt;&lt;P&gt;       APPEND lt_lipov1.&lt;/P&gt;&lt;P&gt; CLEAR  lt_lipov1.&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2008 09:51:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-logic/m-p/3922583#M939710</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-27T09:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-logic/m-p/3922584#M939711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try using MOVE-CORRESPONDING inside the LOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Benedict&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2008 10:01:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-logic/m-p/3922584#M939711</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-27T10:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-logic/m-p/3922585#M939712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;remove where condition in.&lt;/P&gt;&lt;P&gt;LOOP AT it_lips where vbeln = lt_lipov-vbeln.&lt;/P&gt;&lt;P&gt;it will work&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2008 10:01:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-logic/m-p/3922585#M939712</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-27T10:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-logic/m-p/3922586#M939713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the select query, you are doing a For all entries in 'lt_lipov' in to internal table it_lips. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But you said you want to move data from table 'it_lips' to 'lt_lipov'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM lips INTO&lt;/P&gt;&lt;P&gt;CORRESPONDING FIELDS OF TABLE it_lips&lt;/P&gt;&lt;P&gt;for all entries in lt_lipov&lt;/P&gt;&lt;P&gt;WHERE vbeln = lt_lipov-vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in effect, table 'lt_lipov' is blank when you are selecting data from the table lips in to internal table 'it_lips'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the reason why the logic is not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;did you check the sy-subrc status after the select query? is it zero???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls revert back in case it is still not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;removed_by_moderator&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Raghav.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Julius Bussche on Jun 24, 2008 7:19 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2008 10:02:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-logic/m-p/3922586#M939713</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-27T10:02:34Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-logic/m-p/3922587#M939714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I can suggest few steps and you can use which ever is appropriate to your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)check if you really need POSNR, If no, declare a internal table with different structure with all fields of LIPS and lipov and move all the data to that internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2)If you need posnr,check if you have POSNR in LIPOV table and fetch that too, and use POSNR too in WHERE condition of the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These are suggestion, the one to chose depends on your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;removed_by_moderator&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sandeep&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Julius Bussche on Jun 24, 2008 7:20 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2008 10:03:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-logic/m-p/3922587#M939714</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-27T10:03:55Z</dc:date>
    </item>
  </channel>
</rss>

