Skip to Content
avatar image
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 comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    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 comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    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 comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 19, 2008 at 04:48 AM

    Thanks to all for your suggestions.It helped me.

    Add comment
    10|10000 characters needed characters exceeded