Quantcast
Channel: SCN : All Content - SAP CRM: Webclient UI - Framework
Viewing all articles
Browse latest Browse all 4552

Repeated addition of data to view

$
0
0

Hi Experts,

 

I have created a custom component with a custom context node (Value node).

In the DO_PREPARE_OUTPUT method of the view, i am collecting the required data into an internal table  lt_excptn.

 

Now, my task is to set the data in internal table to my value node. This internal table is of the same strucutre as my value node.

Here is the code i have written to set the data to the view.

 

DATA:       lo_struct_ref TYPE REF TO ZSS_UQ_EXCEPTION, (structure of my context node)

                 lo_value_node TYPE REF TO cl_bsp_wd_value_node.


LOOP AT lt_excptn INTO ls_excptn.

   CREATE DATA lo_struct_ref.

   CREATE OBJECT lo_value_node

       EXPORTING

         iv_data_ref = lo_struct_ref.

lo_value_node->set_properties( ls_excptn ).

me->typed_context->EXCEPTIONS->collection_wrapper->add( lo_value_node ).

ENDLOOP.

 

The issue that i am facing here is, if i have two rows of data, it is appending successfully for first time. But the same data is getting added to the view whenever do_prepare_output method is triggered. So the result is, data is getting added repeatedly even though i open and close other views in the overview page ect....

 

Please suggest.


Viewing all articles
Browse latest Browse all 4552

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>