cancel
Showing results for 
Search instead for 
Did you mean: 

How to know if the dynpro was opened in a portal ?

Former Member
0 Kudos

I'd like some element to be displayed only if the dynpro is open in a portal etc etc

How could this be done ?

Regards

Stephan

Accepted Solutions (0)

Answers (2)

Answers (2)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

You can use the portal integration API - IF_WD_PORTAL_INTEGRATION. The M_PORTAL_VERSION attribute will only be populated if you are running within the portal.

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_this->wd_get_api( ).
  lo_portal_manager = lo_api_component->get_portal_manager( ).
  if lo_portal_manager->m_portal_version is INITIAL.

  endif.

Former Member
0 Kudos

Hi Thomas,

I am using above logic to check if WDA called from Portal in COMPONENTCONTROLLER->WDDOINIT. If the WDA is not called from Portal, further processing should be interrupted and throw an error message. I tried with EXIT and RETURN statements but these are only interrupted within WDDOINIT. How to stop the execution of WDA using single ABAP statement?

...Naddy

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>How to stop the execution of WDA using single ABAP statement?

There is no way to stop exectution of the entire WDA with a single statement. At least not gracefully. You could cause a short dump, but that wouldn't be a very clearn thing to do to your users. You would either need to fire an Exit Plug or one of the Portal Navigation APIs.

Former Member
0 Kudos

Hi,

From URL we can come know whether the application is Web Dynpro or not.

look at this URL the application is from WDA.

http://NEWIDES1.XXX.com:8000/sap/bc/webdynpro/sap/powl_easy_test