Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9071

Keeping the WebRFC URL dynamic in Personas

$
0
0

I'm not sure if this is common knowledge so I thought I'd mention it

 

In order to avoid a hard coded server name when performing a WebRFC, there is a very simple way to build the URL in a dynamic fashion. Just precede the WebRFC step with a Javascript step which builds a variable from the current protocol and host name and use that in the WebRFC step. So something like this:

 

Calculate in JavaScript     args.server = location.protocol + '//' + location.host;

Call WebRFC                        {server}/sap/bc/webrfc?_FUNCTION=functionnname...etc...

 

This avoids having to alter the flavor when it gets transported to another environment like from Dev to QA and so on.


Viewing all articles
Browse latest Browse all 9071

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>