ITPub博客

首页 > 数据库 > Oracle > The script which used to Check GL-PO-AP-INV Period Status

The script which used to Check GL-PO-AP-INV Period Status

原创 Oracle 作者:pan_tian 时间:2014-07-02 16:32:37 0 删除 编辑


--需要输入set_of_books_id,set_of_books_id可以从GL_SETS_OF_BOOKS查,Demo环境中的Vision Operations (USA)的set_of_books_id是1

  SELECT   a.period_name,
           a.period_num,
           a.gl_status,
           b.po_status,
           c.ap_status,
           d.inv_status
    FROM   (SELECT   period_name,
                     period_num,
                     DECODE (closing_status,
                             \'O\', \'Open\',
                             \'C\', \'Closed\',
                             \'F\', \'Future\',
                             \'N\', \'Never\',
                             closing_status)
                        gl_status
              FROM   gl_period_statuses
             WHERE       application_id = 101      --GL
                     AND start_date >= \'01-JAN-08\'
                     AND end_date < \'01-JAN-09\'
                     AND set_of_books_id = &&set_of_books_id) a,
           (SELECT   period_name,
                     DECODE (closing_status,
                             \'O\', \'Open\',
                             \'C\', \'Closed\',
                             \'F\', \'Future\',
                             \'N\', \'Never\',
                             closing_status)
                        po_status
              FROM   gl_period_statuses
             WHERE       application_id = 201          --Purchasing
                     AND start_date >= \'01-JAN-08\'
                     AND end_date < \'01-JAN-09\'
                     AND set_of_books_id = &&set_of_books_id) b,
           (SELECT   period_name,
                     DECODE (closing_status,
                             \'O\', \'Open\',
                             \'C\', \'Closed\',
                             \'F\', \'Future\',
                             \'N\', \'Never\',
                             closing_status)
                        ap_status
              FROM   gl_period_statuses
             WHERE       application_id = 200     --AP
                     AND start_date >= \'01-JAN-08\'
                     AND end_date < \'01-JAN-09\'
                     AND set_of_books_id = &&set_of_books_id) c,
           (SELECT   period_name,
                     DECODE (closing_status,
                             \'O\', \'Open\',
                             \'C\', \'Closed\',
                             \'F\', \'Future\',
                             \'N\', \'Never\',
                             closing_status)
                        inv_status
              FROM   gl_period_statuses
             WHERE       application_id = 401    --Inventory
                     AND start_date >= \'01-JAN-08\'
                     AND end_date < \'01-JAN-09\'
                     AND set_of_books_id = &&set_of_books_id) d                     
   WHERE   a.period_name = b.period_name AND a.period_name = c.period_name
ORDER BY   a.period_num;


--SELECT * FROM fnd_application WHERE application_id IN (101,201,200,401)


<!-- Baidu Button BEGIN -->

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/26687597/viewspace-1204914/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: How to Deploy a OAF Files
下一篇: Navigation to Open/Close INV/GL/AR/AP/PO Period
请登录后发表评论 登录
全部评论
暂无介绍

注册时间:2012-02-18

最新文章