CREATE OR REPLACE VIEW KE014T3.BCD_ICT_CUST_COLLECTIONS AS
SELECT
ALOC_DETAIL_1 AR_CODE, AR_NAME,RH_DOC_DATE,ALOC_DOC_NUMBER,ALOC_NARRATION,ALOC_CURRENCY, ALOC_FOREIGN_AMOUNT
FROM
KE014T3.ID_RECEIPT_HEADER,
KE014T3.ID_RECEIPT_ALLOCATION_DETAILS,
KE014T3.ID_AR_MASTER 
WHERE 
ALOC_DOC_NUMBER=RH_DOC_NUMBER
AND ALOC_DETAIL_1=AR_CODE
AND ALOC_ALLOCATION_TYPE='AR'
AND RH_STATUS='P'
AND RH_DOC_TYPE<>'RBRV'


--CREATE OR REPLACE VIEW KE014T3.BCD_ICT_CUST_COLLECTIONS AS
SELECT
ALOC_DETAIL_1 AR_CODE, AR_NAME,RH_DOC_DATE,ALOC_DOC_NUMBER,ALOC_NARRATION,ALOC_CURRENCY, ALOC_FOREIGN_AMOUNT
FROM
KE014T3.ID_RECEIPT_HEADER,
KE014T3.ID_RECEIPT_ALLOCATION_DETAILS,
KE014T3.ID_AR_MASTER 
WHERE 
ALOC_DOC_NUMBER=RH_DOC_NUMBER
AND ALOC_DETAIL_1=AR_CODE
AND ALOC_ALLOCATION_TYPE='AR'
AND RH_STATUS='P'
AND RH_DOC_TYPE<>'RBRV'


