内容发布更新时间 : 2025/1/22 6:36:36星期一 下面是文章的全部内容请认真阅读。
FUNCTION zhr_rfc_get_pic.
*\---
*\本地接口: *\
*\ *\
*\
*\---
DATA: p_tclas LIKE pspar-tclas VALUE 'A', p_begda LIKE prelp-begda VALUE '20071201', p_endda LIKE prelp-endda VALUE '99991231'.
DATA: l_connect_info LIKE toav0, l_exists(1) TYPE c.
DATA: l_access_info TYPE STANDARD TABLE OF scms_acinf WITH HEADER LINE,
l_content_txt TYPE STANDARD TABLE OF sdokcntasc, l_content_bin TYPE STANDARD TABLE OF sdokcntbin.
CALL FUNCTION 'HR_IMAGE_EXISTS' EXPORTING
p_pernr = pernr p_tclas = p_tclas p_begda = p_begda p_endda = p_endda IMPORTING
p_exists = l_exists p_connect_info = l_connect_info EXCEPTIONS
error_connectiontable = 1 OTHERS = 2. IF sy-subrc <> 0 AND sy-msgty <> ''.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ENDIF.
CALL FUNCTION 'SCMS_DOC_READ' EXPORTING
mandt = sy-mandt stor_cat = ''
crep_id = l_connect_info-archiv_id doc_id = l_connect_info-arc_doc_id signature = 'X' raw_mode = 'X' TABLES
access_info = l_access_info content_txt = l_content_txt content_bin = t_image_bin EXCEPTIONS
bad_storage_type = 1 bad_request = 2 unauthorized = 3 comp_not_found = 4 not_found = 5 forbidden = 6 conflict = 7 internal_server_error = 8 error_http = 9 error_signature = 10 error_config = 11 error_format = 12 error_parameter = 13 error = 14 OTHERS = 15. IF sy-subrc <> 0 AND sy-msgty <> ''.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ENDIF.
ENDFUNCTION.