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

BT115IT_SLSO enhance - copy line item EH_ONCOPY - refresh collection?

$
0
0

Hi there,

 

I have a requirement to enhance the standard 'COPY' functionality for Sales Order item.I need to manipulate a field on the ‘copied’ line item, before it returns to the WebUI screen.

 

I have redefined the EH_ONCOPY event handler, retaining the original code which copies the selected items and can see exactly where the copy happens, for selected line items: (standard code)


  lr_btitems
->execute( iv_method_name = 'copyItems'     "#EC NOTEXT
                      it_param      
= lt_param ).

 

 

After this method is called,(while still in EH_ONCOPY) if I navigate through the collection, the newly copied entry is not yet there, and so cannot be manipulated. All other items are there, and I can access them.

 

I am using code similar to this to navigate through, after the method above:

 

lr_admini ?= ztyped_context->btadmini->collection_wrapper->get_current( ).
  
WHILE lr_admini IS BOUND.
   lr_admini
->get_properties( IMPORTING es_attributes = ls_admini).
   lr_admini ?= ztyped_context
->btadmini->collection_wrapper->get_next( ).
  
ENDWHILE.

 

My questions are:

 

Do I need to include some kind of commit in order to see the newly copied record at this stage?

Should I be adding this code elsewhere – if so, can you please suggest where?

Am I navigating through the data incorrectly?

 

 

Thanks in advance,

 

 

David


Viewing all articles
Browse latest Browse all 4552

Trending Articles



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