cancel
Showing results for 
Search instead for 
Did you mean: 

Link to action method called dynamically

Former Member
0 Kudos

Hi,

I have 3 "link to action" elements and a single method. I have assigned "on action" event for all 3 elements to that single method. Now i want to know inside the method from which "link to action element" is this method called dynamically.

Can anyone help me out with the solution.

Thanks in Advance.

Regards,

Kanakaraj V A

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Kanakaraj,

Write the following code in your ONACTION method, case statement compare the ID that you gave to ur buttons.


method myactionmethod.

data: lv_get_index type i,
        btn_name type string,
        lv_set_index type i,
        lv_msg type string,
        lv_max type i.


  call method myevent->get_string
    exporting
      name  = 'ID'
    receiving
      value = btn_name.



case btn_name.
  when 'BTN_LOCATE'.

  when 'BTN_FIRST'.

  when 'BTN_LAST'.

  when others.

endcase.

Greetings

Prashant

ps: Points welcome.

Answers (2)

Answers (2)

former_member402443
Contributor
0 Kudos

Hi,

Hey you can go thru the WDA Component - DEMODYNAMIC in the SWDP_DEMO PACKAGE of your sap system. This will help u in solving ur problem

Thanks and regards,

Manoj Kumar

yesrajkumar
Active Participant
0 Kudos

Hi Kanakaraj,

Refer this thread.

[;

Thanks,

Rajkumar.S