cancel
Showing results for 
Search instead for 
Did you mean: 

Adobe PDF Based Forms saving in sap server.

Former Member
0 Kudos

Hi

I have one Adobe PDF based form it is working well i can view/print it. But eventually there will be thousands of forms in testing i do not want to print one by one, I just need to save them in the following sap server location and by TCODE AL11 i can see them.

usr\sap\INTERFACES\DX2\Outbound\CDIC\Staging\

i have the following Abap but i do not know where i change to saving them in above location

REPORT  /xxx/pdf_form_name MESSAGE-ID /xxx/alv.

CONSTANTS :

gc_fpname          TYPE fpname  VALUE '/xxx/Z_STAT'.


DATA: lv_fm_name          TYPE  funcname,
      lv_doc_params       TYPE  sfpdocparams,
      lt_bnka             TYPE bnka,
      "lt_t001             TYPE t001,
      lt_e_interface_type TYPE  fpinterfacetype,
      lv_w_cx_root        TYPE REF TO cx_root,
      lv_mesg             TYPE string,
      lv_banks            TYPE banks,
      lv_spras            TYPE spras,
      lv_fp_outputparams  TYPE sfpoutputparams,
      ls_formoutput       TYPE fpformoutput,
      ls_sfpdocparams     TYPE sfpdocparams.

TRY.
* Function to find the FM name.
    CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
      EXPORTING
        i_name           = gc_fpname
      IMPORTING
        e_funcname       = lv_fm_name
        e_interface_type = lt_e_interface_type.
  CATCH cx_root INTO lv_w_cx_root.
    lv_mesg = lv_w_cx_root->get_text( ).
    MESSAGE i000 WITH lv_mesg.
ENDTRY.

IF lt_e_interface_type EQ space.

  CALL FUNCTION 'FP_JOB_OPEN'
    CHANGING
      ie_outputparams = lv_fp_outputparams
    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.
ENDIF.

lv_doc_params-country = lv_banks.
lv_doc_params-langu   = lv_spras.

CALL FUNCTION lv_fm_name

EXPORTING
  "/1BCDWB/DOCPARAMS        =
  /1bcdwb/docparams  = ls_sfpdocparams
  lv_acct_number          = 'XXXXXXXXXXXXXXXXXX'
 IMPORTING
  "/1bcdwb/formoutput = ls_formoutput
  /1bcdwb/formoutput = ls_formoutput

* EXCEPTIONS
*   USAGE_ERROR              = 1
*   SYSTEM_ERROR             = 2
*   INTERNAL_ERROR           = 3
*   OTHERS                   = 4
  .
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
IF sy-subrc <> 0.
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
IF lt_e_interface_type EQ space.
  CALL FUNCTION 'FP_JOB_CLOSE'
    EXCEPTIONS
      usage_error    = 1
      system_error   = 2
      internal_error = 3
      OTHERS         = 4.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
ENDIF.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

What you'll need to do is make sure your docparams is not set to preview the form when run.

fp_outputparams-preview    = space.

This will prevent the print preview.

When you call your form and it returns ls_formoutput, that's your form data. You need to figure out a way to download that to your location and be able to retrieve it appropriately