cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Attribute is not saving

eduardo_azo
Explorer
0 Kudos

Hello

I'm new to CRM but I need your help.

I need to add a custom field for service locations => Technical Object Details

The field should be add here:

First I've tried to use AET but I can´t use it in this case (no "Create field" button appears):

I've created a new enhancement set: "ZCRM_TEST2" and in table BSPWDV_EHSET_ASG uses this one as default:

In BOL explorer I've seen that ConnectionObject uses structure "CRM_ISU_TEC_CO". This structure has an include CI_CON, so I added my field here:

Then I've create an enhancement for the view "IUICOBJD/ConnectionObject":

Here I created a new Model Attribute for CCAA field:

In the generated code the only changes are:

Method WD_CREATE_CONTEXT to comment linne super->wd_create_context( ).

Methods GET_ SET_ GET_M and GET_I are also generated but I made no modification in them.

Then I add the attribute to the view.

The problem is that the value is not saved:

Thank you vey much.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

The solution for enhancing the technical objects in CRM is well documented in the following pdf:

https://websmp202.sap-ag.de/~sapidb/011000358700001988852008E/TechnicalObjets_KW_261108.pdf

As stated in the document, the first part is to create the new attribute in txn: COMM_ATTRSET

and later assign into a (new) settype. After finishing it, you could add this set-type the needed level (premise, pod).

eduardo_azo
Explorer
0 Kudos

Thank you!

Answers (1)

Answers (1)

dharmakasi
Active Contributor
0 Kudos

Hi,

What is the code available in wd_create_context after commenting super class call? This is the method used to create context class(model) reference.

Did you check in data base table, the newly added fields in structure are added in data base table also?

You can keep break points in get and set methods of your custom attribute and check the values in debug mode.

Best Regards,
Dharmakasi.

eduardo_azo
Explorer
0 Kudos

Hi Dharmakasi,

Method WD_CREATE_CONTEXT has the following code:

method WD_CREATE_CONTEXT.

*   create the context

     context = cl_bsp_wd_context=>get_instance(

             iv_controller = me

             iv_type = 'ZL_IUICOBJD_CONNECTIONOBJ_CTXT' ).

     typed_context ?= context.

* prepare context by super call

   me->context_node_name = 'CONNECTIONOBJECT'.

*  super->wd_create_context( ).   <==This is the line I comment

* Added by wizard

    ztyped_context ?= context.

endmethod.


When I look for CI_CON in tables I don't find anything. Do I have to look for other one?

I've added a custom field to BP using AET and the wizard add the field to tables BUT000, BUT000_TD,BUT000_TDS, BUTADRSEARCH


I don't know how to find the ConnectionObject table. I'm thinking to activate a ST05 trace, but I don't know if there's an easier way to find it.


Thank you!

dharmakasi
Active Contributor
0 Kudos

Hi,

When you are trying to extend the standard tables and structures we have to AET or EEWB option to append custom fields.

You have just added field in structure alone so you are able to use the field in web ui but when you save it, there should be a mapping field and logic to store the values in database table.

EEWB - Adding Table attribute - CRM - SCN Wiki

Regards,

Dharmakasi.

eduardo_azo
Explorer
0 Kudos

Hi Dharmakasi,


First thank you for your help.


I can't use AET (create element button is not show) I take a look at AXTREG but couldn´t find the way to add my object. (ConnecionObject)


In EEWB my object doesn`t exists.


Thank you

hongyan_shao
Active Contributor
0 Kudos

To enhance a component, which is not open for AET is effort consuming.

Yes, the field must find a place to live, in a table, so that it can be saved.

Please check in thread

which contain some article link regarding how to enhance the genil/bol with complete Z tables, regarding how to enable the save into the Z table, for example.

Hope this could do help to you.