SAP Knowledge Base Article - Public

3251290 - Run time error occured in Procurement BADI.


  • Custom logic application shows the run time error for the BADI.
  • "Error text: 'XXXXXXX' is not a valid value for C(10,0).
  • Select query failing in the BADI.


SAP S/4HANA Cloud.

Reproducing the Issue

  1. Open Custom logic app.
  2. Open Evaluation BADI for workflow conditions.


Expected behavior and there is no impact in the data or system as this is a simulation.


This is an expected behavior of the BADI in the simulation run. As there is no purchase document created during the simulation the parameters are filled with draft key which is a guid value and it causes the select query to return the error and in the actual run time , the value has been replaced with the document number. There are no changes made to the data during the simulation. You can also check the parameter IV_IS_DRAFT present in the BADI SWF_PROCESS_WORKFLOW_CONDITION to know whether it is a simulation or not. Future enhancements will fix this run time error during simulation.


s4_pc, IV_IS_DRAFT, IF_SWF_FLEX_IFS_CONDITION_EVAL~EVALUATE_CONDITION, SWF_PROCESS_WORKFLOW_CONDITION, run time, custom logic. select, query, C(10,0) , is_sap_object_node_type-sont_key_part_1, is_sap_object_node_type-sont_key_part_2, I_PurchaseRequisitionItemAPI01, evaluation, BADI , KBA , MM-FIO-PUR-REL , Fiori UI for Purchasing Approval , Problem


SAP S/4HANA Cloud all versions