Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Does BAPI_INTERNALORDER_CREATE require a company code?

Former Member
0 Likes
1,133

The company code is not a required field in transaction KOT2 for the order type we use; it's just an input field.

Through the GUI, transaction KO01 & KO02, I can create and maintain orders that have no company code.

However, when I try to create an order of the same type through the BAPI, I get the error F5 165 - Company code (blank) is not defined.

As a workaround, I'm thinking of creating the order with a dummy company code, then use a call transaction to KO02 to remove the dummy company code. But, of course, I'd like to get it right the first time via the BAPI, if possible.

The note 2525423 describes the reverse problem: how to make company code available (by setting it to an Input field). Other SCN posts about the BAPI always seem to include COMP_CODE.

0 REPLIES 0