Showing posts with label GL. Show all posts
Showing posts with label GL. Show all posts

Wednesday, October 20, 2021

GL PERIOD STATUS CODE QUERY IN ORACLE APPS

 SELECT sob.name "Set of Books" ,ps.application_id,

fnd.product_code "Product Code" ,

ps.PERIOD_NAME "Period Name" ,

ps.START_DATE "Period Start Date" ,

ps.END_DATE "Period End Date" ,

DECODE(ps.closing_status, 'O','O - Open' ,

                          'N','N - Never Opened' ,

                          'F','F - Future Enterable' ,

                          'C','C - Closed' ,'Unknown') "Period Status"

FROM apps.gl_period_statuses ps ,

apps.GL_SETS_OF_BOOKS sob ,

apps.fnd_application fnd

WHERE 1=1--ps.application_id   =101 -- GL 

AND sob.SET_OF_BOOKS_ID       = ps.SET_OF_BOOKS_ID

AND fnd.application_id        = ps.application_id

AND ps.adjustment_period_flag = 'N'

AND (TRUNC(SYSDATE) -- Comment line if a a date other than SYSDATE is being tested.

  BETWEEN TRUNC(ps.start_date) AND TRUNC (ps.end_date))

ORDER BY ps.SET_OF_BOOKS_ID,

  fnd.product_code,

  ps.start_date;

Tuesday, December 27, 2011

Gl BALANCE


INSERT INTO gl_interface
                (ledger_id,
                 date_created,
                 actual_flag,
                 currency_code,
                 period_name,
                 segment1,
                 segment2,
                 segment3,
                 segment4,
                 segment5,
                 segment6,
                 segment7,
                 segment8,
                 entered_dr,
                 entered_cr,
                 user_je_category_name,
                 user_je_source_name,
                 status,
                 accounting_date,
                 created_by,
                 code_combination_id,
USER_CURRENCY_CONVERSION_TYPE,
currency_conversion_date
                )
         VALUES (cv_int.ledger_id,--2021,--cv_int.ledger_id,
                 SYSDATE,
                 cv_int.actual_flag,
                 cv_int.currency_code,
                 cv_int.period_name,
                 cv_int.segment1,
                 cv_int.segment2,
                 cv_int.segment3,
                 cv_int.segment4,
                 cv_int.segment5,
                 cv_int.segment6,
                 cv_int.segment7,
                 cv_int.segment8,
                 cv_int.closing_balance_dr,
                 cv_int.closing_balance_cr,
                 cv_int.user_je_category_name,
                 cv_int.user_je_source_name,
                 'POSTED',
                 cv_int.accounting_date,
                 fnd_global.user_id,
                 cv_int.code_combination_id,
cv_int.USER_CURRENCY_CONVERSION_TYPE,
cv_int.currency_conversion_date
                );