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 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 TO15ROWS.
* 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 will appear.

Click the Print Preview

Then the Output will shown as below.

adobe form的更多相关文章

  1. SAP PP- OPK8生产订单打印 配置Smart form.

    OPK8 正常情况下是不可以配置Smart form 的 OPK8进入工单打印配置界面,选择Forms, 你会发现只有Script form 和PDF form(Adobe form)可选的,没有配置 ...

  2. SAP Using Text Modules in Adobe Forms

    In this demo we will create an adobe form which displays text in two different languages (English or ...

  3. 使用ABAP和JavaScript代码生成PDF文件的几种方式

    ABAP 方法1:使用ABAP + Adobe Lifecycle Enterprise Service 详细步骤参考我的博客Convert word document into PDF via Ad ...

  4. SAP不同的产品是如何支持用户创建自定义字段的

    我们从SAP CRM,Cloud for Customer(简称C4C)和S/4HANA这三个产品分别来看看. SAP CRM 我们使用所谓的Application Enhancement Tool( ...

  5. 大学毕业时成都SAP和深圳腾讯的Offer,我是怎么选择的

    2006年校园招聘,我拿到了SAP成都研究院和深圳腾讯的offer,而我最后选择了前者. 当时我主要是基于以下四点考虑. SAP成都有最优秀的人才 2006年SAP成都研究院刚刚成立,对人才的挑选非常 ...

  6. 编辑美化图片,保存至本地,Adobe出品(支持IOS,android,web调用)免费插件

    本例以web调用做为例子,本插件支持主流浏览器,IE要9以上,移动设备,触屏设备也支持,能自适应屏幕大小. 使用效果: 工具还是很丰富的,编辑完成之后,可以保存图片至本地目录. 使用说明: 1,需要在 ...

  7. flex中form表单中子元素之间的距离控制

    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.ado ...

  8. Adobe Acrobat pro生成PDF模版

    最近做了一个关于动态生成PDF合同的需求  java生成PDF 网络上随便一搜遍有了 不要用手动在代码里面输入合同中的文字这种方式 如这样的方式 http://blog.csdn.net/justin ...

  9. Adobe® Reader®.插件开发

    Thank you for your interest in developing a plug-in for Adobe® Reader®. To build an Adobe Reader plu ...

随机推荐

  1. Oracle logmnr工具分析日志脚本

    在oracle:对logmnr工具分析日志这个不陌生:对数据恢复应用场景经常用到:这里为了方便对归档日志进行分析: 当然网上有一个logmnr界面的工具:感觉很人性化:下载需要积分:为此写一个脚本. ...

  2. asp.net 之

    <script type="text/javascript"> //获取客户端实例 var pa = Sys.WebForms.PageRequestManager.g ...

  3. C++string中用于查找的find系列函数浅析

    总述:      以下所讲的所有的string查找函数,都有唯一的返回类型,那就是size_type,即一个无符号整数(按打印出来的算).若查找成功,返回按查找规则找到的第一个字符或子串的位置:若查找 ...

  4. hdu1242 优先队列+bfs

    Rescue Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Subm ...

  5. Django ModelForm and Form

    django表单系统中,所有的表单类都作为django.forms.Form的子类创建,包括ModelForm 关于django的表单系统,主要分两种 基于django.forms.Form 基于dj ...

  6. IOS详解TableView——内置刷新,EGO,以及搜索显示控制器

    内置刷新 内置刷新是苹果IOS6以后才推出的一个API,主要是针对TableViewController增加了一个属性,refreshControl,所以如果想用这个内置下拉刷新的话,最好给你的Tab ...

  7. 深入浅出设计模式——迭代器模式(Iterator Pattern)

    模式动机 一个聚合对象,如一个列表(List)或者一个集合(Set),应该提供一种方法来让别人可以访问它的元素,而又不需要暴露它的内部结构.针对不同的需要,可能还要以不同的方式遍历整个聚合对象,但是我 ...

  8. HDU4511 AC自动机+dijkstra

    题意: Description 终于放寒假了,小明要和女朋友一起去看电影.这天,女朋友想给小明一个考验,在小明正准备出发的时候,女朋友告诉他,她在电影院等他,小明过来的路线必须满足给定的规则:  1. ...

  9. iOS开发 百度坐标转火星坐标

    - (CLLocationCoordinate2D)hhTrans_GCGPS:(CLLocationCoordinate2D)baiduGps { const double x_pi = 3.141 ...

  10. StringBuffer delete

    描述 java.lang.StringBuffer.delete() 方法将删除这个序列的一个子字符串中的字符. 子字符串的开始在指定的start和延伸处的字符索引end - 1或结束的序列,如果不存 ...