Skip to Content
0
Former Member
Jul 16, 2008 at 09:26 AM

Archive a smartform

375 Views

Hi everybody,

i need to archive a smartform ( custom invoice ).

I'm trying to print the smartform using a particular printer used to archive ( ARCH printer ).

Same printer that i use to archive a sapscript (it works perfectly).

i tryed to use this function:

CALL FUNCTION 'CONVERT_OTF_AND_ARCHIVE'

EXPORTING

arc_p = arparams

arc_i = toa_dara

arc_tab = tsf_dara

TABLES

otf = p_otfdata

EXCEPTIONS

error_archiv = 1

error_communicationtable = 2

error_connectiontable = 3

error_kernel = 4

error_parameter = 5

error_format = 6

OTHERS = 7.

using same parameters of the sapscritp form but it doesn't work!!!!

😔

to fill all parameters i use this code:

toa_dara-mandant = sy-mandt.

toa_dara-sap_object = 'BKPF'.

toa_dara-ar_object = 'FIIINVOICE'.

toa_dara-object_id = id_ogg.

toa_dara-reserve(6) = 'COMMIT'.

CALL FUNCTION 'GET_ARCHIVE_TAB_PPF'

EXPORTING

io_trigger = trigger

ip_sap_object = toa_dara-sap_object

ip_ar_object = toa_dara-ar_object

IMPORTING

et_archive_index_tab = tsf_dara.

CALL FUNCTION 'GET_PRINT_PARAMETERS'

EXPORTING

mode = 'CURRENT'

destination = 'ARCH'

immediately = 'X'

release = 'X'

new_list_id = 'X'

expiration = days

sap_cover_page = 'D'

receiver = sy-uname

sap_object = toa_dara-sap_object

ar_object = toa_dara-ar_object

archive_mode = '3'

archive_info = ' '

no_dialog = 'X'

IMPORTING

out_parameters = prparams

out_archive_parameters = arparams

valid = valid

EXCEPTIONS

archive_info_not_found = 1

invalid_print_params = 2

invalid_archive_params = 3.

IF sy-subrc <> 0.

ENDIF.

please help me!!!

thanks...