on 2006 Oct 20 8:28 AM
Hi there. Good day. Im a new member of your site and I'm sure you guys can help me regarding printing in SAP. I tried to print some open items in SAP in a landscape format, but when I see the print outs, each page is missing the lower portion. Almost four lines are missing. I tried to print on a portrait format and it was successful. My manager wants to print the datas in landscape. Is there a page set-up in SAP where I can change the spacing of each line? Maybe that can be a solution. Your response is greatly appreciated. Thank you.
hi,
Welcome to SDN forum.
<b>Setting Print Parameters from within the Program</b>
If you use the print statements
1) NEW-PAGE PRINT ON
2) SUBMIT ... TO SAP-SPOOL
3) CALL FUNCTION 'JOB-SUBMIT'
you set the print parameters from within the program, using the corresponding options of the print statements. You can either display or suppress the Print parameters dialog box.
To ensure that the parameters are sent to the spool system properly and completely, you should always transfer the entire parameter set with the print statements. To create a parameter set, use the function module <b>GET_PRINT_PARAMETERS</b>.
<b>You can also view the following code :</b>
Normal definition of the print parameters
DATA: PARAMS LIKE PRI_PARAMS,
VALID TYPE C.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING DESTINATION = 'LT50'
IMPORTING OUT_PARAMETERS = PARAMS
VALID = VALID.
IF VALID <> SPACE.
NEW-PAGE PRINT ON PARAMETERS PARAMS.
ENDIF.
Definition of the parameters for printing and archiving
DATA: PRI_PARAMS LIKE PRI_PARAMS,
ARC_PARAMS LIKE ARC_PARAMS,
VALID TYPE C.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
IMPORTING OUT_PARAMETERS = PRI_PARAMS
OUT_ARCHIVE_PARAMETERS = ARC_PARAMS
VALID = VALID.
IF VALID <> SPACE.
NEW-PAGE PRINT ON PARAMETERS PRI_PARAMS
ARCHIVE PARAMETERS ARC_PARAMS.
ENDIF.
Definition of the parameters for a background job
DATA: PARAMS LIKE PRI_PARAMS,
VALID TYPE C.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING MODE = 'BATCH'
REPORT = 'MYREPORT'
IMPORTING OUT_PARAMETERS = PARAMS
VALID = VALID.
IF VALID <> SPACE.
CALL FUNCTION 'JOB_OPEN' .... EXPORTING JOBCOUNT ...
SUBMIT MYREPORT VIA JOB 'MY_JOB' NUMBER JOBCOUNT
TO SAP-SPOOL WITHOUT SPOOL DYNPRO
SPOOL PARAMTERS PARAMS.
CALL FUNCTION 'JOB_CLOSE' ...
ENDIF.
Modifying the print parameters
CALL FUNCTION 'GET_PRINT_PARAMETERS' "Obtain print
EXPORTING NO_DIALOG = 'X' "parameters
IMPORTING OUT_PARAMETERS = PARAMS.
...
CALL FUNCTION 'GET_PRINT_PARAMETERS' "Modify print
EXPORTING NO_DIALOG = 'X' "parameters
IN_PARAMETERS = PARAMS
LIST_NAME = 'NEW-LIST'
IMPORTING OUT_PARAMETERS = PARAMS.
Reward with points if it is helpful
Cheers
ALfred
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.