cancel
Showing results for 
Search instead for 
Did you mean: 

Abort Web Dynpro Application with Message

Former Member
0 Kudos

Hello,

when calling a Web Dynpro Application I want to check a special authority. If check fails I want to abort the Web Dynpro Application with an error message. I thougt to check the authority in WDDOINT of the Window. What is the best way to abort the Application and still show an error message? [Redirect to an empty view with message area, use of icf-error pages (how can I direct to error page for appl. errors), other (better) possibilities??]

Thanks in advance and kind regards,

Dagmar

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

hi Satish ,

you can do as following .

1. Perform you check

2. If condition is satisfied

A. Call code showing that error in Message area or in form of Error pop up .

Please see this example <b>WDR_POPUP_TO_CONFIRM</b>

B. Keep some button called 'Close'

On click of Close write code to exit application .

This is link will give details how to exit application .

<a href="/people/mohammed.anzys/blog/2007/06/05/how-to-close-parent-window-in-webdynpro-applications to close parent window in Webdynpro applications?.</a>

Else what can you do set some flag on click of popup button like close_app

and in WD_AFTERACTION check this flag and on following condtion call exit plug .

Chill

Parag bhise

Former Member
0 Kudos

Hi,

Its very easy to raise error msg - go to wizard and select Generate Error message and u can select the 'Raise ........... ' and then pass the values.

Generated code will look like this ..

data lo_api_controller     type ref to if_wd_controller.
data lo_message_manager    type ref to if_wd_message_manager.

lo_api_controller ?= wd_This->Wd_Get_Api( ).

CALL METHOD lo_api_controller->GET_MESSAGE_MANAGER
  RECEIVING
    MESSAGE_MANAGER = lo_message_manager
    .

* report message
CALL METHOD lo_message_manager->REPORT_FATAL_ERROR_MESSAGE
  EXPORTING
    MESSAGE_TEXT             =
*    PARAMS                   =
*    MSG_USER_DATA            =
*    IS_PERMANENT             = ABAP_FALSE
*    SCOPE_PERMANENT_MSG      = CO_MSG_SCOPE_CONTROLLER
*    VIEW                     =
*    SHOW_AS_POPUP            =
*    CONTROLLER_PERMANENT_MSG =
*    MSG_INDEX                =
*    CANCEL_NAVIGATION        =
    .

Reward pts if it helps

Thanks

Sathish

Former Member
0 Kudos

Hi,

you will have to call an outbound plug to navigate away,

declare a parameter in the outbound plug containing the message.

In your view where you go to, declare that same parameter in the inbound handle method

and there you use the wizard to report the error message.

or you provide in the sicf transaction on the node of your application an error page

which has the standard message of 'not authorized'

grtz,

Koen

Former Member
0 Kudos

Hello,

thank you for your answer. I have one more question. How can I <i>raise</i> a special error in my WD Application so that my error page is called?

Thanks in advance and kind regards,

Dagmar

Former Member
0 Kudos

Hi,

please check <a href="http://help.sap.com/saphelp_nw70/helpdata/en/5e/05a5421935c511e10000000a1550b0/frameset.htm">documentation</a>

grtz,

Koen

ps: please close thread if question is answered

Former Member
0 Kudos

Hello,

we've tried this already, but we have the problem that we don't get the ICF standard error page but the normal IE error page (with HTTP 500 Internal Server Error).

Any idea?

Thank you and kind regards,

Dagmar