cancel
Showing results for 
Search instead for 
Did you mean: 

Cancelling multiple billing documents in WebUI CRM

former_member681221
Discoverer
0 Kudos

With an attempt to cancel more then one billing documents the error is coming:

Entry *** in table/1BEA/IPMI_BDH not available.

The place of this Error is known:

The method is CANCEL_DOCUMENTS, Class CL_IPMIS_BD_BILLDOCCONSVS_IMPL, Component IPMIS_BD.

With the first selected item everything is working without error. With the second Ithem the method get_related_entities is not returnig the related entity:

lr_bo TYPE REF TO cl_crm_bol_entity,
lr_bdh_col TYPE REF TO if_bol_entity_col, 
lr_bdh_col = lr_bdh_entity->get_related_entities( iv_relation_name = lc_bd_bdcancel_rel ).

and the instance lr_bo ?= lr_bdh_col->get_first( ). getting not initialised and after jump through the WHILE loop the high mentioned Error is cominng.

The code is not the customer code but just standard SAP code.

The part of the SAP Code in the method CANCEL_DOCUMENTS is:

TRY. 
 lr_bdh_entity ?= lr_cuco->typed_context->ipmibdheadercons->collection_wrapper->get_first( ).
 WHILE lr_bdh_entity IS BOUND.
  lr_bdh_col = lr_bdh_entity->get_related_entities( iv_relation_name = lc_bd_bdcancel_rel ).
  lr_bo ?= lr_bdh_col->get_first( ).  "INITIAL in the second step
  WHILE lr_bo IS BOUND
   lr_bo_dupl = lr_cuco->typed_context->ipmibdheadercancel->collection_wrapper->find( iv_bo = lr_bo ).
    IF lr_bo_dupl IS NOT BOUND.
      lr_cuco->typed_context->ipmibdheadercancel->collection_wrapper->add( iv_entity = lr_bo ).
    ENDIF.
   lr_bo ?= lr_bdh_col->get_next( ).
  ENDWHILE. lr_bdh_col->clear( ). 
" go to the second Item:
 lr_bdh_entity ?= lr_cuco->typed_context->ipmibdheadercons->collection_wrapper->get_next( ). 
ENDWHILE. 
 CATCH cx_root. 
ENDTRY.

In one CRM System this code is working correctly and one can cancel a several selected documents.

The other CRM System in the same place return the high described Error.

If someone has an Idea how can repare this Error?

Accepted Solutions (0)

Answers (0)