SAP Adobe form

 Step by step of PDF form programming in GUI

https://wiki.scn.sap.com/wiki/display/ABAP/Step+by+step+of+PDF+form+programming+in+GUI

PDF form is geting popular in ABAP programming. Especially for those forms will be combined in the SAP GUI together with webdynpros.
This article described the steps to creat a PDF form.

1. Install 'SAP Adobe LiveCycle Designer'

2. execute tcode 'SFP'
    Here, you can create the interface and form for the PDF form, different with SMARTFORMS, PDF form defined a separated interface for the program call.

    In the interface, like SMARTFORMS, you can design the input and output parmeters, global definitions and do initializations.

    In the FORM, you should annance the interface to be used by the form. And then the parameters of the interface can be linked to the context of the form.

   In the form layout designed, you can combine the output field with the parameters to show the word in the form as your needed.

3. program the driver program of the PDF form.
    First, get all the data for the interface parameters.
    Second,  CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'  to get the function name of the PDF form
    Third,  CALL FUNCTION 'FP_JOB_OPEN'  to open a PDF form output job.
    Forth, call the PDF function name, parameters are refer to the interface parameters.
    Fifth,  CALL FUNCTION 'FP_JOB_CLOSE'  to close the PDF output job.

Sample codes as:

Error rendering macro 'code': Invalid value specified for parameter 'lang'

* GET THE FUNCTION MUDULE NAME OF THE PDF FORM
  CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
    EXPORTING
      I_NAME     = LF_FORMNAME
    IMPORTING
      E_FUNCNAME = LF_FM_NAME.
  IF SY-SUBRC <> 0.
*   error handling
    RETCODE = SY-SUBRC.
    IF SY-SUBRC = 1.
      MESSAGE E001(SSFCOMPOSER).
    ENDIF.
    IF SY-SUBRC = 2.
      MESSAGE E002(SSFCOMPOSER) WITH LF_FORMNAME.
    ENDIF.
  ENDIF.
* set the job parameters
  LV_OUTPUPARAMS-DEST = NAST-LDEST.
  LV_OUTPUPARAMS-REQIMM = NAST-DIMME.
  LV_OUTPUPARAMS-REQDEL = NAST-DELET.
  CALL FUNCTION 'FP_JOB_OPEN'
    CHANGING
      IE_OUTPUTPARAMS = LV_OUTPUPARAMS
    EXCEPTIONS
      CANCEL          = 1
      USAGE_ERROR     = 2
      SYSTEM_ERROR    = 3
      INTERNAL_ERROR  = 4
      OTHERS          = 5.
  IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
  LV_DOCPARAMS-LANGU = SY-LANGU.
  LV_DOCPARAMS-COUNTRY = 'US'.
  LV_DOCPARAMS-FILLABLE = ''.
  CALL FUNCTION LF_FM_NAME
    EXPORTING
      /1BCDWB/DOCPARAMS  = LV_DOCPARAMS
      ADDRESS            = LS_HEADER
      ITEM_TABLE         = LT_ITEM
      ITEM_FINAL         = LT_ITEM_FINAL
      ITEM_PAYMENT       = LT_PAYMENT
    IMPORTING
      /1BCDWB/FORMOUTPUT = LV_FPFORMOUTPUT
    EXCEPTIONS
      USAGE_ERROR        = 1
      SYSTEM_ERROR       = 2
      INTERNAL_ERROR     = 3
      OTHERS             = 4.
  CALL FUNCTION 'FP_JOB_CLOSE'
    EXCEPTIONS
      USAGE_ERROR    = 1
      SYSTEM_ERROR   = 2
      INTERNAL_ERROR = 3
      OTHERS         = 4.

 

具体范例


https://wiki.scn.sap.com/wiki/display/ABAP/Call+Adobe+Form+through+ABAP+Program?original_fqdn=wiki.sdn.sap.com

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值