cancel
Showing results for 
Search instead for 
Did you mean: 

Archiving smartform output

Former Member
0 Kudos

Hi All,

I have a requirement to archive smartform output. I have passed ARCHIVE_INDEX, ARCHIVE_PARAMETERS, CONTROL_PARAMETERS, OUTPUT_OPTIONS parameters to the function module,

I am passing mode as '3' to print and archive but i was getting error values '2' and '3'' when i execute SF.

i have passed SAP_OBJECT,,AR_OBJECT,, FORMARCHIV for ARCHIVE_INDEX and SAP_OBJECT,,AR_OBJECT,,ARCHIV_ID for archive parameters but still it gives error.

could any one provide me solution how to solve the problem , which parameters do i need to pass to archive.

Accepted Solutions (0)

Answers (1)

Answers (1)

david_liu1
Advisor
Advisor
0 Kudos

Hello,

The Smartforms composer is programmed in a way that it always

archives each single document separately. While the spool system

offers the possibility to put two documents into the same

spool request, this possibility is missing in the archive.

If you need this function, you must program it yourself.

One way is that you tell the Smartforms composer that it shall

not print and archive the forms itself, but that it shall return

the OTF data. After this your program can do the archiving itself.

To see to it that the OTF data contain all forms as one document,

you must set CONTROL_PARAMETERS-NO_OPEN = ' ' and

CONTROL_PARAMETERS-NO_CLOSE = 'X' for the first form and

CONTROL_PARAMETERS-NO_OPEN = 'X' and CONTROL_PARAMETERS-NO_CLOSE = ' '

for the second form.

That you get the OTF data in an internal table, you must set

CONTROL_PARAMETERS-GETOTF = 'X'. The OTF data are returned

in table job_output_info-OTFDATA.

To print the OTF data function module PRINT_OTF can be used.

To archive the OTF data function module CONVERT_OTF_AND_ARCHIVE

can be used.

Regards,

David

Former Member
0 Kudos

Hi David,

thanks for reply. the problem is solved by creating an entry in SPAD tcode with acess method as archive device and converting otf data to padf.

Regards,

Sre

Former Member
0 Kudos

Hi,

I am having the same requirement. Could you please send me the sample code.

Thanks in advance.

Regards,

Nivas.