SAP Knowledge Base Article - Public

3557075 - Error or Exception Raised During Sales Document Creation - SAP S/4HANA Cloud Public Edition

Symptom

When creating sales documents such as credit memo requests, debit memo requests, sales returns, or sales orders, encounter error messages like: 

  • "An exception was raised: character string as message or exception with OTR text'".
  • "An exception was raised".
  • "Flow control: Entry SAPMV45B, ENT2, R1, RFAK, *, * is missing in T185".
  • "The batch number of the outbound delivery is the same as the sales order &1 line &2".

Environment

SAP S/4HANA Cloud Public Edition

Cause

 These errors may be caused by custom code within Cloud BAdIs, for example:

  • For Cloud BAdI "Check of Sales Documents before Saving (SD_SLS_CHECK_BEFORE_SAVE)":
    - Custom code could trigger an abortion of the sales document saving process: cl_ble_badi_runtime=>if_ble_badi_runtime~open ( iv_implementation = 'YY1_EVENTCHECK' ).
    - Within the method "IF_SD_SLS_CHECK_BEFORE_SAVE~CHECK_DOCUMENT", there may be logic that checks for conditions such as LS_SOITEM_EX-yy1_fd_so_item_batch_sdi NE ''.
  • For Cloud BAdI "Modification of Item Custom Fields in Sales Documents (SD_SLS_MODIFY_ITEM)":
    - Within the method "IF_SD_SLS_MODIFY_ITEM~MODIFY_FIELDS", a zero divisor error may exist within the custom logic.

Resolution

Review custom code in Cloud BAdIs like what is mentioned above.

Common issues to address:

  • Ensure that variables used as advisors are not zero to prevent division errors.
  • Verify all logic conditions and ensure that they are appropriately defined and handled.

Specific checking points:

  • Check all custom methods and logic for correctness.

Contact the local development/implementation team for assistance with custom logic writing. Or reach out to the assigned SAP representative (according to the contract) to inquire about SAP Consulting Services for customer-specific logics.

See Also

KBA 2706322 - What is Support – What is Consulting: Cloud Solutions

Keywords

SAP S/4HANA Cloud Public Edition, Sales Document, Error, Exception, BAdI, Custom Code, Zero Division, Sales Document Check, Character String, Message, OTR Text, Flow Control, Entry SAPMV45B, ENT2, R1, RFAK, *, Missing, T185, Batch Number, Outbound Delivery, Sales Order, Credit Memo Requests, Debit Memo Requests, Sales Returns, SD_SLS_CHECK_BEFORE_SAVE, SD_SLS_MODIFY_ITEM , KBA , SD-SLS-EXT-2CL , Extensibility (Public Cloud) , SD-SLS-SO-2CL , Sales Orders (Public Cloud) , SD-SLS-CMR-2CL , Credit Memo Request and Debit Memo Request (Public Cloud) , SD-SLS-RE-2CL , Returns (Public Cloud) , Problem

Product

SAP S/4HANA Cloud Public Edition all versions