cancel
Showing results for 
Search instead for 
Did you mean: 

Get portal information in runtime

Former Member
0 Kudos

Hi,

During runtime I need to capture the Portal details based on a object then send that URL link to a mail as a notification .I have a option of using Home page framework where in I can give the details of PORTAL and PCD path but I need to configure this based on the environmnet (like DEV,QAS,PRD).Is this the only way to make a url for sending or is there any way that I can get PCD path in runtime and also the portal details in runtime so that irrespective of the environment the code will determine .

since My pcd path has some role related data so I have 3 different pcd paths for same iview based on the userid roles.which seems to me that I should get PCD and portal details in runtime.Can some body give some suggestions whcih should be the best practice .

Regards,

Amit

Edited by: AMITTEJA VUTPALA on Nov 8, 2010 3:03 PM

Edited by: AMITTEJA VUTPALA on Nov 9, 2010 3:35 PM

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Answered but a work around

ChrisPaine
Active Contributor
0 Kudos

Hello,

There is no "supported" API accessible by WDA to read the base URL of the portal as far as I know.

You can get the URL of the portal window from

CL_WDR_TASK=>CLIENT_WINDOW->IF_WDR_CLIENT_INFO_OBJECT~HEADER_FIELDS

with the key of "referer"

That said - this is not a supported interface - anything starting "CL_WDR" is not really "available" for use. Also, although this works - it may not be the best way of getting the current portal URL - given that the applications that generate these emails with the embedded links quite often are run in the background and not through a portal WDA application. It is often necessary to build this URL externally to WDA. So I generally build a globally reusable class/method to generate this URL.

I've therefore maintained different URL bases in the resource server section of the HPF for a key of PORTAL depending on the system. It's been the easiest way.

Elegance of the solution is nice to a point - but ease of use and support is nicer (imo).

Cheers,

Chris

Former Member
0 Kudos

Hi ,

Thought of same by saving different resource servers in HPF .Thanks for the answer ,I think SAP has to think of some solution to find out portal details at runtime .

Regards,

Amit

Edited by: AMITTEJA VUTPALA on Nov 10, 2010 10:22 AM

Edited by: AMITTEJA VUTPALA on Nov 10, 2010 10:22 AM