cancel
Showing results for 
Search instead for 
Did you mean: 

Creation of Relation to new Simple object

oleg_agranovich
Explorer
0 Kudos

Hi, i need help.

I created a new Simple object f.e. ZSO with guid as key ,

made an entry in tables CRMC_ORLALL_BTIL (1:1 relation bw. BTAdminH and new object),

CRMC_OBJ_BTIL_C (Handler class for new Object: ZL_ZSO )

and created class ZL_ZSO_RUN_BTIL as child of CL_CRM_RUNTIME_BTIL.

Then i created a new context node for my object in an view and connected it to Header Node in 'on_new_focus' method.

I can set properties of new object in WEBUI,

but i dont understand, how to save my changes.

I wont to save relation data in own table with 3 fields ( client, header guid of servicecontract and guid of my own object )

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

I did a similar thing, in the approach that i followed i had to do the code for saving in the BTIL class (CL_CRM_METHODS_BTIL), SAVE_ORDERS method, by creating implicit enhancement at the end, there i called my Z-Function module to save in update task, so that whole transaction gets saved at a go or nothing is saved.

Though just display a Z-table on UI as entirely different story, but this wiki link can give some pointers.

[ZTable in Asign Block|http://wiki.sdn.sap.com/wiki/display/CRM/Howtodisplayaz-tableinanassignmentblock]

Let me know if it helped.

Thanks,

Rohit

Edited by: Rohit Khetarpal on Nov 26, 2009 4:21 PM

oleg_agranovich
Explorer
0 Kudos

Hi,

Thank you for the answer,

which methods of your RUN_BTIL-classes did you implement?

Could you give me some coding example?

If i'm thinking correct , it should be MAINTAIN_ATTRIBUTES,READ_ATTRIBUTES and GET_SINGLE_ID?

Former Member
0 Kudos

Hi,

As I mentioned above, i am not talking about run_btil class, but cl_crm_methods_btil class, save_orders method of which is called when you save, please see the code there, I created implicit enhancement (end of code) to save in Z-Table.

This was the approach i followed and it worked fine.

(methods you mentioned were not used by me, as I did not create new bol node and relationship for this requirement, but for new BOL relationships, it may be required to code there, yes maintain, read and get_single or get_multiple_id of run_btil class)

Thanks,

Rohit