cancel
Showing results for 
Search instead for 
Did you mean: 

CRM BT Extension Issue: Custom Handler Classes

jackiefung
Explorer
0 Kudos

Hello CRM gurus,

I'm working on a project to extend CRM object Business Transaction with new nodes and encountered an issue.

I configured the new nodes and new relations, developed my own custom handler classes inheriting CL_CRM_RUNTIME_BTIL and redefined methods READ_ATTRIBUTES and MAINTAIN_ATTRIBUTES. I also used CRMV_EVENT to register call-back function modules which were invoked by function module CRM_EVENT_PUBLISH_OW from my customer handler. When I conducted testing in transaction GENIL_BOL_BROWSER, it worked fine to insert a new entry, the Z*_RUN_BTIL-MAINTAIN_ATTRIBUTE method was called and I can see my Z* tables did get updated. However, Z*_RUN_BTIL-READ_ATTRIBUTE was never invoked. Every time I inserted an entry, I can no longer see its existence in GENIL_BOL_BROWSER and have to check it in SE16. It puzzled me a bit as both methods MAINTAIN_ATTRIBUTE and READ_ATTRIBUTE are in the same customer handler Z*_RUN_BTIL. What could be the reason? Would you please shed some light if you have a clue? Many thanks.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Jackie,

Read_attributes method will be called when you will fetch data to display purpose only. Suppose you have extended BT with some relation name 'ZREL', so once when you go to genil_bol_browser and search entities for extended relations for BT, this method will triggered to get the entities for that relationship.

Thanks,

Mamta

jackiefung
Explorer
0 Kudos

Thanks Mamta. But the problem is now READ_ATTRIBUTE method is not called in either display or edit mode while MAINTAIN_ATTRIBUTE method in the same class is working fine. I assume it could be that I missed some configuration somewhere? I debugged into the standard codes but it doesn't look like the method is called anywhere. I associated my new node as 1:1 Composite to BTOrder. I tried to change the relation type to see whether this would be the reason but it doesn't seem to help.

Regards,

Jackie

deepika_chandrasekar
Active Contributor
0 Kudos

Hi,

Are you trying to create relationship object to BT existing object?

then you can create using AET tool instead of doing it manually. Which CRM version you are project using?

Regards,

Deepika.

jackiefung
Explorer
0 Kudos

Hi Deepika,

I'm in CRM 7.0 ENP3. I'm extending BT by creating relation nodes to BTOrder object but I'm not to enhance any SAP tables but rather to relate my custom Z tables to BT in both 1:1 and 1:N cardinality. AET is to enhance tables as far as I know?

Regards,

Jackie

dharmakasi
Active Contributor
0 Kudos

Hi Jackie,

You can do standard table enhancement and can form relation with BT using AET option.

Its not only to create enhancements to standard tables. We can create new custom tables with BTOrder object using AET, we have option to create table in AET as shown in below screen capture.

If you click on Display enhancement and then one window open as shown below

Best Regards,

Dharmakasi.

jackiefung
Explorer
0 Kudos

Thanks Dharmakasi,

The tables enhanced via AET are generated as table types and are inserted to structure CRMXIF_BUSTRANS. In my case, the Z tables are already defined and would share with other custom applications that I have to redefine the backend processing to synchronize updates to my Z tables. Manually extension from GenIL layer is still preferable as this solution is generating dual storage in the system. I would continue to strive why the READ_ATTRIBUTE method is not invoked.

Jackie