method /iwbep/if_mgw_appl_srv_runtime~get_stream.
data: t_photo type table of tbl1024,
t_msg type table of bapiret2,
s_photo type tbl1024,
s_msg type bapiret2,
lv_pernr(8) type n,
l_photo type xstring,
l_line type string,
l_photo1 type string,
ls_key type /iwbep/s_mgw_name_value_pair,
ls_stream type ty_s_media_resource,
lv_entity_name type /iwbep/mgw_tech_name,
lo_dp_facade type ref to /iwbep/if_mgw_dp_facade,
lv_destination type rfcdest.
lv_entity_name = io_tech_request_context->get_entity_type_name( ).
* Get RFC destination
lo_dp_facade = /iwbep/if_mgw_conv_srv_runtime~get_dp_facade( ).
lv_destination = /iwbep/cl_sb_gen_dpc_rt_util=>get_rfc_destination( io_dp_facade = lo_dp_facade ).
case lv_entity_name.
when 'Employee'.
read table it_key_tab into ls_key
with key name = 'Perno'.
if sy-subrc eq 0.
lv_pernr = ls_key-value.
call function 'PAD_PHOTO_UPDATE_GET_DETAIL' destination lv_destination
exporting
iv_employee_number = lv_pernr
tables
t_photo_archive_out = t_photo
t_messages_out = t_msg.
loop at t_photo into s_photo.
l_line = s_photo-line.
concatenate l_photo1 l_line into l_photo1.
endloop.
ls_stream-value = l_photo = l_photo1.
ls_stream-mime_type = 'image/jpeg'.
copy_data_to_ref( exporting is_data = ls_stream
changing cr_data = er_stream ).
endif.
when others.
endcase.
endmethod.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
50 | |
5 | |
5 | |
4 | |
4 | |
4 | |
3 | |
3 | |
3 | |
2 |