Let’s display the SFLIGHT table records on a adobe form.
So here we have a table type for the SFLIGHT table.
Go to Tx- SFP.
Create an interface. Provide a name and create.
Continue with Save.
Create an importing parameter.
provide the name and type. Activate the interface.
Create a Form. Provide a name and create.
Assign the interface and Save.
Map the Importing table from the Interface to the form context. Go to Layout.
In the Data View, Drga the Table and Drop on the design view. Automatically a table is created with header column with text and data is bindded automatically.
Activate and test.
Fill one record.
Execute the Function module.
Here the table.
Let’s call the form from abap program and pass all the records from SFLIGHT table.
DATA : cp_outparam TYPE sfpoutputparams,
ip_funcname TYPE funcname,
lt_sflight TYPE TABLE OF sflight.
SELECT * FROM sflight INTO TABLE lt_sflight.
CALL FUNCTION ‘FP_JOB_OPEN’
CHANGING
ie_outputparams = cp_outparam.
CALL FUNCTION ‘FP_FUNCTION_MODULE_NAME’
EXPORTING
i_name = ‘ZTEST_FORM_03’ ” Pass the form name and
IMPORTING ” it will give the fundtion odule name
e_funcname = ip_funcname.
CALL FUNCTION ip_funcname
EXPORTING
* /1BCDWB/DOCPARAMS =
it_sflight = lt_sflight
* IMPORTING
* /1BCDWB/FORMOUTPUT =
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4.
CALL FUNCTION ‘FP_JOB_CLOSE’
* IMPORTING
* E_RESULT =
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4.
Here is the form preview with all the records.