This tutorial explains how to create a driver program for adobe forms/ calling the adobe form in a report. The driver program has been created for the adobe form created in the following tutorial. The process for creating the driver program for the adobe forms is similar to that of the Smart forms.

Procedure: 1. Open the job for form processing using function module – FP_JOB_OPEN. Call the function module to get the FP_FUNCTION_MODULE_NAME and pass the adobe form name to get the name of the function module generated for the adobe form. Call the function module generated for the adobe form and pass the required data to the interface of the function module. Close the job for form processing using the function module – FP_JOB_ CLOSE.

This solution uses Portable Document Format (PDF) and software from Adobe Systems Inc. That has been integrated into the SAP environment. • SAP tool designed to create your own forms. • You can create interactive forms in PDF format that allow users to fill out the form on the screen and save their entries in XML format in the form.

Go to the Tcode SE38 (ABAP Editor) and create a executable report program and paste the sample code below. Data: lv_form name type fpname value 'ZAF_SFLIGHT'. Data: lv_fmname type rs38l_fnam. Data: ls_output type sfpoutputparams. Data: ls_result type sfpjoboutput, lv_spoolid type rspoid. * Function module to get the name of the function module generated for * Adobe form. Call function 'FP_FUNCTION_MODULE_NAME' exporting i_name = lv_formname importing e_funcname = lv_fmname.

* Open the job using function module FP_JOB_OPEN ls_output-connection = 'ADS'. Call function 'FP_JOB_OPEN' changing ie_outputparams = ls_output exceptions cancel = 1 usage_error = 2 system_error = 3 internal_error = 4 others = 5. Undangan

* Call the function module generated for the adobe form ZAF_SFLIGHT * and replace the function module name with variable lv_fmname. * in this example the form does not have any importing parameters call function lv_fmname ' '/1BCDWB/SM00000642' * EXPORTING * /1BCDWB/DOCPARAMS = * IMPORTING * /1BCDWB/FORMOUTPUT = * EXCEPTIONS * USAGE_ERROR = 1 * SYSTEM_ERROR = 2 * INTERNAL_ERROR = 3 * OTHERS = 4. * Close the job calling the function module FP_JOB_CLOSE call function 'FP_JOB_CLOSE' importing e_result = ls_result exceptions usage_error = 1 system_error = 2 internal_error = 3 others = 4. Xexmenu 1.2 download file.

* Check the result. If ls_result-userexit is initial.

If ls_result-spoolids is initial. Message id 'PO' type 'E' number '475'. Read table ls_result-spoolids index 1 into lv_spoolid. Message id 'PO' type 'S' number '622' with lv_spoolid. By executing this program, the system will prompt for the output device name. Fill in the device name with dummy printer (LP01) and click on print preview to see the output.

Find

Output: In case you want to run the program in the background set the output option parametes as below to avoid the popup. Ls_output-nodialog = 'X'. Ls_output-Preview = 'X'. Ls_output-DEST = 'LP01'.

Popular Posts