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: 

Error: Table without a header line and therefore has no component called x

Former Member
0 Kudos

Hi Expert,

I'm not a programer but I'd like to get the following code working. Sorry if it's too simple.

i have the following simple program whee I want to call a function module. The function module delivers a structure that with several fields including one named LOW. I would like to use it.

However I get the syntax error:

"STRUCTUREB" is a table without a header line and therefore has no component called "LOW".

Any help, appreciated. Alberto


REPORT  ZTESTAS.

TYPE-POOLS: RSR.
DATA: RSR_T_RANGESID TYPE Rsdd_T_RANGE.
DATA: E_T_RANGE TYPE  RSR_T_RANGESID.
*DATA: structure TYPE rsr_s_rangesid occurs 1.
DATA: structureb TYPE RSR_T_RANGESID.

DATA l_version   TYPE /bic/oizversion.

call function 'Z_BWVEZVERSF'
exporting
I_VNAM = 'ZVERSF'
I_VARTYP = '0'
I_IOBJNM = 'ZVERSION'

importing
E_T_RANGE = structureb.

l_version = structureb-low.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Try to change:

structureb TYPE RSR_T_RANGESID occurs 0 with header line.

Best regards,

Leandro Mengue

Edited by: Leandro Mengue on May 19, 2010 4:21 PM

9 REPLIES 9

Former Member
0 Kudos

Hi,

Try to change:

structureb TYPE RSR_T_RANGESID occurs 0 with header line.

Best regards,

Leandro Mengue

Edited by: Leandro Mengue on May 19, 2010 4:21 PM

0 Kudos

Thanks a lot,

Unfortunately I get the very same message when coding as you said.

Regards,

Alberto

0 Kudos

Well then try something like this and check


DATA: structureb TYPE TABLE OF RSR_T_RANGESID WITH HEADER LINE.

Vikranth

0 Kudos

Hi,

Sorry, adjusto to:

DATA: warea LIKE RRRANGESID.
...
READ TABLE structureb INTO warea INDEX 1.
l_version = warea-low.

Best regards,

Leandro Mengue

0 Kudos

Perfect Leandro,

Problem solved. Points assigned.

Regards,

Alberto

0 Kudos

The problem may be solved in that you don't get a syntax error. But you will probably want to check your logic. You are simply looking at the first of possibly many table records.

Rob

0 Kudos

Hi,

It´s obvious that you have to check the logic!

But with this part of code, read the first row make sense, because the program is working with one version (l_version).

The topic is how to handle the internal table and work area (with flat structures) and not to check all code.

Best regards,

Leandro Mengue

0 Kudos

>

> The topic is how to handle the internal table and work area (with flat structures) and not to check all code.

Yes - that's the question, but I'm not sure it's the right question.

Rob

0 Kudos

Hi Rob,

Of course your warning is relevant in terms of all scope of the program.

Tips are every well done. Thanks!

Best regards,

Leandro Mengue