SELECT QPLH.NAME,QPLH.CURRENCY_CODE CURRENCY,
MSI.SEGMENT1 ITEM ,MSI.DESCRIPTION,QPLL.PRODUCT_UOM_CODE UOM,QPLL.OPERAND PRICE,
QPLL.START_DATE_ACTIVE ,QPLL.END_DATE_ACTIVE ,QPLL.COMPARISON_OPERATOR_CODE
FROM QP_SECU_LIST_HEADERS_V QPLH, -- QP_LIST_HEADERS_TL ,QP_LIST_HEADERS_B
MTL_SYSTEM_ITEMS_B MSI,
QP_LIST_LINES_V QPLL -- QP_LIST_LINES ,QP_PRICING_ATTRIBUTES
WHERE QPLH.LIST_HEADER_ID = QPLL.LIST_HEADER_ID
AND MSI.INVENTORY_ITEM_ID = QPLL.PRODUCT_ATTR_VALUE
AND MSI.ORGANIZATION_ID = 89
--AND QPLL.PRODUCT_UOM_CODE = :UOM --ls_uon_code --:UOM
AND QPLH.END_DATE_ACTIVE IS NULL
--AND QPLL.END_DATE_ACTIVE IS NULL
--AND QPLL.START_DATE_ACTIVE <=:PRIC_DATE
AND NVL(QPLL.END_DATE_ACTIVE,SYSDATE+1) >= SYSDATE
--AND QPLL.PRODUCT_ATTR_VALUE = :INVENTORY_ITEM_ID
AND QPLH.LIST_HEADER_ID = :P_LIST_HEADER_ID
ORDER BY MSI.SEGMENT1
MSI.SEGMENT1 ITEM ,MSI.DESCRIPTION,QPLL.PRODUCT_UOM_CODE UOM,QPLL.OPERAND PRICE,
QPLL.START_DATE_ACTIVE ,QPLL.END_DATE_ACTIVE ,QPLL.COMPARISON_OPERATOR_CODE
FROM QP_SECU_LIST_HEADERS_V QPLH, -- QP_LIST_HEADERS_TL ,QP_LIST_HEADERS_B
MTL_SYSTEM_ITEMS_B MSI,
QP_LIST_LINES_V QPLL -- QP_LIST_LINES ,QP_PRICING_ATTRIBUTES
WHERE QPLH.LIST_HEADER_ID = QPLL.LIST_HEADER_ID
AND MSI.INVENTORY_ITEM_ID = QPLL.PRODUCT_ATTR_VALUE
AND MSI.ORGANIZATION_ID = 89
--AND QPLL.PRODUCT_UOM_CODE = :UOM --ls_uon_code --:UOM
AND QPLH.END_DATE_ACTIVE IS NULL
--AND QPLL.END_DATE_ACTIVE IS NULL
--AND QPLL.START_DATE_ACTIVE <=:PRIC_DATE
AND NVL(QPLL.END_DATE_ACTIVE,SYSDATE+1) >= SYSDATE
--AND QPLL.PRODUCT_ATTR_VALUE = :INVENTORY_ITEM_ID
AND QPLH.LIST_HEADER_ID = :P_LIST_HEADER_ID
ORDER BY MSI.SEGMENT1
Link URL: http://hi.erp100.com/home.php?mod=space&uid=55664&do=blog&id=13571136
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/13964895/viewspace-735561/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/13964895/viewspace-735561/