on 06-23-2016 8:31 AM
Hi All,
I am ABAP developer using BAPI_SALESORDER_CREATEFROMDAT2 for the creation of sales order.
The Bapi will be called from external system to post sales order in SAP ERP.
Orders items in
Order partners
Order schedules in
The functional consultant has filled an example of data but we get message AG 005 Project item number not specified in a requirement
If document date is changed we sometimes do not get the message ..
When creating the document in dialog all is well.
I think the problem comes from AVAILABILITY_CHECK_CONTROLLER , ATP Check .
Could this be managed by filling some field in the Bapi?
There is no problem in user exit MV45AFZZ.
Do you know other exits I might have to check to find a solution?
Can you please help me understand or at least point me in the right direction?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alin,
It seems like the WBS you are using as account assignment does have suitable status (may be that is in "Release" Status or may be status that is not relevant for account assignment).
Again, I would suggest, please
" try create sales order manually with given data."
If you are able to create sales order with given data in Transaction VA01, then don't it will difficult to use the same in your BAPI.
Thanks, JP
The question is quite old. But I post my solution here anyway:
In my case the determined item category was incorrect. The item category used is raising a requirement class that creates demand on project stock. Since I didn't pass a WBS element to the BAPI it is throwing the error. After I changed the customizing (Table T184) so it picks up an item category that goes for sales order item stock it worked fine.
The error message is coming from FM AVAILABILITY_CHECK_CONTROLLER. In there checking rule AQ is passed together with special stock indicator Q and account type Q (all derived from req. class). If no WBS is specified, you get that error.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alin,
With the info shared by you, I see that the main issue for this may be due to difference in values for
Field TARGET_QTY in table ORDER_ITEMS_IN is equal to 0
And
Field REQ_QTY in table ORDER_SCHEDULES_IN is equal to 10.000,000
Please get them matched. And don't pass any value in field SCHED_LINE of table ORDER_SCHEDULES_IN.
If you have proper test data from the following fields in the respective table, your BAPI should work.
Table | Field | Notes |
---|---|---|
l_order_header | doc_type | |
l_order_header | distr_chan | |
l_order_header | division | |
l_order_header | sales_org | |
l_order_partners | partn_role | |
l_order_partners | partn_numb | |
l_order_items | itm_number | This should be equal to l_order_schdl - itm_number and l_order_conditions - itm_number |
l_order_items | material | |
l_order_items | target_qty | This should be equal to l_order_schdl - req_qty |
l_order_schdl | itm_number | This should be equal to l_order_items - itm_number and l_order_conditions - itm_number |
l_order_schdl | req_qty | This should be equal to l_order_items - target_qty |
l_order_conditions | itm_number | This should be equal to l_order_items - itm_number and l_order_schdl - itm_number |
l_order_conditions | cond_type | |
l_order_conditions | cond_value | |
l_order_conditions | currency |
Thanks, JP
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.