Create SR activities reading from file-Case Study

In this post I am going to discuss an interesting requirement that I was asked by a reader of Siebel Unleashed. The requirement is little complex but I will try to explain it as simply as I can. Before going into the requirement let me explain the component of the requirement. We have a bunch of files that we will need to work upon and those are:

SRList.txt :: It has list of filenames that contain activity information related to SR as shown below.

Individual Files: The individual files will have the activity information related to a SR Number mentioned in the name of the file. The information will be pipe (|) delimited as shown below

The folder where the files will look something like this


Now Let’s move on the requirement

  1. Read the files name from SRList.txt.
  2. Extract the SR Number from these individual filenames.
  3. Read the Activity information from the individual file.
  4. Create Activities under the SR Number after reading from the file.
  5. Repeat step 1-4 till all the filenames are processed from SRList.txt

For example:
If you look at above screenshots here is what needs to be done:

  1. Read filename SRList.txt (First entry to be read will be 1-111111.txt)
  2. Extract SR Number from the file name (1-111111)
  3. Read Activity Information from individual file (1-111111.txt)
  4. Create Activities under the SR Number after reading from file (2 Activities will be created under SR Number 1-111111)
  5. Repeat Steps 1-4 (process 1-111112.txt, 1-111113.txt etc)

I hope I have made requirement clear. In next post I am going to discuss solution and code to complete this requirement. In the mean time I would like to hear your thoughts on this and any solution you might have in mind.

Click here to get the solution of the requirement

6 Responses to Create SR activities reading from file-Case Study

  1. 1)if you can use .csv files instead of the pipe separated text there are out of the box business services like “read from csv ” . which can directly load the entire coma separated elements into specified integration component fields.After this you can use script or datamaping to process the same.
    2)if csv is not an option you can use clib related functions to do the same.
    clib.fopen,clib.write ,etc
    3)another fast method will be loading the entire file date using os script(shell scripting if unix) into a table in siebel schema(if external schema use EBC) then manipulate this data using logic in siebel.

    i have worked with all the 3 approaches, although not accepted by many the third one is fast and more stable :).

    • I would agree to the static variable here…

      The format is big problem with Read CSV file and in addition to that .. this business service is only for marketing vertical….

      EBC is a fast and stable option but will not fit in this case… It require extensive infrastructure to make external DB available to siebel which is not always possible. With the current requirement in hand escripting through Clib function seems to be the best approach

      • Aye …..nees not use ebc or table load

        Ter is one more way after reading the file wit the batch job,you can invoke wrkflow by login into server mgr…and pass the value you gt frm file..and create act frm wf….this will be super fast method…i think

  2. The Read CSV BS is a good option, but then we need an IO and IO details have to be provided in first two lines of the CSV file.

    As Sandeep mentions, CLIB functions can be used. you can read one line of text, use the split function on delimiter ‘|’ to get individual fields, and set them individually.

  3. Yes, this could be one approach but it will add too many touch points in the process.
    First the ETL requires to have a window server.
    You will need a way to trigger ETL if scheduling is not possible.
    The there will be problem of finding out failed EIM records and report them and figure out a way to reprocess those records.
    And because we are passing the business layer so all the business process validations will have to built in the either the ETL or EIM…

    I think it would make the process too complex and prone to faliures

Leave a Reply