cancel
Showing results for 
Search instead for 
Did you mean: 

Logic to fetch delivered and invoiced Qty using sales order and line no

former_member216345
Participant
0 Kudos

Hi Experts,

I am creating a Sales Order report in which I need to Fetch the delivered Quantity and Invoiced Quantity fields.

I am currently going to VBFA table and pass SO and line item number and fetch all data. Then I perform addition/ subtraction to remove cancelled quantities. this is making the logic complicated.

Is there any standard Function module/ or table or BAPI which can fetch the Delivered and Invoiced quantities directly?

Regards,

Onkar B

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

First pass the sales order number into "VBFA" table into the field "VBELV".

Execute or Press F8.

Get the document number of the delivery from "VBELN".

Pass the same delivery document numebr into "LIPS" table into the field "VBELN".

Execute.

Get the value of the delivery quantity from the field "LFIMG" in this table.

Next got the table "VBFA".

Pass the delivery document number into the field "VBELV".

Execute or Press F8.

Get the document number of the billing document from "VBELN".

Pass the same billing document numebr into "VBRP" table into the field "VBELN".

Execute.

Get the value of the invoiced quantity from the field "FKIMG" in this table.

Like this we have to get the delivery and invoice quantities.

Regards,

Krishna.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

There is no standard Functionality to fetch the Delivered quantity and Invoiced quantity.

The way you are using is correct, getting from VBFA -


>SUBSEQUENT DOCUMENT -
> with document category J and Mfor Delivery and Invoice respectively.

thanks,

santosh

reazuddin_md
Active Contributor
0 Kudos

I dont think,

there is any Std SAP Program, which can directly add/subtract the delivered/Invoiced quantities against SO/Material.

We should provide the logic to the program.

For cancellations, use movement type basis to track the sales returns / document category( credit/debit memo requests) also an easy option to fetch the relevant data.