Skip to content

Instantly share code, notes, and snippets.

@jasper07
Created August 18, 2012 02:16
Show Gist options
  • Save jasper07/3383939 to your computer and use it in GitHub Desktop.
Save jasper07/3383939 to your computer and use it in GitHub Desktop.
abap_gw_contacts_get_entity
METHOD contacts_get_entity.
DATA:
ls_key_tab LIKE LINE OF it_key_tab.
READ TABLE it_key_tab INTO ls_key_tab INDEX 1.
SELECT SINGLE *
INTO er_entity
FROM zat_contacts
WHERE handle = ls_key_tab-value.
DATA: lv_host TYPE string,
lv_port TYPE string,
lv_protocol TYPE string.
*--- give avatar a fully qualified url
cl_http_server=>get_location( IMPORTING host = lv_host
port = lv_port
out_protocol = lv_protocol ).
er_entity-avatar = |{ lv_protocol }://{ lv_host }:{ lv_port }{ er_entity-avatar }|.
ENDMETHOD.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment