cancel
Showing results for 
Search instead for 
Did you mean: 

how to configure print settings in smartforms

Former Member
0 Kudos

Hello friends,

I was given a task to develop smart forms..everythign is working fine but i am left with following queires,

so far i ddint maintain any print related parameters,

i understand i need to work on three parameters now

1)CONTROL_PARAMETERS

2) OUTPUT_OPTIONS

3) USER_SETTINGS

now i have seen other forms at our place and seen

in control parameters they pass

p_control-langu = 'EN'.

p_control-no_dialog = 'X'.

in output

p_output-tddest = 'LP05'.

p_output-tdnewid = 'X'.

and for user_settings

user_settings = ' '

but

the same changes are giving me error....

can any one tell me why?

next if i remove them and give them at runtime i get no sort of problem..

so how i do give them with in program?

next what si the role of user_settings...

why is it ' '...

shud it be 'X'..

next when i give print parameters in DEVELOPMENT..

when i move it to QUALITY...(settings will remain same as DEV) will it cause problmes?(like may be in QUA p_output-tddest = 'LP05'. needs to be modified?)..

any links,material to help me know more abt this issue wil be rewarded..

thnaks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi kumar,

Please find the below thread.....

data: C_FORMNAME TYPE TDSFNAME.

DATA: G_FM_NAME TYPE RS38L_FNAM.

c_formname = 'ZKAR_SF2PDF_EXMPL'.

To get output device type 
CALL FUNCTION 'SSF_GET_DEVICE_TYPE'
EXPORTING
I_LANGUAGE = V_LANGUAGE
I_APPLICATION = 'SAPDEFAULT'
IMPORTING
E_DEVTYPE = V_E_DEVTYPE.


ST_OUTPUT_OPTIONS-TDPRINTER = V_E_DEVTYPE.
ST_CONTROL_PARAMETERS-NO_DIALOG = 'X'.
ST_CONTROL_PARAMETERS-GETOTF = 'X'.

Call Function to get the Function Module name for the smart form 
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = C_FORMNAME
IMPORTING
FM_NAME = G_FM_NAME.
IF SY-SUBRC 0.

Check for Errors 
ENDIF.





Call Smartform function module without hard coding 
CALL FUNCTION G_FM_NAME
EXPORTING
CONTROL_PARAMETERS = ST_CONTROL_PARAMETERS
OUTPUT_OPTIONS = ST_OUTPUT_OPTIONS

USER_SETTINGS = 'X' 
ADD YOUR DATA STRUCTURES HERE 
IMPORTING
DOCUMENT_OUTPUT_INFO = ST_DOCUMENT_OUTPUT_INFO
JOB_OUTPUT_INFO = ST_JOB_OUTPUT_INFO
JOB_OUTPUT_OPTIONS = ST_JOB_OUTPUT_OPTIONS

TABLES 
ADD YOUR DATA TABLES 
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
.
IF SY-SUBRC 0.

On Failure display standard Message 
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

Also see this related note:

Note 1072424 - Error from SSF_GET_DEVICE_TYPE when lang is not installed.

Reward points.....

Regards,

Sreenivasa Sarma K.

Edited by: sharmashree kashi on Apr 7, 2008 4:03 PM

Former Member
0 Kudos

dear kashi,

in ur example u have given user-settings = 'X'.

why?

Answers (0)