I am using BAPI_SALESORDER_CREATEFROMDAT2 to create orders. Since I need automatic item number generation, I have set the INT_NUMBER_ASSIGNMENT flag to X.
However, I am getting the following error -
Error - No item category available (Table T184 ZOSC ZDEL ZPOB)
Since there is no item number attached to the line items and the schedule lines, the item category generation part picks up the item category of the previous material, which is the first line in the line items. - with item number 00.
Note that since I have set the INT_NUMBER_ASSIGNMENT flag, all line item numbers are 00.
Can anyone suggest how I can fix this error please?