03-07-2008 4:48 AM
expert!
im having a problem with the alignment of my page.i used set_print parameters.im printing a paper in landscape type and i used 'X_65_255' as its layout and 63 as its line count and 255 as its line size.problem is when i print the second page it starts on the fourth line instead of starting in the first line of the page.
can you share your ideas with me guys on how i would fix this problem?my first page is ok but the preceding pages were not.
03-07-2008 4:56 AM
Hi,
Chk out this program,
REPORT SAPMZTST NO STANDARD PAGE HEADING LINE-COUNT 0(2).
PARAMETERS P TYPE I.
INITIALIZATION.
CALL FUNCTION 'SET_PRINT_PARAMETERS'
EXPORTING
ARCHIVE_MODE = '3'
COPIES = '5'
DEPARTMENT = 'BASIS'
DESTINATION = 'LT50'
EXPIRATION = ' '
IMMEDIATELY = 'X'
LAYOUT = 'X_65_132'
LINE_COUNT = 54
LINE_SIZE = 20
LIST_NAME = 'Test'
LIST_TEXT = 'Test for User''s Guide'
NEW_LIST_ID = 'X'
RECEIVER = 'KELLERH'
RELEASE = ' '
SAP_COVER_PAGE = 'X'
START-OF-SELECTION.
DO P TIMES.
WRITE / SY-INDEX.
ENDDO.
TOP-OF-PAGE.
WRITE: 'Page', SY-PAGNO.
ULINE.
END-OF-PAGE.
ULINE.
WRITE: 'End of', SY-PAGNO.
After executing this program, the user can enter a value for parameter P on the selection screen (for example 100) and choose Execute + print. The system then displays this dialog window:
Chk out this links..
http://help.sap.com/saphelp_40b/helpdata/en/9f/dba58735c111d1829f0000e829fbfe/content.htm
Hope this helps u,
Regards,
Arunsri
05-02-2008 10:30 AM
hi there
when i execute tht program am getting a short dump
can u pls let me know why and give me another example
regards
bhanu
08-22-2011 3:08 AM
Because Function Type is Conflicted.
Plz use this source.
After executing this program, press the key Ctrl + P .
you can see the values are same the parameters in fuction module 'SET_PRINT_PARAMETERS'.
REPORT z_test001 NO STANDARD PAGE HEADING LINE-COUNT 0(2).
DATA :archive_mode LIKE pri_params-armod VALUE '3',
copies LIKE pri_params-prcop VALUE '5',
department LIKE pri_params-prabt VALUE 'BASIS',
destination LIKE pri_params-pdest VALUE 'LT50',
expiration LIKE pri_params-pexpi VALUE ' ',
immediately LIKE pri_params-primm VALUE 'X',
layout LIKE pri_params-paart VALUE 'X_65_132',
line_count LIKE pri_params-linct VALUE '54',
line_size LIKE pri_params-linsz VALUE '20',
list_name LIKE pri_params-plist VALUE 'TEST',
list_text LIKE pri_params-prtxt VALUE `Test for User's Guide`,
new_list_id LIKE pri_params-prnew VALUE 'X',
receiver LIKE pri_params-prrec VALUE 'KELLERH',
release LIKE pri_params-prrel VALUE ' ',
sap_cover_page LIKE pri_params-prsap VALUE 'X'.
PARAMETERS p TYPE i DEFAULT 10.
INITIALIZATION.
CALL FUNCTION 'SET_PRINT_PARAMETERS'
EXPORTING
archive_mode = archive_mode
copies = copies
department = department
destination = destination
expiration = expiration
immediately = immediately
layout = layout
line_count = line_count
line_size = line_size
list_name = list_name
list_text = list_text
new_list_id = new_list_id
receiver = receiver
release = release
sap_cover_page = sap_cover_page.
START-OF-SELECTION.
DO p TIMES.
WRITE / sy-index.
ENDDO.
TOP-OF-PAGE.
WRITE: 'Page', sy-pagno.
ULINE.
END-OF-PAGE.
ULINE.
WRITE: 'End of', sy-pagno.
Edited by: Jaime White 999 on Aug 22, 2011 4:08 AM