2008 May 28 6:11 AM
Objective :
How To Retrieve Records from a Table Depending on Condition
Description :
Suppose I have Z EMPLOYEE table in that i have ENO, ENAME, DEPTNO fields.
I want the records of employees whose name starts with 'A' .
Please any one provide solution for my query
Thanks
Prasad
2008 May 28 6:14 AM
hi
use the where condition
Suppose I have Z EMPLOYEE table in that i have ENO, ENAME, DEPTNO fields.
I want the records of employees whose name starts with 'A'
select * from zemployee into table itab where ename like 'A%'.
reward if helpful
prasanth
Objective :
How To Retrieve Records from a Table Depending on Condition
Description :
Suppose I have Z EMPLOYEE table in that i have ENO, ENAME, DEPTNO fields.
I want the records of employees whose name starts with 'A' .
Please any one provide solution for my query
Thanks
Prasad
2008 May 28 6:14 AM
hi
use the where condition
Suppose I have Z EMPLOYEE table in that i have ENO, ENAME, DEPTNO fields.
I want the records of employees whose name starts with 'A'
select * from zemployee into table itab where ename like 'A%'.
reward if helpful
prasanth
2008 May 28 6:19 AM
hi,
do this way ..
select ENO ENAME DEPTNO from ZEMPLOYEE into table itab where ENAME like 'A%'.
if sy-subrc = 0.
endif.
2008 May 28 6:19 AM
use the code
select eno ename dept no from ZEMPLOYEE into table itab where ename like 'a%'.
or select * from ZEMPLOYEE into table itab where ename like 'a%'.
means can fetch data as per condition
if you shoud start from A
its gonna surely help
Reward points if useful
Thanks
Edited by: Richa Khosla on May 28, 2008 7:20 AM
Edited by: Richa Khosla on May 28, 2008 7:20 AM
2008 May 28 6:21 AM
2008 May 28 6:23 AM
Hi,
Simply use a select statement.
select eno ename departno
from tablename
into table int_tab
where condition(eg- ename like A%)
To explain why we using A% is that this would fetch all those names from the field ename,where the name starts with A.
If u use select * -then this will fetch all he records of people whose name start with A,if u want only specific ones,mention the field names.
Thanks
Reward points if useful
Edited by: Malvika Sharma on May 28, 2008 7:24 AM