Skip to Content
Former Member
Mar 01, 2010 at 11:42 AM

BT126S_APPT/ApptSR - Method: EH_ONNEW: How to control values of POP-UP


Hi Experts,

I need to change the values (transaction types) of the pop-up controlled by method: EH_ONNEW in component BT126S_APPT and View: ApptSR.

I refedined the method and changed coding to:

METHOD eh_onnew.
    lr_context_node  TYPE REF TO cl_bsp_wd_context_node,
    lr_struct_ref    TYPE REF TO crmst_followup_proctype_option,
    lr_value_node    TYPE REF TO cl_bsp_wd_value_node,
    lv_proc_type     TYPE crmt_process_type,
    lr_cuco          TYPE REF TO cl_bt126s_a_apptsearchcuc_impl,
    lr_collection    TYPE REF TO cl_bsp_wd_collection_wrapper,
    lr_collection2   TYPE REF TO cl_bsp_wd_collection_wrapper,
    lv_result        TYPE REF TO if_bol_bo_property_access,
    lr_value_node2   TYPE REF TO cl_bsp_wd_value_node,
    lv_result2       TYPE string,
    lv_name_comp     TYPE name_komp.

* Check size of result
  lr_context_node = zproctype_bo_popup->get_context_node( iv_cnode_name = 'PROCTYPE' ).
  CHECK lr_context_node IS BOUND.

* BEGIN OF CODE - OLIVER SCHULTZE-------------------------- -------------------*
  CREATE OBJECT lr_collection2 TYPE cl_bsp_wd_collection_wrapper.

  lr_collection   = lr_context_node->collection_wrapper.

  lr_value_node2 ?= lr_collection->get_first( ).

WHILE lr_value_node2 IS BOUND.
   lv_proc_type = lr_value_node2->get_property_as_string( iv_attr_name = 'PROCESS_TYPE' ).
   CASE lv_proc_type.
     WHEN 'ZAFI'.
     lr_collection2->add( lr_value_node2 ).  
     WHEN 'ZCIT'.
     lr_collection2->add( lr_value_node2 ).  
     WHEN 'ZTMU'.
     lr_collection2->add( lr_value_node2 ).  

 lr_value_node2 ?= lr_collection->get_next( ).


  lr_collection ?= lr_collection2.
* END OF CODE - OLIVER SCHULTZE-------------------------------------------------*

  IF lr_context_node->collection_wrapper->size( ) EQ 1.

Until the end of method everything is OK but then must be happening something in the following methods where the system again is putting the transaction types which i have erased in this method. Anybody know in where is the method i have to look at?

Best Regards