3 weeks ago
Hello everyone,
I’m working with SAP Build Process Automation, and I’m trying to create a sales order using the BAPI_SALESORDER_CREATEFROMDAT2.
However, I consistently receive the following error:
BAPI exception: Parameter/field ITM_NUMBER doesn't have a correct data type
I’ve tried all of the following approaches to set the ITM_NUMBER field in the ORDER_ITEMS_IN structure:
Using a string with leading zeros: "000010"
Padding the string in JavaScript like this:
itmNumber.toString().trim().padStart(6, '0')
Hardcoding the value directly as "000010"
Confirming that it’s a string, not a number
Making sure it's exactly 6 characters long with no extra spaces
Logging the output right before the BAPI call to ensure it’s correctly formatted
Creating a variable of type ANY in SAP BPA and assigning the value "000010"
Trying the value without leading zeros, i.e., just "10"
I’ve also verified that all other mandatory fields in ORDER_ITEMS_IN (such as MATERIAL, TARGET_QTY, TARGET_QU, PLANT) are filled in with valid values.
Despite these efforts, the same error persists.
Has anyone encountered this issue before? Could this be related to how SAP BPA structures the call to the BAPI or expects the table input?
@BorisAndree Any suggestions or examples of working configurations would be greatly appreciated. Thank you in advance!
Request clarification before answering.
User | Count |
---|---|
72 | |
19 | |
9 | |
8 | |
7 | |
5 | |
4 | |
4 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.