Adobeform is of “Order Confirmation”. An e-mail message informing a cutomer that an order has been received. It is triggered in CRM.
Need to configure the Adobeform in SPRO for Sales Order Confirmation.
Go to SPRO
Customer Relationship Management->Basic Functions->Actions->Actions in Transaction->Create Actions with Wizard
Click Continue
Enter Action Profile - ZACTION_ORD_CONF and Continue
Enter Action Definition - ZACTION_PRINT1 and Continue
Processing Time - Processing When Saving Document
Click Continue
Enter Partner Function. Eg: 00000001 (Sold-to-Party)
Click Continue
Click External Communication and then Continue
External Communication is used to send the attached mail directly to the Sold-to-party email id.
Form Name - YF_O2C_F_CRM_ORDER_CONFIRM
Form Type – PDF-Based Forms
Format – YSALES_ORDER_CONF
Click Continue
Click Continue
Click Continue
Click Continue
Click Complete
After Completion it will look like above.
Need to implement BADI ‘DOC_PERSONALIZE_BCS’ and enter in Format
It is a filtered BADI
Need to implement the logic to trigger the Adobeform in the IF_EX_DOC_PERSONALIZE_BCS~PERSONALIZE_PDF_DOC_PDFIF
Code Snippet
DATA: rf_order_conf TYPE REF TO ycl_o2c_process_crm_order,
rf_container TYPE REF TO object,
rf_cx_sy_ref_is_initial TYPE REF TO cx_sy_ref_is_initial.
CONSTANTS: lco_e TYPE char1 VALUE 'E'.
MOVE io_appl_object to rf_container.
TRY.
*-- Object is created
CREATE OBJECT rf_order_conf
EXPORTING
i_appl_object = rf_container
i_adobe_form = ip_form_name
i_outputparams = is_outputparams.
*-- Calling CRM Order Confirmation Class YCL_O2C_PROCESS_CRM_ORDER
IF rf_order_conf IS BOUND.
*-- Method to Fetch Data using FM CRM_ORDER_READ
CALL METHOD rf_order_conf->fetch_data( ).
*-- Method to Call Adobe Form Function Module
CALL METHOD rf_order_conf->process
CHANGING
c_sfpjoboutput = es_joboutput
c_fpformoutput = es_formoutput
c_sfpdocparams = cs_docparams.
ENDIF.
CATCH cx_sy_ref_is_initial INTO rf_cx_sy_ref_is_initial.
MESSAGE rf_cx_sy_ref_is_initial TYPE lco_e.
ENDTRY.
So from transaction CRMD_ORDER, for any Sales Order when saving any data, an email will be send to the Sold-to-Party email id set in BP.
Example of Email Attachment is as below.