cancel
Showing results for 
Search instead for 
Did you mean: 

Wrong item category determination in BAPI_SALESORDER_SIMULATE

marco_paciucci_danone
Participant
0 Kudos

Dear experts,

when I run BAPI_SALESORDER_SIMULATE for a given Sales Area and Material the item category which is determined is not correct.

The table T184 constains two entries:

ZSO X020  --> ZSN (PSTYV)

ZSO X020 ZBOM --> ZTSQ (PSTYV) ZSN (PSTY1)

The system picks up the first one.

If ORDER_ITEMS_IN contains PSTYV = ZTSQ (which is the one I want) the system returns an error. If I keep it empty the system returns ZSN (which is wrong).

What should I do?

Unfortunately the item usage type cannot be specified for BAPI_SALESORDER_SIMULATE .

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

ansix12
Explorer
0 Kudos

Hi

Item category is assigned by SAP code at time of its choosing.  As such, your ZBOM usage will simply be ignored.  If you add ZTSQ as part of you BAPI input, SAP code will validate the entry against T184 for entry ZSO x020 and see that ZTSQ is not listed as an alternative so  you get the error. 

Your options I can see are: one to add ZTSQ as PSTY1 into T184 for ZSO X020.  Two, Add code to force item usage to be ZBOM when your specific conditions are met.   Have a look at enhancement point VBAP-PSTYV_PRUEFEN_11  in ES_SAPFV45P.

Just out of curiosity, your usage is ZBOM.  Is that a bill of material?  If so, why are you using item category usage instead of standard SAP item category groups for BOM?  If I over interpreted the meaning of ZBOM. Please ignore the question

ansix12
Explorer
0 Kudos

Sorry, finger trouble.  I meant to say item category usage is assigned by SAP code....

Answers (0)