Below script will help you to find Sales Order's subtotal, discount, charges and Tax through API OE_OE_TOTALS_SUMMARY.ORDER_TOTALS
This script was tested in R12.1.1
SET SERVEROUTPUT ON;
DECLARE
v_HEADER_ID NUMBER;
v_SUBTOTAL NUMBER;
v_DISCOUNT NUMBER;
v_CHARGES NUMBER;
v_TAX NUMBER;
BEGIN
v_HEADER_ID := 5908;
OE_OE_TOTALS_SUMMARY.ORDER_TOTALS(
P_HEADER_ID => v_HEADER_ID,
P_SUBTOTAL => v_SUBTOTAL,
P_DISCOUNT => v_DISCOUNT,
P_CHARGES => v_CHARGES,
P_TAX => V_TAX
);
DBMS_OUTPUT.PUT_LINE('SUBTOTAL = ' || v_SUBTOTAL);
DBMS_OUTPUT.PUT_LINE('DISCOUNT = ' || v_DISCOUNT);
DBMS_OUTPUT.PUT_LINE('CHARGES = ' || v_CHARGES);
DBMS_OUTPUT.PUT_LINE('TAX = ' || v_TAX);
END;
Do you have any idea how these fields are populated in the form.
ReplyDeleteit would be great if you can post it.
Regards,
Shiva