I want make select from EPREI to ET_DATA ET_DATA have prices prices is structure what i want fill it from EPREIH…
*"----------------------------------------------------------------------
*"*"Lokálne rozhranie:
*" IMPORTING
*" REFERENCE(I_PREIS) TYPE ZRT_IWP_CPREISTYP OPTIONAL
*" EXPORTING
*" REFERENCE(ET_DATA) TYPE ZTT_IWPIFC_PRICE
*" EXCEPTIONS
*" NO_DATA_SELECTED
*"----------------------------------------------------------------------
field-symbols: <lfs_ET_DATA> like line of ET_DATA.
refresh ET_DATA.
SELECT *
FROM EPREI
into CORRESPONDING FIELDS OF TABLE ET_DATA.
loop at ET_DATA assigning <lfs_ET_DATA>.
select *
from EPREIH
into CORRESPONDING FIELDS OF TABLE ET_DATA-prices
where PREIS = <lfs_ET_DATA>-PREIS
and PREISTYP <= <lfs_ET_DATA>-PREISTYP.
endloop.
it shows error:
"ET_DATA" is table without hedaer line and therefore have not component call prices.
How can i make this select correctly? Sorry for my english but i am so tired…
As the previous answer said, ET_DATA is a reference to a table type and does not have a work area.
So if you really want to add a list of EPREIH into ET_DATA-PRICE you have to point to the work area which is assigned to your field symbol.
Something like this:
extra tip: try using pretty printer with “keywords uppercase” and avoid “select *” if you are not using all fields from those tables.