‎2007 Mar 29 4:49 AM
Hello Guru's
I want to generate SPOOL for the program which is used to print script layout throuth submit.
When i am calling this program through submit the spool is not generating .
I had tried to do it two ways
1 )
SUBMIT ZQGAAM31_NEW
WITH QL_PRLOS-low = t_qals-PRUEFLOS
WITH ART = '04'
WITH kunnr = LIKP-KUNNR
WITH TRUCK = LIKP-BOLNR
AND RETURN.
2)
submit ZPM_IB_NOTI_SEND to sap-spool without spool dynpro
spool parameters mstr_print_parms
WITH QL_PRLOS-low = t_qals-PRUEFLOS
WITH ART = '04'
WITH kunnr = LIKP-KUNNR
WITH TRUCK = LIKP-BOLNR
AND RETURN.
For the second option system is generating spool but the spool does not contain related data of the script laout.
Kindly suggest any solution.
With Regards
Shantanu Modi
‎2007 Mar 29 5:02 AM
hi shantanu
Check out the printer program of the F110 transaction. It is RFFOAVIS_FPAYM.
hopen it helps
rewards points accordingly
regards
navjot
‎2007 Mar 29 5:06 AM
hi
u can also look at this sample code .
To generate spool u have to use function module.
Example:
FORM write_to_spool.
DATA : l_f_list_name LIKE pri_params-plist,
l_f_destination LIKE pri_params-pdest,
l_f_spld LIKE usr01-spld,
l_f_layout LIKE pri_params-paart,
l_f_line_count LIKE pri_params-linct,
l_f_line_size LIKE pri_params-linsz,
l_f_out_parameters LIKE pri_params,
l_f_valid.
l_f_line_size = 255.
l_f_line_count = 65.
l_f_layout = 'X_65_255'.
l_f_list_name = sy-repid.
to get defult spool device for the user
SELECT SINGLE spld INTO l_f_spld FROM usr01 WHERE bname = sy-uname.
IF sy-subrc = 0.
MOVE l_f_spld TO l_f_destination.
ENDIF.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
ARCHIVE_ID = C_CHAR_UNKNOWN
ARCHIVE_INFO = C_CHAR_UNKNOWN
ARCHIVE_MODE = C_CHAR_UNKNOWN
ARCHIVE_TEXT = C_CHAR_UNKNOWN
AR_OBJECT = C_CHAR_UNKNOWN
ARCHIVE_REPORT = C_CHAR_UNKNOWN
AUTHORITY = C_CHAR_UNKNOWN
COPIES = C_NUM3_UNKNOWN
COVER_PAGE = C_CHAR_UNKNOWN
DATA_SET = C_CHAR_UNKNOWN
DEPARTMENT = C_CHAR_UNKNOWN
destination = l_f_destination
EXPIRATION = C_NUM1_UNKNOWN
immediately = 'X'
IN_ARCHIVE_PARAMETERS = ' '
IN_PARAMETERS = ' '
layout = l_f_layout
line_count = l_f_line_count
line_size = l_f_line_size
list_name = l_f_list_name
LIST_TEXT = C_CHAR_UNKNOWN
MODE = ' '
NEW_LIST_ID = C_CHAR_UNKNOWN
NO_DIALOG = C_FALSE
RECEIVER = C_CHAR_UNKNOWN
RELEASE = C_CHAR_UNKNOWN
REPORT = C_CHAR_UNKNOWN
SAP_COVER_PAGE = C_CHAR_UNKNOWN
HOST_COVER_PAGE = C_CHAR_UNKNOWN
PRIORITY = C_NUM1_UNKNOWN
SAP_OBJECT = C_CHAR_UNKNOWN
TYPE = C_CHAR_UNKNOWN
USER = SY-UNAME
IMPORTING
OUT_ARCHIVE_PARAMETERS =
out_parameters = l_f_out_parameters
valid = l_f_valid
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4
.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
IF l_f_valid NE space.
NEW-PAGE PRINT ON PARAMETERS l_f_out_parameters.
WRITE : /5 'Material No.',
25 'Message Type',
40 'Message Issued'.
ULINE.
LOOP AT g_t_message_table WHERE type = 'E'.
WRITE : / g_t_message_table-matnr UNDER 'Material No.',
g_t_message_table-type UNDER 'Message Type',
g_t_message_table-message UNDER 'Message Issued'.
ENDLOOP.
NEW-PAGE PRINT OFF.
ENDIF.
ENDFORM.
reward point if it helps
regards
navjot