on 12-12-2008 5:03 AM
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.
Thanks to all for your suggestions.It helped me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.