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

Errors from BAPI_MATPHYSINV_COUNT

Former Member
0 Likes
1,147

Hello All,

My current requirement is to create a z-program with similar functionality to that of MI04. The user needs to do counts on materials with multiple serial numbers (in some cases 30,000). MI04 restricts the user to 19 serial numbers, they are unable to copy and paste from an excel or text document with all the serial numbers.

I have created the program and used BAPI_MATPHYSINV_CREATE to make the inventory document. I then pass the inventory document and appropriate item information to BAPI_MATPHYSINV_COUNT along with the list of serial numbers for that material. I am getting 2 errors in the Return table:

1) No data changed.

2) Item requires exactly # serial numbers for the asset.

I have searched not only this site but others trying to find similar issues or documentation on the BAPI and so far have come up with nothing. Does anyone have any insight on this? Or dealt with an issue similar?

I appreciate any help you can provide.

Regards,

C

2 REPLIES 2
Read only

Former Member
0 Likes
723

Hey Everyone,

When using this specific BAPI the parameters ask for a table of serial numbers with the structure BAPI_PHYSINV_SERIALNUMBERS.

This is composed of two fields, Item and Serial Number. It seems I misunderstood their definition of Item, it applies to the material. Thus if you have 1 material for the document but multiple serial numbers each one would need to have the same Item number of 001. It took me nearly an hour of debugging the BAPI to find out what the issue was. When really it wasn't all that complicated.

I hope this thread will help prevent someone from wasting hours on a simple solution :).

Regards,

C

Read only

0 Likes
723

This message was moderated.