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

issue while checking data in table

Former Member
0 Likes
880

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

1 ACCEPTED SOLUTION
Read only

murat_kaya
Participant
0 Likes
848

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

7 REPLIES 7
Read only

Former Member
0 Likes
848

check whether z table is activated or not....

Read only

0 Likes
848

ztable is activated

Read only

former_member404244
Active Contributor
0 Likes
848

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

Read only

murat_kaya
Participant
0 Likes
849

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

Read only

Former Member
0 Likes
848

thanks

Read only

0 Likes
848

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.

Read only

former_member585060
Active Contributor
0 Likes
848

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