Lets create three temporary tables firstly, say TEMP_VIEW,TEMP_RESP and TEMP_VIEW_RESP. These tables can be used as below :-
TEMP_VIEW - to store information about Views such as view name and view description
TEMP_RESP - to store information about Responsibilities such as responsibility name, responsibility description and responsibility organization.
TEMP_VIEW_RESP - to store views and their associated responsibilities.
At first, you have import data to load to these temporary tables. From these temporary tables data should be imported into the interface tables in three stages. At first, you have to import the views to 'S_APP_VIEW', then responsibilities to 'S_RESP' and then have to populate inter table 'S_APP_VIEW_RESP' with view-responsibility association information.
Let's below look into the script used for loading the Views and Responsibilities:-
(
ROW_ID,
IF_ROW_STAT,
IF_ROW_BATCH_NUM,
NAME,
DESC_TEXT,
LOCAL_ACCESS_FLG
)
SELECT
SEQ.nextval,
'FOR_IMPORT',
1,
VIEW_NAME, ---view name
VIEW_DESC, ---view description
'Y' ---local access flag
FROM TEMP_VIEW
PROCESS = "IMPORT"
[IMPORT]
TYPE = IMPORT
BATCH = 1
TABLE = EIM_APP_VIEW
ONLY BASE TABLES = S_APP_VIEW
(
ROW_ID,
IF_ROW_STAT,
IF_ROW_BATCH_NUM,
RESP_NAME,
RESP_DESC_TEXT,
RESP_ACCSS_TYPE_CD,
RESP_BU
)
SELECT
SEQ.nextval,
'FOR_IMPORT',
1,
RESP_NAME, ---responsibility name
RESP_DESC, ---responsibility description
'Yes', ---web access flag
ORG ---organization
FROM TEMP_RESP
PROCESS = "IMPORT"
[IMPORT]
TYPE = IMPORT
BATCH = 1
TABLE = EIM_RESP
ONLY BASE TABLES = S_RESP
(
ROW_ID,
IF_ROW_STAT,
IF_ROW_BATCH_NUM,
RESP_BU,
RESP_NAME,
VIEW_NAME,
LOCAL_ACCESS_FLG,
APPVIEWRE_ROFLG
)
SELECT
SEQ.nextval,
'FOR_IMPORT',
1,
SBU.NAME,
TE.RESP_NAME, ----responsibility
TE.VIEW_NAME, ----view
'Y', ---local access flag
'N' ---read only flag
FROM TEMP_VIEW_RESP TE
JOIN SIEBEL.S_RESP SR ON SR.NAME=TE.RESP
JOIN SIEBEL.S_BU SBU ON SBU.ROW_ID=SR.BU_ID
PROCESS = "IMPORT"
[IMPORT]
TYPE = IMPORT
BATCH = 1
TABLE = EIM_RESP
ONLY BASE TABLES = S_APP_VIEW_RESP,S_RESP
TEMP_VIEW - to store information about Views such as view name and view description
TEMP_RESP - to store information about Responsibilities such as responsibility name, responsibility description and responsibility organization.
TEMP_VIEW_RESP - to store views and their associated responsibilities.
At first, you have import data to load to these temporary tables. From these temporary tables data should be imported into the interface tables in three stages. At first, you have to import the views to 'S_APP_VIEW', then responsibilities to 'S_RESP' and then have to populate inter table 'S_APP_VIEW_RESP' with view-responsibility association information.
Let's below look into the script used for loading the Views and Responsibilities:-
Populating View information
INSERT INTO SIEBEL.EIM_APP_VIEW(
ROW_ID,
IF_ROW_STAT,
IF_ROW_BATCH_NUM,
NAME,
DESC_TEXT,
LOCAL_ACCESS_FLG
)
SELECT
SEQ.nextval,
'FOR_IMPORT',
1,
VIEW_NAME, ---view name
VIEW_DESC, ---view description
'Y' ---local access flag
FROM TEMP_VIEW
IFB
[Siebel Interface Manager]PROCESS = "IMPORT"
[IMPORT]
TYPE = IMPORT
BATCH = 1
TABLE = EIM_APP_VIEW
ONLY BASE TABLES = S_APP_VIEW
Populating Responsibility information
INSERT INTO SIEBEL.EIM_RESP(
ROW_ID,
IF_ROW_STAT,
IF_ROW_BATCH_NUM,
RESP_NAME,
RESP_DESC_TEXT,
RESP_ACCSS_TYPE_CD,
RESP_BU
)
SELECT
SEQ.nextval,
'FOR_IMPORT',
1,
RESP_NAME, ---responsibility name
RESP_DESC, ---responsibility description
'Yes', ---web access flag
ORG ---organization
FROM TEMP_RESP
IFB
[Siebel Interface Manager]PROCESS = "IMPORT"
[IMPORT]
TYPE = IMPORT
BATCH = 1
TABLE = EIM_RESP
ONLY BASE TABLES = S_RESP
Populating View-Responsibility relation information
INSERT INTO SIEBEL.EIM_RESP(
ROW_ID,
IF_ROW_STAT,
IF_ROW_BATCH_NUM,
RESP_BU,
RESP_NAME,
VIEW_NAME,
LOCAL_ACCESS_FLG,
APPVIEWRE_ROFLG
)
SELECT
SEQ.nextval,
'FOR_IMPORT',
1,
SBU.NAME,
TE.RESP_NAME, ----responsibility
TE.VIEW_NAME, ----view
'Y', ---local access flag
'N' ---read only flag
FROM TEMP_VIEW_RESP TE
JOIN SIEBEL.S_RESP SR ON SR.NAME=TE.RESP
JOIN SIEBEL.S_BU SBU ON SBU.ROW_ID=SR.BU_ID
IFB
[Siebel Interface Manager]PROCESS = "IMPORT"
[IMPORT]
TYPE = IMPORT
BATCH = 1
TABLE = EIM_RESP
ONLY BASE TABLES = S_APP_VIEW_RESP,S_RESP
No comments:
Post a Comment