<?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: Logic required in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/5441175#M1247872</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;loop at itab1 into wa_itab1.&lt;/P&gt;&lt;P&gt;    read table itab2 into wa_itab2 &lt;/P&gt;&lt;P&gt;             where wa_itab2-mat1 =  wa_itab1-mat1 and wa_itab2-mat2 =  wa_itab1-mat2. &lt;/P&gt;&lt;P&gt;     IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;         MOVE-CORRESPONDING wa_itab2 to wa_itab3.&lt;/P&gt;&lt;P&gt;         APPEND WA_ITAB3 TO ITAB3.&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;HOPETHIS WILL HELP U.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Mar 2009 06:25:42 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-03-23T06:25:42Z</dc:date>
    <item>
      <title>Logic required</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/5441171#M1247868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have 2 internal table. itab and itab1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;material1	                material2     	qty&lt;/P&gt;&lt;P&gt;aaa		123		1&lt;/P&gt;&lt;P&gt;aaa		456		3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;material1	                material2     	material3	               values&lt;/P&gt;&lt;P&gt;aaa		123		xyz		1a&lt;/P&gt;&lt;P&gt;aaa		123		x1y1		2b&lt;/P&gt;&lt;P&gt;aaa		123		x2z2		1a&lt;/P&gt;&lt;P&gt;bbb		456		abc		4g&lt;/P&gt;&lt;P&gt;ddd		789		pqr		2g&lt;/P&gt;&lt;P&gt;ddd		789		lmn		5g&lt;/P&gt;&lt;P&gt;ddd		789		1bc		7h&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i need to compare both the internal tables with material1 and material2, In the 2nd internal table the field material2's records comes three or more times i need to remove those records from the internal tabel and append the correct records into another table. &lt;/P&gt;&lt;P&gt;How to add with out this values into another internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From the above example i need to remove aaa and ddd from the internal and append only bbb from here to itab3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any one help this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mohana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2009 06:09:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/5441171#M1247868</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-23T06:09:13Z</dc:date>
    </item>
    <item>
      <title>Re: Logic required</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/5441172#M1247869</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;use &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DELETE ADJACENT DUPLICATE&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;on both the internal table..&lt;/P&gt;&lt;P&gt;this remove al the duplicate records from both the internal table after that you append left value &lt;/P&gt;&lt;P&gt;in the third internal table...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this help  you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ritesh J&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2009 06:16:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/5441172#M1247869</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-23T06:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: Logic required</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/5441173#M1247870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mohana,&lt;/P&gt;&lt;P&gt;Loop through ITAB2 with WHERE Condition and move the value to other internal table.. or&lt;/P&gt;&lt;P&gt;u can check and delete from ITAB2 without deleting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to move to other.&lt;/P&gt;&lt;P&gt;loop at itab2 where fld1 = 'value ' and fld2 = 'value '.&lt;/P&gt;&lt;P&gt;itab3 = itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append itab3.&lt;/P&gt;&lt;P&gt;clear itab3.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to delete it from itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab2.&lt;/P&gt;&lt;P&gt;if fld1 ne 'value' and fld2 ne 'value'.&lt;/P&gt;&lt;P&gt;delete itabe2.&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;Hope this helps u.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Guru&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2009 06:18:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/5441173#M1247870</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-23T06:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: Logic required</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/5441174#M1247871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friend,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use like below in itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE ADJACENT DUPLICATES FROM itab2 comparing material1 material2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2009 06:20:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/5441174#M1247871</guid>
      <dc:creator>awin_prabhu</dc:creator>
      <dc:date>2009-03-23T06:20:36Z</dc:date>
    </item>
    <item>
      <title>Re: Logic required</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/5441175#M1247872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;loop at itab1 into wa_itab1.&lt;/P&gt;&lt;P&gt;    read table itab2 into wa_itab2 &lt;/P&gt;&lt;P&gt;             where wa_itab2-mat1 =  wa_itab1-mat1 and wa_itab2-mat2 =  wa_itab1-mat2. &lt;/P&gt;&lt;P&gt;     IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;         MOVE-CORRESPONDING wa_itab2 to wa_itab3.&lt;/P&gt;&lt;P&gt;         APPEND WA_ITAB3 TO ITAB3.&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;HOPETHIS WILL HELP U.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2009 06:25:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/5441175#M1247872</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-23T06:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: Logic required</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/5441176#M1247873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have one internal table itab with below records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fld1	fld2	fld3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;zzz	784	231&lt;/P&gt;&lt;P&gt;zzz	784	597&lt;/P&gt;&lt;P&gt;AAA	111	BBB&lt;/P&gt;&lt;P&gt;AAA	111	CCC&lt;/P&gt;&lt;P&gt;AAA	111	DDD&lt;/P&gt;&lt;P&gt;BBB	222	xyz&lt;/P&gt;&lt;P&gt;BBB	222	pqr&lt;/P&gt;&lt;P&gt;BBB	222	123&lt;/P&gt;&lt;P&gt;BBB	222	478&lt;/P&gt;&lt;P&gt;BBB	222	zqr&lt;/P&gt;&lt;P&gt;ggg	123	879&lt;/P&gt;&lt;P&gt;CCC	777	kkk&lt;/P&gt;&lt;P&gt;CCC	777	qwi&lt;/P&gt;&lt;P&gt;CCC	777	dsf&lt;/P&gt;&lt;P&gt;CCC	777	qwe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my requirement is i need to check the field fld1 and fld2, if the values comes more than 3times i need to remove the records, i want to append the correct records into another internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the above case i need to append 'ggg' and 'zzz' rows only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone pls suggest the logic.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2009 07:12:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/5441176#M1247873</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-23T07:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: Logic required</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/5441177#M1247874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just in your words tell what is the final o/p you are expecting from your internal table ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;give the output  for the below.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fld1 fld2 fld3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;zzz 784 231&lt;/P&gt;&lt;P&gt;zzz 784 597&lt;/P&gt;&lt;P&gt;AAA 111 BBB&lt;/P&gt;&lt;P&gt;AAA 111 CCC&lt;/P&gt;&lt;P&gt;AAA 111 DDD&lt;/P&gt;&lt;P&gt;BBB 222 xyz&lt;/P&gt;&lt;P&gt;BBB 222 pqr&lt;/P&gt;&lt;P&gt;BBB 222 123&lt;/P&gt;&lt;P&gt;BBB 222 478&lt;/P&gt;&lt;P&gt;BBB 222 zqr&lt;/P&gt;&lt;P&gt;ggg 123 879&lt;/P&gt;&lt;P&gt;CCC 777 kkk&lt;/P&gt;&lt;P&gt;CCC 777 qwi&lt;/P&gt;&lt;P&gt;CCC 777 dsf&lt;/P&gt;&lt;P&gt;CCC 777 qwe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is it the occurance of fld1  &amp;amp; fld2 thrice  or fld1 3 times sinlge is enough to discard the entry ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AAA 111 BBB&lt;/P&gt;&lt;P&gt;AAA 121 CCC  " check hte change &lt;/P&gt;&lt;P&gt;AAA 111 DDD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AAA 111 BBB&lt;/P&gt;&lt;P&gt;ABA 111 CCC&lt;/P&gt;&lt;P&gt;AAA 111 DDD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in both the cases can we discard the entry .. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Br,&lt;/P&gt;&lt;P&gt;Vijay..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2009 07:22:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/5441177#M1247874</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-23T07:22:01Z</dc:date>
    </item>
    <item>
      <title>Re: Logic required</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/5441178#M1247875</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;My final output table will be  like below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;zzz 784 231&lt;/P&gt;&lt;P&gt;zzz 784 597&lt;/P&gt;&lt;P&gt;ggg 123 879&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pls help this out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mohana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2009 07:27:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/5441178#M1247875</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-23T07:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: Logic required</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/5441179#M1247876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Apply this logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort itab by 3 fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at internal table.&lt;/P&gt;&lt;P&gt;var1 = field1.&lt;/P&gt;&lt;P&gt;count = count +1.&lt;/P&gt;&lt;P&gt;At new field 1&lt;/P&gt;&lt;P&gt;if count &amp;gt;3.&lt;/P&gt;&lt;P&gt;clear var1.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;move var1 to second internal table.&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;Thanks &amp;amp; Regards.&lt;/P&gt;&lt;P&gt;Ruchi Tiwari&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2009 07:27:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/5441179#M1247876</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-23T07:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: Logic required</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/5441180#M1247877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;execute the code ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZEX14.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : begin of itab occurs 0 ,&lt;/P&gt;&lt;P&gt;        f1(4) type c,&lt;/P&gt;&lt;P&gt;        f2(4) type c,&lt;/P&gt;&lt;P&gt;        f3(4) type c,&lt;/P&gt;&lt;P&gt;        end of itab.&lt;/P&gt;&lt;P&gt;DATA : GV_FLAG, GV_CNT TYPE I, GV_VAL(4) TYPE C.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        ITAB-F1 = 'ZZZ'. ITAB-F2 = '784'. ITAB-F3 = '231'. APPEND ITAB.CLEAR ITAB.&lt;/P&gt;&lt;P&gt;        ITAB-F1 = 'ZZZ'. ITAB-F2 = '784'. ITAB-F3 = '597'. APPEND ITAB.CLEAR ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        ITAB-F1 = 'AAA'. ITAB-F2 = '111'. ITAB-F3 = 'BBB'. APPEND ITAB.CLEAR ITAB.&lt;/P&gt;&lt;P&gt;        ITAB-F1 = 'AAA'. ITAB-F2 = '111'. ITAB-F3 = 'BBB'. APPEND ITAB.CLEAR ITAB.&lt;/P&gt;&lt;P&gt;        ITAB-F1 = 'AAA'. ITAB-F2 = '111'. ITAB-F3 = 'BBB'. APPEND ITAB.CLEAR ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        SORT ITAB BY F1 F2.&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;         AT NEW F1.&lt;/P&gt;&lt;P&gt;         GV_FLAG = 'X'.&lt;/P&gt;&lt;P&gt;         ENDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         IF GV_FLAG = 'X'.&lt;/P&gt;&lt;P&gt;         GV_CNT = GV_CNT + 1.&lt;/P&gt;&lt;P&gt;         ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         AT END OF F1.&lt;/P&gt;&lt;P&gt;         IF GV_CNT GE 3.&lt;/P&gt;&lt;P&gt;         DELETE ITAB WHERE F1 = ITAB-F1.&lt;/P&gt;&lt;P&gt;         ENDIF.&lt;/P&gt;&lt;P&gt;         CLEAR : GV_FLAG, GV_CNT.&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;        LOOP AT ITAB.&lt;/P&gt;&lt;P&gt;        WRITE:/ ITAB-F1, ITAB-F2, ITAB-F3.&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;you can enhace the logic on fld2 just like f1 in the above. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;br, &lt;/P&gt;&lt;P&gt;vijay.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2009 07:39:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/5441180#M1247877</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-23T07:39:03Z</dc:date>
    </item>
    <item>
      <title>Re: Logic required</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/5441181#M1247878</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;Use like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if prev_fld1 = it-fld1 and prev_fld2 = it-fld2.&lt;/P&gt;&lt;P&gt;count = count + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if count GE 3.&lt;/P&gt;&lt;P&gt;delete it where fld1 = prev_fld1 and fld2 = prev_fld2 .&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;prev_fld1 = it-fld1.&lt;/P&gt;&lt;P&gt;prev_fld2 = it-fld2.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2009 07:41:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/5441181#M1247878</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-23T07:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: Logic required</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/5441182#M1247879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mohana,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    do sumthing like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Sort itab_1 with by field1, field2.

Loop at itab_1 into wa_1.

  count = count + 1.
" if you want to check some condition with itab_2 use a READ statement &amp;amp; check the same
  At end of field1.
" if you want combination of field1 &amp;amp; field2 than use 'AT END OF FIELD2'
    If count lt 3.
      Append wa1 to itab3.
      Clear count.
    Endif.    
  Endat.  
Endloop.&lt;/CODE&gt;&lt;/PRE&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;&lt;P&gt;With luck,&lt;/P&gt;&lt;P&gt;Pritam.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Pritam Ghosh on Mar 23, 2009 8:57 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2009 07:52:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/5441182#M1247879</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-23T07:52:54Z</dc:date>
    </item>
  </channel>
</rss>

