on 09-02-2014 10:06 AM
Hello,
can anyone please help me with "Print Preview" button in CRM UI:
In the CRM UI when a certain data is changed on the document, a note on the document is updated with changes in data. When pressing the "Print Preview" button the generated PDF is not showing an updated text. If i run the SmartForm directly in SAP GUI after the data change, the generated PDF shows an updated text. If i reload the CRM UI (close the browser and run the CRM_UI transaction) the "Print Preview" shows an updated text.
What should i do, that the Print Preview in the CRM UI would also show an updated text (without reloading the CRM UI) ?
Im thinking it could be a problem with the parameters SFPDOCPARAMS and SFPOUTPUTPARAMS, that are used when calling the SmartForm FM. The parameters are set as this:
ls_outputparams-nodialog = 'X'.
ls_outputparams-getpdf = 'X'.
ls_outputparams-connection = 'ADS'.
CALL FUNCTION '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.
CALL FUNCTION 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.
SAP gurus, please help
I figured the solution:
In the Code Initialization of my interface (SFP transaction) i had to initialize the buffer:
CALL FUNCTION 'INIT_LOAD_TEXT_BUFFER'
EXPORTING
EXCL_ID = ls_stxh-tdid
EXCL_LANGUAGE = ls_stxh-tdspras
EXCL_NAME = ls_stxh-tdname
EXCL_OBJECT = ls_stxh-tdobject
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2.
This way the text is loaded from the updated note every time a "Print Preview" button is pressed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
6 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.