博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

Discoverer报表维护

Posted on 2011-10-18 17:45  奥客  阅读(315)  评论(0编辑  收藏  举报

 --信用报表
begin
     fnd_client_info.set_org_context(81);
end;

 

FND_PROFILE.VALUE('USER_ID')


 

SELECT APPS.SECOM_CUSTOMER_CREDIT_PKG.GET_INVOICE_BAL(O104480.CUSTOMER_ID,1,TO_DATE('2011-10-18','YYYY-MM-DD'),1), O104480.CUSTOMER_NUMBER, O104480.CUSTOMER_NAME, O104480.SALES_REP, O104480.DEPT, O104480.PAYMENT_NAME, O104480.ORG_NAME, O104480.AMOUNT, O104480.HOLD_CREDIT_MOUNT, O104480.HOLD_CREDIT_MOUNT_OUT, O104480.HOLD_SYS_MOUNT, O104480.AMOUNT_OUT, O104480.HOLD_SYS_MOUNT_OUT, APPS.SECOM_CUSTOMER_CREDIT_PKG.GET_INVOICE_BAL(O104480.CUSTOMER_ID,-1,TO_DATE('2011-10-18','YYYY-MM-DD')), APPS.SECOM_CUSTOMER_CREDIT_PKG.GET_INVOICE_BAL(O104480.CUSTOMER_ID,2,TO_DATE('2011-10-18','YYYY-MM-DD'),1,30), APPS.SECOM_CUSTOMER_CREDIT_PKG.GET_INVOICE_BAL(O104480.CUSTOMER_ID,2,TO_DATE('2011-10-18','YYYY-MM-DD'),31,60), APPS.SECOM_CUSTOMER_CREDIT_PKG.GET_INVOICE_BAL(O104480.CUSTOMER_ID,2,TO_DATE('2011-10-18','YYYY-MM-DD'),61,90), APPS.SECOM_CUSTOMER_CREDIT_PKG.GET_INVOICE_BAL(O104480.CUSTOMER_ID,2,TO_DATE('2011-10-18','YYYY-MM-DD'),91,180), APPS.SECOM_CUSTOMER_CREDIT_PKG.GET_INVOICE_BAL(O104480.CUSTOMER_ID,2,TO_DATE('2011-10-18','YYYY-MM-DD'),181,360), APPS.SECOM_CUSTOMER_CREDIT_PKG.GET_INVOICE_BAL(O104480.CUSTOMER_ID,2,TO_DATE('2011-10-18','YYYY-MM-DD'),361,720), APPS.SECOM_CUSTOMER_CREDIT_PKG.GET_INVOICE_BAL(O104480.CUSTOMER_ID,1,TO_DATE('2011-10-18','YYYY-MM-DD'),721), O104480.INVOICE_BAL-O104480.RECEIPT_BAL, O104480.CREDIT, O104480.INVOICE_BAL, O104480.OPEN_SO, O104480.OVER_CREDIT, O104480.RECEIPT_BAL
FROM APPS.SECOM_DIS_CUSTOMER_CREDIT_V O104480
WHERE ( O104480.CUSTOMER_NUMBER = 78382 )