Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9076

Re: Reading the data from one component view into another component view

$
0
0

Finally I was able to fix my code...My Mistakes were need to read the parent node above three levels and need to use the relation entity name while reading the data..

 

Below is the correction code

IF iv_index IS NOT INITIAL.

     lr_iterator ?= collection_wrapper->get_iterator( ).

     lr_current ?= lr_iterator->get_by_index( iv_index ).

     lr_entity ?= lr_iterator->get_by_index( iv_index ).

   ELSE.

     lr_current = collection_wrapper->get_current( ).

   ENDIF.

 

*loop back to root entity

         WHILE lr_entity->get_name( ) NE 'BTAdminH'.

           lr_entity = lr_entity->get_parent( ).

         ENDWHILE.

*Get the related entity

         IF lr_entity IS BOUND.

           lr_collection ?= lr_entity->get_related_entities( iv_relation_name = 'BTHeaderOrgmanSet' ) .

           IF lr_collection IS BOUND.

             lr_orgset_m = lr_collection->get_current( ).

*            lr_orgset = lr_orgset_m->get_related_entity( iv_relation_name = 'BTOrgSet' ).

             lr_orgset = lr_orgset_m->get_property_as_string( 'SALES_ORG' ).

           ENDIF.

         ENDIF.

 

Thanks,

Sapsar.


Viewing all articles
Browse latest Browse all 9076

Trending Articles



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