03-19-2009 11:57 AM
i have writtten aprogram to check the data in the table. program is like
REPORT ZTEST3.
tables zempdata.
data wa_zempdata type zempdata.
loop at zempdata into wa_zempdata.
WRITE: / 'Runtime 1', wa_zempdata-employee_number.
WRITE: / 'Runtime 2', wa_zempdata-employee_name.
ENDSELECT.
its giving me error saying VERSION expected after zempdata.
is there any way to resolve it or any other simple way to check the dat in the table through report program as i don't have acces on se16
03-19-2009 12:03 PM
Hi,
your code seems a little bit false as you wrote it. there is no select statement but there is an endselect statement. there is a loop statement but there is no endloop. if you have a database table, first create an internal table with same type, then select all the required data to your internal table. you can use the data as you like then. you may loop-endloop and write data on the screen as you like for instance.
regards,
Murat Kaya
03-19-2009 11:59 AM
03-19-2009 12:00 PM
03-19-2009 12:01 PM
HI,
TO chek the data is there or not
do liek this
data : lwa_area type <dbtable>.
select single * from <dbtable> into lwa_area.
if sy-subrc ne 0.
error message.
endif.
Regards,
Nagaraj
03-19-2009 12:03 PM
Hi,
your code seems a little bit false as you wrote it. there is no select statement but there is an endselect statement. there is a loop statement but there is no endloop. if you have a database table, first create an internal table with same type, then select all the required data to your internal table. you can use the data as you like then. you may loop-endloop and write data on the screen as you like for instance.
regards,
Murat Kaya
03-19-2009 12:06 PM
03-19-2009 12:08 PM
Hi Vishal,
Try with this code
Select single * from zempdata into wa_zempdata.
WRITE: / 'Runtime 1', wa_zempdata-employee_number.
WRITE: / 'Runtime 2', wa_zempdata-employee_name.
endselect.
03-19-2009 12:07 PM
HI,
Try with the below code
DATA : it_empdata TYPE TABLE OF zempdata,
wa_empdata TYPE zempdata.
SELECT * FROM zempdata INTO TABLE it_empdata.
LOOP AT it_empdata INTO wa_empdata.
WRITE 😕 wa_zempdata-employee_number, wa_zempdata-employee_name.
ENDLOOP.
Regards
Bala Krishna