
In BTP you configure the destination on subaccount level, here you see how to do so:
this way you can access the data from SAP BTP, ABAP environment:
DATA(http_destination) = cl_http_destination_provider=>create_by_cloud_destination(
i_name = 'service1' "destination name
i_authn_mode = if_a4c_cp_service=>service_specific
).
DATA(http_client) = cl_web_http_client_manager=>create_by_http_destination( i_destination = http_destination ).
As a second option, you can use custom communication scenario, how this is done, is shown in this tutorial.
at some point a lot of peoples and project are using the subaccount and are able to reuse the destinations. We wanted a separation from other solutions also when it comes to destinations.
In five steps I show You how to do this.
Create Instance of custom destination service, give it a name, make sure to enable it in the same Cloud Foundry Space as your ABAP Environment is assigned to:
No parameters are required, your instance should look like this:
after hitting "Create" the Destination Service Instance is provisioned:
now you can navigate to the custom service instance and go to "Destinations". From there you can create one to many destinations or add more later.
Hit "Service Keys" and generate a service key without any parameters. The name is not relevant.
The result looks like that:
Go to ABAP Launchpad and find the App "Communication Arrangements". Create a new communication arrangement of Scenario SAP_COM_0276. Give it a name and copy the service key from previous step in.
Your communication arrangement looks like this now:
Optionally you can rename the Service Instance Name, what I did in my example:
DATA(http_destination) = cl_http_destination_provider=>create_by_cloud_destination(
i_name = 'service1' "destination name
i_authn_mode = if_a4c_cp_service=>service_specific
i_service_instance_name = 'MYSERVICEINSTANCE' "the service instance name
).
DATA(http_client) = cl_web_http_client_manager=>create_by_http_destination( i_destination = http_destination ).
Next to the classics ways of subaccount level destinations and custom communication scenarios, you can create custom destination service instances and use it in SAP BTP, ABAP environment
The initial effort is a bit higher, but it comes with better separation in your BTP account.
Note that the shown solutions are not usable in trial environments.
if you like this post or it helped you, don't hesitate to give kudos.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
7 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 | |
4 |