Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9159

Re: Goods Isuue with Batch Number wise.

$
0
0

Hi Santosh,

 

First try this query for Good issue:

 

SELECT T0.[ItemCode],

T1.[WhsName],

v0.[Quantity] [WhsTotal],

T0.[BatchNum], case when T0.[BaseType] = 60 then 'GoodIssue' end as Type,

SUM(CASE T0.[Direction] when 0 then 1 else -1 end * T0.[Quantity]) [Quantity] FROM IBT1 T0 INNER JOIN OWHS T1 ON T0.WhsCode = T1.WhsCode

INNER JOIN (SELECT T0.[ItemCode], T1.[WhsName],

SUM(CASE T0.[Direction] when 0 then 1 else -1 end * T0.[Quantity]) [Quantity]

FROM IBT1 T0 INNER JOIN OWHS T1 ON T0.WhsCode = T1.WhsCode

GROUP BY T1.[WhsName], T0.[ItemCode]) V0 ON T0.[ItemCode]=V0.[ItemCode] and t1.[WhsName]=v0.[WhsName] WHERE T0.[ItemCode] =[%0] GROUP BY T0.[BatchNum], T1.[WhsName], v0.[Quantity], T0.[ItemCode],T0.[BaseType]

 

2. OIGN and IGN1 tables are used for Good receipt process. For Good issue process, you have to use OIGE and IGE1 tables.

 

3. If you want know linking OIGN and IGN1 table with OBTN, please post as separate discussion.

 

Finding link between tables:

 

1. Some tables are automatically linked while creating query through query generator.

 

2. To find related table, run query wizard. For example, if you want know Business partner OCRD, linked tables, enter OCRD in query wizard table, related tables are displayed in same window.

 

3.  Refer document to understand link between tables:

 

Database design in SAP Business One

 

Thanks & Regards,

Nagarajan


Viewing all articles
Browse latest Browse all 9159

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>