cancel
Showing results for 
Search instead for 
Did you mean: 

how to call the adobe form from se38

Former Member
0 Kudos

hi friends,

iam calling the adobe form from se38.

in my adobe forms there are one import froms and some text elements and one subform,in that subform there is one table.

i had inserted the data into the table.

when i executed the form in SFP transaction code the out put is coming.

but when i executed the same form from se38 iam not getting the table.

iam getting the text element and the input parameters.

how to get the table data in the PDF output when we executed the form by se38.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

You have to call FM FP_JOB_OPEN and FP_JOB_CLOSE before and after you are calling PDF form.

Check this code below.

* Determine PDF function module for CMR Belgium
  CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
    EXPORTING
      i_name     = l_formname
    IMPORTING
      e_funcname = l_fm_name.
*   E_INTERFACE_TYPE           =

  CALL FUNCTION 'FP_JOB_OPEN'
    CHANGING
      ie_outputparams = fp_outputparams
    EXCEPTIONS
      cancel          = 1
      usage_error     = 2
      system_error    = 3
      internal_error  = 4
      OTHERS          = 5.
  IF sy-subrc <> 0.
    CASE sy-subrc.
      WHEN OTHERS.
    ENDCASE.                           " CASE sy-subrc
  ENDIF.

* Calling Function module
  CALL FUNCTION l_fm_name
    EXPORTING
      /1bcdwb/docparams         = fp_docparams
      vbeln                     = p_vbeln
      itemdetails               = it_item_data
*    IMPORTING
*      /1BCDWB/FORMOUTPUT       =
    EXCEPTIONS
      usage_error              = 1
      system_error             = 2
      internal_error           = 3
      OTHERS                   = 4      .

  IF sy-subrc <> 0.
    CASE sy-subrc.
      WHEN OTHERS.
    ENDCASE.                           " CASE sy-subrc
  ENDIF.                               " IF sy-subrc <> 0.

*Close spool job
  CALL FUNCTION 'FP_JOB_CLOSE'
*   IMPORTING
*     E_RESULT             = result
   EXCEPTIONS
     usage_error          = 1
     system_error         = 2
     internal_error       = 3
     OTHERS               = 4
             .
  IF sy-subrc <> 0.
    CASE sy-subrc.
      WHEN OTHERS.
    ENDCASE.                           " CASE sy-subrc
  ENDIF.                               " IF sy-subrc <> 0.

Thanks,

Phani Diwakar.

Former Member
0 Kudos

Hi,

Try this ...

DATA: gs_outputparams TYPE sfpoutputparams.

DATA: gv_fm_name TYPE rs38l_fnam.

DATA: zdocparams TYPE sfpdocparams.

DATA: MY_OUTPUT TYPE FPFORMOUTPUT.

CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'

EXPORTING

i_name = 'ZFORM_NAME'

IMPORTING

e_funcname = gv_fm_name.

CALL FUNCTION 'FP_JOB_OPEN'

CHANGING

ie_outputparams = gs_outputparams

EXCEPTIONS

OTHERS = 1.

CALL FUNCTION gv_fm_name

EXPORTING

/1bcdwb/docparams = zdocparams

IMPORTING

/1bcdwb/formoutput = my_output

EXCEPTIONS

usage_error = 1

system_error = 2

internal_error = 3

OTHERS = 4.

CALL FUNCTION 'FP_JOB_CLOSE'.

Former Member
0 Kudos

thanks for replay.

iam not getting the table contants.

iam getting only text fields ,iam not getting the table.

please tell how to get the table in form from se38