<?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/1085511#M99178</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;Thanks alot once again for your valuable help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;chandu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Nov 2005 10:31:04 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-11-11T10:31:04Z</dc:date>
    <item>
      <title>logic required</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/1085500#M99167</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 have an internal table with fields matnr and fevor and i have to check for no of records for every materal if the no of entries for each material more than 1 then i have to furthur coding based on fevor field.&lt;/P&gt;&lt;P&gt;And i want to know which system filed to use and which control break is better(at new or at end of) and some sample code is very helpful&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;chandu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2005 08:51:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/1085500#M99167</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-11T08:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: logic required</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/1085501#M99168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;data count type i.&lt;/P&gt;&lt;P&gt;data flg_further .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort itab by matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt; count = count + 1 .&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; at end of matnr .&lt;/P&gt;&lt;P&gt;  If count gt 1 .&lt;/P&gt;&lt;P&gt;     flg_further = 'X'.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;  clear count.&lt;/P&gt;&lt;P&gt; endat.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  if flg_further = 'X'.&lt;/P&gt;&lt;P&gt;    &amp;lt; Your code here &amp;gt;.&lt;/P&gt;&lt;P&gt;    clear flg_further .&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;endloop.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Cheers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sanjay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2005 08:59:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/1085501#M99168</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-11T08:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: logic required</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/1085502#M99169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Data count_mat type I.&lt;/P&gt;&lt;P&gt;Sort itab by matnr.&lt;/P&gt;&lt;P&gt;Loop at itab.&lt;/P&gt;&lt;P&gt;       Count_mat = count_mat + 1.&lt;/P&gt;&lt;P&gt;At end of matnr.&lt;/P&gt;&lt;P&gt;     Itab-count = count_mat.&lt;/P&gt;&lt;P&gt;     Modify itab transporting count.&lt;/P&gt;&lt;P&gt;     Clear count_mat.&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 itab where count &amp;gt; 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Do the coding for fevor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2005 09:01:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/1085502#M99169</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-11T09:01:35Z</dc:date>
    </item>
    <item>
      <title>Re: logic required</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/1085503#M99170</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;As Usha suggested,you can go for that logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you declare count field in your internal table with others fields,you can easily handle this situation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types : begin of ty,&lt;/P&gt;&lt;P&gt;        matnr type mara-matnr,&lt;/P&gt;&lt;P&gt;        fevor...&lt;/P&gt;&lt;P&gt;        ...&lt;/P&gt;&lt;P&gt;        count type i,&lt;/P&gt;&lt;P&gt;        end of ty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : itab type standard table of ty,&lt;/P&gt;&lt;P&gt;       wa type ty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select required_fields from required_tables into corresponding fields of table itab where condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa-count = 0.&lt;/P&gt;&lt;P&gt;loop at itab into wa.&lt;/P&gt;&lt;P&gt;wa-count = wa_count + 1.&lt;/P&gt;&lt;P&gt;at end of matnr.&lt;/P&gt;&lt;P&gt;*Here you need to modify for all the corresponding materials where condition is must.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;modify itab from wa transporting count where matnr = wa-matnr.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;wa-count = 0.&lt;/P&gt;&lt;P&gt;endat.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab into wa where count &amp;gt; 1.&lt;/P&gt;&lt;P&gt;...logic needed for your program&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2005 09:32:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/1085503#M99170</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2005-11-11T09:32: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/1085504#M99171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;And i have to check fevor also for every material.&lt;/P&gt;&lt;P&gt;ex:&lt;/P&gt;&lt;P&gt;My internal table contains:&lt;/P&gt;&lt;P&gt;matnr   fevor&lt;/P&gt;&lt;P&gt;25      s07&lt;/P&gt;&lt;P&gt;25      empty&lt;/P&gt;&lt;P&gt;24      T04&lt;/P&gt;&lt;P&gt;24      s03&lt;/P&gt;&lt;P&gt;26      empty&lt;/P&gt;&lt;P&gt;27      s08&lt;/P&gt;&lt;P&gt;so my requirement is for every matnr check the no of records&lt;/P&gt;&lt;P&gt;if no of records is 1 then do nothing.(case 26 and 27)&lt;/P&gt;&lt;P&gt;if no of records is greater than 1(25 and 24) for that matnr i have to check fevor if it is empty (case 25) then delete that record otherwise do nothing (case 24)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope now it is clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards&lt;/P&gt;&lt;P&gt;Chandu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2005 09:34:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/1085504#M99171</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-11T09:34:32Z</dc:date>
    </item>
    <item>
      <title>Re: logic required</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/1085505#M99172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;  The above postings however solves your problem.&lt;/P&gt;&lt;P&gt;however, i shall explain the case where you should use &amp;lt;b&amp;gt; AT NEW OR AT END OF&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;consider an internal table with 2 fields&lt;/P&gt;&lt;P&gt;A   B&lt;/P&gt;&lt;P&gt;1   1  &amp;lt;-gets triggered&lt;/P&gt;&lt;P&gt;2   1  &lt;/P&gt;&lt;P&gt;2   1  &amp;lt;-gets triggered&lt;/P&gt;&lt;P&gt;2   2  &amp;lt;-gets triggered&lt;/P&gt;&lt;P&gt;3   1  &amp;lt;-gets triggered&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB.&lt;/P&gt;&lt;P&gt;  AT END OF B.&lt;/P&gt;&lt;P&gt;    // TRIGGERS RECORD 1 1 , 2 1.....&lt;/P&gt;&lt;P&gt;  ENDAT.&lt;/P&gt;&lt;P&gt;  AT LAST.&lt;/P&gt;&lt;P&gt;    // TRIGGERS ONLY AT THE LAST RECORD OF ITAB.&lt;/P&gt;&lt;P&gt;  ENDAT.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;1)Table should be sorted before using control breaks.&lt;/P&gt;&lt;P&gt;2)WHere condition should not be specified in loop while using control breaks.&lt;/P&gt;&lt;P&gt;3)Control breaks considers all fields left to field mentioned in control break.&lt;/P&gt;&lt;P&gt;So, in this case, &lt;/P&gt;&lt;P&gt;AT end of B. &lt;/P&gt;&lt;P&gt;triggers 1 1 and then 2 1 and so on.&lt;/P&gt;&lt;P&gt;though there is no change in B in first 3 records, even then the records gets triggered as there is change in A.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sailaja.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2005 09:37:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/1085505#M99172</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-11T09:37:20Z</dc:date>
    </item>
    <item>
      <title>Re: logic required</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/1085506#M99173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi sanjay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   A small clarification from you.&lt;/P&gt;&lt;P&gt;As per your code, the variable flg_further will be set to X only for the last material in the group (Say if the material T5 exists 3 times..only the third occurance of T5 will be picked up and the code applies there alone...am I right)&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Usha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2005 09:39:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/1085506#M99173</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-11T09:39:24Z</dc:date>
    </item>
    <item>
      <title>Re: logic required</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/1085507#M99174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;Data: cnt type i.
