<?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: abap code in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code/m-p/2148774#M453513</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;&amp;lt;b&amp;gt;this will solve ur prob...just paste this code..&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;  W_ID(20) TYPE C VALUE '123 &amp;gt;?ABC# XYZ',&lt;/P&gt;&lt;P&gt;  w_len type i,&lt;/P&gt;&lt;P&gt;  w_actual(20) type c,&lt;/P&gt;&lt;P&gt;w_off type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_len = strlen( w_id ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do w_len times.&lt;/P&gt;&lt;P&gt; w_off = sy-index - 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;b&amp;gt;if ( w_id+w_off(1) ca sy-abcde   ) &amp;lt;b&amp;gt;or&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;     ( w_id+w_off(1) ca '0123456789' )  .&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;    concatenate w_actual w_id+w_off(1) into w_actual.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;enddo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write: w_actual.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Rammohan Nagam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Apr 2007 08:49:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-04-17T08:49:17Z</dc:date>
    <item>
      <title>abap code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code/m-p/2148772#M453511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i want an abap code which when a user enters an ID number all the other characters except numbers and letterrs will only be ignored.in other words i want to store the ID number containing only numbers and letters. Our ID numbers contain spaces, forward slashes and hyphens and i want these ignored when returning the ID number&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2007 07:24:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code/m-p/2148772#M453511</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-17T07:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: abap code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code/m-p/2148773#M453512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Willard,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  I will give the logic and with this you can write the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First you store all your special symbols in one constant like forward slashes , spaces and etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First findout the length of your id. take an temp variable which is of the same type of ID. Now read single character of the ID using the offset( +0(1) )from back to end. if it has the special symbol, don't put that in your temp varilable otherwise place it in to your temp. Once the loop is over then you temp varible contains required information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Logic:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Finout the length of the string = n&lt;/P&gt;&lt;P&gt;2. Do loop n times&lt;/P&gt;&lt;P&gt;     if  ID+n(1) containts any space, forward slashes, hyphens &lt;/P&gt;&lt;P&gt;            Continue.&lt;/P&gt;&lt;P&gt;     else.&lt;/P&gt;&lt;P&gt;         TEMP+n(1).&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;This will solve your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Warm Regards,&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Warm Regards,&lt;/P&gt;&lt;P&gt;Vijay.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2007 08:41:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code/m-p/2148773#M453512</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-17T08:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: abap code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code/m-p/2148774#M453513</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;&amp;lt;b&amp;gt;this will solve ur prob...just paste this code..&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;  W_ID(20) TYPE C VALUE '123 &amp;gt;?ABC# XYZ',&lt;/P&gt;&lt;P&gt;  w_len type i,&lt;/P&gt;&lt;P&gt;  w_actual(20) type c,&lt;/P&gt;&lt;P&gt;w_off type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_len = strlen( w_id ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do w_len times.&lt;/P&gt;&lt;P&gt; w_off = sy-index - 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;b&amp;gt;if ( w_id+w_off(1) ca sy-abcde   ) &amp;lt;b&amp;gt;or&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;     ( w_id+w_off(1) ca '0123456789' )  .&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;    concatenate w_actual w_id+w_off(1) into w_actual.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;enddo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write: w_actual.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Rammohan Nagam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2007 08:49:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code/m-p/2148774#M453513</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-17T08:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: abap code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code/m-p/2148775#M453514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;willard,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZTEST11 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : v_str  type String,&lt;/P&gt;&lt;P&gt;             V_len type i,&lt;/P&gt;&lt;P&gt;              v_num type i,&lt;/P&gt;&lt;P&gt;              V_TOT(60),&lt;/P&gt;&lt;P&gt;              V_NUM2 TYPE I.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS : P_ID(30).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    v_len =  strlen( P_ID ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    concatenate '0123456789' sy-abcde into v_tot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    condense v_tot no-gaps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    v_num = v_num + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    do V_LEN TIMES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         if P_ID+V_NUM2(v_num) na v_tot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             REPLACE P_ID+V_NUM2(v_num) WITH space  INTO p_id.&lt;/P&gt;&lt;P&gt;         endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       v_num2 = v_num2 + 1.&lt;/P&gt;&lt;P&gt;    enddo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CONDENSE P_ID NO-GAPS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    write P_ID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't forget ot reward if useful..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2007 09:08:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code/m-p/2148775#M453514</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-17T09:08:47Z</dc:date>
    </item>
  </channel>
</rss>

