Hello,
please help, i have this problem:
When certain data values on the CRM UI document change, the "Print preview" is not showing an updated text. It looks like the print preview procedure reads (generates ?) the text for display only once, when the document is opened. If i close and reload CRM_UI, the "Print preview" is showing an updated text. The document also has automatic note creation to it (when a document is saved, the note is automatically created), which gets correctly updated (change document data --> delete note --> save document --> updated note).
So what should i do that the "Print preview" text is generated every time a button is pressed ?
Information:
On the document transaction type ZDO1 (BT126H_APPT component) the "Print preview" button is added in the method IF_BSP_WD_TOOLBAR_CALLBACK~GET_BUTTONS. When the event triggers, it calls a method EH_ONPRINT_PREVIEW from superclass CL_CRM_UIU_BT_H_OVW_VIEWSET:
CALL METHOD SUPER->EH_ONPRINT_PREVIEW
EXPORTING
HTMLB_EVENT = HTMLB_EVENT
HTMLB_EVENT_EX = HTMLB_EVENT_EX.
The transaction ZDO1 has an Action profile ZPOR_ZDO1, which has an action ZDO1_PRINT defined for "Print Preview". In the CRMC_ACTION_CONF the action ZDO1_PRINT has these Properties:
1.) Overview tab:
- Schedule Condition = In the Worklist
- Action Merging = Max. 1 Unprocessed Action for Each Action Definition
- Start Condition = No Condition
- Time of Processing = Immediate Processing
2.) Processing Details tab:
- Assigned Processings = Smart Forms Print
- "Printer" subtab:
OutputDevice = PDF
Number of Copies = 1
- "Form" subtab:
Form Name = CRM_ACTIVITY_BUSACT01
Processing Class = ZCL_DOC_PROCESSING_CRM_ORDER
Processing Method = ZCRM_ACTIVITY_EXEC_PDF
In the method ZCRM_ACTIVITY_EXEC_PDF it says that for transaction ZDO1 the Smart FOrm /DURS/POR_IZPIS_01 should be used:
case ls_orderadm_h_wrk-process_type.
when'ZDO1'.
lv_iname = '/DURS/POR_IZPIS_01'.
whenothers.
lv_iname = '/DURS/POR_IZPIS_02'.
endcase.
CALLFUNCTION'FP_FUNCTION_MODULE_NAME'
EXPORTING
i_name = lv_iname
IMPORTING
e_funcname = lv_name.
ls_outputparams-nodialog = 'X'.
ls_outputparams-getpdf = 'X'.
ls_outputparams-connection = 'ADS'.
CALLFUNCTION'FP_JOB_OPEN'
CHANGING
ie_outputparams = ls_outputparams
EXCEPTIONS
cancel = 1
usage_error = 2
system_error = 3
internal_error = 4
OTHERS = 5.
ls_docparams-country = 'SI'.
ls_docparams-langu = sy-langu.
CALLFUNCTION lv_name
EXPORTING
/1bcdwb/docparams = ls_docparams
I_HEADER_GUID = ls_orderadm_h_wrk-guid
IMPORTING
/1bcdwb/formoutput = ls_formoutput
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4.
3.) Schedule & Start Condition tab:
Empty
Help greatly appreciated, thanks!