Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Internal table in Perform

How to pass internal tables in Perform.....

Tags:
replied

below is one of the method...

REPORT ztable .

TYPES: BEGIN OF ty_mara,
        matnr TYPE mara-matnr,
        ersda TYPE mara-ersda,
        ernam TYPE mara-ernam,
        laeda TYPE mara-laeda,
        aenam TYPE mara-aenam,
      END OF ty_mara.

TYPES : t_mara TYPE TABLE OF ty_mara .

DATA : it_mara TYPE t_mara .

START-OF-SELECTION .

  SELECT matnr
         ersda
         ernam
         laeda
         aenam
    INTO table it_mara
    FROM mara
   WHERE matnr LIKE 'A%' .

    PERFORM print_material USING it_mara .

*---------------------------------------------------------------------*
*       FORM print_material                                           *
*---------------------------------------------------------------------*
*       ........                                                      *
*---------------------------------------------------------------------*
*  -->  PIT_MARA                                                      *
*---------------------------------------------------------------------*
FORM print_material USING pit_mara TYPE t_mara .

  DATA : wa_mara TYPE ty_mara .

  LOOP AT pit_mara INTO wa_mara .
    WRITE : / wa_mara-matnr .
  ENDLOOP.

ENDFORM.                    " print_material

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question