DPP Distributor Inventory Claim Log

Description
Categories: BI Publisher, Sales
Application: Oracle Price Protection
Source:
Short Name: DPPONHDLOG
DB package:
select 
to_char(DED.EXECUTION_START_DATE,'dd-Mon-yyyy HH24:MI:ss')STARTDATE,
to_char(DED.EXECUTION_END_DATE,'dd-Mon-yyyy HH24:MI:ss') ENDDATE,
DED.EXECUTION_STATUS as EXECUTIONSTATUS,
DED.OUTPUT_XML.extract('//TXNNUMBER/text()').getStringVal() as TXNNUMBER,
decode(INSTR(extract(value(w),'//CLAIMNUMBER/text()').getStringVal(),'DPP',2),0,'N','Y') as CLAIMS_EXIST,
decode(INSTR(extract(value(w),'//CLAIMNUMBER/text()').getStringVal(),'DPP',2),0,SUBSTR(extract(value(w),'//CLAIMNUMBER/text()').getStringVal(),1),SUBSTR(extract(value(w),'//CLAIMNUMBER/text()').getStringVal(),1,INSTR(extract(value(w),'//CLAIMNUMBER/text()').getStringVal(),'DPP',2)-1)) as CLAIMNUMBER1,
decode(INSTR(extract(value(w),'//CLAIMNUMBER/text()').getStringVal(),'DPP',2),0,null,SUBSTR(extract(value(w),'//CLAIMNUMBER/text()').getStringVal(),INSTR(extract(value(w),'//CLAIMNUMBER/text()').getStringVal(),'DPP',2))) as CLAIMNUMBER2,
extract(value(w), '//ITEMNUMBER/text()').getStringVal() as ITEMNUMBER,
extract(value(w), '//REASON/text()').getStringVal() as REASON
from DPP_EXECUTION_DETAILS DED, table(xmlsequence(extract(DED.OUTPUT_XML, '/ROWSET/ROOT/TRANSACTION'))) w
WHERE DED.EXECUTION_DETAIL_ID=:EXECUTION_DETAIL_ID
Download