Here is a sample program in which used two internal tables:
REPORT YPRINTPRG_SMARTFORM1 .
DATA : ITKNA1 LIKE KNA1,
ITVBAK LIKE VBAK OCCURS 0 WITH HEADER LINE.
PARAMETERS : PKUNNR LIKE KNA1-KUNNR.
SELECT * FROM KNA1 INTO ITKNA1
WHERE KUNNR = PKUNNR.
ENDSELECT.
SELECT * FROM VBAK
INTO TABLE ITVBAK
WHERE KUNNR = PKUNNR.
CALL FUNCTION '/1BCDWB/SF00000011' “THIS FUNCTION MODULE CALLS THE
SMART FORM WE WILL GET THIS AT MENU ENVIRONEMENT ”
EXPORTING
ITKNA1 = ITKNA1
TABLES
ITVBAK = ITVBAK.
IN SMART FORM
FORM INERFACE---------IMPORT (TAB)
Parameter name Type assignment Reference type Default value
ITKNA1 LIKE KNA1
FORM INERFACE---------TABLES (TAB)
ITVBAK LIKE VBAK
PAGES & WINDOWS----- MAIN WINDOW-----LOOP 1----DATA(TAB)
ITVBAK INTO ITVBAK
PAGES & WINDOWS-------MAIN WINDOW------LOOP 1-----TEXT 3(EDITOR)
&ITVBAK-VBELN& &ITVBAK-ERDAT& &ITVBAK-ERNAM& &ITVBAK-NETWR&
PAGES & WINDOWS-------HEADER WINDOW-----TEXT 2(EDITOR)
Customer No. &itkna1-kunnr& CustomerName :&itkna1-name1&