Hi Krishna,
You can achieve your requirement as below
- Let us say you have link to action ui elements name KUNNR & VBELN in the view
- Create an action "ON_CLICK" in the view and assign SAME action to both ui elements event "OnAction"
- Now, inside the event handler method "ONACTIONON_CLICK", you get get the ui element name on which the click event taken place by using ID from WDEVENT
Sample code:
METHOD onactionon_click .
DATA lv_id TYPE string.
wdevent->get_data( EXPORTING name = 'ID' IMPORTING value = lv_id ).
CASE LV_ID.
WHEN 'KUNNR'.
" Open T-code XD03
WHEN 'VBELN'.
" Open T-code VA03
WHEN OTHERS.
ENDCASE.
ENDMETHOD.
Hope this helps you.
Regards,
Rama