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: 

Type "WA_MARA" is unknown

former_member844813
Participant
0 Kudos
349

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
5 REPLIES 5

jack_graus2
Active Contributor
292

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.

0 Kudos
292

Thank you dear sir, it works

but its popping up another error

0 Kudos
292

demaauliansyah What error does it pop up now?

raymond_giuseppi
Active Contributor
292
Remarks:
  • A TYPE TABLE OF option requires a TYPE not a DATA defined object,
  • Are you actually sure MTART field exists in is defined in MARC (check with SE11)

DominikTylczyn
Active Contributor
0 Kudos
292

MTART is material type. It is in MARA, not MARC.