Skip to Content

Consult existing batch using DI API

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Sep 08, 2017 at 11:32 AM

    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

    Add comment
    10|10000 characters needed characters exceeded