Friday, November 3, 2017

API to display Sales Order Order Details like Subtotal,Discount, Charges, Tax Amount & Order Total in Oracle Apps

Get the Order Header ID by using below query:
select * from oe_order_headers_all where order_number = '123456789' --Here 123456789 is Order Number.


Pass the Header_ID in below API to fetch Order Subtotal,Discount, Charges, Tax Amount & Order Total.

DECLARE
   p_header_id                   NUMBER := 11223344;
   p_subtotal                    NUMBER;
   p_discount                    NUMBER;
   p_charges                     NUMBER;
   p_tax                         NUMBER;
   p_total                       NUMBER;
BEGIN
   apps.oe_oe_totals_summary.order_totals (p_header_id,
                                           p_subtotal,
                                           p_discount,
                                           p_charges,
                                           p_tax);
   p_total                         := p_subtotal + p_charges + p_tax;
   DBMS_OUTPUT.put_line (   'Order Subtotal : '
                         || p_subtotal
                         || ' Discount : '
                         || p_discount
                         || ' Charges : '
                         || p_charges
                         || ' Tax Amount : '
                         || p_tax
                         || ' Order Total:'
                         || p_total);
EXCEPTION
   WHEN OTHERS
   THEN
      DBMS_OUTPUT.put_line (   'Exception In Main : '
                            || SUBSTR (SQLERRM, 1, 250));
END;

No comments:

Post a Comment

SupplierAddressImportTemplate.xlsm South Africa Suburb Field mapping in POZ_SUPPLIER_ADDRESSES_INT

Suburb mpping in Supplier Address Import Template will be mapped to Address Element Attribute2 (HZ_LOCATIONS. ADDR_ELEMENT_ATTRIBUTE2)