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

How to split the value of object-id to get the PO-Number .

Hello Experts,

I want to get the last 10-digits(ex:1234567899) of a string(ex:GPP/1234567899).Please help me out.

Thanks in advance,

Regards,

Asmitha.

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 12, 2008 at 05:34 AM

    Hi,

    You can write the logic as :

    data : w_objid(10) type c,

    w_value type string.

    w_value = 'GPP/1234567899'.

    w_objid = w_value+4(10).

    BR,

    Disha.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 12, 2008 at 09:53 AM

    The below code will return the last 10 chars for string of different length.

    REPORT  zkb_test.
    
    DATA: lv_text TYPE string.
    DATA: lv_id TYPE string.
    DATA: lv_len TYPE i.
    
    lv_text = 'GPPS/1234567899'.
    
    lv_len = STRLEN( lv_text ).
    
    lv_len = lv_len - 10.
    
    lv_id = lv_text+lv_len(10).
    
    WRITE:/ lv_text.
    WRITE:/ lv_id.

    Regards

    Kathirvel

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 19, 2008 at 04:48 AM

    Thanks to all for your suggestions.It helped me.

    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.