‎2006 Oct 10 5:06 AM
Hi,
Good morning.
I have a requirement where I need to extract all standard entries and custom entries starting with ZA*.
Suppose my tables contains the following data:-
ABC
EFG
A123
ZA1
ZA2
ZB1
ZB2
Output should be:-
ABC
EFG
A123
ZA1
ZA2
Any idea on this. It will be very useful.
Regards,
Eureka.
‎2006 Oct 10 6:06 AM
Hi
Please try as below.
select <fld1> <fld2> into table itab
from <table>
where not <fld1> like 'Z%'
or <fld1> like 'ZA%'.Hope this helps you.
Kind Regards
Eswar
‎2006 Oct 10 6:06 AM
Hi
Please try as below.
select <fld1> <fld2> into table itab
from <table>
where not <fld1> like 'Z%'
or <fld1> like 'ZA%'.Hope this helps you.
Kind Regards
Eswar
‎2006 Oct 10 6:13 AM
Hi Eureka,
As you have not mentioned table names, I am giving you one example.
Suppose I want to select Sales organizations extracting values which starts with "Z".
I can write a code like this:
DATA: BEGIN OF itab OCCURS 0.
DATA : vkorg LIKE vbak-vkorg.
DATA: END OF itab.
SELECT vkorg FROM tvko INTO TABLE itab.
SORT itab.
DELETE itab WHERE vkorg CP 'Z*'.
LOOP AT itab.
WRITE : / itab-vkorg.
ENDLOOP.
Hope it solves the problem.
Regards,
Dharitree