未找到存档计费参数的值



>我必须通过 SMARTFORMS 打印计费文档,并且我想将 PDF 存档到附件列表中,我不得不使用结构toa_dara并从INCLUDE rvadtablarc_params,但它们是空的,没有值,所以存档没有完成!

如何获取此值?

使用的代码 :

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.

但是,我们还没有具体这样做,我们已经将智能表单转换为PDF,然后通过邮件发送。

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.

希望对你有帮助

最新更新