cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to make cost assignment mandatory while SC creation

Former Member
0 Kudos
158

While creating a SC for account assigned situation,system does not stop even if i do not enter cost center.Any ways we can restrict this.In ECC we have kept this option open for some GLs but in SRM we need to make it mandatory

Please suggest!

BM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Answers (3)

Answers (3)

Former Member
0 Kudos

Answered

Former Member
0 Kudos

Hi,

You can do this in BBP_DOC_CHECK_BADI.

Sample code :

read table i_e_account into wa2_i_e_account

with key p_guid = wa_i_e_item-guid.

if wa2_i_e_account-acc_cat ne 'NET'.

if wa2_i_e_account-cost_ctr is initial.

wa_message-msgty = 'E'.

wa_message-msgno = sy-msgno.

msg1 = 'Cost center should not be blank'.

wa_message-message = msg1.

wa_message-item_guid = wa_i_e_item-guid.

append wa_message TO et_messages.

clear wa_message.

endif.

endif.

Hope this will help.

Thanks

Venkatesh P

peter_novoth
Advisor
Advisor
0 Kudos

Hi,

you can throw an error message in the BBP_DOC_CHECK BAdI.

Regards,

Peter