Wednesday, March 26, 2014

How to calculate total of Oracle Sales Order

 

Here is the logic/sql to find out total of Oracle Sales Order, I have used this logic to derive total of oracle sales order for reporting purposes-



declare

x_subtotal number;

x_discount number;

x_charges number;

x_tax NUMBER;

x_total number:

begin

OE_OE_TOTALS_SUMMARY.Order_Totals

                              (

                              p_header_id=>6040357,

                              p_subtotal =>x_subtotal,

                              p_discount =>x_discount,

                              p_charges  =>x_charges,

                              p_tax      =>x_tax

                              );

dbms_output.put_line('sagar') ;                            

dbms_output.put_line('x_subtotal:'|| x_subtotal) ;  

dbms_output.put_line('x_discount:'|| x_discount) ;  

dbms_output.put_line('x_charges:'|| x_charges) ;  

dbms_output.put_line('x_tax:'|| x_tax) ; 

x_total:= x_subtotal+ x_charges+ x_tax;

dbms_output.put_line(‘x_total:'|| x_total) ; 
end;           

1 comment:

  1. Regards
    Sridevi Koduru (Senior Oracle Apps Trainer Oracleappstechnical.com)
    LinkedIn profile - https://in.linkedin.com/in/sridevi-koduru-9b876a8b
    Please Contact for One to One Online Training on Oracle Apps Technical, Financials, SCM, SQL, PL/SQL, D2K at training@oracleappstechnical.com | +91 - 9581017828.

    ReplyDelete