SAP – Getting sales order type from delivery number

The delivery details are stored in the tables LIKP and LIPS.

LIKP – Delivery Header Data

LIPS – Delivery item data

The sales order details are stored in the tables VBAK and VBAP.

VBAK – Sales Header Data

VBAP – Sales item data

Link between LIPS and VBAK is as follows:

VBAK-VBELN = LIPS-VGBEL

Link between LIPS and VBAP is as follows:

VBAP-VBELN = LIPS-VGBEL

VBAP-POSNR = LIPS-VGPOS

The sales order type information will stored in the header data table VBAK.

The field for sales order type is AUART, the key field in table VBAK is only VBELN.

So for getting sales order type use the below query:

SELECT auart from VBAK into lv_auart WHERE VBELN = lips-vgbel.

0 Comments

Leave A Reply