cancel
Showing results for 
Search instead for 
Did you mean: 

sap crm ADOBE form print

0 Kudos

**Local Structure

  DATA: ls_outputparams   TYPE sfpoutputparams,

        ls_docparams      TYPE sfpdocparams,

        ls_formoutput     TYPE fpformoutput,

        ls_control_params TYPE ssfctrlop,

        ls_result         TYPE sfpjoboutput.

Kindly let me know what else

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

    EXPORTING

      formname = lc_form_name" Adobe form name

*     VARIANT  = ' '

*     DIRECT_CALL            = ' '

    IMPORTING

      fm_name  = lv_fm_name

   EXCEPTIONS

     NO_FORM                = 1

     NO_FUNCTION_MODULE     = 2

     OTHERS                 = 3



  ls_outputparams-getpdf = 'X'.



  CALL FUNCTION 'FP_JOB_OPEN'

    CHANGING

      ie_outputparams = ls_outputparams

    EXCEPTIONS

      cancel          = 1

      usage_error     = 2

      system_error    = 3

      internal_error  = 4

      OTHERS          = 5.

  IF sy-subrc <> 0.

    RETURN.

  ENDIF.



  ls_docparams-langu = 'X'.

  ls_docparams-country = 'US'.

  ls_docparams-fillable = 'X'.



  CALL FUNCTION lv_fm_name

    EXPORTING

*     /1bcdwb/docparams  = ls_docparams

      control_parameters = ls_control_params

      output_options     = ls_output_options

      user_settings      = space

      i_zscrm_rma_header = is_rma_header

    IMPORTING

*     /1bcdwb/formoutput = ls_formoutput

      job_output_info    = ls_job_info

    EXCEPTIONS

      usage_error        = 1

      system_error       = 2

      internal_error     = 3

      OTHERS             = 4.

  IF sy-subrc <> 0.

    RETURN.

  ENDIF.

  CALL FUNCTION 'FP_JOB_CLOSE'

    IMPORTING

      e_result       = ls_result

    EXCEPTIONS

      usage_error    = 1

      system_error   = 2

      internal_error = 3

      OTHERS         = 4.

  IF sy-subrc <> 0.

    RETURN.

  ENDIF.

Kindly let me know what else code i have to write so that adobe form will get print out .

Regards,

Raju Prasad.



Accepted Solutions (0)

Answers (1)

Answers (1)

former_member210661
Active Contributor
0 Kudos

Hi Raju,

there are lots of blogs available go through that you will get to know and one more thing elaborate your requirement once..

http://wiki.scn.sap.com/wiki/display/CRM/Print+an+Adobe+Form+from+CRM+Web+UI

http://scn.sap.com/people/satishkumar.palyam2/blog/2011/07/07/adobe-forms-in-webui

Thanks & Regards,

Srinivas.

0 Kudos

Hi Srinivas,

My requirement is to print custom adode form on the click of print button of crm web ui complaint & Repair component.Please find the below screenshoot for the same.

Once click on print button.Below action will come.

Once i select  print Repair order Quote then custom adode form should get a print out by local printer.

As you suggested the link i am also following the same i have configured the action profile for external comunication.

Even i had implemented the badi DOC_PERSONALIZE_BCS. But this is not triggering. I have put the debuger in all three method.

Regards,

Raju Prasad.

0 Kudos

Hi Srinivas,

Now the badi  DOC_PERSONALIZE_BCS is triggering and i had written below code.

METHOD if_ex_doc_personalize_bcs~personalize_pdf_doc_pdfif.

*****************Data declaration********************

**Local Reference

DATA : lo_appl_object TYPE REF TO cl_doc_crm_order_h.

**Local Variable

  DATA:lv_ref_kind TYPE crmt_object_kind,

       lv_ref_guid TYPE crmt_object_guid.

** Local Structure

  DATA: ls_rma_header        TYPE zscrm_rma_header.

**lOCAL Internal Table

  DATA : lt_rma_item        TYPE TABLE OF zscrm_rma_itemdata.



lo_appl_object ?= io_appl_object.



TRY.

CALL METHOD lo_appl_object->get_crm_obj_guid

RECEIVING

result = lv_ref_guid.

CATCH cx_os_object_not_found .

ENDTRY.

IF lv_ref_guid IS INITIAL.

RETURN.

ENDIF.



CALL METHOD zcl_rma_process=>fetch_order_details

      EXPORTING

        iv_guid       = lv_ref_guid

      IMPORTING

        es_rma_header = ls_rma_header

        et_rma_item   = lt_rma_item.



*CALL FUNCTION 'ZCRM_PRINT_ADOBE_FORM'

*      EXPORTING

*        is_rma_header  = ls_rma_header

*        IV_FORM_NAME   =

*        it_rma_item    = lt_rma_item

*      IMPORTING

*        et_content_hex = lt_att_content_hex.



CALL FUNCTION 'FP_JOB_OPEN'

CHANGING

ie_outputparams = is_outputparams

EXCEPTIONS

cancel = 1

usage_error = 2

system_error = 3

internal_error = 4

OTHERS = 5.

IF sy-SUBRC <> 0.

EXIT.

ENDIF.



CALL FUNCTION ip_function_name

EXPORTING

/1bcdwb/docparams = cs_docparams

i_zscrm_rma_header = ls_rma_header

IMPORTING

/1bcdwb/formoutput = es_formoutput

EXCEPTIONS

usage_error = 1

system_error = 2

internal_error = 3

OTHERS = 4.



IF sy-subrc <> 0.

RETURN.

ENDIF.



CALL FUNCTION 'FP_JOB_CLOSE'

IMPORTING

e_result = es_joboutput

EXCEPTIONS

usage_error = 1

system_error = 2

internal_error = 3

OTHERS = 4.





ENDMETHOD.

While debuging i am not getting error but still print out is not coming.

in importing parameter values are.

IS_OUTPUTPARAMS-DEVICE = PRINTER.

IS_OUTPUTPARAMS-NODIALOG = 'X'.

IS_OUTPUTPARAMS-GETPDF = 'X'

please let me know what i am missing.

Regadds,

Raju Prasad.