Hello Team ,
Im facing the issue while creating the Purchase Requisition. When user Trying to create the PR , system is giving cost center error . I have checked the message and it is Custom Message and Im not able to find where it is effecting.
Message is - Authorization missing for Cost Center 1002000. ( cost center number given as example )
It is referring EXKN Structure and im not able to find the values from where it is effecting . Below is the code which I got from investigation .
ENHANCEMENT 1 ZCOST_CENTER_AUTH_CHECK. "active version
IF IM_ITEM-BSTYP = 'B' and ( IM_ITEM-KNTTP = 'K' or IM_ITEM-KNTTP = 'Z' ).
AUTHORITY-CHECK OBJECT 'K_CSKS'
ID 'KOKRS' FIELD CH_EXKN-KOKRS
ID 'KOSTL' FIELD CH_EXKN-KOSTL
ID 'ACTVT' FIELD '01'.
IF sy-subrc <> 0.
* Implement a suitable exception handling here
MESSAGE e000(zpur) WITH CH_EXKN-KOSTL.
* Missing authorization for cost object &
ENDIF.
AUTHORITY-CHECK OBJECT 'K_CSKS'
ID 'KOKRS' FIELD CH_EXKN-KOKRS
ID 'KOSTL' FIELD CH_EXKN-KOSTL
ID 'ACTVT' FIELD '02'.
* Implement a suitable exception handling here
IF sy-subrc <> 0.
* Implement a suitable exception handling here
MESSAGE e000(zpur) WITH CH_EXKN-KOSTL.
* Missing authorization for cost object &
ENDIF.
Can Anybody Help me in this ?? Thanks in advance ..
Regards
Pavan G Kulkarni