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: Table without a header line and therefore has no component called x

Former Member
0 Likes
11,188

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
Read only

Former Member
0 Likes
2,278

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

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.

9 REPLIES 9
Read only

Former Member
0 Likes
2,279

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

Read only

0 Likes
2,278

Thanks a lot,

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

Regards,

Alberto

Read only

0 Likes
2,278

Well then try something like this and check


DATA: structureb TYPE TABLE OF RSR_T_RANGESID WITH HEADER LINE.

Vikranth

Read only

0 Likes
2,278

Hi,

Sorry, adjusto to:

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

Best regards,

Leandro Mengue

Read only

0 Likes
2,278

Perfect Leandro,

Problem solved. Points assigned.

Regards,

Alberto

Read only

0 Likes
2,278

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

Read only

0 Likes
2,278

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

Read only

0 Likes
2,278

>

> 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

Read only

0 Likes
2,278

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