cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple linkToActions in one string in WDABAP ?

Former Member
0 Kudos

Hi,

im trying to achieve a functionality where inside a string, i can click on multiple items, leading to different actions (Leading to different URL).

im trying to figure out the best way to do this, and if it is even possible in WD ABAP.

i've attached an example.

in the example:

Person 1,

Person 2,

45 Persons

Are all clickable items leading to different URLS

Thanks for any help!

Accepted Solutions (0)

Answers (3)

Answers (3)

kutjohn
Active Participant
0 Kudos

Hi,

You can use the following code to create a LTA dynamically

Data:   lr_link_to_action      type ref to cl_wd_link_to_action,

  

lr_link_to_action = cl_wd_link_to_action=>new_link_to_action(

                            id        = definition_name_txt

                            on_action = 'DISPLAY_DETAIL'

                            text      = display_name_txt

                            view      = i_view ).


create multiple LTA using the above code using different ID and the text and handle the events accordingly . And if the number of the LTAs are constant then it will be easy to handle the events.

former_member199125
Active Contributor
0 Kudos

Using dynamic programming, split your string into say 3 words and create 3  link to action / url ui elements , then write whatever the code you want .

Regards

Srinivas

guillaume-hrc
Active Contributor
0 Kudos

Hi,

I really doubt this is possible the way you describe it.

Yet, you can split your string into 4 UI controls (3 LTA in your example) and associate desired actions to each of them.

You can even do it dynamically using event WDDOMODIFYVIEW.

Best regards,

Guillaume