Skip to Content
0
Former Member
Nov 22, 2015 at 08:35 AM

Extend BOL Model BT with custom table type relationship under BTAdminH

379 Views

Hi ALL,

I need help with create the custom object.
I created objects under the instruction Extend BOL Model BT with custom table type relationship - CRM - SCN Wiki

It seems everything is working fine except for the reading of the entity object.

I created:

1) 2 Objects: ZPRODSVZ and ZPRODSVZSET

2) 2 Ralations: ZBTExternalCaseSet and ZBTExternalCaseAll

GENIL_MODEL_BROWSER:

3) Cudtom handler Classes:

ZPRODSVZ_DESIGN_BTIL,

ZPRODSVZ_SET_DESIGN_BTIL,

ZPRODSVZ_RUN_BTIL,

ZPRODSVZ_SET_RUN_BTIL

When I want to perform relation ZBTExternalCaseAll in GENIL_BOL_BROWSER runs ZPRODSVZ_SET_RUN_BTIL->IF_CRM_RUNTIME_BTIL~READ_ATTRIBUTES method.

*Read underlying relations
if ir_cont_obj->check_rels_requested( ) eq true.

me->access_children( ir_cont_obj = ir_cont_obj
ir_data = ir_api_data
iv_ref_guid = iv_ref_guid
iv_ref_kind = iv_ref_kind ).
endif.


Then method LR_CHILDREN = IR_CONT_OBJ->GET_CHILDREN( FALSE ) returns nothing, because the checks are not performed in the following code. The Relation ZBTExternalCaseAll is not added to the attribute ME->RELATION_TAB.


loop at <REL>-OBJECTS into LV_ENTRY.
LV_CHILD_PROXY ?= LV_ENTRY.
if LV_CHILD_PROXY is bound and LV_CHILD_PROXY->DATA_REF is bound.
* check group border
check IV_PARENT_DATA_REF->GROUP_NUMBER = LV_CHILD_PROXY->DATA_REF->GROUP_NUMBER.
check LV_HAS_TO_BE_SPLITETD = ABAP_FALSE.
LS_RELATION-CHILD_PROXY ?= LV_CHILD_PROXY.
append LS_RELATION to ME->RELATION_TAB.
else.
* freed child -> remove
delete <REL>-OBJECTS.
endif.
endloop.


The Field GROUP_NUMBER of the ZPRODSVZ and ZPRODSVZSET have different values. And LV_HAS_TO_BE_SPLITETD = 'X'.


CLASS=CL_CRM_GENIL_DATA_CONTAINER}-DATA_TAB:



What should I do to make reading of the entity? Are all the settings for the objects are true? Why GROUP_NUMBER field has a different value?



Regards, Valeriy


Attachments

Objects.PNG (28.2 kB)
Relations.PNG (22.3 kB)
Classes.PNG (8.8 kB)
BTAdminH.PNG (20.4 kB)
ZPRODSVZSET.PNG (27.4 kB)
ZPRODSVZ.PNG (27.4 kB)