СПС ВСЕМ!!! Сделал
* Проверяем на существование фотографии call function 'HR_IMAGE_EXISTS' exporting p_pernr = p0001-pernr p_tclas = 'A' p_begda = '18000101' p_endda = '99991231' importing p_exists = l_exists p_connect_info = l_connect_info exceptions others = 2. if sy-subrc <> 0. message id sy-msgid type sy-msgty number sy-msgno with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 . exit. endif.
call function 'SCMS_DOC_READ_FILES' exporting stor_cat = space crep_id = l_connect_info-archiv_id doc_id = l_connect_info-arc_doc_id path = 'C:\Temp\HRFOTO.jpg' frontend = 'X' tables comps = comps2 comp_names = comp_names exceptions bad_storage_type = 1 bad_request = 2 unauthorized = 3 not_found = 4 conflict = 5 internal_server_error = 6 error_http = 7 error_signature = 8 error_config = 9 error_hierarchy = 10 error_download = 11 error_open = 12 error_parameter = 13 error = 14 others = 15. if sy-subrc <> 0. w_binary = ''. else. call function 'WS_UPLOAD' exporting filename = 'C:\Temp\HRFOTO.jpg' filetype = 'BIN' tables data_tab = itab. clear w_binary. loop at itab into ls_line. concatenate w_binary ls_line into w_binary in byte mode. endloop. endif.
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
* Удаляем фотографию с локального компьютера call method cl_gui_frontend_services=>file_delete exporting filename = 'C:\Temp\HRFOTO.jpg' changing rc = l_rc exceptions file_delete_failed = 1 cntl_error = 2 error_no_gui = 3 file_not_found = 4 access_denied = 5 unknown_error = 6 not_supported_by_gui = 7 wrong_parameter = 8 others = 9.
|
|