Application Development 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: 

getting the particular records

Former Member
0 Kudos

hai guys ,

i have a structure as follows.

TYPES : BEGIN OF typ_ztbukxxin003,

z_manufdate LIKE ztbukxxin003-z_manufdate, "Manufacture date

z_thonum LIKE ztbukxxin003-z_thonum, "Thomson number

z_ndsnum LIKE ztbukxxin003-z_ndsnum, "NDS number

z_digicard LIKE ztbukxxin003-z_digicard, "Smart card

"number

END OF typ_ztbukxxin003.

data : tab_ztbukxxin003 TYPE TABLE OF typ_ztbukxxin003,

wa_ztbukxxin003 LIKE LINE OF tab_ztbukxxin003.

then i want nds number which will be in the form of

' CEA79A02818138577'. otherthan this if the value is starting with any other string ,i dont want. for this can i use ca or co in the where clause of select query or is there any other way to so this.

can anybody help me.

1 ACCEPTED SOLUTION

former_member188685
Active Contributor
0 Kudos

You can do this way... using select

select *
 from <dbtable>
into <itable>
where ndsno like 'CEA79A02818138577%'.

"now the select will get the records starts with CEA79A02818138577

5 REPLIES 5

Former Member
0 Kudos

Hi,

You cannot use CO or CA in the select query.

A very simple solution.

Fetch all records.

then loop through the internal table and delete the entries that are not matching your format.

Regards,

Subramanian

former_member188685
Active Contributor
0 Kudos

You can do this way... using select

select *
 from <dbtable>
into <itable>
where ndsno like 'CEA79A02818138577%'.

"now the select will get the records starts with CEA79A02818138577

0 Kudos

hi vijay,

but i can not hardcode as i need the records which starts with CEA.

0 Kudos

use this in the where conditions...

where z_ndsnum ca 'CEA%'.

Former Member
0 Kudos

hi use this .....'

select

z_manufdate

z_thonum

z_ndsnum

z_digicard

from ztbukxxin003

into table tab_ztbukxxin003

where z_ndsnum like 'CEA79A02818138577%'.