2006 Mar 28 9:54 AM
Hi experts,
If i select printer name in the selection screen..
SELECTION-SCREEN BEGIN OF BLOCK P1 WITH FRAME TITLE TEXT-005.
PARAMETERS : P_PRINT LIKE NAST-LDEST.
SELECTION-SCREEN END OF BLOCK P1.
I want to get that printer name in print privew in smartforms....
How can i achive this?
Reward guaranteed
thanks
kaki
2006 Mar 28 10:00 AM
Hi kaki,
1. like this :
BOLD is important.
Also
USER_SETTINGS = space
<b>
(This parameter is Imporant, do not comment this parameter,
instead pass like this only,
other wise OUR PRinter will not get selected !
)</b>
DATA: output_options TYPE ssfcompop.
<b>output_options-tddest = 'LOC1'. <----
your printer</b>
funcname = '/1BCDWB/SF00000100'.
CALL FUNCTION funcname
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT = 'mamit'
MAIL_SENDER =
<b> output_options = output_options
USER_SETTINGS = space</b>
IMPORTING
DOCUMENT_OUTPUT_INFO =
job_output_info = output_data
JOB_OUTPUT_OPTIONS =
TABLES
p9002 = p9002
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5
.
BREAK-POINT.
regards,
amit m.
Hi experts,
If i select printer name in the selection screen..
SELECTION-SCREEN BEGIN OF BLOCK P1 WITH FRAME TITLE TEXT-005.
PARAMETERS : P_PRINT LIKE NAST-LDEST.
SELECTION-SCREEN END OF BLOCK P1.
I want to get that printer name in print privew in smartforms....
How can i achive this?
Reward guaranteed
thanks
kaki
2006 Mar 28 9:59 AM
HI Kaki,
TDDEST of SSFCOMPOP contains the device name..
just pass this to the FM in Output options in exporting parameters..
SELECTION-SCREEN BEGIN OF BLOCK P1 WITH FRAME TITLE TEXT-005.
PARAMETERS : P_PRINT LIKE NAST-LDEST.
SELECTION-SCREEN END OF BLOCK P1.
.....
data : dev type SSFCOMPOP.
dev-TDDEST = p_PRINT.
CALL FUNCTION...
EXPORTING
....
OUTPUT_OPTIONS = dev
...
regards
satesh
2006 Mar 28 9:59 AM
DATA param TYPE SSFCTRLOP
param-device = ."Device name"and pass it as a parameter to the smartform
CALL FUNCTION 'your_smartform'
IMPORTING
CONTROL_PARAMETERS = param
.
2006 Mar 28 10:00 AM
Hi kaki,
1. like this :
BOLD is important.
Also
USER_SETTINGS = space
<b>
(This parameter is Imporant, do not comment this parameter,
instead pass like this only,
other wise OUR PRinter will not get selected !
)</b>
DATA: output_options TYPE ssfcompop.
<b>output_options-tddest = 'LOC1'. <----
your printer</b>
funcname = '/1BCDWB/SF00000100'.
CALL FUNCTION funcname
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT = 'mamit'
MAIL_SENDER =
<b> output_options = output_options
USER_SETTINGS = space</b>
IMPORTING
DOCUMENT_OUTPUT_INFO =
job_output_info = output_data
JOB_OUTPUT_OPTIONS =
TABLES
p9002 = p9002
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5
.
BREAK-POINT.
regards,
amit m.
2006 Mar 28 10:11 AM
hi kaki,
To the funcion module that is generated by the smartforms there is a parameter called Control parameters.
Declare internal table it_print like SSFCTRLOP.
it_print-device = P_PRINT.
hope this helps,
priya
2006 Mar 28 10:28 AM
Hi Wenceslaus,Amit,Satish,
Thanks for all replies.
Points alloted.
thanks
kaki
2006 Mar 28 11:14 AM
Hi Kaki,
you follow the following two steps :
1. In your layout, write in any text where you want to print he name of printer : &OUTPUT_OPTIONS-TDDEST&
(NOTE THIS IS MENTIONED IN THE IMPORT PARAMETER OF THE FORM INTERFACE).
2. In your program,
copy paste the following code and run it : ( you will get the result once you activate both the layout and the program)
Report zkunal.
DATA : OUTPUT_OPTIONS TYPE ssfcompop.
OUTPUT_OPTIONS-TDDEST = 'LP01'.
" LP01 is printer name
CALL FUNCTION '/1BCDWB/SF00000071'
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS = OUTPUT_OPTIONS
USER_SETTINGS = SPACE
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
When you get execute this , you can see the printer name in your smart form.
Thanks and Regards,
Kunal
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |