It's well known that the <Print Immediately> check box of the SmartForm POPUP screen is controlled by SSFCOMPOP-TDIMMED. Every time I just copy those parameters from the previous one until one day I find out it's un-ticked at the POPUP window even with precisely the identical copy~
Cost one-hour checking, I realize that the root of the missing checkbox was caused by:
- A few customized screens need the same print buttons with different sources, so the smart form output has been made as FM which can be called from different places;
call function LV_FM_NAME
exporting
control_parameters = ls_control_param
user_settings = SPACE
...
- Every FM generated by SmartForm will have a parameter called 'USER_SETTINGS' with default 'X';
- FM of SmartForm will use FM 'SSF_CREATE_COMPOSER_INPUT' to recap input parameters. But if user_settings <> space, it'll reset SSFCOMPOP-TDIMMED !
- Inside the customized FM, already set user_setting as SPACE when calling the FM of SmartForms. But it'll be reset as default 'X' inside my FM of Smartforms~ I thought must be some restriction for the wrapped FM of SmartForms, but finally, I find out I make a silly mistake which is the parameter 'user_settings' was mistyped as 'user_setting'! Without the 'S', FM doesn't raise an error and reset my user settings which leads to the un-ticked <Print Immediately> check box.
Maybe it's cliche and obvious for others, but I just realize what's the cost of such a stupid mistake, have to write this to remind myself!
CHECK THE NAMES OF THE PARAMETERS!
CAN'T RELAY ON SYNTAX CHECK!