cancel
Showing results for 
Search instead for 
Did you mean: 

how to Know wich action is triggered

RicardoRomero_1
Active Contributor
0 Kudos

Hi all,

I want to know wich button is pushed within the badi BBP_PD_SAVE_BADI (esle in badi BBP_DOC_CHANGE_BADI).

I know that i can get the action with the following code::


      DATA: lo_transaction_context TYPE REF TO /sapsrm/if_transaction_context,
      lv_action TYPE /sapsrm/pdo_action_type.
      lo_transaction_context = /sapsrm/cl_transaction_context=>/sapsrm/if_transaction_context~get_instance( ) .
      lv_action = lo_transaction_context->get_current_action( ).

The problem is this code only works if the document is open in the portal. If I go to the Work Overview and select one document without open it and push somo button like "Approve" or "Reject" the value of lv_action is SPACE.

Do you know how can i obtain this action ?

Thanks in advacnce.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Put a breakpoint at BBP_SC_APP_EVENT_DISPATCHER and check it out

Regards

Sameer

RicardoRomero_1
Active Contributor
0 Kudos

Hi Sammer,

Thanks for your reply, but don't stop there.

I've put a breakpoint in that FM but don't stop, it's stoppin in both badis CHANGE and SAVE but not there...

Any other suggestions?

RicardoRomero_1
Active Contributor
0 Kudos

Hi, i don't know if it's the proper way, but i solved it doing the following:

I've created an enhancement point in the WDA POWL_TABLE_COMP in order to create a pre-exit in the method ON_OBJECT_ACTION of the view TABLE_DATA.

Here you have the action doing the following:

DATA: l_action_id TYPE powl_actionid_ty.
  
* get action ID
  l_action_id = wdevent->get_string( 'ID' ).

so, you only need to Export this value to memory in order to get it in the badi.