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. AS3语言注意事项汇总

    1. 在IE中,主DisplayObject加入stage后,可能其大小还是0,这时可以通过监听resize信息,在主DisplayObject获得正确的大小后,运行主要程序.需要注意的是在这个过程中 ...

  2. print函数

    python中print既可以写成print a,也可以写成print(a) >>> a=1 >>> print a 1 >>> print(a) ...

  3. UITableView优化的方法

    使用不透明视图. 不透明的视图可以极大地提高渲染的速度.因此如非必要,可以将table cell及其子视图的opaque属性设为YES(默认值). 其中的特例包括背景色,它的alpha值应该为1(例如 ...

  4. 【HDU5955】Guessing the Dice Roll/马尔科夫

    先从阿里机器学习算法岗网络笔试题说起:甲乙两人进行一个猜硬币的游戏.每个人有一个目标序列,由裁判来抛硬币.谁先得到裁判抛出的一串连续结果,谁赢. 甲的目标序列是正正正,乙的目标序列是反正正.那么如果裁 ...

  5. jquery截图插件的使用

    首先感谢http://www.htmleaf.com/Demo/201504211717.html这款插件. 使用之初,对于插件的结构很是糊涂,首先文件的核心是cropper.js,其次才是mian. ...

  6. idea 工程添加svn关联

    1.想启用idea的SVN插件还需要在idea配置一下(Ctrl + Alt + S),如下图所示: 2.接下来启用idea的版本控制插件(这里当然是启用Subversion了),打开“VCS”菜单项 ...

  7. zoj3228Searching the String(ac自动机)

    链接 这个题把病毒分为了两种,一种包含可以覆盖,另一种不可以,需要分别求出包含他们的个数,可以把两种都建在一颗tire树上,在最后求得时候判断一下当前节点是属于哪种字符串,如果是不包含的需要判断一下p ...

  8. Python脚本开头两行的:#!/usr/bin/python和# -*- coding: utf-8 -*-的作用

    #!/usr/bin/Python指定用什么解释器运行脚本以及解释器所在的位置 # -*- coding: utf-8 -*-用来指定文件编码为utf-8的 估计有不少人注意过一些python脚本开头 ...

  9. codeforces 446A DZY Loves Sequences

    vjudge 上题目链接:codeforces 446A 大意是说最多可以修改数列中的一个数,求最长严格递增的连续子序列长度. 其实就是个 dp 的思想,想好思路后交上去没想到一直 wa 在第二个测试 ...

  10. JQuery Datatables Dom 和 Language 参数详细说明

    http://linleizi.iteye.com/blog/2086435 *********************************** Data Tables: http://datat ...