Call Adobe Form through ABAP program

Source: Internet
Author: User

Scenario

Create an Adobe Form and call it through a ABAP program

Pre-request:

1) in the Front End System, Adobe life Cycle Designer have to install. Then only the Adobe form Layout and Adobe form would open in the SAP system
2) Adobe Reader 8.0 and above version have to installed

Steps to Create and call the Adobe form

1) Create a table Type for a table
2) Create The Interface for the Adobe Form
3) Create the Adobe Form and design the layout
4) Write a program to call the Adobe Form

Step by step approach

1) Create a table Type for a table

Go to the Transaction Code "SE11" and give the Table Type name as "Zmari_tb1".


Then click "Create" and a popup would appear as shown below.

Select the radio button "Table Type" and press Enter

Enter the Table Name ' MARI ' in the line type.

Then save it as Local Object and activate it.

Activate the Table Type.

2) Create The Interface for the Adobe Form

Go to Transaction code ' SFP ' and create the Interface for the ADOBE FORM

Enter the Interface Name as ' zsur_adobe_intr ' and click ' Create '

Give the Description and click Save.

Give Description and press ENTER

Save as Local Object

Then the below screen would appear.

Then click "Append Row" icon as indicated below.

Then as new row would inserted and assign the Table Type zmari_tbl value as shown below.

Then activate it.

Then go back and Give the Adobe Form name click Create.

3) Create Adobe Form and design the layout in the same Transaction Code "SFP"

Give the Description and the Interface name, which just created as indicated below.

Then Save as Local Object.

Then the below screen would appear.

Expand the Import button and you can find the Table Parameter Zmari.

Then Drag and drop it to the Context as shown below

After Drag and Drop the Table type to Context, then below screen would appear.

Then click the ' Layout ' tab and the Below screen would appear.

Drag and Drop the table type "Zmari" to Design View Layout as indicated below.

Then adjust the Table in the Top center of the layout as shown below.

Select the ' Text ' from the Library and drop it the Layout ' Design ' View and give a description to the Table as shown below .

Then Activate the Adobe form

4) Write a program to call the Adobe Form


Go to Transaction code SE38 and Create a Test program "Zcall_adobe_form".

Save it as local Object.

Then enter the Below Code.

REPORT  zcall_adobe_form. &-----------------------------------------------------------------------& *& Author  : P Surjith Kumar *& Purpose : Call the Adobe form in the ABAP Program *&------------------------------------------------------------------------ DATA: fm_name           TYPE rs38l_fnam,      " CHAR 30 0 Name of Function Module        fp_docparams      TYPE sfpdocparams,    " Structure  SFPDOCPARAMS Short Description  Form Parameters for Form Processing        fp_outputparams   TYPE sfpoutputparams, " Structure  SFPOUTPUTPARAMS Short Description  Form Processing Output Parameter        it_mari           TYPE zmari_tbl.       " Table Type ZMARI_TBL MARI Table Tyoe * Sets the output parameters and opens the spool job CALL FUNCTION ‘FP_JOB_OPEN‘ "& Form Processing: Call Form    CHANGING      ie_outputparams = fp_outputparams    EXCEPTIONS      cancel          = 1      usage_error     = 2      system_error    = 3      internal_error  = 4      OTHERS          = 5 . IF sy-subrc <> 0 . *            <error handling> ENDIF. *&---- Get the name of the generated function module CALL FUNCTION ‘FP_FUNCTION_MODULE_NAME‘ "& Form Processing Generation    EXPORTING      i_name     = ‘ZSUR_ADOBE_FORM‘    IMPORTING      e_funcname = fm_name. IF sy-subrc <> 0 . *  <error handling> ENDIF. *-- Fetch the Data and store it in the Internal Table SELECT * FROM mari INTO TABLE it_mari UP TO 15 ROWS. * Language and country setting (here US as an example) fp_docparams-langu   = ‘E‘ . fp_docparams-country = ‘US‘ . *&--- Call the generated function module CALL FUNCTION fm_name    EXPORTING      /1bcdwb/docparams        = fp_docparams      zmari                   = it_mari *    IMPORTING *     /1BCDWB/FORMOUTPUT       =    EXCEPTIONS      usage_error           = 1      system_error          = 2      internal_error           = 3 . IF sy-subrc <> 0 . *  <error handling> ENDIF. *&---- Close the spool job CALL FUNCTION ‘FP_JOB_CLOSE‘ *    IMPORTING *     E_RESULT             =    EXCEPTIONS      usage_error           = 1      system_error          = 2      internal_error        = 3      OTHERS               = 4 . IF sy-subrc <> 0 . *            <error handling> ENDIF.

Then activate and Execute (F8) it.

Then the printer screen would appear.

Click the Print Preview

Then the Output would shown as below.

Call Adobe Form through ABAP program

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.