sapdev logo background
sapdev logo sapdev logo
Comments

PERFORM TABLES command passing internal table as parameter




The following ABAP code shows you how to pass an internal table as a parameter to a subroutine(FORM) using the SAP PERFOM statement/command

*&---------------------------------------------------------------------*
*& Report  ZPASS_ITAB
*&
*&---------------------------------------------------------------------*
*& Pass intenal table as parameter
*&---------------------------------------------------------------------*
REPORT  ZPASS_ITAB.
data: it_ekko type STANDARD TABLE OF ekko.

************************************************************************
*START-OF-SELECTION
START-OF-SELECTION.

select *
  up to 10 rows
  from ekko
  into table it_ekko.


PERFORM test_form TABLES it_ekko.


*&---------------------------------------------------------------------*
*&      Form  TEST_FORM
*&---------------------------------------------------------------------*
*       test form passing internal table
*----------------------------------------------------------------------*
FORM TEST_FORM  TABLES   P_EKKO STRUCTURE EKKO.
  data: wa_ekko type ekko.

  loop at p_ekko into wa_ekko.
    WRITE:/ wa_ekko-ebeln.
  endloop.
ENDFORM.                    " TEST_FORM




comments powered by Disqus