cancel
Showing results for 
Search instead for 
Did you mean: 

How to create multiple hyperlink texts dynamically in webdynp ABAP.

gopalkrishna_baliga
Participant
0 Kudos

Hi Experts

   I have to create multiple hyperlinks in the first view dynamically. The text that will be displayed as a  hyperlink will come from a custom table.

   If the table has 3 row for texts then I need display three rows of hyperlinks. Depending on number entries in the table the number of hyperlink text to displayed will also vary. How can I do this? Any sample code?

  For example if the table has three entries: display data

                                                               modify data

                                                               create data

  Then the hyperlinks displayed in view will be three (three rows)

                                                               display data

                                                               modify data

                                                               create data

Please help

Thanks

Gopal

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Gopal,

Please try this link

http://webdynproabap.wordpress.com/2012/10/30/alv-with-link-to-action/

Hope it will be help ful for you

Thanks & Regards,

Meenachi.R

Former Member
0 Kudos

Hi Gopal,

There are two ways of acheiving what you wanted to.

1. At runtime dynamically create the link to action UI element using its runtime class.  Using static method NEW_LINK_TO_ACTION of class CL_WD_LINK_TO_ACTION you can create link to action at runtime and set its property. It requires a bit lot of coding.

http://help.sap.com/saphelp_nw04s/helpdata/en/0f/e8884118aa1709e10000000a155106/content.htm

2. You can you use table or multipane UI element in order to acheive the same. I would prefer go for multipane UI element. Below are two examples which increases the ui element at run time. With a bit of coding alteration to the below examples you can acheive what you want.

http://www.teamabap.com/2013/04/multipane-ui-element/

http://www.teamabap.com/2013/03/multiple-fileuploa-using-table/

Best Regards,

Arun Krishnamoorthy

former_member82178
Active Participant
0 Kudos

Hi Krishna,

Have a look below wiki for dynamic table creation.

http://wiki.sdn.sap.com/wiki/display/WDABAP/Creating+UI+Elements+Dynamically+in+Abap+Webdynpro+Appli...

By default, table cell editor is TextView. To get hyperlink within table, change cell editor to LinktoURL or LinktoAction depending upon requirement.

Regards,

Madhu Sudhan.

Former Member
0 Kudos

Hi

You could create a table, and set the cell editor to LinkToUrl and bind it to your context.

Maybe the rowrepeater could be used as well.

Kim