2009 Aug 28 10:25 AM
Hi Experts,
I have a requirement in which the user wants to that the printer's default setting of format 'X_65_1024' should be changed to 'X_65_255' in case of if he executes this perticular report.
The output of the report is ALV list display.
Is it possible to control printer's setting from within the program?
I serached and found two FMs.
'SET_PRINT_PARAMETERS' and 'GET_PRINT_PARAMETERS' .
But I am unable to understand how to use these FMs.
Is there any other way to achieve this?
Any pointers to resolve this issue would be very helpful.
Hi,
try to set your parameters at the beginning:
CALL FUNCTION 'SET_PRINT_PARAMETERS'
EXPORTING
immediately = 'X'
layout = 'X_65_255'
line_count = 65.Regards,
David
2009 Aug 28 10:38 AM
Hi,
look here:
http://help.sap.com/saphelp_nw04/Helpdata/EN/9f/dba56d35c111d1829f0000e829fbfe/content.htm
All Print Parameters are described.
And a little code example:
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
destination = lv_pdest
copies = lv_count
list_name = lv_lnam
list_text = lv_prtxt
immediately = lv_flg_prn
release = ' '
new_list_id = 'X'
expiration = lv_days
line_size = 255
line_count = 65
layout = 'X_65_255'
sap_cover_page = ' '
cover_page = ' '
receiver = lv_prrec
department = lv_prabt
no_dialog = 'X'
IMPORTING
out_parameters = ls_params
valid = lv_valid.
IF lv_valid <> space.
NEW-PAGE PRINT ON
PARAMETERS ls_params NEW-SECTION NO DIALOG.
ENDIF.Hope it helps.
Regards,
David
2009 Aug 28 11:11 AM
Thanks for you reply.
Can you tell me how to use GET_PRINT_PARAMETERS in case of ALV list display?
When the user clicks on Print button on menu bar, I want the dialog box to be pre-populated with default settings.
The code given is useful in case of write statement but not in case of ALV.
2009 Aug 28 11:25 AM
Hi,
try to set your parameters at the beginning:
CALL FUNCTION 'SET_PRINT_PARAMETERS'
EXPORTING
immediately = 'X'
layout = 'X_65_255'
line_count = 65.Regards,
David
2009 Aug 28 10:40 AM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |