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

Error message activating a program

Former Member
0 Likes
382

Hi, experts

I've created a ZTABLE for customer requirement and declared an internal table like:

DATA: TI_ZTABLE LIKE ZTABLE OCCURS 0.

and after I assign values

      TI_ZTABLE-ZFIELD1   = SY-MANDT.
      TI_ZTABLE-ZFIELD2   = VAR1.
      TI_ZTABLE-ZFIELD3   = VAR2.

and check program a message appear:

The data object "TI_ZTABLE" has no structure and therefore no component called "ZFIELD1". called "ZFIELD1".

What do I have to do for solving this problem? It's urgent.

I will appreciate any information.

Regards

mgg

P.D Points reward

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
359

Declare your internal table like this.

DATA: TI_ZTABLE type table of ZTABLE with header line.

Regards,

RIch Heilman

2 REPLIES 2
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
360

Declare your internal table like this.

DATA: TI_ZTABLE type table of ZTABLE with header line.

Regards,

RIch Heilman

Read only

Former Member
0 Likes
359

I don't what this ZTABLE looks like, but this should work:

DATA: ti_ztable TYPE STANDARD TABLE OF ZTABLE WITH HEADER LINE.