cancel
Showing results for 
Search instead for 
Did you mean: 

Project item number not specified in a requirement

alinradu
Explorer
0 Kudos

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?

Accepted Solutions (1)

Accepted Solutions (1)

alinradu
Explorer

Hi Guys,

I had to have the item line WBS element before ATP check so I added logic in MV45AFZZ form userexit_move_field_to_vbap . Here a custom function concatenates the WBS.

Now i get a strange error:

Message BS

001 No status object is available for SDI 0



jpfriends079
Active Contributor
0 Kudos

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

alinradu
Explorer
0 Kudos

Problem was the custom code check in MV45AFZZ because the wbs is created with the order and it needs wbs before wbs is created when the bapi is called.

Thanks for your help.

Answers (2)

Answers (2)

lat_gmbh
Explorer
0 Kudos

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.

jpfriends079
Active Contributor
0 Kudos

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.

TableFieldNotes
l_order_headerdoc_type
l_order_headerdistr_chan
l_order_headerdivision
l_order_headersales_org
l_order_partnerspartn_role
l_order_partnerspartn_numb
l_order_itemsitm_numberThis should be equal to l_order_schdl - itm_number and l_order_conditions - itm_number
l_order_itemsmaterial
l_order_itemstarget_qtyThis should be equal to l_order_schdl - req_qty
l_order_schdlitm_numberThis should be equal to l_order_items - itm_number and l_order_conditions - itm_number
l_order_schdlreq_qtyThis should be equal to l_order_items - target_qty
l_order_conditionsitm_numberThis should be equal to l_order_items - itm_number and l_order_schdl - itm_number
l_order_conditionscond_type
l_order_conditionscond_value
l_order_conditionscurrency

Thanks, JP

alinradu
Explorer
0 Kudos

Hi Jyoti,

Thanks for your reply, I have deleted the SCHED_LINE field value

I set Field TARGET_QTY in table ORDER_ITEMS_IN to 10.000,000

now TARGET_QTY = REQ_QTY but i still get that message AG 005.


If i delete REQ_QTY , SO is incomplete.


Could it be a problem from WBS?


Thanks,


Alin

jpfriends079
Active Contributor
0 Kudos

One thing you can do is, try create sales order manually with given data. To see what schedule line category/requirement type is getting determined. In my opinion, the requirement type that is getting determined in the your sales order is pointing towards ATP interface.

Thanks,

JP

Lakshmipathi
Active Contributor
0 Kudos

Check the OSS notes 710123 and 860613