Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Archive a smartform

Former Member
0 Likes
1,063

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...

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...

4 REPLIES 4
Read only

Former Member
0 Likes
688

This is an ABAP forum !!!

Post in the appropriate forum please.

Read only

0 Likes
688

Sorry, but i don't understand!

is my code ABAP??

Read only

0 Likes
688

I think Gary meant to suggest that you might want to ask such questions in the forum specifically designated to Forms (Expert Forums » ABAP Development » Form Printing) rather than posting in ABAP General.