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

Type "KNA1" is unknown. & REPORT/PROGRAM statement missing ...

Former Member
0 Likes
777

Hello everybody,

I'm new to ABAP and I'm writing sample programs found in a book.

I had been working fine until I started the subject of 'Data in the SAP system'.

The first program is simple and the beginning line is like this:

REPORT ZDATA_ACCESS.

DATA Line TYPE KNA1.

I can't activate the program because of that second line.

The error: Type "KNA1" is unknown.

I have been looking for the answer and added TABLES: KNA1  as the first line in my program.

Then that line give me the error: report/program statement missing or program type is INCLUDE.

Then I looked for that 2nd. error and the answers I've found tell me to declare my main function,

but I don't have any functions, just this simple program.

Please write your advice, thank you.

1 ACCEPTED SOLUTION
Read only

ThomasZloch
Active Contributor
0 Likes
617

Table KNA1 exists in SAP ECC systems only. Are you practicing in an ABAP trial version?

Try working with examples involving the so-called flight model, this is available in all SAP systems.


Thomas

Hello everybody,

I'm new to ABAP and I'm writing sample programs found in a book.

I had been working fine until I started the subject of 'Data in the SAP system'.

The first program is simple and the beginning line is like this:

REPORT ZDATA_ACCESS.

DATA Line TYPE KNA1.

I can't activate the program because of that second line.

The error: Type "KNA1" is unknown.

I have been looking for the answer and added TABLES: KNA1  as the first line in my program.

Then that line give me the error: report/program statement missing or program type is INCLUDE.

Then I looked for that 2nd. error and the answers I've found tell me to declare my main function,

but I don't have any functions, just this simple program.

Please write your advice, thank you.

2 REPLIES 2
Read only

ThomasZloch
Active Contributor
0 Likes
618

Table KNA1 exists in SAP ECC systems only. Are you practicing in an ABAP trial version?

Try working with examples involving the so-called flight model, this is available in all SAP systems.


Thomas

Read only

0 Likes
617

Thank you Thomas,

I have been practicing in a BW system, and I have to change.

I appreciate your advice, thank you.