on 12-20-2010 2:45 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.