Skip to Content
0
Former Member
Feb 08, 2012 at 08:21 AM

Problem with BOL Object - IF_GENIL_APPL_INTLAY~GET_OBJECTS

109 Views

Hello All,

i created a BOL Object according to this tutorial: http://harelgilor.blogspot.com/2010/06/sap-crm-how-to-create-your-own-bol.html

i redefined the method: if_genil_appl_intlay~get_objects.

in this method there is a code part where it says:

data: lr_object type ref to if_genil_container_object,
       lr_msg_cont type ref to cl_crm_genil_global_mess_cont,
       lv_name_obj type ZTEAMS_BOL_ST-ID,
       lr_attr_props type ref to if_genil_obj_attr_properties,
       l_result type ZTEAMS_BOL_ST,
       lv_name type crmt_ext_obj_name.
       lr_object = iv_root_list->get_first( ).
       lr_msg_cont ?= iv_root_list->get_global_message_container( ).

  while lr_object is bound.
    lv_name = lr_object->get_name( ).
    if lr_object->check_attr_requested( ) = abap_true.

      lr_object->get_key( importing es_key = lv_name_obj ). <-------------- !!!!!!!!!!! EXCEPTION HERE
      select single *
        from ZTEAMS
        into corresponding fields of l_result
      where id = lv_name_obj.
....

for the marked line i get an exception:

the part where the exception comes from:IF_GENIL_CONT_SIMPLE_OBJECT~GET_KEY (CL_CRM_GENIL_CONT_SIMPLE:

...
  try.
        import KEY = ES_KEY from data buffer LV_OBJECT_ID.
      catch CX_SY_IMPORT_MISMATCH_ERROR into LV_PREV_EX.

*     Conditional Breakpoint
        data: LV_EX type ref to CX_CRM_CIC_PARAMETER_ERROR.
        create object LV_EX
          exporting
            CLASS    = 'CL_CRM_GENIL_CONTAINER_OBJECT'
            METH     = 'GET_KEY'
            PARAM    = 'ES_KEY'
            PREVIOUS = LV_PREV_EX.

        assert id CRMUIF_CONDITIONAL_BREAKPOINTS
               subkey 'Generic Interaction Layer - Simple Object -> Get Key - CX_CRM_GENIL_* Exception'
               condition CL_COND_BREAKPOINT_MANAGER=>ASSERT2(
                           IV_PROVIDER = CL_GENIL_COND_BREAKPOINTS=>BOL_BREAKPOINT_PROVIDER_ID
                           IV_BREAK_EVENT = 'CX_CRM_BOL_EXCEPTION'
                           IV_OBJECT_TO_CHECK = LV_EX
                         ) = ABAP_TRUE.                     "#EC NOTEXT
        raise exception LV_EX. <-------------------------------------------
....

my variables at runtime look as following:

ES_KEY: 00000000000000000000000000000000  X(16) 

LV_OBJECT_ID: FF0601010102800034313032000000000100000000000400000030030000000000000000000000000000000000000000004B00450059BC0000000400490044BD04 XString{65}

and the exception is: CX_CRM_CIC_PARAMETER_ERROR

Any help to solve the problem ?

regards

sven