No values found for Archiving billing params
No values found for Archiving billing params
I've to print a billing document via a SMARTFORMS, and i want to archive the PDF into the attachement list, i had to use the structure toa_dara and arc_params from the INCLUDE rvadtabl but they are empty with no value, So the archiving is not done !
How can i get this values ?
Used Code :
INCLUDE rvadtabl.
...
...
lst_loutput_options-tdimmed = gc_x.
lst_loutput_options-tddest = nast-ldest.
lst_loutput_options-tdnewid = gc_x.
lst_loutput_options-tdarmod = nast-tdarmod.
CALL FUNCTION lv_fname
EXPORTING
control_parameters = lst_control
output_options = lst_loutput_options
user_settings = gc_x
archive_parameters = arc_params
archive_index = toa_dara
IMPORTING
job_output_info = lst_info
job_output_options = lst_output.
Yes, i put there Print and Archive (3), but the nast-tdarmod still come emty, i hd changed it in debug to 3 ... it print the PDF without archiving it !
– Hamza Chioua
Jun 29 at 15:37
1 Answer
1
We haven't done especifically that however, we've converted a smartform to PDF and then send it by mail.
form convert_and_send.
data: it_otf type standard table of itcoo,
it_content type table of tline,
it_data type table of solisti1,
it_target type table of solisti1,
wa_job_info type ssfcrescl,
wa_content like line of it_content,
wa_data like line of it_data,
wa_options type ssfcompop,
wa_params type ssfctrlop,
func_name type rs38l_fnam,
lv_size type sood-objlen,
lv_buffer type string.
call function 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZMYSMARTFORM'
IMPORTING
fm_name = func_name.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
wa_params-getotf = 'X'.
wa_params-no_dialog = 'X'.
wa_params-preview = 'X'.
call function func_name
EXPORTING
control_parameters = wa_params
wa_options = wa_options
my_parameter = my_parameter
IMPORTING
job_output_info = wa_job_info.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
it_otf = wa_job_info-otfdata.
call function 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = lv_size
TABLES
otf = it_otf
lines = it_content
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
others = 4.
if sy-subrc <> 0.
endif.
loop at it_content into wa_content.
translate wa_content using '~'.
concatenate lv_buffer wa_content into lv_buffer.
endloop.
translate lv_buffer using '~'.
do.
clear wa_data.
wa_data-line = lv_buffer.
append wa_data to it_data.
shift lv_buffer left by 255 places.
if lv_buffer is initial.
exit.
endif.
enddo.
it_target = it_data. " This content send to email
*** ...
*** ...
*** ...
*** call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
*** EXPORTING
*** document_data = lv_document_data
*** put_in_outbox = 'X'
*** commit_work = 'X'
*** TABLES
*** packing_list = it_packing_list
*** object_header = it_object_header
*** contents_bin = it_target <---------- The content
*** contents_txt = it_contents_txt
*** receivers = it_receivers
*** EXCEPTIONS
*** too_many_receivers = 1
*** document_not_sent = 2
*** document_type_not_exist = 3
*** operation_no_authorization = 4
*** parameter_error = 5
*** x_error = 6
*** enqueue_error = 7
*** others = 8.
endform.
Hope it helps
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Go to NACT t-code, select your application and Check the storage mode in storage system tab, It shouldn't be empty.
– divScorp
Jun 29 at 12:28