Skip to Content
0
Former Member
Feb 01, 2008 at 05:11 PM

Archiving Smartforms

439 Views

Hi,

I need to archive(Document Image Archiving Sytem-CImage) a Notification. I Used smartforms to output the Notification. I am able to Convert this Output to PDF Format and then send a mail.

We pass the Archiving Parameters and Archive Index in OPEN_FORM for SAP Scripts. I tried to Archive by directly passing Archve Index & Archive Parameters to Smartform Call but with no result.

Then I tried fetching OTF Data from Smartforms call and then Passing it to Archiving FM as below

*ARCHIVE_PARAMETERS

arc_params-sap_object = 'BUS2078'. "Object type

arc_params-archiv_id = 'Z2'. "Target storage system

arc_params-doc_type = 'Z*'. " Doc type in Customizing

*ARCHIVE_INDEX

ls_toa_dara-function = 'DARA'.

ls_toa_dara-mandant = sy-mandt.

ls_toa_dara-sap_object = 'BUS2078'.

ls_toa_dara-object_id = Notif_number.

ls_toa_dara-reserve(6) = 'COMMIT'.

The Output of Smartform Output(job_output_info-otfdata) is passed to FM below

call Function 'CONVERT_OTF_AND_ARCHIVE'

exporting

arc_p = ls_arc_params

arc_i = ls_toa_dara

format = 'PDF'

* ARC_TAB =

* ARCHIVE_COPIES = ' '

* MAX_COPIES = '001'

tables

otf = ls_output-otfdata.

if sy-subrc <> 0.

* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

endif.

endif.

sy-subrc of Above call returns '0', but the Document is not Archived.

Please advice if I missed any parameters or if any further settings needs to be in place for Archiving Smartforms.

Thanks in advance for advice

Poorna

poornachanders@yahoo.com