Skip to Content
author's profile photo Former Member
Former Member

How to get the event triggered in the Web Dynpro screen inside the BADI's

Hi All!

There are some scenarios in SRM6.0 where the requirement is to perform a specific validation or process depending on the event triggered by the user in the screen (press check button, save button, etc.).

The problem is that in the new Web Dynpro interface, when user press a button in the screen, the system performs a METHOD in the class that trigger the specific event.

Because of that there is no user-command, then the SY-UCOMM variable is blank and we are unable to check the event triggered in the screen inside any BADI (BBP_DOC_CHECK_BADI, BBP_DOC_CHANGE_BADI)

There is another way to check the event?

Thanks!

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 18, 2007 at 07:18 PM

    After some workaround, I was able to create a function module with the following code:

    DATA t_callstack TYPE sys_callst.

    FIELD-SYMBOLS <l_callstack> TYPE LINE OF sys_callst.

    CALL FUNCTION 'SYSTEM_CALLSTACK'

    IMPORTING

    et_callstack = t_callstack.

    READ TABLE t_callstack ASSIGNING <l_callstack>

    WITH KEY eventname(8) = 'ONACTION'.

    IF sy-subrc EQ 0.

    MOVE <l_callstack>-eventname TO e_action.

    ENDIF.

    The logic is the following:

    - considering that the events triggered by an Web Dynpro screen will always have the name "ONACTION...", then I can use the function module SYSTEM_CALLSTACK, and then read the stack with the name starting with the string 'ONACTION'.

    There should be only 1 line ( Does anyone knows how to press 2 buttons at same time :-)...?)

    In this way, the result in the E_ACTION parameter is the action triggered.

    But I still wonder if there is any other way to do that....does anyone knows?

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 19, 2007 at 01:02 PM

    Hi Oscar,

    there are certain circumstances which will prevent the call-stack scenario from working (e.g. more than one UI element are bound to one and the same action).

    Who is the SRM6.0 ramp-up customer your working for? Please open a customer message and we will let you know the scenario which needs to be implemented in that case.

    regards, Ulli

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 19, 2007 at 04:41 PM

    Hi People!

    Thanks for the answers.

    I'm working in the SRM 6.0 ramp-up with Standard applications.

    The problem with using enhancement is that it would be a huge work to do because there are various screens that should be enhanced. But I understand that could be another way.

    Regards, Oscar.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.