转自http://wiki.sdn.sap.com/wiki/display/ABAP/Call+Adobe+Form+through+ABAP+Program
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_TBL"
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)
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 will appear.
Click the Print Preview
Then the Output will shown as below.
相关推荐
标题“abap-ALV.rar_ABAP系统ALV_abap_abap开发alv”暗示我们将深入探讨ABAP ALV的使用,特别是在ABAP系统中的应用以及如何进行开发。 描述中提到“ABAP ALV总结,ALV格式,REUSE_ALV_GRID_DISPLAY_LVC函数使用”,...
在SAP系统中,ABAP调用ABAP Proxy是一种常见的技术操作,用于在不同系统间或者同一系统内的组件之间实现通信。ABAP Proxy是SAP提供的一个强大的接口技术,它允许开发者创建安全、高效的远程调用机制。接下来,我们将...
标题和描述所涉及的知识点主要集中在ABAP语言在SAP系统中对数据库的操作和管理。由于这部分内容比较专业,我将尽量详细地阐述ABAP(Advanced Business Application Programming)逻辑数据库和数据库操作的概念和用法...
ABAP(Advanced Business Application Programming)是SAP公司推出的一种编程语言,主要用于开发SAP系统中的业务应用程序。SAP系统在全球企业资源规划(ERP)领域有着广泛的应用,而ABAP则是其核心开发语言,使得...
ABAP,全称为Advanced Business Application Programming,是一种高级业务应用编程语言,主要被用于SAP(System Applications and Products in Data Processing)系统中进行企业级应用程序的开发。本教程以"30天学会...
ABAP(Advanced Business Application Programming)是SAP公司开发的一种编程语言,主要用于开发SAP系统中的业务应用程序。这个“ABAP中文帮助文档”包含了对ABAP基础、报表编写以及事务处理的详细指南,对于学习和...
《SAP ABAP 4.7开发指南》 在企业级信息技术领域,SAP系统扮演着至关重要的角色,尤其在企业资源规划(ERP)方面。SAP ABAP(Advanced Business Application Programming)是SAP系统中的一种编程语言,用于开发、...
SAP ABAP Query 是 SAP 系统中一种用于创建自定义报表的强大工具,尤其适合那些对 SQL 不太熟悉或者没有数据库直接访问权限的用户。它提供了丰富的功能,使得开发人员可以构建复杂的数据查询,而无需编写大量的 ABAP...
### ABAP常用字符串操作知识点详解 #### 一、字符串连接 在ABAP中,字符串连接是一种常见的操作方式,用于将两个或多个字符串合并成一个新的字符串。实现字符串连接的方法主要是通过`CONCATENATE`语句。 **语法...
在ABAP(Advanced Business Application Programming)环境中,处理Excel文件(通常以.xlsx格式存在)是常见的需求,例如数据导入导出、报表生成等。"abap xlsx2 demo 程序"是一个示例项目,旨在展示如何在SAP系统中...
ABAP 常用函数总结 ABAP 开发中,函数是非常重要的一部分,合理地使用函数可以大大提高开发效率和代码质量。本文总结了 ABAP 中常用的函数,包括日期计算、表操作、数据转换、权限检查、报表生成、PDF 转换、日期...
### ABAP 7.4 新特性详解 #### ABAP 7.40 是什么? ABAP 7.40 是 SAP NetWeaver 7.40 的一部分,它继承了 AS ABAP 7.31 (又称为 AS ABAP 7.03),并在此基础上进行了增强。值得注意的是,尽管版本号上有一定的跳跃...
ABAP OLE 颜色代码 ABAP OLE 颜色代码是指在 ABAP 编程语言中使用的颜色代码。这些代码用于在用户界面中显示不同的颜色,例如背景颜色、文字颜色、按钮颜色等。 在 ABAP 中,颜色代码通常以 šestnaestkovo ...
根据提供的文件信息,本文将详细解释 ABAP 中通过 URL 下载文件的相关知识点,包括 ABAP 程序中实现此功能的基本步骤和技术要点。 ### ABAP URL 文件下载概述 ABAP(Advanced Business Application Programming)...
ABAP(Advanced Business Application Programming)是SAP公司开发的一种编程语言,主要用于开发在SAP系统上的业务应用程序。本文将深入探讨ABAP的关键字查询帮助,为初学者提供一个清晰的入门指南。 首先,理解...
在ABAP编程中,加密和解密是两个关键的安全操作,用于保护敏感数据不被未经授权的用户访问。本文将深入探讨ABAP环境下的加密和解密技术,以及如何在实际应用中实施这些技术。 首先,我们需要理解加密的基本原理。...
ABAP语言是SAP系统中用于开发应用的核心编程语言,自从1980年代初期推出以来,它随着SAP系统版本的升级而不断演进。在SAP软件的各个版本中,ABAP7.40是一个重要的里程碑,因为它带来了一系列新的语法和特性,使...
ABAP - Keyword Documentation This documentation describes the syntax and meaning of the keywords of the ABAP language and its object-oriented part ABAP Objects. Alongside this, language frameworks ...
在SAP ABAP编程环境中,开发人员经常需要调用各种函数模块来实现特定的功能。"ABAP调用函数自动填充模式"是一种提高开发效率的工具,它允许在编写代码时快速填充函数调用的参数,并自动声明对应的变量。这个功能在...
SAP ABAP开发快捷键 SAP ABAP开发是一种功能强大且灵活的编程语言,用于开发SAP系统中的业务逻辑。然而,在ABAP开发过程中,效率是一个非常重要的因素。为了提高开发效率,熟悉ABAP开发快捷键是非常必要的。在本文...