on 04-09-2005 12:10 AM
Does SAP provide any equivalent of the FILE transaction and logical file names for URLs?
My BSP application needs to link to different URLs depending on whether its running in development, QA, or production.
I would like to do this in the most flexible way possible -- no code changes when URLs change, no custom tables to store URLs, ...
Best Regards,
Shawn Searcy
Shawn,
I think I understood your problem. I also have ABAP apps where it send an email to the user that has BSP apps link, which can be differ from each system.
What i did is call the following method:
CALL METHOD cl_http_ext_webapp=>create_url_for_bsp_application
EXPORTING
bsp_application = <your BSP app name>
bsp_start_page = <your start page>
bsp_start_parameters = <your start params if any>
IMPORTING
ABS_URL = <your link>.
hope that helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use transaction SM59 and just define the logical URLs that you want. You can associate with the name the complete destination, port, paths, etc.
In your BSP application just read the data from SM59 and build your URL. Or if you are using the http_client, it can automatically work against SM59 names.
The last part of the puzzle you have been missing: CALL FUNCTION 'RFC_READ_HTTP_DESTINATION'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not sure I follow, I use all relative links and the BSP is transported from one environment to the other and everything goes with it therefore since everything is relative no concern over what system.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Craig,
My application must link to another application that runs on a different server. For example,
MyApp in development links to http://otherdev/App.aspx
MyApp in QA links to http://otherqa/App.aspx
MyApp in production links to http://otherprod/App.aspx
Logical file names will work, but I was curious as to whether or not there was a more appropriate solution.
Thanks,
Shawn Searcy
Hi Shawn,
I don't know exactly what you want to achieve, but maybe this small example to solve a similar task will give you some ideas.
In our system landscape there is a standalone WebAS next to a 4.6B R/3 system, both being present as development and production system.
The WebAS uses RFC to call some programs/function modules on the respective R/3 system. Of course the development WebAS can only access the development R/3, same goes for the productive pendants.
I solved this by simply using a model variable in my application, which I initialize in the beginning, checking which system the application is currently executing on and therefore setting the model variable to the name of the Trusted RFC connection for this system.
Thanks for the replies.
I will try to be more specific in what I am doing (if you promise not to ask why ;-).
My BSP application must link (e.g. via hyperlink or redirect) to an ASP.NET web application running in a completely different landscape of non-SAP servers.
When my BSP application is running in development, I want it to link to the ASP.NET application on the development server in the other landscape.
When my BSP application is running in QA, I want it to link to the ASP.NET application on the QA server in the other landscape.
And so on...
My solution at this point is the following:
<%
data logical_url type FILENAME-FILEINTERN.
data physical_url type FILENAME-FILEEXTERN.
data redirect_url type string.
concatenate 'ZEXTERNAL_APP_' sy-sysid into logical_url.
call function 'FILE_GET_NAME'
exporting
logical_filename = logical_url
importing
file_name = physical_url
exceptions
file_not_found = 1
others = 2 .
if sy-subrc = 0.
redirect_url = physical_url.
response->redirect( redirect_url ).
.
.
.
This works fine. The target URL is 1) determined based on the current SAP system ID, and 2) completely externalized from application code.
The purpose of my initial message was to find out if SAP had a "new and improved", and possibly more appropriate, mechanism for accomplishing this.
Regards,
Shawn
User | Count |
---|---|
77 | |
9 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.