cancel
Showing results for 
Search instead for 
Did you mean: 

Abap Query

Former Member
0 Kudos

Dear all,

I want to generate an Abap query

Here is the complete requirement

For a particular division, sales org, delivery creation date I want Delivery number, material, del creation date, qty, item category, net value from the sales order..

I tried to link VBAP - VBFA - LIKP - LIPS.and got the output, but the output is wrong.It shows many duplicate entries and wrong net value

Kindly assist

Regards

Vish

Accepted Solutions (0)

Answers (2)

Answers (2)

od_manikandan
Active Contributor
0 Kudos

Hai Vish,

In query

from sales order to delivery order join condition

if you create

SO to Delivery it will give duplicate entries.

If 1 sales order - 2 deliverly and 2 delivery each has two batches

the report shows data 6 times.

In general, Create SQVI query starting from

LIPS - LIKP - VBAK - VBAP

LIPS and LIKP joined by delivery order number

join LIKP and VBAK by the reference document filed in LIKP to VBAK

and VBAK and VBAP can be joined by sales order number.

VBFA is not required.

Regards,

Mani

Former Member
0 Kudos

Dear Mani,

Can you tell me what is join LIKP and VBAK by the reference document filed in LIKP to VBAK

regards

Vish

Lakshmipathi
Active Contributor
0 Kudos

You can find field VBELN in both the tables.

thanks

G. Lakshmipathi

od_manikandan
Active Contributor
0 Kudos

Hai Viswa,

Please check Table : LIPS - VGBEL

It gives the sales order number.

Connect query like

LIPS VBELN LIKP (to take delivery creation date and time)

and add table VBAK

Now system by default show link between LIKP and VBAK

Now remove the joining by selecting and delete (right click)

Now VBAK VBELN (sales order Number ) and LIPS - VGBEL is same conenct it.

Now go back and select the required field for selection screen and Listing fields.

Data will be displayed proper.

Regards,

Mani

Former Member
0 Kudos

Dear Mani,

I did, again the output is wrong

It gives duplicate entries with zero net value

Here is how I connected

Tables -


LIPS - LIKP - VBAK - VBAP

1. LIPS -- VBELN -


LIKP

2. LIKP --- VBELN --- VBAK ---> I removed this and connected LIPS - VGBEL to VBAK - VBELN

3.VBAK -


VBELN ---VBAP

Please let me know where is the fauld and how to correct it

Regards

Vish

Lakshmipathi
Active Contributor
0 Kudos
but the output is wrong

It is because of the wrong coding. Better you post in ABAP forum with the coding what you have developed

thanks

G. Lakshmipathi