2007 May 09 11:21 AM
<b>Requirement :</b>Developing a data transfer program. Approach used is Call Transaction in S mode.
In some cases(if Receiving Storage Location is PKGX) I need to load only MB11 and other cases I need to load 3 transaction sequentially MB11 creates Mat. Doc. No. which in turn passed to the LT06 to create TO(Transfer Order) and the TO passed to LT12 to confirm TO.
<b>Problem </b> When I run it in background(it generates report in foreground), job finished successfully, data is loaded into system and spool status shown as error ONLY IF ALL THE 3 TRANSACTIONS CALLED AND LOADED.
<u>I debugged the Batch Job(using t-code JDBG) line by line output,contents are writen to output but at the end spool goes into error and report is not visible</u>.
In all other cases like messages/outputs due to record not correct or/and only MB11 is to be processed, spool is generated with status Waiting and report is visible.
<b>Statement at top </b> REPORT ZL6C_LOAD_INVENTORY_WM_SLOC
NO STANDARD PAGE HEADING
MESSAGE-ID ZOLSC_AS
LINE-COUNT 65
LINE-SIZE 148.
<u><b>It works if I set line-size as 132 .</b></u>
To overcome this I used FM GET_PRINT_PARAMETER with various cominations of parameter passed but it doesnt work
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
COPIES = L_C_ONE
DEPARTMENT = L_C_SYSTEM
DESTINATION = L_C_LOCL
EXPIRATION = L_C_2
LAYOUT = L_C_X_65_255
LINE_COUNT = L_C_65
LINE_SIZE = L_C_255
LIST_NAME = L_LIST_NAME
LIST_TEXT = L_LIST_TEXT
MODE = 'BATCH'
NEW_LIST_ID = G_C_X
NO_DIALOG = G_C_X
RECEIVER = L_C_SAP
RELEASE = G_C_X
SAP_COVER_PAGE = G_C_X
REPORT = SY-REPID
USER = SY-UNAME
IMPORTING
OUT_PARAMETERS = L_PARAMS
EXCEPTIONS
ARCHIVE_INFO_NOT_FOUND = 1
INVALID_PRINT_PARAMS = 2
INVALID_ARCHIVE_PARAMS = 3
OTHERS = 4
.
IF SY-SUBRC = 0 AND NOT L_PARAMS IS INITIAL.
NEW-PAGE PRINT ON PARAMETERS L_PARAMS NO DIALOG NEW-SECTION.
G_SPOOL = 'X'.
ENDIF.
Also when I use this FM under INITIALIZATION then it generates the spool but content written at TOP_OF_PAGE not displayed. When I use it under START-OF-SELECTION, problem still remain same.
Please Suggest
thanks
Sonal
2007 May 09 10:40 PM
Use FM : RSPO_OUTPUT_SPOOL_REQUEST
Reward Points if it is helpful
Thanks
Seshu