How to ADD COLUMN in TABLE Base ADI in Oracle
How to ADD COLUMN in TABLE Base ADI in Oracle
select * from
XXSD_TABLE_TYPE_ADI_TL
--==================
Add Column in Table ====================
alter table
XXSD_TABLE_TYPE_ADI_TL add Attribute1 varchar2(100)
--===================
Interface Columns Details ================
select * from BNE_INTERFACE_COLS_TL
where INTERFACE_CODE like 'XXSD_TABLE_ADI_TL_XINT_INTF1%'
select * from
BNE_INTERFACE_COLS_B
where INTERFACE_CODE = 'XXSD_TABLE_ADI_TL_XINT_INTF1'
--====================================================
------------------------------------------------------------------------------
--REGISTER_COLUMN
------------------------------------------------------------------------------
DECLARE
CURSOR C1 IS
SELECT (SELECT
APPLICATION_SHORT_NAME FROM FND_APPLICATION WHERE APPLICATION_ID =
(SELECT APPLICATION_ID FROM FND_APPLICATION_TL WHERE APPLICATION_NAME = 'XXSD Custom Application')) APP_SHORT_NAME,
TABLE_NAME,COLUMN_NAME,DATA_TYPE,DATA_LENGTH,COLUMN_ID,NULLABLE,OWNER
FROM DBA_TAB_COLUMNS A
WHERE TABLE_NAME IN ( SELECT OBJECT_NAME FROM
DBA_OBJECTS A WHERE A.OBJECT_NAME LIKE 'XXSD_TABLE_TYPE_ADI_TL')
AND not exists (select 1 from FND_COLUMNS Z where Z.COLUMN_NAME = A.COLUMN_NAME and Z.TABLE_ID = ( select table_id from fnd_tables where table_name = 'XXSD_TABLE_TYPE_ADI_TL') );
BEGIN
FOR I IN C1 LOOP
AD_DD.REGISTER_COLUMN (I.APP_SHORT_NAME, I.TABLE_NAME,I.COLUMN_NAME, I.COLUMN_ID, I.DATA_TYPE, I.DATA_LENGTH, 'N', 'N');
END LOOP;
END;
------------------------------------------------------------------------------
--
Fatching data for API
------------------------------------------------------------------------------
select * from BNE_INTERFACE_COLS_TL
where INTERFACE_CODE like 'XX_TABLE_ADI%'
edit BNE_INTERFACE_COLS_B
where INTERFACE_CODE = 'XX_TABLE_ADI_XINTG_INTF1'
------------------------------------------------------------------------------
-- API for Add column
------------------------------------------------------------------------------
BEGIN
BNE_INTEGRATOR_UTILS.UPSERT_INTERFACE_COLUMN (
20003, --P_APPLICATION_ID
--
'XX_TABLE_ADI_XINTG_INTF1', ---
P_INTERFACE_CODE ---
6, --
P_SEQUENCE_NUM ---
1, --
P_INTERFACE_COL_TYPE --
'ATTRIBUTE1', --
INTERFACE_COL_NAME -- P_ATTRIBUTE1 ---
'Y', --ENABLED_FLAG
--
'Y', ---REQUIRED_FLAG
---
'Y', ---
DISPLAY_FLAG ---
NULL,NULL,NULL,NULL,NULL,NULL,NULL,
'N', --
READ_ONLY_FLAG --
NULL, --'JAVA', -- VAL_TYPE -- 17
NULL,NULL,NULL,NULL,NULL,
2, -- DATA_TYPE (2 for Varchar , 3
for DATE, 1 for Number ) - 23
'N', --- NOT_NULL_FLAG -- 24
null, --20003, ---
VAL_COMPONENT_APP_ID -- 25
null, --'XXTEST_XINTG_INTF1_C5_COMP', -- VAL_COMPONENT_CODE
-- 26
'N', --
SUMMARY_FLAG -- 27
'Y', --
P_PROMPT_LEFT -- 28
'ATTRIBUTE1', --
P_PROMPT_ABOVE -- 29
'ATTRIBUTE1', --
USER_HINT -- 30
NULL,NULL,
'US','US',
NULL,NULL,
NULL, --5, -- EXPANDED_SQL_QUERY --
NULL, --5, --
LOV_TYPE --
NULL,NULL,NULL,NULL,
1111 --
USER_ID --
);
END;
Comments
Post a Comment