‎2006 Aug 04 11:44 AM
Hello,
i have a string in this form,
ABCDEFGHI 123456-23 , from which i only want 'ABCDEFGHI'. Is their any SAP method or string function which cuts the string to the point where a number starts.
Thanks..
Shehryar
‎2006 Aug 04 11:51 AM
HI dahar,
Do this way...
<b>
v_string = 'ABCDEFGHI 123456-23'
split v_string at ' ' into v_target.</b>
Regards,
Santosh
‎2006 Aug 04 11:57 AM
Hi,
One solution you van try is
data :str1(20) type c value 'ABCDEFGHI 123456-23'
REPLACE '0123456789-' WITH ' ' INTO str1.
Regards,
Sumit.
‎2006 Aug 04 12:00 PM
data : v_str type string,
v_substr type string,
v_position type i.
v_str = 'ABCDEFGHI 123456-23'.
break-point.
if v_str ca '123456789'.
write 😕 sy-fdpos.
v_position = sy-fdpos.
v_substr = v_str+0(v_position).
endif.
write 😕 v_substr.
‎2006 Aug 04 12:03 PM
hi,
goto ABAPDOCU transaction code,
click on keyword help,
write STRING,continue
you will get different string operations,
check them,
regards,
kcc