Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

field extraction

Former Member
0 Likes
498

Hi everyone,

In my internal table it_itab I have a field zext with value 'Number 1100992288' and now I just need to grab

'1100992288' in an a variable v_num. so can you please tell me how can I do that,.

Thanks,

Raeev Gupta

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
470

Hi,

If the first characters would be Number, then you can use v_num = ws_itab-ztext+7.

else, split the field at 'space' into diff variables.

or

try func module: ISM_CONVERT_NUMC_TO_DEC, even though the input parameter is of type 'N', I passed your string and it returned me the DEC numbers.

or

you can create your own func module to extract the numbers out of the string.

Regards,

Subramanian

3 REPLIES 3
Read only

Former Member
0 Likes
470

split your variable at space ...

split it_itab-ztext at space into v_char v_num .

Read only

0 Likes
470

Hi srinivas,

That field is 80 character long and I just need to grab that numeric value and that pass it to another variable.

Read only

Former Member
0 Likes
471

Hi,

If the first characters would be Number, then you can use v_num = ws_itab-ztext+7.

else, split the field at 'space' into diff variables.

or

try func module: ISM_CONVERT_NUMC_TO_DEC, even though the input parameter is of type 'N', I passed your string and it returned me the DEC numbers.

or

you can create your own func module to extract the numbers out of the string.

Regards,

Subramanian