How to show contents of a table in a smartform ? I'll show you the fastest way to show table that we have made in Learn ABAP (1) i.e table ztylfa1 by smartforms.
/nsmartforms
Global Settings > Global Definition >
Tab [Global Data]
IT_TABLE TYPE TABLE OF ZTYLFA1
WA_TABLE TYPE ZTYLFA1
Tab [Initialization]
Output parameters : IT_TAB
Code : select lifnr name1 regio from ztylfa1 into table it_tab.
Pages and Windows > %PAGE1 > MAIN > %LOOP1
Tab [Data]
Operand IT_TAB INTO WA_TAB
Pages and Windows > %PAGE1 > MAIN > %LOOP1 >%TEXT1
Tab [General Attributes]
&WA_TAB-lifnr& &WA_TAB-name1& &WA_TAB-regio&
Then execute the smartform. You'll see the contents of ztylfa1 as seen on Learn ABAP(1). Congratulations.