惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Visual Studio Blog
N
Netflix TechBlog - Medium
GbyAI
GbyAI
大猫的无限游戏
大猫的无限游戏
博客园 - 三生石上(FineUI控件)
T
Tailwind CSS Blog
IT之家
IT之家
博客园 - Franky
雷峰网
雷峰网
博客园 - 聂微东
腾讯CDC
M
MIT News - Artificial intelligence
B
Blog RSS Feed
博客园_首页
罗磊的独立博客
S
SegmentFault 最新的问题
I
InfoQ
博客园 - 叶小钗
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
阮一峰的网络日志
阮一峰的网络日志
D
Docker
宝玉的分享
宝玉的分享
B
Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报

博客园 - smith_feng

六大免费网站数据采集器对比(火车头,海纳,云采集,ET,三人行,狂人采集) 微信公众账号 Senparc.Weixin.MP SDK 开发教程 索引 国内app快速生成平台对比 .NET连接SAP系统专题:BAPI_TRANSACTION_COMMIT的使用方法(十) SAP IDOC开发(转) 按月统计tcode和report使用次数的工具 webdynpro C#打印条码与ZPL weixin 公众平台开发 android SDK 离线下载更新 SAP web 开发 (第二篇 bsp 开发 mvc模式 Part2 ) SAP web 开发 (第二篇 bsp 开发 mvc模式 Part1 ) bsp STEP 使用查询(SQ01、SQ02、SQ03)创建报表 程序员想玩转大数据:需要知晓的12种工具 查找SAP标准程序用户出口及BADI的方法 SAP abap 需找出口(BADI)的几种方法 SAP 增强-出口选找方法-全部 android sdk 更新用的HOSTS
adobe form
smith_feng · 2015-05-06 · via 博客园 - smith_feng
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.

\