Skip to Content
author's profile photo Former Member
Former Member

String Function

Hi,

I have field which is techincal 18 characters in length but it has value 6 character i would like to select last 3 character from this ..

Eg:

573

I have to get 73 as my value i am getting next field character as my value for the below code

field1 = field1+2(3)

Need an help

thanks

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Feb 26, 2009 at 05:04 PM

    Hello,

    You can try this code:

    DATA:
    v1 TYPE char18,
    v_len TYPE i,
    v2 TYPE char3.
    
    
    v1 = '123456'.
    
    v_len = STRLEN( v1 ) - 3.
    
    v2 = v1+v_len(3).
    
    WRITE:
    / v1, / v2.

    Hope this helps.

    BR,

    Suhas

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.