cancel
Showing results for 
Search instead for 
Did you mean: 

Find out the current EVENT_ID (SRM 7.0)

Former Member
0 Kudos

Hi,

I am a bit new to Web Dynpro and I have the following question:

I am within an own BADI implementation (for example change_badi).

I just want to find out the current event_id (which button has been pressed by the user).

Up to now I used sy-ucomm and sy-tcode.

I just need a short introduction which class/method should I use within badi implementation to find out the current event_id (perhaps with a short example).

Thanks a lot.

Best regards

Andreas

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

Check the OSS Note for details around this.... Note 1334202 - How to get current Action ID and transaction group.pdf

Pasting a sample code here:

DATA: v_transaction_context TYPE REF TO /sapsrm/if_transaction_context,

v_action_type TYPE /sapsrm/pdo_action_type,

  • Instantiate the object

v_transaction_context = /sapsrm/cl_transaction_context=>/sapsrm/if_transaction_context~get_instance( ) .

  • Retrieve the current action

v_action_type = v_transaction_context->get_current_action( ).

IF v_action_type = /sapsrm/if_pdo_action_c=>gc_action_order AND

wl_item-category_id IS NOT INITIAL.

READ TABLE il_partner INTO wl_partner

WITH KEY partner_fct = '00000027'

p_guid = wl_item-guid.

IF sy-subrc = 0. "There is a ship-to addr and category ID

  • Select statement only once.

IF il_ship_to IS INITIAL.

SELECT * FROM zsc_ship_to

INTO TABLE il_ship_to.

ENDIF.

READ TABLE il_ship_to INTO wl_ship_to WITH KEY matkl = wl_item-category_id.

  • End of changes

IF sy-subrc = 0 AND vl_addrnumber <> wl_partner-addr_no.

APPEND INITIAL LINE TO et_messages ASSIGNING <wl_message>.

<wl_message>-msgno = 903.

ENDIF.

ENDIF.

ENDIF.

Regards

Virender Singh

Former Member
0 Kudos

THANKS

Perfect, problem solved!

Regards

Andreas

Answers (0)