<?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: read data string from right to left in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-data-string-from-right-to-left/m-p/4126096#M986547</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 presume you are wanting data like 'value' and instead getting it like '  value'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If that is the case, please use CONDENSE w_st2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That will take care of the problem.&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;Prosenjit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Jul 2008 05:27:03 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-04T05:27:03Z</dc:date>
    <item>
      <title>read data string from right to left</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-data-string-from-right-to-left/m-p/4126094#M986545</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i need some advice on the coding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
      READ TABLE it_zsd_mat_format INTO wa_zsd_mat_format WITH KEY
                 matnr = wa_zsdserial-material BINARY SEARCH.

      w_st1 = wa_zsd_mat_format-matlength.
      w_st2 = wa_zsdserial-serial_num(w_st1).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the above gave me the wrong data, because i want to take the number from right to left, but above code take the number from left to right. can any one help me how to code to get the wa_zsdserial-serial_num from right to left?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jul 2008 04:56:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-data-string-from-right-to-left/m-p/4126094#M986545</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-04T04:56:40Z</dc:date>
    </item>
    <item>
      <title>Re: read data string from right to left</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-data-string-from-right-to-left/m-p/4126095#M986546</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;data : lv_len type i.&lt;/P&gt;&lt;P&gt;data : lv_num type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; READ TABLE it_zsd_mat_format INTO wa_zsd_mat_format WITH KEY&lt;/P&gt;&lt;P&gt;                 matnr = wa_zsdserial-material BINARY SEARCH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_st1 = wa_zsd_mat_format-matlength.&lt;/P&gt;&lt;P&gt;lv_len = STRLEN( wa_zsdserial-serial_num ).&lt;/P&gt;&lt;P&gt;lv_num = lv_len - w_st1.&lt;/P&gt;&lt;P&gt;w_st2 = wa_zsdserial-serial_num+lv_num(w_st1).&lt;/P&gt;&lt;P&gt;clear : lv_len,lv_num.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this code yur probelm will solve.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if useful..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Durai.V&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jul 2008 05:13:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-data-string-from-right-to-left/m-p/4126095#M986546</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-04T05:13:13Z</dc:date>
    </item>
    <item>
      <title>Re: read data string from right to left</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-data-string-from-right-to-left/m-p/4126096#M986547</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 presume you are wanting data like 'value' and instead getting it like '  value'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If that is the case, please use CONDENSE w_st2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That will take care of the problem.&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;Prosenjit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jul 2008 05:27:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-data-string-from-right-to-left/m-p/4126096#M986547</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-04T05:27:03Z</dc:date>
    </item>
    <item>
      <title>Re: read data string from right to left</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-data-string-from-right-to-left/m-p/4126097#M986548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
Just refer this sample code...u will get it


TYPES:BEGIN OF tt,
      val TYPE string,
     END OF tt.
DATA:itab TYPE TABLE OF tt.
DATA:wa TYPE tt.
DATA:length TYPE i.
DATA:out TYPE string.

wa-val = 'ABCDEFG'.
APPEND wa TO itab.
wa-val = '123456789'.
APPEND wa TO itab.

LOOP AT itab INTO wa.
  CLEAR length.
  length = STRLEN( wa-val ).
  length = length - 1.
  WHILE length &amp;gt;= 0.
    IF sy-index = 1.
      out = wa-val+length(1).
    ELSE.
      CONCATENATE out wa-val+length(1) INTO out.
    ENDIF.
    CONDENSE out NO-GAPS.
    length = length - 1.
  ENDWHILE.
  WRITE / out.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jul 2008 05:31:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-data-string-from-right-to-left/m-p/4126097#M986548</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2008-07-04T05:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: read data string from right to left</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-data-string-from-right-to-left/m-p/4126098#M986549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lee,&lt;/P&gt;&lt;P&gt;You can use a function module 'STRING_REVERSE'.&lt;/P&gt;&lt;P&gt;For your case wa_zsdserial-serial_num should of type 'C' or type 'N'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: v_reverse_strng(80) TYPE c,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'STRING_REVERSE'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    string    = wa_zsdserial-serial_num&lt;/P&gt;&lt;P&gt;    lang      = sy-langu&lt;/P&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;    rstring   = v_reverse_strng&lt;/P&gt;&lt;P&gt;  EXCEPTIONS&lt;/P&gt;&lt;P&gt;    too_small = 1&lt;/P&gt;&lt;P&gt;    OTHERS    = 2.&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE v_reverse_strng.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**************************************************&lt;/P&gt;&lt;P&gt;You can use v_reverse_strng as type of wa_zsdserial-serial_num but both should be either of type 'N' or 'C', otherwise it may give Short Dump.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please reward if it helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jul 2008 05:31:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-data-string-from-right-to-left/m-p/4126098#M986549</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-04T05:31:36Z</dc:date>
    </item>
    <item>
      <title>Re: read data string from right to left</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-data-string-from-right-to-left/m-p/4126099#M986550</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;what i want is example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;correct result:&lt;/P&gt;&lt;P&gt;input : 000000000012345678&lt;/P&gt;&lt;P&gt;string length i want is 12&lt;/P&gt;&lt;P&gt;output:000012345678&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but the code above i enter got the result of&lt;/P&gt;&lt;P&gt;output:000000000012, which is wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so how am i going to code to read from right side of the character, to the left side.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jul 2008 07:35:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-data-string-from-right-to-left/m-p/4126099#M986550</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-04T07:35:06Z</dc:date>
    </item>
    <item>
      <title>Re: read data string from right to left</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-data-string-from-right-to-left/m-p/4126100#M986551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Ben,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you have to do something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SHIFT string RIGHT BY 12 PLACES CIRCULAR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now the first 12 character of string is what you need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;ec&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jul 2008 07:42:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-data-string-from-right-to-left/m-p/4126100#M986551</guid>
      <dc:creator>JozsefSzikszai</dc:creator>
      <dc:date>2008-07-04T07:42:12Z</dc:date>
    </item>
  </channel>
</rss>

