‎2008 Feb 26 12:47 PM
Hi!!
Is there any FM which helps u to fetch the NUMC value from a string
Eg: if the string is asdet5756frgd it shud give the output as 5756.
‎2008 Feb 26 12:49 PM
REPORT zzztest.
DATA:str(20) TYPE c VALUE 'abcd 1234225523 xyz',
num(10) TYPE n.
num = str.
WRITE:/ num NO-ZERO.
all you need to take care about is, that your num variable is long enough to take all the digits in your string.
Edited by: Florian Kemmer on Feb 26, 2008 2:02 PM
‎2008 Feb 26 1:07 PM
Hi,
You can do as below :
data : var(10) type c value 'ACNC12345'.
data : num(10) type n.
num = var.
shift num left deleting leading '0'.
write num.
O/P : 12345.