Symptom
It is not possible to only give user authorization to reverse supplier invoice while restrict the authorization to post invoice.
Environment
SAP S/4HANA Cloud Public Edition
Reproducing the Issue
- Assign business catalog SAP_MM_BC_INV_PROCESS_MC or SAP_MM_BC_INV_PROCESS_PC to a user.
- The user is able to both post and reverse supplier invoices.
Cause
The authorization for reversing and posting supplier invoices cannot be split. This is because when reversing a supplier invoice, the system automatically posts a credit memo which is also an invoicing document.
It is not possible to sperate the posting of credit memo and posting of a supplier invoice based on roles assigned. Therefore if a user has the authorization to reverse the supplier invoice, (s)he will also be able to post the supplier invoice as well.
Resolution
This is standard system behavior.
Workaround:
The Custom Logic MRM_CHECK_INVOICE_CLOUD(Check Invoice Data) can be used as a workaround.
Take the following scenario as an example: Users cannot post supplier invoice but can reverse supplier invoice. A sample code is provided for reference only.
IF ( action = if_ex_mrm_check_invoice_cloud=>c_action_check
OR action = if_ex_mrm_check_invoice_cloud=>c_action_post )
AND headerdata-reversedocument IS INITIAL
AND headerdata-reversedocumentfiscalyear IS INITIAL.
APPEND VALUE #(
messagetype = if_ex_mrm_check_invoice_cloud=>c_messagetype_error
messageid = 'MRM_BADI_CLOUD'
messagenumber = '001'
messagevariable1 = 'Posting/checking is not allowed.'
) TO messages.
ENDIF.
See Also
Keywords
reverse, post, SAP_MM_BC_INV_PROCESS_MC, MR8M, MIRO, Create Supplier Invoice, authorization, credit memo, invoice reversal, supplier invoice, SAP_MM_BC_INV_PROCESS_PC, split, business catalog, business role, MRM_CHECK_INVOICE_CLOUD, custom logic, check invoice data , KBA , MM-FIO-IV-2CL , Fiori UI for Invoice Verification (Public Cloud) , Problem
SAP Knowledge Base Article - Public