2007 Sep 26 5:00 AM
In report, after getting O/P list, the user has to select a row from output list and press pushbutton so that a new transaction is opend. at this movement there are two options. i.e. the Tcode is executed in either in Fore ground or in Back ground. If it is Background, a protocal is created with some information and this protocal has to be printed automatically. Can anybody please suggest how to implementin logic for this requirement.
Thanks,
Zakir
In report, after getting O/P list, the user has to select a row from output list and press pushbutton so that a new transaction is opend. at this movement there are two options. i.e. the Tcode is executed in either in Fore ground or in Back ground. If it is Background, a protocal is created with some information and this protocal has to be printed automatically. Can anybody please suggest how to implementin logic for this requirement.
Thanks,
Zakir
2007 Sep 26 5:09 AM
Hi Zakir,
You can use NEW-PAGE PRINT ON for the same.
<b>* IF EXECUTED IN BACKGROUND</b>
if sy-batch = 'X'
Example
Printing with archiving
DATA: PARAMS LIKE PRI_PARAMS,
ARPARAMS LIKE ARC_PARAMS,
DAYS(1) TYPE N VALUE 2,
COUNT(3) TYPE N VALUE 1,
VALID TYPE C.
CALL FUNCTION <b>'GET_PRINT_PARAMETERS'</b>
EXPORTING DESTINATION = 'LT50'
COPIES = COUNT
LIST_NAME = 'TEST'
LIST_TEXT = 'Test NEW-PAGE PRINT ON'
IMMEDIATELY = 'X'
RELEASE = 'X'
NEW_LIST_ID = 'X'
EXPIRATION = DAYS
LINE_SIZE = 79
LINE_COUNT = 23
LAYOUT = 'X_PAPER'
SAP_COVER_PAGE = 'X'
RECEIVER = 'SAP*'
DEPARTMENT = 'System'
SAP_OBJECT = 'RS'
AR_OBJECT = 'TEST'
ARCHIVE_ID = 'XX'
ARCHIVE_INFO = 'III'
ARCHIVE_TEXT = 'Description'
NO_DIALOG = ' '
IMPORTING OUT_PARAMETERS = PARAMS
OUT_ARCHIVE_PARAMETERS = ARPARAMS
VALID = VALID.
IF VALID <> SPACE.
<b>NEW-PAGE PRINT ON</b> PARAMETERS PARAMS
ARCHIVE PARAMETERS ARPARAMS
NO DIALOG.
WRITE / 'First line'.
Write 😕 'Second line'.
ENDIF.
else.
..........
endif.
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |