8/27/2010

Creating External Business Components or EBC in Siebel

                Hello!

                Toady lets talk about External Tables and Business Components. They are used to get data from external database (some other application non-Siebel). So let’s say you have to get data from three different tables in this external database, so then you use External Tables and Business Components. In first it’s seems like a complicated thing, but after all it is a very easy. And it can be done by using Siebel Wizard. So I’m not gone to invent bicycle because there already is full internet with help how to do this. So I take example from “Toolbox for IT” “Let's Talk Siebel” blog written by Sharfi. So here it is.

Creating External Business Components or EBC in Siebel
What is EBC?

So lets say you have some data in an external database which you want to show in Siebel. this data could reside in a table or may be in multiple tables and you have a view that queries these various tables to show u the data you want.

Siebel v7.7 and higher provides you an extremely easy way to get this data into siebel by means of what is known as "External Business Component", or EBC in short.

Configuration Steps

Here are the steps to configure your EBC.

** I am using the Oracle DB example. You could connect to any database thru EBC - DB2, SQL Server,

A. The very first thing you will do is create an External table.

1. get the DDL file for your external table.
here is how a sample ddl file will look like:

CREATE TABLE C00591.EBC_TEST
(
test1 VARCHAR2(20),
test2 VARCHAR2(20),
test3 NUMBER(10,3)
)

Save this file in your local machine.

2. Use siebel object creation wizard to create this table.
Go to siebel tools --> click on File --> New Object --> External Table Schema Import

3. The wizard will ask for following inputs:
i. Select Project this table will be part of from the list -
ii. Select the database where external table resides - Enter the database, for this example it is Oracle Server Enterprise Edition
iii. Specify full path of the file where table definition resides -
iv. Specify a 3 digit batch code for this import -
v. Click on Next and then click on Finish

Note: In order to import a view you still have to cheat siebel. Basically you will create a dummy DDL file to mimic the exact columns and datatypes that your view has and then import this table definition. Change the Type to External View.

4. This will create your External table. with a name like EX_001_0000001. The names of External tables begin with "EX_" the next 3 characters are batch codes and the rest is just a serial number.

* The Type field will be "External" for this table.
* You will also have to map one of the table columns to the Siebel's Id field. to do this: go to the desired table column and in the "System Field Mapping" column select "Id"

5. But hold on, you are not done yet. We still have to specify the data source name, in order to tell siebel where to look for your external table or view. Her'es how its done to enable your local client for accessing EBC.

6. Do the foll in your local cfg file

6.a. create an entry for a new datasource under [DataSources] section

c00591 = c00591

6.b. add a new section [c00591] to describe the datasource params:

[c00591]
Docked = TRUE
ConnectString = KCR2D
TableOwner = C00591
DLL = sscdo90.dll
SqlStyle = OracleCBO
DSUserName = C00591
DSPassword = C00591

Explanation of params:
Docked -
ConnectString - this is the entry for the DB in your tnsnames file
Tableowner - name of schema where your table/view resides
DLL - for oracle its sscdo90.dll
SqlStyle - OracleCBO
DSUserName - username to access the DB table
DSPassword - password to access the DB table

6.c. Now that you have defined the Datasource in cfg file, go back to siebel tools and add the datasource to your external table. Go to your external table, and go to the Data Source and add a new record:
Name = c00591

6.d. your External table is now ready for use in a EBC.

6.e. Use siebel object wizard to create a BC based on this table.

6.f. once the BC is created, change the Data Source property of the BC to "c00591"

You are now ready to use this BC in a applet/view/ 1:M links !!

________


7.Heres how to enable your thin/web client for accessing EBC. this is slightly different than the thin client configuration.

7.a. Create a new named subsystem of type "InfraDatasources"

7.b. Go to Administration - Server Configuration --> Enterprises --> Profile Configuration
7.c. create a new record with foll details:
Name = SharfiTest
Alias = SharfiTest
Subsystem type = InfraDatasources

Modify the following profile parmeters:
DSConnectString = KCR2D
DSPassword = C00591
DSTableOwner = C00591
DSUsername = C00591
DSDLLName = sscdo90.dll

You will also have to change the value of a hidden parameter "DSSQLStyle" thru server manager command line. Run the foll command to do this:

Change parameter DSSQLStyle="OracleCBO" for named subsystem SharfiTest

7.d. Add the new Datasource to your OM parameter, "OM - Named Data Source":

7.e. Go to Administration - Server Configuration --> Servers --> Components
7.f. Query for your application object Manager
7.g. Query for parameter = "OM - Data Source"
7.h. In the Value on Restart field you will see - ServerDataSrc,GatewayDataSrc
7.i. Change this to following:
ServerDataSrc,GatewayDataSrc,SharfiTest
7.j. Restart Siebel Server services.

7.k. Now that you have defined the Datasource in your Application Object Manager and restarted the services, go back to siebel tools and change the datasource on your external table. Go to your external table, and go to the Data Source and modify the Name field to:
Name = SharfiTest

7.l. Also modify the Data Source attribute of your BC to "SharfiTest"

7.m. compile, and replace the server srf to reflect this change and enable your EBC to work on thin/web client.

No comments:

Post a Comment