cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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!

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

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.

Ulli_Hoffmann
Contributor
0 Kudos

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

Former Member
0 Kudos

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?

Former Member
0 Kudos

Hi Oscar!

Are you using SAP standard WDA applications in SRM or are these your own ones? If you have your on applications the problem should not exist. If these are standard WDA applications you may use the enhancement technology (newly released with SAP WebAS 7.0) within the WDA coding to hit a nail into the appl.

For more details about enhancement technology you may have a look at http://help.sap.com/saphelp_nw70/helpdata/en/94/9cdc40132a8531e10000000a1550b0/frameset.htm

On the other hand your workaround is a nice feature also ...

Hope this helps.

Regards,

Volker