How to Create a External Business Component – EBC in Siebel
EBC is a External Business Component, which is created in Siebel database using the external table definition file i.e. DDL file.
Lets take an example to be more precise,
We will copy our existing Local DB or Sample DB which will act as External Database. And lets take S_LANG table which is to be shown in our database via an EBC. This is Language table stores the Language Code and Name like CHS Chinese, ENU English, JPY Japan.
How to Create External Data Source?
1. Go to your /tools/sample/utf8 directory and Copy your existing sample database file sse_samp.dbf to sse_samp_EBC.dbf . This creates the external database for you.
2. Now, you need to create a DDL file. The new sample database which created is a DB2 database, so creating a DDL file from DB2 database; I am not sure how to do that?
Hence, I created the DDL file using the SQL Developer, from the actual Database server.
3. There I opened the S_LANG table, and copied the SQL (DDL) statement, pasted to a file and named as S_LANG.ddl.
4. Take the DDL file. This file contains the definition of external table in the form of a CREATE TABLE … statement.
Here is the content of the S_LANG.ddl file taken in the below example -
CREATE TABLE SIEBEL.S_LANG ( ROW_ID VARCHAR2(15 CHAR) NOT NULL, CREATED DATE DEFAULT sysdate NOT NULL, CREATED_BY VARCHAR2(15 CHAR) NOT NULL, LAST_UPD DATE DEFAULT sysdate NOT NULL, LAST_UPD_BY VARCHAR2(15 CHAR) NOT NULL, DCKING_NUM NUMBER(22, 7) DEFAULT 0, MODIFICATION_NUM NUMBER(10, 0) DEFAULT 0 NOT NULL, CONFLICT_ID VARCHAR2(15 CHAR) DEFAULT ‘0′ NOT NULL, LANG_CD VARCHAR2(5 CHAR) NOT NULL, MSG_LOCKED_FLG CHAR(1 CHAR) DEFAULT ‘N’ NOT NULL, NAME VARCHAR2(50 CHAR) NOT NULL, REP_LOCKED_FLG CHAR(1 CHAR) DEFAULT ‘N’ NOT NULL, DB_LAST_UPD DATE, MSG_LOCKED_DT DATE, REP_LOCKED_DT DATE, DB_LAST_UPD_SRC VARCHAR2(50 CHAR), MSG_LOCKED_BY VARCHAR2(15 CHAR), REP_LOCKED_BY VARCHAR2(15 CHAR), ) TABLESPACE “SIEBEL_TBS_01″ LOGGING PCTFREE 10 INITRANS 1 MAXTRANS 255 STORAGE ( INITIAL 64K MINEXTENTS 1 MAXEXTENTS 2147483645 BUFFER_POOL DEFAULT ) ; |
How to Design External Business Componentin Siebel Tools?
1. Now, Go to Siebel Tools -> New Object -> External Table Schema Import.
Select the any locked project. Specify the Type Of Schema as DDL/Analytics
Choose 3 Character Group Code as 111
Click Next
2. Select the Database where external table resides = IBM DB2 UDB for Windows and UNIX
Specify the path of DDL file which we have created above.
Click Next
3. Specify the Runtime Data Source Name. Give name like LangTestDBSrc. This data source name will appear in the Siebel Tools -> Table -> Data Source.
Click Finish.
4. A table with name = EX_111_0000001 will be created under Table object in Tools. You can see its Type = External. Its Data Source child object will be LangTestDBSrc. You will see its column names like X_111_0000001_0003, X_111_0000001_0004.
5. Now in Table -> Column, query for the ROW_ID in Alias Column, you will get the Column Name = X_111_0000001_0001. Go to its System Field Mapping field and pick Id. This ensures a unique mapping between the External Database Table and Siebel External Table (created by importing the DDL file).
6. Now, you can simply create BCs, BO, Applet, Views, and Screens like a normal Siebel Table using this External Table (EX_111_0000001).
7. In the BusComp based on table: EX_111_0000001, specify the Data Source as LangTestDBSrc. This tells Business Component to refer to the external data source.
8. Add the new View to the Responsibility of logged in user.
How to Configure CFG to connect to External Database?
1. Remember the name of the data source we created in during the creation of the EBC i.e. LangTestDBSrc.
2. Open you dedicated application cfg file.
Copy the local database section.
Create a new section with datasource name as LangTestDBSrc
Change the database file name like – sse_samp_EBC.dbf
[LangTestDBSrc] Docked = FALSE ConnectString = d:\siebel\tools\81\SAMPLE\UTF8\sse_samp_EBC.dbf -q -m -x NONE -gp 4096 -c40m -ch60m TableOwner = SIEBEL DockedDBFilename = CHANGE_ME DLL = SSCDW9.DLL SqlStyle = Watcom MaxCachedCursors = 16 MaxCachedDataSets = 16 ReverseFillThreshold = 100 FileSystem = D:\siebel\client\sample\files ChartServer = localhost:8001 ChartImageFormat = png SymbolicURLSuffix = _Demo AutoStopDB = FALSE |
3. Goto [DataSources] section, add a entry like
[DataSources]
LangTestDBSrc = LangTestDBSrc
How to Start the External Business Component?
1. Once the EBC is configured, you can launch your dedicated client. Navigate to the new view you have created to display data from the external data base.
2. When you click in the View, the applet is loaded and it tries to connect to external data source (as configured above). If the external data sources user id and password are same as your current data base, it will show the external data correctly. But if Uid/pwd is different, then it will pop-up a window to enter the user id and password.









Leave your response!