FUNCTION zsrm_contract_attachment_rfc
.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(I_CONTRACT) TYPE EBELN
*" EXPORTING
*" VALUE(E_URL) TYPE STRING
*"----------------------------------------------------------------------
DATA :ls_header TYPE bbp_pds_ctr_header_d .
DATA :lt_attach TYPE TABLE OF BBP_PDS_ATT_T WITH HEADER LINE .
CALL FUNCTION 'BBP_PD_CTR_GETDETAIL'
EXPORTING
i_object_id = i_contract
IMPORTING
e_header = ls_header .
CALL FUNCTION 'BBP_PD_CTR_GETDETAIL'
EXPORTING
i_guid = ls_header -guid
i_object_id = i_contract
IMPORTING
et_attach = lt_attach[] .
LOOP AT lt_attach .
CLEAR lt_attach -disp_url .
MODIFY lt_attach .
ENDLOOP .
READ TABLE lt_attach INDEX 1 .
CALL FUNCTION 'BBP_ATTACH_BUILD_URL'
EXPORTING
is_attach = lt_attach
IMPORTING
ev_url = e_url .
ENDFUNCTION .
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(I_CONTRACT) TYPE EBELN
*" EXPORTING
*" VALUE(E_URL) TYPE STRING
*"----------------------------------------------------------------------
DATA :ls_header TYPE bbp_pds_ctr_header_d .
DATA :lt_attach TYPE TABLE OF BBP_PDS_ATT_T WITH HEADER LINE .
CALL FUNCTION 'BBP_PD_CTR_GETDETAIL'
EXPORTING
i_object_id = i_contract
IMPORTING
e_header = ls_header .
CALL FUNCTION 'BBP_PD_CTR_GETDETAIL'
EXPORTING
i_guid = ls_header -guid
i_object_id = i_contract
IMPORTING
et_attach = lt_attach[] .
LOOP AT lt_attach .
CLEAR lt_attach -disp_url .
MODIFY lt_attach .
ENDLOOP .
READ TABLE lt_attach INDEX 1 .
CALL FUNCTION 'BBP_ATTACH_BUILD_URL'
EXPORTING
is_attach = lt_attach
IMPORTING
ev_url = e_url .
ENDFUNCTION .