cnt = 0.
Loop at itab.
cnt = cnt + 1.
At end of matnr.
if cnt &amp;gt; 1.
 CONTINUE.
else.
&amp;lt;b&amp;gt; IF itab-fevor[] IS INITIAL.
  DELETE itab.
  ENDIF.&amp;lt;/b&amp;gt;
 clear cnt.
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this solves ur problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly reward if u find helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2005 09:41:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/1085507#M99174</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-11T09:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: logic required</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/1085508#M99175</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;&lt;/P&gt;&lt;P&gt;sort itab by matnr.&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;gv_tabix = sy-tabix.&lt;/P&gt;&lt;P&gt;count = count + 1.&lt;/P&gt;&lt;P&gt;if count &amp;gt; 1.&lt;/P&gt;&lt;P&gt;  if itab-fevor is initial.&lt;/P&gt;&lt;P&gt;   delete itab index gv_tabix.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;at end of matnr.&lt;/P&gt;&lt;P&gt;clear count.&lt;/P&gt;&lt;P&gt;endat.&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;Sailaja.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2005 09:42:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/1085508#M99175</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-11T09:42:00Z</dc:date>
    </item>
    <item>
      <title>Re: logic required</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/1085509#M99176</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;cnt = 0.&lt;/P&gt;&lt;P&gt;loop at itab into wa.&lt;/P&gt;&lt;P&gt;cnt = cnt + 1.&lt;/P&gt;&lt;P&gt;at end of matnr.&lt;/P&gt;&lt;P&gt;if cnt ge 1.&lt;/P&gt;&lt;P&gt;delete itab where matnr = wa-matnr and fervr is initial.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;cnt = 0.&lt;/P&gt;&lt;P&gt;endat.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2005 09:56:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/1085509#M99176</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2005-11-11T09:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: logic required</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/1085510#M99177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;Data: cnt type i.
cnt = 0.
Loop at itab.
cnt = cnt + 1.
At end of matnr.
if cnt &amp;gt; 1.
 CONTINUE.
else.
 IF itab-fevor[] IS INITIAL.
  DELETE itab.
  ENDIF.
 clear cnt.
endif.

&amp;lt;b&amp;gt;
ENDAT.
ENDLOOP&amp;lt;/b&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Forgot to add endloop in my code just try this out u can solve ur problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2005 10:00:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/1085510#M99177</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-11T10:00:37Z</dc:date>
    </item>
    <item>
      <title>Re: logic required</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/1085511#M99178</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;Thanks alot once again for your valuable help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;chandu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2005 10:31:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/1085511#M99178</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-11T10:31:04Z</dc:date>
    </item>
  </channel>
</rss>

