2012年7月30日 星期一

[GL]GL Interface 簡單範例

Interface table:
GL_INTERFACE

Base table:
GL_JE_HEADERS
GL_JE_LINES
GL_JE_BACTHES

Concurrent Program:
Journal Import

image

簡單範例:
1.
SELECT GL_JOURNAL_IMPORT_S.NEXTVAL
  INTO V_GROUP_ID                 
  FROM DUAL;                      

SELECT CODE_COMBINATION_ID
  INTO V_CODE_COMBINATION_ID
  FROM GL_CODE_COMBINATIONS_V
WHERE CHART_OF_ACCOUNTS_ID = XXXX;
 
INSERT INTO GL_INTERFACE (
         STATUS,
         SET_OF_BOOKS_ID,
         ACCOUNTING_DATE,
         CURRENCY_CODE,
         DATE_CREATED,
         CREATED_BY,
         ACTUAL_FLAG,
         USER_JE_CATEGORY_NAME,
         USER_JE_SOURCE_NAME,
         BUDGET_VERSION_ID,
         CODE_COMBINATION_ID,
         PERIOD_NAME,
         ENTERED_DR,
         GROUP_ID)
VALUES ('NEW',                     
         :PARAMETER.SET_OF_BOOKS_ID,
         SYSDATE,          
         'TWD',                     
         SYSDATE,
         Fnd_Global.USER_ID,
         'B',                       
         'Accrual',
         'Spreadsheet',
         'test',
         V_CODE_COMBINATION_ID,
         V_PERIOD_NAME,
         100,
         V_GROUP_ID);

2.執行Journal Import

沒有留言: