You can configure the URL static in the code:
DATA(lo_url_destination) = cl_http_destination_provider=>create_by_url( 'https://<host>/sap/bc/srt/xip/sap/<provider>/000/<service>/<binding>').
Using
create_by_url
is only suitable for public services or test purposes, because credentials should be stored in the communication management in SAP Fiori launchpad.
Related Information