SELECT SINGLE archiv_id
arc_doc_id
INTO (iv_archiv_id,
iv_arc_doc_id)
FROM /opt/vim_1head
WHERE docid = iv_docid.
CALL FUNCTION '/OPT/VIM_VA2_GET_ARCH_DATA'
EXPORTING
iv_docid = iv_docid
IMPORTING
iv_archiv_id = gv_archiv_id
iv_arc_doc_id = gv_arc_doc_id
EXCEPTIONS
system_failure = 1 error_message
communication_failure = 2 error message.
* read Archive ID
IF iv_docid IS INITIAL.
RAISE EXCEPTION TYPE zcx_vim_util EXPORTING textid = zcx_vim_util=>exp_id001.
ENDIF.
CALL FUNCTION '/OPT/VIM_VA2_GET_ARCH_DATA'
EXPORTING
iv_docid = iv_docid
IMPORTING
iv_archiv_id = gv_archiv_id
iv_arc_doc_id = gv_arc_doc_id
EXCEPTIONS
system_failure = 1 error_message
communication_failure = 2 error message.
IF gv_archiv_id IS INITIAL
OR gv_arc_doc_id IS INITIAL.
RAISE EXCEPTION TYPE zcx_vim_util EXPORTING textid = zcx_vim_util=>exp_id002.
ENDIF.
METHOD get_dp_image_from_cms_x.
CALL FUNCTION 'ARCHIVOBJECT_GET_TABLE'
EXPORTING
archiv_id = gv_archiv_id
document_type = gc_dp_doc_type
archiv_doc_id = gv_arc_doc_id
* ALL_COMPONENTS =
* SIGNATURE = 'X'
compid = 'data'
IMPORTING
length = ev_length
binlength = ev_binlength
TABLES
archivobject = et_archivobject
binarchivobject = et_binarchivobject
EXCEPTIONS
error_archiv = 1
error_communicationtable = 2
error_kernel = 3
OTHERS = 4.
IF sy-subrc = 0.
CALL METHOD cl_rmps_general_functions=>convert_1024_to_255
EXPORTING
im_tab_1024 = et_binarchivobject[]
RECEIVING
re_tab_255 = rt_solix_tab[].
ENDIF.
ENDMETHOD.
** Create OBJ attachment - DP Invoice PDF
DATA(lt_pdf_solix)
= NEW zcl_vim_dp_invfile_srv_001( CONV /opt/docid( gp_def_attrib ) )->get_dp_image_from_cms_x(
IMPORTING ev_binlength = lv_binlength
ev_length = lv_length ).
IF lt_pdf_solix[] IS NOT INITIAL.
lo_document_att = cl_document_bcs=>create_document(
i_type = 'PDF'
i_subject = CONV so_obj_des( TEXT-303 )
i_length = CONV so_obj_len( lv_binlength )
i_hex = lt_pdf_solix
i_language = sy-langu
i_importance = '1' ).
lo_document->add_document_as_attachment( lo_document_att ).
APPEND lo_document_att TO lt_attachments.
ENDIF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 |