cancel
Showing results for 
Search instead for 
Did you mean: 

Cprojects and BAdI: Check/Change Fields in cProjects

Former Member
0 Kudos

Hi,

Have anyone of you used this BAdI? In the performance assistant it looks like you can use this BAdI for setting default values for standard SAP fields when creating new object. However when reading the programming documentation it looks like you only should use this BAdI for customer defined fields. Does anyone of you know????

Thanks, Camilla

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hi Camilla,

Yes, this BAdI can be used for setting default values for both SAP standard fields and custom fields. In case you want to set custom fields, 2 additional steps as mentioned in the Performance Assistant are to be performed, namely:-

1) Enhance Database Tables

2) Make Customer-Specific Interface Changes

You can see the example implementation in the class CL_EXM_IM_DPR_ATTRIBUTES. Specifically check out the method SET_DEFAULTS_UPON_CREATION.

Best Regards,

Saurabh

Former Member
0 Kudos

Hi again,

I'm not a programmer, but I have allready had a programmer to look as this method. However he said that in the code given it looked like you should not use this for standard fields. Have you used if for standard fields???

Thanks, Camilla

0 Kudos

Hi Camilla,

This BAdI can very well be used for custom fields also.

If you look at the documentation provided for the IMG activity:-

Collaboration Projects->Global Enhancements to Project Elements->Business Add-Ins (BAdIs)->BAdI: Check/Change Fields in cProjects

Link - Enhance Database Tables

Here it is explained how fields can be added to the tables of the individual cProjects objects using customer includes. Once this is done the customer field becomes available in the BAdI method and hence can be set to a default value during creation.

Best Regards,

Saurabh