Application Development and Automation 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: 
Read only

Internal table in Perform

SG141
Active Participant
0 Likes
4,202

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

1 ACCEPTED SOLUTION
Read only

Pawan_Kesari
Active Contributor
0 Likes
1,480

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

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

6 REPLIES 6
Read only

Former Member
0 Likes
1,480

Hi,

like changing,using we can use tables also

FORM fill_table USING wa TYPE any

CHANGING ptab TYPE INDEX TABLE

TABLES itab.

ENDFORM.

<b>reward if helpful</b>

rgds,

bharat.

Read only

Former Member
0 Likes
1,480

and there is no need to pass them . you can use them straight away in you're form if you like

Read only

Former Member
0 Likes
1,480

hi

perform display tables itab.

form display tables itab.

loop at itab.

write :...........

endloop.

endform.

Read only

Former Member
0 Likes
1,480

Perform get_data tables itab.

form tables itab structure vbak.

endform.

Read only

Former Member
0 Likes
1,480

TYPES: BEGIN OF T_X.

INCLUDE STRUCTURE SFLIGHT.

TYPES: ADDITION(8) TYPE C,

END OF T_X.

...

DATA: X TYPE STANDARD TABLE OF T_X WITH NON-UNIQUE

DEFAULT KEY INITIAL SIZE 0.

FORM U TABLES X STRUCTURE SFLIGHT.

...

PERFORM U TABLES X.

...

FORM U TABLES X STRUCTURE SFLIGHT.

WRITE: X-FLDATE.

ENDFORM.

Read only

Pawan_Kesari
Active Contributor
0 Likes
1,481

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