cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Dynamic Destination in BTP

rameshputta
Participant
0 Likes
2,662

Hello,

We have developed an application in BTP environment using restful ABAP which will be consumed by various different customers. The application connects to the on premise ABAP system to fetch the data using RFC function modules. This will be achieved by creating the destination on the BTP cockpit.

Currently in the code, we are hardcoding the destination name in order to call the RFC function module from the on premise system. But the problem is , each customer may create the destination with different names , in that case how are we going to fetch the destination name dynamically ?

Appreciate your inputs. thanks in advance.

 

Accepted Solutions (1)

Accepted Solutions (1)

rameshputta
Participant
0 Likes

Thank you!

 

 

Answers (2)

Answers (2)

peterpersiel
Product and Topic Expert
Product and Topic Expert
Hello rameshputta,
We recommend using the communication arrangement approach (RFC Communication via Communication Arrangements) for the following reasons over the deprecated destination service approach:
  • There are no hardcoded values/assumptions for a destination name in the destination service or destination service integration (for example, only default integration).
  • The communication system can also refer to a destination service. The destination name and destination service instance are then configured instead of hardcoded.
Best regards,
Peter
rameshputta
Participant
0 Likes
Thanks for your input. I followed the steps provided in the link but while trying to get the destination based on communication arrangement, I get 'Cloud Destinations are not supported in your system' error.
kaidehmann
Product and Topic Expert
Product and Topic Expert

Hi @rameshputta,

you can create a business configuration app that allows the maintenance of a destination. A customer's administrator can maintain the destination in this business configuration app. The code reads and uses the destination name from the business configuration. Please have a look at Creating Business Configuration Apps with ABAP RESTful Application Programming Model and Custom Busi... on how to create a business configuration app.

Best regards
Kai

rameshputta
Participant
0 Likes
Thanks for your input. Can we restrict the business configuration app to maintain only one record of the destination?
kaidehmann
Product and Topic Expert
Product and Topic Expert

Yes, just make the client the only key field. However, as Peter mentioned in his answer, using cl_rfc_destination_provider=>create_by_comm_arrangement is preferred over the deprecated cl_rfc_destination_provider=>create_by_cloud_destination. When using cl_rfc_destination_provider=>create_by_comm_arrangement, there is no need to provide a business configuration app since the consumer's administrator can configure the destination in the communication system.