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

Reading Data of One View In Another view

$
0
0

Hi,

I am controlling an event in BTPAYMENT/HeaderPayment view based on the Item Category in BT120H_CPL/OVViewSet.

As Iam adding a product in BT120H_CPL/OVViewSet. and I hit enter, its entire details are filled in line item associated with it.

I want to read the details of this line item in BTPAYMENT/HeaderPayment so that I can control my event here.

 

clear lv_item.
   lr_entity_admini = me->typed_context->btadminh->collection_wrapper->get_current( ).
   lr_entity ?= lr_entity_admini.
   lr_collection = lr_entity->get_related_entities( iv_relation_name = 'BTHeaderItemsExt ').
   lr_entity_admini = lr_collection->get_current( ).


   IF lr_entity_admini IS NOT BOUND.
    lr_entity_admini = lr_entity->create_related_entity( iv_relation_name = 'BTHeaderItemsExt' ).
   ENDIF.


data : lr_iterator type ref to IF_BOL_ENTITY_COL_ITERATOR.
   lr_entity ?= lr_entity_admini.
   lr_collection = lr_entity->get_related_entities( iv_relation_name = 'BTItemsFirstLevel' ).
*----------- Code added on 05.02.2014
   lr_iterator = LR_COLLECTION->GET_ITERATOR( ).


lr_entity_admini_1 = lr_collection->get_current( ).

*lr_entity_admini_1 ?= lr_iterator->get_first( ).
WHILE lr_entity_admini_1 IS BOUND.

try.
   lv_item = lr_entity_admini_1->get_property_as_string( 'ITM_TYPE' ) .
   lv_item1 = lr_entity_admini_1->get_property_as_string( 'GUID' ) .
catch CX_SY_REF_IS_INITIAL.
   endtry.
lr_entity_admini_1 ?= lr_iterator->get_next( ).
endwhile.



This code is not working properly.It returns the Item Type for only the first line items and that too after everal iterations of the while loop

What if i add 3-4 products in the BT120H_CPL/OVViewSet.Please suggest how to read all the line item details in my Billing (BTPAYMENT/HeaderPayment) view.


Viewing all articles
Browse latest Browse all 4552

Trending Articles



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