cancel
Showing results for 
Search instead for 
Did you mean: 

Get the url of the portal

Former Member
0 Kudos

Hi,

I want to get the URL of the portal dynamically.

I mean from R3 I want to know in which portal my code is running.

I know there is a utility method construct Url but it give the application url of the component not the url of portal.

Does any ine have any idea?

Thanks,

Prosun

Accepted Solutions (0)

Answers (1)

Answers (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Not sure that getting the Portal URL will be possible. There are the Portal Integration APIs. You can get access to them via the following code:

DATA lo_api_component  TYPE REF TO if_wd_component.
  DATA lo_portal_manager TYPE REF TO if_wd_portal_integration.

  lo_api_component = wd_comp_controller->wd_get_api( ).
  lo_portal_manager = lo_api_component->get_portal_manager( ).

Now there are public attributes of the API that tell you the portal version, but I don't see anything for the URL. You might play around with the returned object. The actual instance of CL_WDR_PORTAL_INTEGRATION has more attributes and methods than the interface, but only the methods and attributes of the interface would probably be offically supported.