<?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: syntax help in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-help/m-p/1357051#M178022</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Excellent its working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But i am getting an extra comma(,) in front of v_stat field.I think i am getting it because of the header any idea how to remove it..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Awarded maximum points&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 May 2006 13:22:27 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-05-29T13:22:27Z</dc:date>
    <item>
      <title>syntax help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-help/m-p/1357044#M178015</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 a dynamic internal table and in a field called status.The IT is having several line items retrieved dynamically.For example the line item display of status field is as below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;01&lt;/P&gt;&lt;P&gt;02&lt;/P&gt;&lt;P&gt;01&lt;/P&gt;&lt;P&gt;03&lt;/P&gt;&lt;P&gt;05&lt;/P&gt;&lt;P&gt;02&lt;/P&gt;&lt;P&gt;05&lt;/P&gt;&lt;P&gt;.....&lt;/P&gt;&lt;P&gt;Now i want a consolidated field which gives the result like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;status_field = 01,02,03,05...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its means each staus value should be displayed once in this field.&lt;/P&gt;&lt;P&gt;Any code help please..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 May 2006 12:27:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-help/m-p/1357044#M178015</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-29T12:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: syntax help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-help/m-p/1357045#M178016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Kumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could collect all values in another table using COLLECT, thus having each value only once in the new table. Then sort this new table, read it and CONCATENATE all values in the status_field.&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;&lt;/P&gt;&lt;P&gt;John.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 May 2006 12:29:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-help/m-p/1357045#M178016</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-29T12:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: syntax help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-help/m-p/1357046#M178017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sort itab by status,&lt;/P&gt;&lt;P&gt;delete adjacent duplicate from itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;first it will sort the table and then it will remove the duplicate entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is what u want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark helpfull answers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Manoj Gupta&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 May 2006 12:29:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-help/m-p/1357046#M178017</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-29T12:29:49Z</dc:date>
    </item>
    <item>
      <title>Re: syntax help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-help/m-p/1357047#M178018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this..&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data status_field type string.
loop at it.
 concatenate status_field  it-lfd into status_field 
separated by ','.
endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suresh Datti&lt;/P&gt;&lt;P&gt;P.S. sorry..Didn't read your post completely.. ignore my reply &amp;amp; use the code posted by Ravi below..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Suresh Datti&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 May 2006 12:31:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-help/m-p/1357047#M178018</guid>
      <dc:creator>suresh_datti</dc:creator>
      <dc:date>2006-05-29T12:31:15Z</dc:date>
    </item>
    <item>
      <title>Re: syntax help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-help/m-p/1357048#M178019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;move itab-status to itab_new-status.&lt;/P&gt;&lt;P&gt;append itab_new.&lt;/P&gt;&lt;P&gt;clear itab_new.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort itab_new by status.&lt;/P&gt;&lt;P&gt;loop at itab_new.&lt;/P&gt;&lt;P&gt;at new status.&lt;/P&gt;&lt;P&gt;concatenate v_stat itab_new-status into v_stat &lt;/P&gt;&lt;P&gt;separated by ','.&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;write:/ v_stat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 May 2006 12:31:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-help/m-p/1357048#M178019</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-29T12:31:36Z</dc:date>
    </item>
    <item>
      <title>Re: syntax help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-help/m-p/1357049#M178020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;b&amp;gt;SORT T_BOM BY VBELN POSNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE ADJACENT DUPLICATES FROM T_BOM COMPARING VBELN&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PLEASE AWARD POINTS IF SOUNF HELPFUL&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 May 2006 12:33:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-help/m-p/1357049#M178020</guid>
      <dc:creator>rahulkavuri</dc:creator>
      <dc:date>2006-05-29T12:33:11Z</dc:date>
    </item>
    <item>
      <title>Re: syntax help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-help/m-p/1357050#M178021</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;&lt;/P&gt;&lt;P&gt;1. just copy paste in new program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. it will print&lt;/P&gt;&lt;P&gt;   01,02,03,05, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. report abc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;       status(2) type c,&lt;/P&gt;&lt;P&gt;       end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : allstat(100) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------" /&gt;&lt;P&gt;itab-status = '01'.&lt;/P&gt;&lt;P&gt;append itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab-status = '02'.&lt;/P&gt;&lt;P&gt;append itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab-status = '01'.&lt;/P&gt;&lt;P&gt;append itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab-status = '03'.&lt;/P&gt;&lt;P&gt;append itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab-status = '05'.&lt;/P&gt;&lt;P&gt;append itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab-status = '02'.&lt;/P&gt;&lt;P&gt;append itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab-status = '05'.&lt;/P&gt;&lt;P&gt;append itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="----------------------" /&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;  if not allstat  cs itab-status.&lt;/P&gt;&lt;P&gt;    concatenate allstat  itab-status ',' into allstat.&lt;/P&gt;&lt;P&gt;  endif.&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;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write allstat.&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;&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>Mon, 29 May 2006 12:34:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-help/m-p/1357050#M178021</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-29T12:34:21Z</dc:date>
    </item>
    <item>
      <title>Re: syntax help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-help/m-p/1357051#M178022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Excellent its working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But i am getting an extra comma(,) in front of v_stat field.I think i am getting it because of the header any idea how to remove it..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Awarded maximum points&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 May 2006 13:22:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-help/m-p/1357051#M178022</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-29T13:22:27Z</dc:date>
    </item>
    <item>
      <title>Re: syntax help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-help/m-p/1357052#M178023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do this way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab_new.&lt;/P&gt;&lt;P&gt;at new status.&lt;/P&gt;&lt;P&gt;concatenate  itab_new-status v_stat into v_stat &lt;/P&gt;&lt;P&gt;separated by ','.&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;NOte that i have Changed the order of the arguments passed to the concatenate statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 May 2006 13:27:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-help/m-p/1357052#M178023</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-29T13:27:22Z</dc:date>
    </item>
    <item>
      <title>Re: syntax help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-help/m-p/1357053#M178024</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;I made the changes but now i am getting the comma at the end.Also when there is only one status i want only value to be displaced without the comma.Please advise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 May 2006 13:32:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-help/m-p/1357053#M178024</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-29T13:32:57Z</dc:date>
    </item>
    <item>
      <title>Re: syntax help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-help/m-p/1357054#M178025</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;Instead of using the APPEND statement use the COLLECT statement. You then don't need any AT NEW.. statement when looping over the table as there are only unique values in the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then check if the table holds more than one line. If not just read the first value and assign it to status_field, otherwise loop over the table and CONCATENATE each value seperated by ','.&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;&lt;/P&gt;&lt;P&gt;John.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 May 2006 13:36:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-help/m-p/1357054#M178025</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-29T13:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: syntax help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-help/m-p/1357055#M178026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. To remove the comma at the end of the string,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. use this logic (just 4 lines)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;data : l type i.&lt;/P&gt;&lt;P&gt;l  = strlen( allstat ).&lt;/P&gt;&lt;P&gt;l = l - 1.&lt;/P&gt;&lt;P&gt;allstat = allstat(l).&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; allstat.&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;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 May 2006 13:39:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-help/m-p/1357055#M178026</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-29T13:39:48Z</dc:date>
    </item>
    <item>
      <title>Re: syntax help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-help/m-p/1357056#M178027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Excellent Amit. It works&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can only award 2 points..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 May 2006 13:44:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-help/m-p/1357056#M178027</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-29T13:44:09Z</dc:date>
    </item>
  </channel>
</rss>

