on 09-20-2010 9:47 AM
Dear All,
I am printing a smartform through Z-Program.
I need to archive this printout.
Please suggest me the solution.
Hello,
Please be noted that archiving documents other than ABAP lists has been
deactivated through SAP note 725723.
So, OTF objects should be archived directly from the application.
The suggestion was that when the application calls the Smartforms
function module, it asks to prepare the OTF data and give it back to
the application.
If you set parameter CONTROL_PARAMETERS-GETOTF = 'X', then OTF data will
be returned to application and no printing/ archiving will be performed.
The application can manipulate the returned data. for instance convert
it to PDF and send as email (usual practice).
The application can also accumulate the OTF data received from different
Smartforms and then call the archiving procedure. e.g.
perform otf_archive in program SAPLSTXBC tables otfdata
using arc_params
arc_index.
It was also suggested that some modifcations to the OTF data before
appending it to a common table otfdata.
For instance, if you want to put 3 Smartforms into one archive, the
nntermediate OTF data returned will be OTF1, OTF2, OTF3. For OTF1
last line ('//'), for OTF2 you need to delete the first and last line,
for OTF3 you need to delete the first line only.
Then you can append them into the one OTFDATA table and do the call
above to otf_archive.
Or you can also use the Storage Mode Print and Archive instead of Print Only when print.
Regards,
David
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello David,
Thanks for your solution. I did the same as you mentioned. The logic was executed.
The coding is given below,
DATA: otfdata TYPE TABLE OF itcoo.
DATA t_toa_dara TYPE tsfdara.
DATA: l_r_ssfcrescl TYPE ssfcrescl.
*----archive_parameters
MOVE: 'LIKP' TO arc_params-sap_object, " for delivery order
'SDODELNOTE' TO arc_params-ar_object, " for delivery order
sy-mandt TO arc_params-mandant,
sy-uname TO arc_params-arcuser,
'OT1C' TO arc_params-printer.
*----archive_index
MOVE: sy-mandt TO toa_dara-mandant,
'LIKP' TO toa_dara-sap_object, " for delivery order
'SDODELNOTE' TO toa_dara-ar_object. " for delivery order
APPEND toa_dara TO t_toa_dara.
Now How & where should I see the archived printout?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Pass values to the following parameters while calling smart form in the Z program:
ARCHIVE_INDEX
ARCHIVE_INDEX_TAB
ARCHIVE_PARAMETERS
CONTROL_PARAMETERS
Check below code for reference:
l_control_param-device = ld_device.
l_control_param-no_dialog = 'X'.
l_control_param-preview = xscreen.
l_control_param-getotf = getotf.
l_control_param-langu = nast-spras.
CALL FUNCTION lf_fm_name
EXPORTING
archive_index = toa_dara
archive_parameters = arc_params
control_parameters = ls_control_param
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.