cancel
Showing results for 
Search instead for 
Did you mean: 

Where is stock posting data stored in B1?

former_member445524
Participant
0 Kudos
Hello, all

Do you know in which table or tables does B1 store the items
flow, i.e. the stock posing list?  I need it to test
progammatically, prefereably via an SQL quiery, whether a
given warehouse may be removed from a given item master data
record.

Accepted Solutions (1)

Accepted Solutions (1)

edy_simon
Active Contributor
0 Kudos

Hi Anton,

Maybe you can use OIVL ?

This is the inventory valuation log table, but contains the quantity and whscode also,

I hope it suffices your requirement.

Regards

Edy

former_member445524
Participant
0 Kudos
Yea, Edy, it works:

SELECT TOP 1 1 FROM OIVL
WHERE ItemCode = @itemCode AND LocCode = @whsCode
former_member445524
Participant
0 Kudos
Strange thing -- trying to remove some warehouses still
results in the error:

  The warehouse cannot be deleted; stock is currently in the
  warehouse.

even though there are no corresponding records in OIVL, and
OITW.OnHand is zero for that item & warehouse.  What else
could I check?
edy_simon
Active Contributor
0 Kudos

Hi Anton,

You can fire up your SQL profiler and see what tables are last check by SBO before it gave you the error.

Usually this helps.

Regards

Edy

former_member445524
Participant
0 Kudos
I am glad I did not have to resort to the Profiler, for it
is tedious.  The warehouse could not be removed because it
had a non-zero Committed quanity of that item.  The problem
is now solved.  Thank you!

Answers (0)