cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple deliveries per sales order

Former Member
0 Kudos

Hi,

(I tried to search through the forum first, but was unable to get the search to return anything in the new SCM).

I have a requirement to write a query to find orders (for a given month) that have mulitple deliveries.

I need to select by a given order type only.

I am thinking this should be a join between VBAK and either LIKP or LIPS.  I'm wondering if there is an indicator in these tables (or somewhere else) that says there are 2 or more different delieveries for a given order?

Accepted Solutions (1)

Accepted Solutions (1)

Shiva_Ram
Active Contributor
0 Kudos

You can use table VBFA. Enter the sales document number in the VBELV and value J in the field VBTYP_N to get the delivery details.

Regards,

Former Member
0 Kudos

Thank you for your answer; that is part of what I need.  When I build that query (I join between VBAK and VBFA so that I select the dates from VBAK), I get deliveries for the sales orders.   What I need, more prescisely, is to select (or count) only those orders that have more than one unique delivery number.  I was wondering if there was a flag indicator in the sales/delivery tables somewhere that tells us an order has more than one unique delivery.

Thank you again,

Lakshmipathi
Active Contributor
0 Kudos

Once you execute VBFA, you can see a tab "Number of Entries".  You have to make use of this.

G. Lakshmipathi

Shiva_Ram
Active Contributor
0 Kudos

I could not see any flag either. Can you check table VBEP? You can check the fields Item, serial number and confirmed quantity. If the confirmed quantity is not equal to zero and serial number is equals/more than 2, then I assume you can categorize as multiple deliveries document.You can test this with all the possible scenario to arrive at a conclusion.

Regards,

Former Member
0 Kudos

Hello,

In VBEP, I am seeing Sales Document Item (POSNR), and confirmed quantity (BMENG), but I do not see a serial number.  Do you perhaps mean Schedule line (ETENR)?  We are on version 4.7

Using VBEP, I am trying to view a few orders that I know have either (a.) only one unique delivery number and (b.) have more than one unique delivery number.  I'm looking for a way to identify the latter, but I'm so far unable to find a specific field or flag that I can use to positively identify those that have multiple deliveries.

I'm hoping to either view against the tables or use Quick Viewer to join, as I don't want to have to write and transport custom ABAP.  SQVI can't handle a select distinct, however, or this query would be a lot easier.  I will keep looking through VBEP / VBFA.

Thanks!

Former Member
0 Kudos

You can do this with SQ02 and adding some ABAP codes.

Do a count for each SO item that has a delivery document in VBFA and type 'J'.

No transport required. Just do a bit of ABAP.

Answers (0)