2023 Mar 09 8:29 AM
Hi Expert!,
i have this error, i already double-check the program. it looks fine to me
can u guys help me with it ?
REPORT getfbl.
PARAMETERS p_mtart TYPE mara-mtart.
DATA: BEGIN OF wa_mara,
matnr TYPE mara-matnr,
maktx TYPE makt-maktx,
END OF wa_mara.
DATA: BEGIN OF wa_marc,
matnr TYPE marc-matnr,
werks TYPE marc-werks,
END OF wa_marc.
DATA: it_mara TYPE TABLE OF wa_mara,
it_marc TYPE TABLE OF wa_marc.
SELECT mara~matnr makt~maktx FROM mara
INNER JOIN makt ON mara~matnr = makt~matnr
INTO TABLE it_mara
WHERE mara~mtart = p_mtart.
SELECT matnr werks FROM marc INTO TABLE it_marc
WHERE mtart = p_mtart.
LOOP AT it_mara INTO wa_mara.
WRITE: / wa_mara-matnr, wa_mara-maktx.
ENDLOOP.
LOOP AT it_marc INTO wa_marc.
WRITE: / wa_marc-matnr, wa_marc-werks.
ENDLOOP.
Error : row 15 type "WA_MARA" is unknown
2023 Mar 09 8:52 AM
What make you think the program does look fine ?
Replacing this part of the code:
DATA: it_mara TYPE TABLE OF wa_mara,
it_marc TYPE TABLE OF wa_marc.
By:
DATA: it_mara LIKE TABLE OF wa_mara,
it_marc LIKE TABLE OF wa_marc.
might do.
2023 Mar 09 8:56 AM
2023 Mar 09 1:10 PM
2023 Mar 09 9:14 AM
2023 Mar 09 1:11 PM