博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
adobe form
阅读量:4963 次
发布时间:2019-06-12

本文共 4699 字,大约阅读时间需要 15 分钟。

Call Adobe Form through ABAP Program
2015-04-24       0     来源:ChampaignWolf的专栏  
    

Scenario

Create an Adobe Form and call it through an ABAP Program

Pre-request:

1) In the Front End System Adobe Life Cycle Designer has to install. Then only the Adobe Form Layout and Adobe form will open in the SAP system

2) Adobe Reader 8.0 and above version has 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 will 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 will appear.

\

 

Then Click "Append Row" icon as indicated below.
\

 

Then as new row will 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 will 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 will appear.

\

 

Then Click the "Layout" Tab and the Below Screen will 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,      " CHAR300 Name of Function Module      fp_docparams      TYPE sfpdocparams,    " Structure  SFPDOCPARAMS Short Description  Form ParametersforForm 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 jobCALL 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.*            
ENDIF.*&---- Get the name of the generated function moduleCALL FUNCTION 'FP_FUNCTION_MODULE_NAME' "& Form Processing Generation EXPORTING i_name ='ZSUR_ADOBE_FORM' IMPORTING e_funcname = fm_name.IF sy-subrc <> 0.*
ENDIF.*-- Fetch the Data and store it in the Internal TableSELECT * FROM mari INTO TABLE it_mari UP TO15ROWS.* Language and country setting (here US as an example)fp_docparams-langu ='E'.fp_docparams-country ='US'.*&--- Call the generated function moduleCALL 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.*
ENDIF.*&---- Close the spool jobCALL FUNCTION 'FP_JOB_CLOSE'* IMPORTING* E_RESULT = EXCEPTIONS usage_error =1 system_error =2 internal_error =3 OTHERS =4.IF sy-subrc <> 0.*
ENDIF.

Then activate and Execute (F8) it.

\

 

Then the printer screen will appear.
\

 

Click the Print Preview

\

 

Then the Output will shown as below.

\

转载于:https://www.cnblogs.com/goodsmith/p/4482470.html

你可能感兴趣的文章
Scala并发编程
查看>>
【CodeM初赛B轮】A 贪心
查看>>
maven 手动构建项目
查看>>
JSON遇到的问题
查看>>
float浮动深入理解
查看>>
流程控制之 if 判断
查看>>
OpenCV图像处理篇之边缘检测算子
查看>>
hdu1331Function Run Fun
查看>>
web容器启动后自动执行程序的几种方式比较
查看>>
expdp/impdp 参数说明,中英对照
查看>>
软件工程—团队作业1
查看>>
centos7 关闭默认firewalld,开启iptables
查看>>
UVALive 3989Ladies' Choice(稳定婚姻问题)
查看>>
来一发!!
查看>>
POJ1679The Unique MST(次小生成树)
查看>>
焦作网络赛K-Transport Ship【dp】
查看>>
面试题 —— 面向对象
查看>>
英文语法 —— 句型(定语从句)
查看>>
markdownpad 2 的使用
查看>>
数据结构与算法的实现 —— 结点定义与数据结构的选择
查看>>