<?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 printing ranges for smartforms in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/printing-ranges-for-smartforms/m-p/1576126#M260137</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;dear all,&lt;/P&gt;&lt;P&gt;i have a task which requires me to find the ranges in a set of numbers..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sample data: R09004016, R020185M01, R050015M&amp;lt;M04, R09004018, R020185M03, R050015M&amp;lt;M05,&lt;/P&gt;&lt;P&gt;R09004017, R020185M02, R050015M&amp;lt;M06, R020185M12, R09004002&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;these are the norsec numbers... which are needed to group them together if these numbers have the same characteristics..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the expected output would be &lt;/P&gt;&lt;P&gt;R09004002, R09004016 TO R09004018, R020185M01 TO R020185M03, R020185M12,&lt;/P&gt;&lt;P&gt;R050015M&amp;lt;M04 TO R050015M&amp;lt;M06  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my question is, how do i put these norsec numbers into ranges...? and the problem is that some norsec numbers have characters inside...the norsec numbers are alphanumeric..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any help is very much appreciated..thanks.. &lt;/P&gt;&lt;P&gt;urgent.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Oct 2006 08:34:44 GMT</pubDate>
    <dc:creator>cywings</dc:creator>
    <dc:date>2006-10-09T08:34:44Z</dc:date>
    <item>
      <title>printing ranges for smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/printing-ranges-for-smartforms/m-p/1576126#M260137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;dear all,&lt;/P&gt;&lt;P&gt;i have a task which requires me to find the ranges in a set of numbers..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sample data: R09004016, R020185M01, R050015M&amp;lt;M04, R09004018, R020185M03, R050015M&amp;lt;M05,&lt;/P&gt;&lt;P&gt;R09004017, R020185M02, R050015M&amp;lt;M06, R020185M12, R09004002&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;these are the norsec numbers... which are needed to group them together if these numbers have the same characteristics..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the expected output would be &lt;/P&gt;&lt;P&gt;R09004002, R09004016 TO R09004018, R020185M01 TO R020185M03, R020185M12,&lt;/P&gt;&lt;P&gt;R050015M&amp;lt;M04 TO R050015M&amp;lt;M06  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my question is, how do i put these norsec numbers into ranges...? and the problem is that some norsec numbers have characters inside...the norsec numbers are alphanumeric..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any help is very much appreciated..thanks.. &lt;/P&gt;&lt;P&gt;urgent.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Oct 2006 08:34:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/printing-ranges-for-smartforms/m-p/1576126#M260137</guid>
      <dc:creator>cywings</dc:creator>
      <dc:date>2006-10-09T08:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: printing ranges for smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/printing-ranges-for-smartforms/m-p/1576127#M260138</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;   Please check if below code can help to lead you. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: begin of itab occurs 0,
        fld1(20) type c,
      end of itab.
data: begin of it_out occurs 0,
        text(50) type c,
      end of it_out.

itab-fld1 = 'R09004016'.
append itab.
itab-fld1 = 'R020185M01'.
append itab.
itab-fld1 = 'R050015M&amp;lt;M04'.
append itab.
itab-fld1 = 'R09004018'.
append itab.
itab-fld1 = 'R020185M03'.
append itab.
itab-fld1 = 'R050015M&amp;lt;M05'.
append itab.
itab-fld1 = 'R09004017'.
append itab.
itab-fld1 = 'R020185M02'.
append itab.
itab-fld1 = 'R050015M&amp;lt;M06'.
append itab.
itab-fld1 = 'R020185M12'.
append itab.
itab-fld1 = 'R09004002'.
append itab.


data: from(20) type n,
      to(20) type n.

data: from_c like itab-fld1, "type c,
      to_c like itab-fld1. "type c.

sort itab by fld1.

loop at itab.

     if sy-tabix eq 1.
        from = itab-fld1.
        from_c = itab-fld1.
     else.
        perform compare using itab-fld1 to changing from.
     endif.

     to = itab-fld1.
     to_c = itab-fld1.

     at last.
        perform compare using to to changing from.
     endat.

 endloop.

 loop at it_out.
    write:/ it_out-text.
 endloop.

 form compare using p_fld1 p_to changing p_from.

 data: l_to(20) type n.
 data: l_fld(20) type n.

    l_to = p_to + 1.
    l_fld = p_fld1.
    
    if l_fld ne l_to.
       if p_to &amp;gt; p_from.
          concatenate from_c 'TO' to_c into it_out-text
                      separated by space.
          append it_out.
       else.
          move from_c to it_out-text.
          append it_out.
       endif.
       p_from = itab-fld1.
       from_c = itab-fld1.
     endif.

 endform.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Eswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Oct 2006 09:52:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/printing-ranges-for-smartforms/m-p/1576127#M260138</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-09T09:52:54Z</dc:date>
    </item>
    <item>
      <title>Re: printing ranges for smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/printing-ranges-for-smartforms/m-p/1576128#M260139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks!! it worked...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit: how come i cant award points when i clicked on the radio button on the left...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Yew Wing Chen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Oct 2006 07:02:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/printing-ranges-for-smartforms/m-p/1576128#M260139</guid>
      <dc:creator>cywings</dc:creator>
      <dc:date>2006-10-11T07:02:54Z</dc:date>
    </item>
    <item>
      <title>Re: printing ranges for smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/printing-ranges-for-smartforms/m-p/1576129#M260140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Glad could help you Yew.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe the server is down for points system. Please remember to reward when the server is up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Eswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Oct 2006 07:11:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/printing-ranges-for-smartforms/m-p/1576129#M260140</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-11T07:11:54Z</dc:date>
    </item>
  </channel>
</rss>

