cancel
Showing results for 
Search instead for 
Did you mean: 

Error occurs in Smart Form

Former Member
0 Kudos
852

Hi Expert,

I encounter a problem in print previewing for the smart form in the CRM Web UI, it displayed "Error occurs in Smart Form". However, the form itself is working as I am able to debug and execute it from the backend. Besides, the smart form is aimed to send through email as an attachment and the attachment is working. Just that it failed to be print preview from the CRM Web UI. Any idea?

Thank you very much for the time!

Best Regards,
Yi Ying

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hi Yi Ying,

Have you configured the print output for action profile of each transaction in question using SPPFCADM?  Normally your error indicates improper configuration in your action or actual smartform form using to generate the output.  Now in order to "print preview" you must have at least one action configured in the action profile that generates a print output.  If not, then the print preview will not be available since there is no print action.

Also check the exec_smartform methods,if the import structure IS_CONTROL_PARAMETERS is not transfered to the function module that calls the smartform. In the SAP GUI this is not a problem. In the Web UI however this is required. After transfering this structure to the function module the print preview should work fine.

Regards,

Leon

Former Member
0 Kudos

Hi Leon,

Thank you for such a quick response. Most probably the problem falls under the 2nd. Because I have quite a number of smartforms and some are working (most of them are not working anyway). Do you mind explain more as of how to import the structure IS_CONTROL_PARAMETERS and what are the values need to be assigned to?

Many thanks.

Best Regards,
Yi Ying

0 Kudos

Hi Yi Ying,

IS_CONTROL_PARAMETERS is one of the import parameter of the smart form method. You may refer the following smartform class method  cl_doc_processing_crm_order=>CRM_ORDER_EXEC_SMART_FORM or in your smartform class.

You may set the control structure with the proper values like this.

*---Set control parameters for smart forms to get OTF Output

ls_control_parameters-no_open   = ' '.    "SAP SF: General flag

ls_control_parameters-no_close  = ' '.    "SAP SF: General flag

ls_control_parameters-device    = ' '.    "Output device

ls_control_parameters-no_dialog = ' '.    "suppress printer dialog

ls_control_parameters-preview   = 'X'.    "Print preview

ls_control_parameters-getotf    = ' '.    "Return OTF tab, no print  ***

ls_control_parameters-langu     = 'EN'. "Language key

ls_control_parameters-replangu1 = ' '.     "Language key

ls_control_parameters-replangu2 = ' '.     "Language key

ls_control_parameters-replangu3 = ' '.     "Language key

ls_control_parameters-startpage = ' '.     "SAP SF: Object name

Regards,

Leon

Former Member
0 Kudos

Thanks Leon,

Sorry that I'm quite new here. I am able to view cl_doc_processing_crm_order and its processing method is crm_srvorder_exec_smart_form. As the sap classes cannot be changed, so does it mean we have to write :

*---Set control parameters for smart forms to get OTF Output
ls_control_parameters-no_open   = ' '.    "SAP SF: General flag
ls_control_parameters-no_close  = ' '.    "SAP SF: General flag
ls_control_parameters-device    = ' '.    "Output device
ls_control_parameters-no_dialog = ' '.    "suppress printer dialog
ls_control_parameters-preview   = 'X'.    "Print preview
ls_control_parameters-getotf    = ' '.    "Return OTF tab, no print  ***
ls_control_parameters-langu     = 'EN'. "Language key
ls_control_parameters-replangu1 = ' '.     "Language key
ls_control_parameters-replangu2 = ' '.     "Language key
ls_control_parameters-replangu3 = ' '.     "Language key
ls_control_parameters-startpage = ' '.     "SAP SF: Object name

in the smart form, such as it's form routine and specific it in the Export?

Thank you for the patience

Best regards,
Yi Ying