05-19-2010 8:13 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.
05-19-2010 8:19 PM
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
05-19-2010 8:19 PM
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
05-19-2010 8:24 PM
Thanks a lot,
Unfortunately I get the very same message when coding as you said.
Regards,
Alberto
05-19-2010 8:34 PM
Well then try something like this and check
DATA: structureb TYPE TABLE OF RSR_T_RANGESID WITH HEADER LINE.
Vikranth
05-19-2010 8:35 PM
Hi,
Sorry, adjusto to:
DATA: warea LIKE RRRANGESID.
...
READ TABLE structureb INTO warea INDEX 1.
l_version = warea-low.
Best regards,
Leandro Mengue
05-19-2010 8:46 PM
Perfect Leandro,
Problem solved. Points assigned.
Regards,
Alberto
05-19-2010 8:49 PM
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
05-19-2010 8:58 PM
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
05-19-2010 9:11 PM
>
> 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
05-19-2010 9:24 PM
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