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;
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