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

Internal table

Former Member
0 Likes
865

Dear friends,

i have to take data for VBAK-ERNAM. while pulling data, i have some are numbers and some are names. i need to pull only names.

Ex: ernam contains

825569

860070

Rakesh

Ramesh

564896

Kumar

I need to pull only

Rakesh

Ramesh

Kumar

it should not take numbers

How to do this ?

Please let me know

Thanks & Regards,

Ajay

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
836

hi,

First you have to get all values in your itab.

Then you can filter values having only numbers using if condidtion.

if itab-field co '0123456789'.

delete itab.

endif.

8 REPLIES 8
Read only

Former Member
0 Likes
837

hi,

First you have to get all values in your itab.

Then you can filter values having only numbers using if condidtion.

if itab-field co '0123456789'.

delete itab.

endif.

Read only

0 Likes
836

I have done like this

LOOP AT ITAB.

IF itab-ernam CO '0123456789'.

DELETE itab.

ENDIF.

ENDLOOP.

But it is not working

Plese suggest

thanks,

Ajay

Read only

Former Member
0 Likes
836

create a select option using pattern like 0, 1,....9* add these values to ur select option. and then based on that u can move the values.

try it.

Read only

0 Likes
836

Dear Madhavi,

Actual requirement is i have provided F4 help to ERNAM. For this field in data base somany numbers are there. But i need to pickup only names not numbers.

So i have taken whole data into itab.

From that itab i need to filerize the data for fetching only names.

Kindly suggest in this

Thanks ,

Ajay

Read only

0 Likes
836

u can check this

Read only

Former Member
0 Likes
836

Hi Ajay,

Select -


ernam -


into table itab

from vbak

where............

........................

Now in ur itab all the data vbak-ernam are stored with numeric & charecter type record.

now u jsut foolow the code

Loop at itab.

if itab-ernam co '0123456789'.

delete itab.

endif.

endloop.

It will work fine.

If it is helpfull pls reward pts.

Regards

Srimanta

Read only

Former Member
0 Likes
836

Hi,

first pick all the data from the database,

Then you can filter that.

***********

lv_abcde = sy-abcde.

loop at it_vbak.

if not it_vbak-ernam NA lv_abcde.

write: it_vbak-ernam.

else.

delete itab.

endif.

endloop.

***********

It will help if ernam contains name like 'D1000'.

Regards,

Bhanu

Edited by: Bhanu P on Apr 15, 2008 7:45 AM

Read only

Former Member
0 Likes
836

Insted of CO use CA (Contains Any)