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. maven+swagger

    maven+swagger 构建restful风格的应用服务确实很好用 maven来管理jar包 swagger提供接口文档和测试接口

  2. 页面缩放对css的影响

    昨天发现一个上线的项目css样式明显不对,但是查看别人的电脑上的页面样式都是没问题的,于是找了半天原因,原来是我的浏览器对这个页面缩放了,导致样式问题. 发现了页面缩放会作用在同一个域名下的所有页面, ...

  3. python学习之字典

    1.字典 列表存储的数据比较单一也不够灵活,这时我们可以使用字典来存储某些多内容的数据,字典是无顺序的 1.简单的字典 book={ 'huqiang':13457412571, 'Jasper':1 ...

  4. Flowplayer-Embedding

    SOURCE URL:https://flowplayer.org/docs/embedding.html Embedding Video embedding is an act where the ...

  5. Cheatsheet: 2015 06.01 ~ 06.30

    Web The Front-End Optimization Checklist [ASP.NET 5] Production Ready Web Server on Linux. Kestrel + ...

  6. hdu4352 XHXJ's LIS

    链接 这个题最不好想到的是状态的保存,也没有几亿的数组让你开,怎么保存前面出现了哪些数字. 题意让你求最长上升子序列的长度为k的数字的数目,可以是不连续的,可以保留一个状态栈,栈顶部依次更新,再保证长 ...

  7. maven eclipse 安装

    jdk 的 系统变量一定要用  JAVA_HOME maven 的系统变量也一定要用  M2_HOME 配置在path 中 一定要用  %JAVA_HOME%\bin;  和 %M2_HOME%\bi ...

  8. 在centos6.5中安装github的客户端git

    简介 git是一个分布式版本控制软件,我采用的采用的安装方式是源码安装 1.安装编译git时需要的包 # yum install curl-devel expat-devel gettext-deve ...

  9. 学习JQ

    目前我对jq的了解还很少,只知道jq比js简单很多,只需引入一个js文件,然后,在js中很多行才能实现的代码,jq中或许一行就搞掂了,比如根据类名获取元素,$(".类名")即可,对 ...

  10. SPSS数据分析——t检验

    SPSS中t检验全都集中在分析—比较均值菜单中.关于t检验再简单说一下,我们知道一个统计结果需要表达三部分内容,即集中性.变异性.显著性. 集中性的表现指标是均值变异的的表现指标是方差.标准差或标准误 ...