Quantcast
Channel: SCN : Discussion List - SAP Interactive Forms by Adobe
Viewing all articles
Browse latest Browse all 1237

Printing Adobe Form in Webdynpro

$
0
0


Hi Experts,

 

I need one help  from all of you , its quite urgent.

 

Actually I am trying to print Adobe form in webdynpro method like below:

 

 

   "----- Take the Adobe fprm -------------------"

      lv_form_name = 'ZHR_SAP_FORM'.
*----------------------------------------------"

      CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
        EXPORTING
          i_name     = lv_form_name
        IMPORTING
          e_funcname = lv_fm_name.

      lfs_output_params-nodialog = 'X'.
      lfs_output_params-getpdf   = 'X'.
      lfs_output_params-device   = 'TR5T'.
      lfs_output_params-connection   = 'ADS'.

      CALL FUNCTION 'FP_JOB_OPEN'
        CHANGING
          ie_outputparams = lfs_output_params
        EXCEPTIONS
          cancel          = 1
          usage_error     = 2
          system_error    = 3
          internal_error  = 4
          OTHERS          = 5.
      IF sy-subrc <> 0.
* Implement suitable error handling here
      ENDIF.

*---Form language
      lfs_doc_params-langu = 'E'.

*---Call Adobe form.
      CALL FUNCTION lv_fm_name  

        EXPORTING
         /1bcdwb/docparams         = lfs_doc_params
          gt_item                  = lit_zhrauth_item
          gs_hrauth                = lwa_zhrauth
       IMPORTING
         /1bcdwb/formoutput       lwa_output
       EXCEPTIONS
         usage_error              = 1
         system_error             = 2
         internal_error           = 3
         OTHERS                   = 4
                .
      IF sy-subrc <> 0.
* Implement suitable error handling here
      ENDIF.

*---Job Close
      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.

 

Here , the funtion module name is coming correctly.

But when calling function CALL FUNCTION 'FP_JOB_OPEN' ,

 

It is giving sy-subrc = 2 , i.e. usage error (An Exception).

 

Similarily , due to this i am getting same exception in 

 

CALL FUNCTION  lv_fm_name

 

So some one please help me , what should i do ,

am i supposed to pass some other parameter in  CALL FUNCTION 'FP_JOB_OPEN'

 

 

 

Hopefully , waiting for responds.

 

Thanks & Regards;

Gaurav Singh


Viewing all articles
Browse latest Browse all 1237

Trending Articles