cancel
Showing results for 
Search instead for 
Did you mean: 

Consult existing batch using DI API

Former Member
0 Kudos

Good day experts,

I am developing a website to make stock transfers between different warehouses, without the need users see the SAP interface.

I already have the base, however, I ran into a problem that I have not been able to solve. When specifying the batch of material to be taken for the transfer, I have to write it manually because I have not found references on the web how to extract this information through a query. The objective is than the user see a drop-down list with the available batches of the selected material, so that he can choose which one to move.

Will someone have an example or idea of how to get this data? I am currently using C # / ASP.NET language

Thanks in advance! Best regards.

Accepted Solutions (1)

Accepted Solutions (1)

former_member185682
Active Contributor
0 Kudos

Hi Luis,

You can use this query to get what serial numbers are in your company's warehouse:

SELECT 
	* 
FROM 
	OSRQ T0
	INNER JOIN OSRN T1 ON T0.ItemCode = T1.ItemCode AND T0.SysNumber = T1.SysNumber
WHERE 
	T0.Quantity > 0

OSRQ -> Serial No. Quantities per warehouse

OSRN -> Serial Numbers Master Data

You can use this query to get what batch numbers are in your company's warehouse:

SELECT 
	* 
FROM 
	OBTQ T0
	INNER JOIN OBTN T1 ON T0.ItemCode = T1.ItemCode AND T0.SysNumber = T1.SysNumber
WHERE 
	T0.Quantity > 0

OBTQ -> Batch No. Quantities per warehouse

OSRN -> Batch Numbers Master Data

Hope it helps.

Kind Regards,

Diego Lother

Answers (0)