Skip to Content

Programmatically Check if Physical Inventory Document is Active for SO Line

Jan 23, 2017 at 08:16 PM


avatar image
Former Member

Hi all,

Prior to running BAPI_MATPHYSINV_CREATE_MULT I'd like to check if a physical inventory document is already active for a sales order line item / material. My thoughts are to read the ISEG table and check for entries that are not marked as deleted and do not have a posting date. Has anyone done this before that could help shed some light on this?

Thanks much!


10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Raghu Govindarajan Jan 23, 2017 at 09:09 PM

IKPF is the header table that also has status fields that you could use.

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

It's a good suggestion, I worry that it would not be accurate in all cases where the header may still be active, but certain line items may have been deleted from the PI document. I tried to follow how

BAPI_MATPHYSINV_CREATE_MULT does it's check, but it was quite difficult to see which fields it was checking against even after finding the error message (M7 - 700).


I was suggesting using the statuses on both the tables together and not just checking the item table. You can't just use the header, because there is no material on it. But, you can use the header to narrow down which documents are open, that will make your search on the ISEG faster - or you could even use a join.