cancel
Showing results for 
Search instead for 
Did you mean: 

Badi MRM_CHECK_INVOICE_CLOUD with check on supplier master data

Massi_Merc
Explorer
0 Kudos

Dear SAP experts,

our requirement is to compare payment terms specified in supplier invoice header with payment terms defined in supplier master data (company code view). If they differ a warning/error message should be raised.

Checking badi MRM_CHECK_INVOICE_CLOUD it seems that it's possible to check only supplier invoice data (at header and line item level) but without comparing them with external values, e.g. in supplier master data.

Could you please advice on and alternatively propose a possible solution to meet our requirement?

Thanks a lot for your support

Tayane
Advisor
Advisor
0 Kudos

Dear Massimiliano,

We helped you to accept the answer, since there were no updates after 7 days. You can unaccept it anytime if the answer provided was not helpful enough and you have further questions.

Best regards.

Accepted Solutions (1)

Accepted Solutions (1)

Zhehui_Xia
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Mercuri,

I read your problem and I think a blog I wrote before can help you. I raised a solution to a customer requirement same as yours. You can read my blog and maybe you can get some insights.

I wrote the blog in Chinese, so maybe you need to translate it.

在 SAP S/4HANA Cloud 中通过自定义逻辑检查预制发票的付款条件与供应商主数据中的付款条件是否一致 | SAP Blogs

Best Regards,

Zhehui

Answers (1)

Answers (1)

Massi_Merc
Explorer
0 Kudos

We are trying to implement this logic:

IF action = if_ex_mrm_check_invoice_cloud=>c_action_check.

IF headerdata-INVOICINGPARTY-paymentterms <> IT_SUPPLIER_COMPCODE-paymentterms

APPEND VALUE #( messagetype = if_ex_mrm_check_invoice_cloud=>c_messagetype_error

messageid = 'MRM_BADI_CLOUD'

messagenumber = '001'

messagevariable1 = 'Payment terms differ from supplier master data.' ) TO messages.

ENDIF.

ENDIF.