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: 

issue while checking data in table

Former Member
0 Kudos

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

murat_kaya
Participant
0 Kudos

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

former_member228751
Contributor
0 Kudos

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

0 Kudos

ztable is activated

former_member404244
Active Contributor
0 Kudos

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

murat_kaya
Participant
0 Kudos

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

Former Member
0 Kudos

thanks

0 Kudos

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.

former_member585060
Active Contributor
0 Kudos

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