In the video, you can see How to create very basic adobe form to print a parameter on the layout, and then call the same Adobe form from driver program.
Driver Program
*&---------------------------------------------------------------------*
*& Report ZS08_ZK_ADOBEFORM1
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT ZK_ADOBEFORM1.
TABLES : apb_lpd_otr_keys.
"variables/struture
DATA: gv_fm_name         TYPE rs38l_fnam,      " FM Name
      gs_fp_docparams    TYPE sfpdocparams,
      gs_fp_outputparams TYPE sfpoutputparams.
CONSTANTS : gv_form_name TYPE fpname VALUE 'ZADOBE_PRINT_TEXT'.
**&&~~ Selection Screen
*
SELECTION-SCREEN begin of BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS : ip_text TYPE char30.
SELECTION-SCREEN end of BLOCK b1.
START-OF-SELECTION.
     perform print_form.
end-of-SELECTION.
*&---------------------------------------------------------------------*
*& Form PRINT_FORM
*&---------------------------------------------------------------------*
*& text
*&---------------------------------------------------------------------*
*& -->  p1        text
*& <--  p2        text
*&---------------------------------------------------------------------*
FORM PRINT_FORM .
*&---------------------------------------------------------------------*
**&&~~ Form Processing: Call Form - Open
*
CALL FUNCTION 'FP_JOB_OPEN'
  CHANGING
    ie_outputparams = gs_fp_outputparams
  EXCEPTIONS
    cancel          = 1
    usage_error     = 2
    system_error    = 3
    internal_error  = 4
    OTHERS          = 5.
IF sy-subrc <> 0.
  " Suitable Error Handling
ENDIF.
*&---------------------------------------------------------------------*
**&&~~ Get the Function module name based on Form Name
*
CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
  EXPORTING
    i_name     = gv_form_name
  IMPORTING
    e_funcname = gv_fm_name.
IF sy-subrc <> 0.
  " Suitable Error Handling
ENDIF.
*&---------------------------------------------------------------------*
*
**&&~~ Call the Generated FM
CALL FUNCTION gv_fm_name   "'/1BCDWB/SM00000176'
  EXPORTING
    /1bcdwb/docparams = gs_fp_docparams
    IP_TEXT           = ip_text
* IMPORTING
*   /1BCDWB/FORMOUTPUT       =
  EXCEPTIONS
    usage_error       = 1
    system_error      = 2
    internal_error    = 3
    OTHERS            = 4.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
*&---------------------------------------------------------------------*
**&&~~ Form Processing: Call Form - Open
*
CALL FUNCTION 'FP_JOB_CLOSE'
* IMPORTING
*   E_RESULT             =
* EXCEPTIONS
*   USAGE_ERROR          = 1
*   SYSTEM_ERROR         = 2
*   INTERNAL_ERROR       = 3
*   OTHERS               = 4
  .
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
ENDFORM.
 

 
 
 
0 Comments