cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks to all for your suggestions.It helped me.

Former Member
0 Kudos

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

Former Member
0 Kudos

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.