cancel
Showing results for 
Search instead for 
Did you mean: 

Print Preview: SAP GUI showing updated text, CRM UI not showing updated text

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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.