cancel
Showing results for 
Search instead for 
Did you mean: 

compare the elements data of the 2 context nodes using internal table

Former Member
0 Kudos

Hi,

How can i compare the elements data of the 2 context nodes using internal table?

Regards,

Ronita

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI,

Can you please explain your query with a simple scenario?

Is the two context nodes has same structure?

Thanks.

Former Member
0 Kudos

yes they are of the same structure..

i need to reflect the changes ie the edited data ie stored as the old values in one context and new values in another context ..so i need to compare the values using internal tables

Former Member
0 Kudos

Hi,

if the only issue is to get the updated fields (by the user)

I suggest to use the framework's functionalities and try to

implement the context change log: [documentation|http://help.sap.com/saphelp_nw2004s/helpdata/en/47/a8e5d273b12fe2e10000000a42189d/content.htm]

grtz,

Koen

Former Member
0 Kudos

Hi,

how do i compare the specific attribute value?

i need to highlight the changes data.

Thanks & regards,

Ronita

Former Member
0 Kudos

Hi,

you can do this via report_attribute_message

give the context element and attribute name from the changes table

and add for instance the message 'value changed'

grtz,

Koen

Answers (1)

Answers (1)

Former Member
0 Kudos

hi ronita,

just get the nodes data into internal tables and just compare them......

node1->get_static_attributes_table(importing table = ITAB_node1)

node2->get_static_attributes_table(importing table = ITAB_node2)

now u have the data of ur 2 context nodes in 2 different internal tables ..

just compare them like

if ITAB_node1[ ] = ITAB_node2[ ].

write: / 'itab1 is equal to itab2'..

endif.

and u can use as many as comparision operators between these 2 tables to compare them....

regards....

srini,,,,