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

Select Statement

Former Member
0 Likes
581

Hi All..

There is a field in ztable called "zreqtype" with char 20 length.

i have defined an internal table itab with all fields same as in ztable.

Now if i write select statement, i am facing following Problems..

1. If i write as follows, i can't retrieve the data from ztable-zreqtype. But i will get other fields of that row..

select * from ztable into corresponding fields of table itab where zreqno = s_reqno.

The extracted fields will be made to display in an ALV output..

2. If i write it as...

select reqtype from ztable into corresponding fields of table itab where zreqno = s_reqno.

I will be able to retrieve the "Zreqtype" field...

BUT the same data don't display in ALV Output...

What to do now...??

plz help me out...

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
551

hi

good

how you have declared the internal table,thats makes the difference, if you have not declared using the like statement, than your select statement give you the error.

check out that first,

than your select statement are correct, but the thing is how you are displaying them though the ALV report, have you declared the field catalogue properly.

check your field catalogoue.

thanks

mrutyun

5 REPLIES 5
Read only

Former Member
0 Likes
551

DATA:BEGIN OF ITAB OCCURS 0.

INCLUDE STRUCTURE ZTZBLE.

DATA:END OF ITAB.

select * from ztable into table itab where zreqno = s_reqno.

2)

TO DISPLAY IN ALV CHECK..

zreqtype</b>---->IT IS IN CAPITAL LETTER

Read only

0 Likes
551

Kishan,

System is throwing error " The work area itab is not long enough"..

???????????

Read only

Former Member
0 Likes
551

hi,

Check if you included the MANDT field which is existing in z table in the internal tbale itab or not?

Regards,

Sailaja.

Read only

Former Member
0 Likes
551

hi,

DATA: begin of ITAB.

include structure ZTABLE.

DATA: end of itab.

then

SELECT * FROM ZTABLE INTO ITAB WHERE <cond>

Now you will able to see all the fields.

Regards,

srikanth

Message was edited by: Srikanth Kidambi

Read only

Former Member
0 Likes
552

hi

good

how you have declared the internal table,thats makes the difference, if you have not declared using the like statement, than your select statement give you the error.

check out that first,

than your select statement are correct, but the thing is how you are displaying them though the ALV report, have you declared the field catalogue properly.

check your field catalogoue.

thanks

mrutyun