Siebel : COMCreateObject equivalent in Unix

While working on some of the file operations, found that COMCreateObject is only supported in Windows servers. (As expected) and we cannot be using this if your siebel servers are based on AIX/Unix.

Alternative is to use Clib File operations.

Although it cannot open Excel, convert your excel to CSV or a Tab delimted or any delimited file and then try the operation.

Following is the sample code snippet : Enjoy coding 🙂

function WebApplet_PreInvokeMethod (MethodName)
{
if(MethodName == “ReadSpreadSheet”)
{
var fp = Clib.fopen(csvFileName, “r”);
var bo = TheApplication().GetBusObject(“CRS Action”);
var bc = bo.GetBusComp(“CRS Action”);

for(var line = Clib.fgets(fp); line != null; line = Clib.fgets(fp))
{
var cells = line.split(“;”);
var test = cells[0];

with(bc)
{
NewRecord(NewAfter);
SetFieldValue(“Type”, test);
SetFieldValue(“Description”,”Test For Siebel from Excel”);
WriteRecord();
}
}

Clib.fclose(fp);
bc = null;
bo = null;

return(CancelOperation);
}

return(ContinueOperation);
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s