Sei sulla pagina 1di 10

IBM Global Business Services

Integration with ABAP Program

Integration with ABAP Programs Jan 2011 © IBM Corporation 2013


IBM Global Business Services

Objectives

 The participants will be able to:


 Use an ABAP program as the interface for Adobe Forms
 Write an ABAP program for a simple printing scenario with the tool “Interactive Forms
based on Adobe software”

2 Integration with ABAP Programs Jan 2011 © IBM Corporation 2013


IBM Global Business Services

Why ABAP Program in Adobe Forms ?

 A form can not be run on its own (it can only be previewed with test data)

 ABAP program is required to process the form

3 Integration with ABAP Programs Jan 2011 © IBM Corporation 2013


IBM Global Business Services

Basic Steps for an Interface of Form

 Data Retrieval and Processing


 Finding the Function Module Name
 Start Processing of the Form
 Pass Different Data to the Form
 Close Processing of the Form

4 Integration with ABAP Programs Jan 2011 © IBM Corporation 2013


IBM Global Business Services

Example to get Generated FM

DATA: FM_NAME TYPE RS38L_FNAM,


INTERFACE_TYPE TYPE FPINTERFACETYPE.
* Get the name of the generated function module
CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
EXPORTING
I_NAME = <FORM NAME> Pass Form Name
IMPORTING
E_FUNCNAME = FM_NAME. Get FM Name
E_INTERFACE_TYPE = INTERFACE_TYPE.

FP_FUNCTION_MODULE_NAME use class based


exception handling.
Use TRY- CATCH –ENDTRY block to handle the
exception

5 Integration with ABAP Programs Jan 2011 © IBM Corporation 2013


IBM Global Business Services

Starting and Ending Form Processing

Open Form using FP_JOB_OPEN

Close Form using FP_JOB_Close

6 Integration with ABAP Programs Jan 2011 © IBM Corporation 2013


IBM Global Business Services

Different Fields for SFPOUTPUTPARAMS

 nodialog - no printer dialog popup


 noprint - no backend printing
 nopdf - no PDF document only PDL
 getpdf - PDF as return parameter
 dest - output device
 copies - number of copies to be printed
 reqnew - start a new spool job
 reqfinal - spool request completed
 connection - determine RFC destination for ADS

7 Integration with ABAP Programs Jan 2011 © IBM Corporation 2013


IBM Global Business Services

Calling Generated Function Module

DATA: FP_DOCPARAMS TYPE SFPDOCPARAMS,


FP_NAME TYPE RS38L_FNAM,
FP_RESULT TYPE FPFORMOUTPUT.

FP_DOCPARAMS-LANGU = CUSTOMER_LANGUAGE.
CALL FUNCTION FM_NAME
EXPORTING
/1bcdwb/docparams = fp_docparams
booking = it_bookings Pass Data to the Form
IMPORTING
/1bcdwb/formoutput = fp_result
EXCEPTIONS
OTHERS = 1.

8 Integration with ABAP Programs Jan 2011 © IBM Corporation 2013


IBM Global Business Services

Reuse of Smart Forms Application Program

 From SMARTFORMS transaction go to Utilities -> Migration -> PDF-based Form


-> Switch Runtime
 Call SSF_FUNCTION_MODULE_NAME with the Smartform name
 Get the Returned generated function module
 Call that Generated Function Module

9 Integration with ABAP Programs Jan 2011 © IBM Corporation 2013


IBM Global Business Services

Summary

 Simple ABAP Program can process the Adobe Form


 Use FP_FUNCTION_MODULE_NAME to get the generated function module
name
 Call FP_JOB_OPEN to start the processing
 Call the Generated function module to process the Form
 Call FP_JOB_CLOSE to close the Form processing
 Smart Forms application programs are also can be used

10 Integration with ABAP Programs Jan 2011 © IBM Corporation 2013

Potrebbero piacerti anche