cancel
Showing results for 
Search instead for 
Did you mean: 

How to set reference?

Former Member
0 Kudos

Hi,

I have table control which contains 5 columns.

(tripno,tripdate,reason,reimbursement,activities)

In 5th column, i have given cell editor is LINK_TO_URL.

i am binding values from internal table to Node attributes, then Node attributes to table fields. Everything is working fine.

i want to set reference field of LINK_TO_URL dynamically for each record based on trip no.

i have one node URL with attribute REFERENCE.

i am binding this REFERENCE attribute with reference property of LINK_TO_URL.

i am getting:

<b>Activities</b>

<a href="http://www.abc.com/test?tripno=3">Edit</a>

<a href="http://www.abc.com/test?tripno=3">Edit</a>

<a href="http://www.abc.com/test?tripno=3">Edit</a>

<b>Problem:</b>

If you see the reference of each link contains TRIPNO is 3. ie. it is taking latest value only for all records.

it should take corresponding tripno for each record.

but i want like this:

<b>Activities</b>

<a href="http://www.abc.com/test?tripno=1">Edit</a>

<a href="http://www.abc.com/test?tripno=2">Edit</a>

<a href="http://www.abc.com/test?tripno=3">Edit</a>

see the reference of each hyperlink.

What should i set cardinality of node URL?

Where the problem will be?

PLZ help on this.

Message was edited by:

Mog

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

the easiest way is to set your attribute reference in the table node

and fill it up in your supply function with the correct value,

if your node url is set into the node of your table,

you can write a supply function like this:

methods set_url

parent_element->get_static_attributes( importing static_attributes = ls_structure ).

concatenate 'http://www.abc.com/test?tripno=' ls_structure-tripno into lv_url.

node->set_attribute( exporting name = 'reference' value = lv_url ).

endmethod.

grtz

Koen