<?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: replace continous numbers with space in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-continous-numbers-with-space/m-p/3162341#M752215</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Credit card numbers?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Untested - but this could work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: rec(70),
      t_tab LIKE STANDARD TABLE OF rec,
      l_checkrec(85).

FIELD-SYMBOLS: &amp;lt;l_rec&amp;gt;      LIKE rec,
               &amp;lt;l_next_rec&amp;gt; LIKE rec.

DATA: l_index      TYPE i,
      l_checklen   TYPE i,
      l_pos        TYPE i,
      l_char       TYPE c LENGTH 1,
      l_num_length TYPE i,
      l_start      TYPE i,
      l_len        TYPE i.

LOOP AT t_tab ASSIGNING &amp;lt;l_rec&amp;gt;.
  l_index = sy-tabix + 1.
  READ TABLE t_tab ASSIGNING &amp;lt;l_next_rec&amp;gt; INDEX l_index.
  IF &amp;lt;l_next_rec&amp;gt; IS ASSIGNED.
    CONCATENATE &amp;lt;l_rec&amp;gt; &amp;lt;l_next_rec&amp;gt; INTO l_checkrec.
  ELSE.
    l_checkrec = &amp;lt;l_rec&amp;gt;.
  ENDIF.
  l_checklen = STRLEN( l_checkrec ).

  DO l_checklen TIMES.                                    
    l_char = l_checkrec+l_pos(1).
    IF l_char CA '0123456789'.
      ADD 1 TO l_num_length.
    ELSE.
      CLEAR l_num_length.
    ENDIF.
    IF l_num_length EQ 16.
      l_start = l_pos - 16.
      IF l_pos LE 70.

        CLEAR &amp;lt;l_rec&amp;gt;+l_start(16).
      ELSE.
        CLEAR &amp;lt;l_rec&amp;gt;+l_start.
        l_len = l_pos - 70.
        CLEAR &amp;lt;l_next_rec&amp;gt;(l_len).
      ENDIF.
    ENDIF.
  ENDDO.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I say, untested - so you'll probably have to play with some of the numbers to get it exactly right, but I think the principle is obvious.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Dec 2007 13:47:05 GMT</pubDate>
    <dc:creator>matt</dc:creator>
    <dc:date>2007-12-14T13:47:05Z</dc:date>
    <item>
      <title>replace continous numbers with space</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-continous-numbers-with-space/m-p/3162340#M752214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi...&lt;/P&gt;&lt;P&gt;an urgent requirement...&lt;/P&gt;&lt;P&gt;i have an internal table, with rows containing characters of 70 length.&lt;/P&gt;&lt;P&gt;if i find continous 16 digits of numbers, i have to replace the numbers with space.&lt;/P&gt;&lt;P&gt;How am i supposed to do this?&lt;/P&gt;&lt;P&gt;The first row can be continued by next row record also.&lt;/P&gt;&lt;P&gt;So, how to check the contnuinty in the next record also.&lt;/P&gt;&lt;P&gt;for example...&lt;/P&gt;&lt;P&gt;Line 1--- thrirj1234&lt;/P&gt;&lt;P&gt;line  2 --- 45678thyeu&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so, it has c first line  and next line to is to be checked to c if it is starting wth numbers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please do help me solve this issue..&lt;/P&gt;&lt;P&gt;Thank u&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Dec 2007 13:19:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-continous-numbers-with-space/m-p/3162340#M752214</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-14T13:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: replace continous numbers with space</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-continous-numbers-with-space/m-p/3162341#M752215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Credit card numbers?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Untested - but this could work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: rec(70),
      t_tab LIKE STANDARD TABLE OF rec,
      l_checkrec(85).

FIELD-SYMBOLS: &amp;lt;l_rec&amp;gt;      LIKE rec,
               &amp;lt;l_next_rec&amp;gt; LIKE rec.

DATA: l_index      TYPE i,
      l_checklen   TYPE i,
      l_pos        TYPE i,
      l_char       TYPE c LENGTH 1,
      l_num_length TYPE i,
      l_start      TYPE i,
      l_len        TYPE i.

LOOP AT t_tab ASSIGNING &amp;lt;l_rec&amp;gt;.
  l_index = sy-tabix + 1.
  READ TABLE t_tab ASSIGNING &amp;lt;l_next_rec&amp;gt; INDEX l_index.
  IF &amp;lt;l_next_rec&amp;gt; IS ASSIGNED.
    CONCATENATE &amp;lt;l_rec&amp;gt; &amp;lt;l_next_rec&amp;gt; INTO l_checkrec.
  ELSE.
    l_checkrec = &amp;lt;l_rec&amp;gt;.
  ENDIF.
  l_checklen = STRLEN( l_checkrec ).

  DO l_checklen TIMES.                                    
    l_char = l_checkrec+l_pos(1).
    IF l_char CA '0123456789'.
      ADD 1 TO l_num_length.
    ELSE.
      CLEAR l_num_length.
    ENDIF.
    IF l_num_length EQ 16.
      l_start = l_pos - 16.
      IF l_pos LE 70.

        CLEAR &amp;lt;l_rec&amp;gt;+l_start(16).
      ELSE.
        CLEAR &amp;lt;l_rec&amp;gt;+l_start.
        l_len = l_pos - 70.
        CLEAR &amp;lt;l_next_rec&amp;gt;(l_len).
      ENDIF.
    ENDIF.
  ENDDO.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I say, untested - so you'll probably have to play with some of the numbers to get it exactly right, but I think the principle is obvious.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Dec 2007 13:47:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-continous-numbers-with-space/m-p/3162341#M752215</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2007-12-14T13:47:05Z</dc:date>
    </item>
  </channel>
</rss>

