Skip to Content

Internal table in Perform

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • Best Answer
    Aug 20, 2007 at 01:57 PM

    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
    

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 20, 2007 at 01:51 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 20, 2007 at 01:54 PM

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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 20, 2007 at 01:54 PM

    hi

    perform display tables itab.

    form display tables itab.

    loop at itab.

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

    endloop.

    endform.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 20, 2007 at 01:56 PM

    Perform get_data tables itab.

    form tables itab structure vbak.

    endform.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 20, 2007 at 01:56 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded