How do I write my BLL to make it re-usable?

Most of it was written 4-5 years ago. Our teams long term objectives are to use Entity Framework. Though we aren't gonna do it right away as our deadlines aren't allowing us to do so. Now we have our own framework. I want to be able to segregate the Business
logic layer in such a way that it need not be re-written when we move to EF. Please guide us with best practices, advise us in this direction.
Our business logic layer is very fragmented today (UI Code Behind + Stored Procedures/functions SqlServer/ C# persistent classes) : What if I want to segregate it totally and draw a very prominent line between Storage | DAL | Business Logic | UI
I want to know if it's ok to move the BLL totally in SQl stored Procedures or does it have to be totally C# classes?
Also to avoid re-writing the BLL as we are going to move to EF eventually. What steps should I take so that I can readily use the entire BLL with EF without changing the code.
A lot of the stored procedures (which have the BL) lie in the storage DB itself. Does segregating the BLL mean the SP's and functions should be in a different database altogether? or for all
practical purposes it's ok for them to be in the same DB?
I've seen multiple questions on SO which were really helpful, but I just couldn't get a clear picture of the solution or advise I seek, so I put everything in one post.
Please correct me if I'm wrong. I'm a novice when it comes to system design. I wanna be able to foresee what I'm getting into before actually implementing it.

Putting all your logic in c# is fine if that's the only way you're ever going to access a database.
It's not a great plan if you also need to use that business logic elsewhere.
It's quite common to have business logic in triggers, constraints etc and a very similar version reproduced in code for validation at client.
The database logic acts as a backstop making it absolutely certain you cannot duplicate something unique or choose a foreign key which doesn't exist.
Separating out layers so absolutely has rather gone out of fashion in some areas.
There are pros and cons.
But for example:
When using something like EF it's often easier if business logic goes in buddy classes as say metadata and calculated properties for your entities rather than another separate layer.
Please don't forget to upvote posts which you like and mark those which answer your question.
My latest Technet article - Dynamic XAML

Similar Messages

  • How to i write a script that makes multiple selections in a pdf and exports them to excel?

    I have a large number of PDFs
    Not all the PDFs contain information we need. We want to be able to automate a script that extracts certain info from the PDFs and opens them in a certain format in excel.
    Acrobat allows me to make a single selection and export as excel.
    How do i export multiple parts to excel from the pdfs and ensure that the resulting excel is in a format that i can use without much fixing needed (e.g. merged cells)?

    This type of process can't really be done using JavaScript. You would need to read the contents of the file, word by word, decide (based on some logic) what data to extract, and then collect it and at the end export to a plain-text file. Not a simple process...

  • How can i write the code for make calendar in sap abap

    hi this aditya  from ongc trainee
    i want design the calendar which is editadle only at present date for tik is it present or not.

    Hi Ajay ,
              You can have Calender in your webdynpro Application by creating Element " DateNavigator" .

  • How can I write a program that compiles without warnings?

    I tried the following with the 1.5 beta-compiler (build 28; I think):
    class Y {
         public static final class Pair<X,Y> {
           private X fst;
           private Y snd;
           public Pair(X fst, Y snd) {this.fst=fst; this.snd=snd;}
           public X getFirst() { return fst; }
           public Y getSecond() { return snd; }
           public String toString() { return "("+fst+","+snd+")"; }
      public static void main(String... args) {
         Pair[] pairArr = new Pair[10];              // supposed to be an array of Pair<Integer,Integer>
         for (int i=0; i<pairArr.length; i++)
             pairArr[i] = new Pair<Integer,Integer>(i,i);
         for (int i=0; i<pairArr.length; i++) {
             Pair<Integer,Integer> p = pairArr; // unchecked warning
         System.out.println(p);
         Integer first = p.getFirst();
         Integer second = p.getSecond();
    // ... more stuff ...
    It turns out that I get an unchecked warning when I extract an element from the array of pairs. Okay, that's fine. How can I avoid the warning? I had expected that an explicit cast would help.
      Pair<Integer,Integer> p = (Pair<Integer,Integer> )pairArr;
    With a cast I'm telling the compiler: "I _know_ what I'm doing; please trust me." But the compiler still issues a warning.
    How can I write a warning-free program in this case? The only thing I can think of, is not using the parameterized type Pair in its parameterized form. But it's not the idea of Java Generics that I refrain from using parameterized types. What am I missing?

    It turns out that I get an unchecked warning when I
    extract an element from the array of pairs. Okay,
    that's fine. How can I avoid the warning? I had
    expected that an explicit cast would help.
    Pair<Integer,Integer> p = (Pair<Integer,Integer>
    )pairArr;
    With a cast I'm telling the compiler: "I _know_ what
    I'm doing; please trust me."  But the compiler still
    issues a warning.  Yes, but at least you were able to change the warning from "unchecked assignment" to "unchecked cast" which is a little shorter ;-)
    Seriously , since arrays of generic types are disallowed, there is probably no way to get rid of these warnings - which makes a strong point for eliminating "unchecked" warnings altogether (see the other thread "selectively suppressing compiler warnings")
    Cheerio,
    Gernot

  • How do I write to an SDHC card? My iMac doesn't seem to recognize it.

    How do I write to an SDHC card? It read a couple of my cards from camcorders, but I have others that it won't recognize. I don't see any software for writing. I can read and write CDs OK.

    Hi -
    My two cents -
    have +the camera+ format the card whenever possible. It will save you many, many headaches later.
    There have been many posts about memory cards with corrupted directories and the machinations required to recover the media.
    I make it a Standard Operating Procedure - once the media files are off the card, the card gets formatted by the camera before the next use.
    MTD

  • How can I write to an SD card with my iPad 3?

    How can I write to an SD card/thumb drive with my iPad 3?

    Sorry to post this question before realizing others already did. HOWEVER! Why would Apple make such a cool device like the iPad without the abiity to write to an SD card?

  • List v = new Vector() how can i write this ?

    List v = new Vector() how can i write this ?
    vector does not 'extends' List rather it 'implements' only ......so how can write this way ? ( polymorphism applies only for 'extends' ).

    my question in a simple way is :
    List some_list extends Vector
    No, List is an interface; Vector is a concrete class. Read the javadocs.
    Vector implements List
    >
    AND
    List some_list implements Vector
    are these two same in behaviour
    our  apart from theoretical differences ?thanks
    Interfaces don't have any implementation; they're pure method signatures. When a concrete class implements an interface, it makes a promise that says "I will provide implementations for exactly these methods. Any client can call a method from the interface and I will do something 'sensible' if I'm written correctly."
    From the point of view of static and dynamic types, there's no difference between interfaces and classes.
    C++ has interfaces, too - they're classes with all pure virtual methods. If you understand how C++ works, the concept shouldn't be hard.
    ArrayList is preferred precisely because it isn't synchronized by default. (You can always make it so using java.util.Collections if you wish later on.) If you don't need synchronization, why pay the performance penalty?

  • How can I write HTML code in this forums

    Sorry but I didn't know where to post this thread.....
    How can I write HTML code in this forums?

    Hello,
    Every piece of code in your post should be wrapped with the forum tags [ code] and [ /code], without the blanks.
    In case of the &lt;a> tag, that is not enough. In this case, you have several options. The most elegant one is to use the entity name for the less-then sign - & lt; - without any spaces. Other options is to add a space between the less-then and the ‘a’ character (and make a note of it) or change the less-then character with a left bracket one.
    When posting code, you should always use the forum preview option, just to make sure the forum software “understood” your code correctly.
    Hope this helps,
    Arie.

  • Guys, How do I write a trigger to call Calulator /Notepad???

    How do I write a trigger to call Calulator /Notepad???
    how do i make a button to call the notepad editor in windows and calculator?
    of course i know about making the button, i want the code behind the trigger....

    Kid, while you are providing more information on exactly what you are trying to do please make if clear if you are asking about a database table trigger or a Forms trigger?
    As a general rule I would think an action such as calling a Windows specific feature should be done external to the database via the application.
    HTH -- Mark D Powell --

  • How can I write cursor which tell me no record exists

    Hi Experts,
    I want to know how can I write a cursor which told me no record exists before opening and running the loop.
    So I want that if no record exist then I dont want to run loop and open the cursor.
    Example: cursor c1 is select empno from scott.emp where empno=10
    In procedure body, I want to check if there is no record against my cusor then I don't like to open it.
    Thanks

    Rizwan Ali Wahla wrote:
    I want to know how can I write a cursor which told me no record exists before opening and running the loop.
    So I want that if no record exist then I dont want to run loop and open the cursor.Not possible.
    Example: cursor c1 is select empno from scott.emp where empno=10Single row? No need for an explicit cursor. No need for a loop. It can be done using an implicit cursor. E.g.
    SQL> create or replace function GetEmployee( empID number ) return EMP%RowType is
      2          empRow EMP%RowType;
      3  begin
      4          select
      5                  e.* into empRow
      6          from    emp e
      7          where   e.empno = empID;
      8          return( empRow );
      9  exception when NO_DATA_FOUND then
    10          return( null );
    11  end;
    12  /
    Function created.
    SQL>
    SQL> declare
      2 
      3          procedure ProcessEmp( empID number ) is
      4                  empRow  EMP%RowType;
      5          begin
      6                  empRow := GetEmployee( empID );
      7 
      8                  if empRow.empno is null then
      9                          dbms_output.put_line( 'Employee '||empID||' does not exist.' );
    10                  else
    11                          dbms_output.put_line(
    12                                  'Employee '||empID||' is '||empRow.ename ||
    13                                  ' and employed as '||empRow.job
    14                          );
    15                  end if;
    16          end;
    17 
    18  begin
    19          ProcessEmp( 7900 );
    20          ProcessEmp( 7901 );
    21  end;
    22  /
    Employee 7900 is JAMES and employed as CLERK
    Employee 7901 does not exist.
    PL/SQL procedure successfully completed.
    SQL> All SQLs are cursors. Every single SQL passed to Oracle for parsing and execution is a cursor. So it does not make sense to use one SQL cursor for testing the existence of a specific row, and then another to return the row.
    That kind of logic is PL/SQL logic and a single SQL cursor need to be used.
    PS. Make sure that the SQL projection only includes the columns needed in PL/SQL. If the SQL is a pure exist row? check, then do not return any column and use a literal value as the projected column.
    Edited by: Billy Verreynne on Feb 16, 2012 5:55 AM

  • How do you write a deterministic clause?

    How do you write / code a deterministic clause? I was told to use it instead of Target buckets
    Thanks,

    This is my target_bucket function. I have been trying to create a rewrite enabled materialized view and I have been able to do that. I was told to use a deterministic clause to be able to make the code into a re-write enable materialized view.
    THIS IS THE TARGET BUCKET CODE / FUNCTION.
    GRP_OR_BCKT_IN CHAR, -- 'G' or 'B'
    PTD_OR_RESV_IN CHAR, -- 'P' or 'R'
    CLM_KIND_IN CHAR,
    CODE_IN CHAR,
    PTD_1 NUMBER,
    PTD_2 NUMBER,
    PTD_3 NUMBER,
    PTD_4 NUMBER,
    PTD_5 NUMBER,
    PTD_6 NUMBER,
    PTD_7 NUMBER,
    PTD_8 NUMBER,
    PTD_9 NUMBER)
    RETURN NUMBER IS
    TEMP NUMBER := 0;
    BEGIN
    SELECT /*+ INDEX(INDICATOR_SUM IDX_INDICATOR_SUM_GRP)*/
    SUM(DECODE(INDICATOR_SUM.INDICATOR,
    1, PTD_1,
    2, PTD_2,
    3, PTD_3,
    4, PTD_4,
    5, PTD_5,
    6, PTD_6,
    7, PTD_7,
    8, PTD_8,
    9, PTD_9,
    0)) INTO TEMP
    FROM INDICATOR_SUM WHERE
    INDICATOR_SUM.GRP_OR_BCKT = GRP_OR_BCKT_IN AND
    INDICATOR_SUM.PTD_OR_RESV = PTD_OR_RESV_IN AND
    INDICATOR_SUM.CLM_KIND = CLM_KIND_IN AND
    INDICATOR_SUM.CODE = CODE_IN;
    RETURN NVL(TEMP,0);
    EXCEPTION
    WHEN OTHERS THEN
    RETURN 0;
    END;
    This is what I've been trying to do with no LUCK AT ALL.
    CREATE MATERIALIZED VIEW M_reserve
    TABLESPACE mviews_TS
    BUILD IMMEDIATE
    Enable query rewrite
    AS
    SELECT
    Reserve.clm_seq_id_fk as clm_seq_id,
    PID.PID_NBR AS PARENT_ID,
    PID.PID_NAME AS PID_NAME,
    ACCT.ACCT_NBR AS ACCOUNT_NBR,
    ACCT.ACCT_NAME AS ACCOUNT_NAME,
    CLAIM_1.CLM_NBR AS CLAIM_NBR,
    CLAIM_1.CLM_SUFFIX AS CLAIM_SUFFIX,
    ACCT_LOI.LOI AS LOI,
    CLAIM_1.CLM_KIND AS CLAIM_KIND,
    CLAIM_1.ST_CLM_NBR AS STATE_CLAIM_NBR,
    ACCT_LOI.RISK_NBR AS RISK_NBR,
    ACCT_LEVEL1.LEVEL_1 AS LOCATION_1,
    ACCT_LEVEL1.LEVEL_NAME AS LOCATION_1_NAME,
    ACCT_LEVEL2.LEVEL_2 AS LOCATION_2,
    ACCT_LEVEL2.LEVEL_NAME AS LOCATION_2_NAME,
    ACCT_LEVEL3.LEVEL_3 AS LOCATION_3,
    ACCT_LEVEL3.LEVEL_NAME AS LOCATION_3_NAME,
    ACCT_LEVEL4.LEVEL_4 AS LOCATION_4,
    ACCT_LEVEL4.LEVEL_NAME AS LOCATION_4_NAME,
    ACCT_LEVEL5.LEVEL_5 AS LOCATION_5,
    ACCT_LEVEL5.LEVEL_NAME AS LOCATION_5_NAME,
    SERV_OFC.SERV_OFC AS SERV_OFC,
    SERV_OFC.SERV_OFC_NAME AS SERV_OFC_NAME,
    CLAIM_1.BEN_ST AS BENEFIT_ST,
    CLAIM_1.CLM_TYPE AS CLAIM_TYPE,
    CLAIM_1.OPN_CLSD AS OPEN_CLOSED,
    SUBSTR(CLAIM_1.CLM_STAT,1,5) AS CLAIM_STATUS,
    CLAIM_1.CLMT_LST_NAME AS CLMNT_LAST_NAME,
    CLAIM_1.CLMT_FIRST_NAME AS CLMNT_FIRST_NAME,
    CLAIM_1.CLMT_MID_INIT AS CLMNT_MIDDLE_INITIAL,
    CLAIM_2.CLMT_ADDR1 AS CLMNT_ADDR1,
    CLAIM_2.CLMT_ADDR2 AS CLMNT_ADDR2,
    CLAIM_2.CLMT_CITY AS CLMNT_CITY,
    CLAIM_2.CLMT_ST AS CLMNT_ST,
    CLAIM_2.CLMT_ZIP_CD AS CLMNT_ZIP_CD,
    CLAIM_2.CLMT_CNTRY AS CLMNT_CNTRY,
    CLAIM_1.CLMT_SSN AS CLMNT_SSN,
    CLAIM_1.DT_INJ AS DATE_OF_INJURY,
    CLAIM_1.DT_RPT_EMPLR AS DATE_RPT_TO_EMPLOYER,
    CLAIM_1.DT_RECV AS DATE_RCVD_BY_GMCD,
    CLAIM_1.DT_INPT AS DATE_CLAIM_ENTERED,
    CLAIM_1.DT_CLSD AS DATE_CLAIM_CLOSED,
    CLAIM_1.DT_LST_ACTVY AS DATE_OF_LAST_ACTIVITY,
    CLAIM_1.DT_REOPN AS DATE_REOPENED,
    CLAIM_1.INJ_CAUSE AS INJ_CAUSE_CD,
    IJCA_DESC.TBL_DESC AS INJ_CAUSE_DESC,
    CLAIM_1.PART_OF_BODY AS POB_CD,
    IJPB_DESC.TBL_DESC AS POB_DESC,
    CLAIM_1.NATR AS INJ_NATURE_CD,
    IJNT_DESC.TBL_DESC AS INJ_NATURE_DESC,
    CLAIM_1.AGCY AS AGENCY_CD,
    AGAL_DESC.TBL_DESC AS AGENCY_DESC,
    CLAIM_1.MANL_CLSR_REQR AS MANUAL_CLASS_NBR,
    CLAIM_1.REC_ONLY AS RECORD_ONLY_FLAG,
    CLAIM_1.SEX AS SEX,
    NVL(DECODE(CLAIM_1.AGE,0,NULL,CLAIM_1.AGE),
    TRUNC((CLAIM_1.DT_INJ - CLAIM_1.DT_BIRTH) / 365.25))
    AS AGE,
    CLAIM_1.TIME_EMPLD AS TIME_EMPLOYED,
    CLAIM_1.DT_MED_TO_INDM AS DATE_MED_CHG_TO_IND,
    CLAIM_1.DT_INDM_TO_MED AS DATE_IND_CHG_TO_MED,
    TARGET_BUCKET('G','R',
    DECODE(PID.CONV_FLAG,'Y',CLAIM_1.CLM_KIND,'WC00'),
    '200',
    RESERVE.RESV_1,
    RESERVE.RESV_2,
    RESERVE.RESV_3,
    RESERVE.RESV_4,
    RESERVE.RESV_5,
    RESERVE.RESV_6,
    RESERVE.RESV_7,
    RESERVE.RESV_8,
    RESERVE.RESV_9) AS RESV_MEDICAL,
    TARGET_BUCKET('G','R',
    DECODE(PID.CONV_FLAG,'Y',CLAIM_1.CLM_KIND,'WC00'),
    '201',
    RESERVE.RESV_1,
    RESERVE.RESV_2,
    RESERVE.RESV_3,
    RESERVE.RESV_4,
    RESERVE.RESV_5,
    RESERVE.RESV_6,
    RESERVE.RESV_7,
    RESERVE.RESV_8,
    RESERVE.RESV_9) AS RESV_INDEMNITY,
    TARGET_BUCKET('G','R',
    DECODE(PID.CONV_FLAG,'Y',CLAIM_1.CLM_KIND,'WC00'),
    '202',
    RESERVE.RESV_1,
    RESERVE.RESV_2,
    RESERVE.RESV_3,
    RESERVE.RESV_4,
    RESERVE.RESV_5,
    RESERVE.RESV_6,
    RESERVE.RESV_7,
    RESERVE.RESV_8,
    RESERVE.RESV_9) AS RESV_EXPENSES,
    TARGET_BUCKET('G','R',
    DECODE(PID.CONV_FLAG,'Y',CLAIM_1.CLM_KIND,'WC00'),
    '203',
    RESERVE.RESV_1,
    RESERVE.RESV_2,
    RESERVE.RESV_3,
    RESERVE.RESV_4,
    RESERVE.RESV_5,
    RESERVE.RESV_6,
    RESERVE.RESV_7,
    RESERVE.RESV_8,
    RESERVE.RESV_9) AS RESV_RECOVERABLE,
    TARGET_BUCKET('G','R',
    DECODE(PID.CONV_FLAG,'Y',CLAIM_1.CLM_KIND,'WC00'),
    '204',
    RESERVE.RESV_1,
    RESERVE.RESV_2,
    RESERVE.RESV_3,
    RESERVE.RESV_4,
    RESERVE.RESV_5,
    RESERVE.RESV_6,
    RESERVE.RESV_7,
    RESERVE.RESV_8,
    RESERVE.RESV_9) AS RESV_PROPERTY_DAMAGE,
    TARGET_BUCKET('G','R',
    DECODE(PID.CONV_FLAG,'Y',CLAIM_1.CLM_KIND,'WC00'),
    '205',
    RESERVE.RESV_1,
    RESERVE.RESV_2,
    RESERVE.RESV_3,
    RESERVE.RESV_4,
    RESERVE.RESV_5,
    RESERVE.RESV_6,
    RESERVE.RESV_7,
    RESERVE.RESV_8,
    RESERVE.RESV_9) AS RESV_BODILY_INJURY,
    TARGET_BUCKET('G','R',
    DECODE(PID.CONV_FLAG,'Y',CLAIM_1.CLM_KIND,'WC00'),
    '206',
    RESERVE.RESV_1,
    RESERVE.RESV_2,
    RESERVE.RESV_3,
    RESERVE.RESV_4,
    RESERVE.RESV_5,
    RESERVE.RESV_6,
    RESERVE.RESV_7,
    RESERVE.RESV_8,
    RESERVE.RESV_9) AS RESV_OTHER,
    TARGET_BUCKET('G','R',
    DECODE(PID.CONV_FLAG,'Y',CLAIM_1.CLM_KIND,'WC00'),
    '207',
    RESERVE.RESV_1,
    RESERVE.RESV_2,
    RESERVE.RESV_3,
    RESERVE.RESV_4,
    RESERVE.RESV_5,
    RESERVE.RESV_6,
    RESERVE.RESV_7,
    RESERVE.RESV_8,
    RESERVE.RESV_9) AS RESV_CONTENTS,
    TARGET_BUCKET('G','R',
    DECODE(PID.CONV_FLAG,'Y',CLAIM_1.CLM_KIND,'WC00'),
    '208',
    RESERVE.RESV_1,
    RESERVE.RESV_2,
    RESERVE.RESV_3,
    RESERVE.RESV_4,
    RESERVE.RESV_5,
    RESERVE.RESV_6,
    RESERVE.RESV_7,
    RESERVE.RESV_8,
    RESERVE.RESV_9) AS RESV_STRUCTURES,
    TARGET_BUCKET('G','R',
    DECODE(PID.CONV_FLAG,'Y',CLAIM_1.CLM_KIND,'WC00'),
    '209',
    RESERVE.RESV_1,
    RESERVE.RESV_2,
    RESERVE.RESV_3,
    RESERVE.RESV_4,
    RESERVE.RESV_5,
    RESERVE.RESV_6,
    RESERVE.RESV_7,
    RESERVE.RESV_8,
    RESERVE.RESV_9) AS RESV_RECOVERY,
    CLAIM_1.DT_DEATH AS DATE_OF_DEATH,
    CLAIM_1.INJ_CLASS_CD AS INJ_CLASS_CD,
    ICLA_DESC.TBL_DESC AS INJ_CLASS_DESC,
    CLAIM_1.OCCUP_CD AS OCCUPATION_CD,
    CLAIM_1.OCCUP AS OCCUPATION_DESC,
    CLAIM_1.NATR_OF_INJ AS INJ_NATURE,
    CLAIM_1.ACCD_DESC AS ACCIDENT_DESC,
    RESERVE.DT_INPT AS DATE_RESERVE_ENTERED,
    RESERVE.TIME_INPT AS TIME_RESERVE_ENTERED,
    RESERVE.RESV_OTH_DESC AS RESV_OTH_DESC,
    ASSOCIATE.HP_LOGON AS FIELD_OFFICE,
    ASSOCIATE.USER_LST_NAME AS EXAMINER_LAST_NAME,
    ASSOCIATE.USER_FIRST_NAME AS EXAMINER_FIRST_NAME,
    ASSOCIATE.SUPV AS EXAMINERS_SUPERVISER,
    ASSOCIATE.MGR AS EXAMINERS_MANAGER,
    CLAIM_1.BUS_UNIT AS BUSINESS_UNIT,
    CLAIM_1.CLM_CLASS AS CLAIM_CLASS,
    CLAIM_1.NURSE_RESP AS NURSE_RESPONSIBLE,
    CLAIM_2.EMPL_NBR AS EMPL_NBR
    FROM
    ACCT,
    ACCT_LOI,
    PID,
    INCIDENT,
    CLAIM_1,
    CLAIM_2,
    ACCT_LEVEL1,
    ACCT_LEVEL2,
    ACCT_LEVEL3,
    ACCT_LEVEL4,
    ACCT_LEVEL5,
    RESERVE,
    SERV_OFC,
    ASSOCIATE,
    AGAL_DESC,
    IJCA_DESC,
    ICLA_DESC,
    IJNT_DESC,
    IJPB_DESC
    WHERE
    CLAIM_1.OPN_CLSD <> 'Z' AND
    PID.PID_SEQ_ID = ACCT.PID_SEQ_ID_FK AND
    ACCT.ACCT_SEQ_ID = ACCT_LOI.ACCT_SEQ_ID_FK AND
    INCIDENT.ACCT_LOI_SEQ_ID_FK(+) = ACCT_LOI.ACCT_LOI_SEQ_ID AND
    CLAIM_1.INC_SEQ_ID_FK(+) = INCIDENT.INC_SEQ_ID AND
    CLAIM_2.CLM_SEQ_ID_FK = CLAIM_1.CLM_SEQ_ID AND
    RESERVE.CLM_SEQ_ID_FK(+) = CLAIM_1.CLM_SEQ_ID AND
    SERV_OFC.SERV_OFC_SEQ_ID = CLAIM_1.SERV_OFC_SEQ_ID_FK AND
    ACCT_LEVEL1.LEVEL1_SEQ_ID(+) = CLAIM_1.LEVEL1_SEQ_ID_FK AND
    ACCT_LEVEL2.LEVEL2_SEQ_ID(+) = CLAIM_1.LEVEL2_SEQ_ID_FK AND
    ACCT_LEVEL3.LEVEL3_SEQ_ID(+) = CLAIM_1.LEVEL3_SEQ_ID_FK AND
    ACCT_LEVEL4.LEVEL4_SEQ_ID(+) = CLAIM_1.LEVEL4_SEQ_ID_FK AND
    ACCT_LEVEL5.LEVEL5_SEQ_ID(+) = CLAIM_1.LEVEL5_SEQ_ID_FK AND
    ASSOCIATE.PROCS_UN(+) = CLAIM_1.EXAMR_RESP AND
    ASSOCIATE.SERV_OFC_SEQ_ID_FK(+) = CLAIM_1.SERV_OFC_SEQ_ID_FK AND
    (AGAL_DESC.TBL_TYPE = ACCT_LOI.AGCY_CD_TBL OR
    AGAL_DESC.TBL_TYPE IS NULL) AND
    AGAL_DESC.TBL_CD(+) = CLAIM_1.AGCY AND
    ICLA_DESC.TBL_CD (+) = CLAIM_1.INJ_CLASS_CD AND
    IJCA_DESC.TBL_CD (+) = CLAIM_1.INJ_CAUSE AND
    IJNT_DESC.TBL_CD (+) = CLAIM_1.NATR AND
    IJPB_DESC.TBL_CD (+) = CLAIM_1.PART_OF_BODY ;

  • HOW DO I WRITE A STRING TO FLAG WHEN A CELL HAS OR 17 CHARACTERS?

    HOW DO I WRITE A STRING TO FLAG WHEN A CELL HAS < OR > 17 CHARACTERS?

    Hi Tassytiger,
    A "string" is just a string of characters. Examples are qwerty, 123abc, 43πbono. there are several ways to write one. A more precise description of your end goal might help answer "How do I write a string."
    To the current version of your specific question:
    What I actually need to achieve is a situation where, when I enter <17 Char. or >17 Char.
    inadvertently then tab to the next cell, I get the following response in the active cell:
    The cell immediately below "17 character ID" displays an error triangle. These are shown when the formula in a cell produces an error message. they are system generated and require two things to happen: The cell must contain a formula AND something must have happened to cause that formula to produce an error.
    I don't wish to add any columns to my s/s but would like to apply the rule to the current column just as i would change the text or fill colour.
    The difficulty there is that a cell may contain entered data, OR it may contain a formula. You want to enter data (a string of characters) and you want to produce an error triangle if that string has more or fewer than 17 characters. Evaluating the length of the string requires a formula. Getting the string into the cell requires direct entry (in your scenario). The two are not compatible within the content of a single cell.
    Terry's example uses a formula in column B to measure the length of the string in column A. If the length is 17 characters, the IF statement produces the empty string ( "" ), and the cell in column B appears empty. If the string is not 17 characters long, the IF statement produces the string "Not 17 Chars!"
    His formula is easily changed to produce an error triangle in place of "Not 17 Chars!":
    B1: =IF(LEN(A1)=17, "",17/0)
    In this version, if the length of the string in A1 is not 17 (characters), the formula will attempt to divide 17 by 0, and will produce a 'division by zero' error.
    But, as with all of the other suggestions, this one will require a new column to provide space for the formula and it's result.
    Changing the text or fill colour can be done using conditional formatting. Changing content of the cell (eg. choosing between the entered string of characters and the error triangle) cannot.
    Conditional formatting rules compare the content of a the cell to be formatted with either a fixed value (written into the rule) or to the content of another cell. In my examples (and in Ian's examples) above the rules compared the content of the cell to be formattes to the number '17'. The number was generated by a formula which measured the length (in characters) of the text in the cell where the ID was entered, and reported that length as a number.
    A way to show a red triangle using conditional formatting is to use Image fill as the default fill of the cell, then use a colour fill as the conditional fill to hide the trialngle when the conditions are met. Here's the same example as used above, with this technique applied to column B:
    The same formula is used in column B as in my previous example. Type size is set to 1 point (note the black dot, visible in the green filled cell) to keep the numbers from obscuring the triangles. The triangles are shapes, inserted onto the canvas (not into the table) from the Shapes button in the tools. Their fill colour has been changed to red, a 12 point exclamation sign character ha been typed into the shape and its text colour set to white, and the triangle's size has been reduced as much as possible without triggering the overflow symbol (boxed plus sigh) to appear.
    The triangle image (and some of its white background) was made into a png image file by taking a screen shot, and the image was inserted into all of the cells in the body rows of column B as an image fill, using the Graphic inspector. The conditional format rule below was then applied to the body row cells in column B.
    Finally, you can apply conditional formatting to the cell containing the ID. This will still require another column to contain the values to which the content of the ID cell will be compared, but that column may be hidden, or may be located on a separate table.
    The method requires an second cell for each cell contining an ID, and uses a formula that makes the contents of the second cell the same as that of the ID cell IF the ID cell contents are 17 characters long.
    Here's a sample. Table 1 is column A of the same table as above. Table 2 is a single column table holding the comparison cells.
    As in the example above, the cells on table 1 were given an image fill. The conditional format rule replaces that with a white colour fill when the cell contains the same text as its partner cell in Table 2.
    This is the rule for cell A2. In A3, the cell reference is to Table 2::A3, and in A4, to Table 2::A4. The cell references in conditional format rules must be edited individually.
    Regards,
    Barry

  • How can i write a string into a specified pos of a file?

    How can i write a string into a specified pos of a file without read all file into ram and write the whole file again?
    for example:
    the content of file is:
    name=123
    state=456
    i want to modify the value of name with 789
    (write to file without read all file into ram)
    How can i do it? thank you

    take this as an idea. it actually does what i decribed above. you sure need to make some modifications so it works for your special need. If you use it and add any valuable code to it or find any bugs, please let me know.
    import java.io.*;
    import java.util.*;
    * Copyright (c) 2002 Frank Fischer <[email protected]>
    * All rights reserved. See the LICENSE for usage conditions
    * ObjectProperties.java
    * version 1.0, 2002-09-12
    * author Frank Fischer <[email protected]>
    public class ObjectProperties
         // the seperator between the param-name and the value in the prooperties file
         private static final String separator = "=";
         // the vector where we put the arrays in
         private Vector PropertiesSet;
         // the array where we put the param/value pairs in
         private String propvaluepair[][];
         // the name of the object the properties file is for
         public String ObjectPropertiesFileName;
         // the path to the object'a properties file
         public String ObjectPropertiesDir;
         // reference to the properties file
         public File PropertiesFile;
         // sign for linebreak - depends on platforms
         public static final String newline = System.getProperty("line.separator");
         public ObjectProperties(String ObjectPropertiesFileName, String ObjectPropertiesDir, ObjectPropertiesManager ObjectPropertiesManager)
         //     System.out.println("Properties Objekt wird erzeugt: "+ObjectPropertiesFileName);
              this.ObjectPropertiesFileName = ObjectPropertiesFileName;
              this.ObjectPropertiesDir = ObjectPropertiesDir;
              // reference to the properties file
              PropertiesFile = new File(ObjectPropertiesDir+ObjectPropertiesFileName);
              // vector to put the param/value pair-array in
              PropertiesSet = new Vector();
         //     System.out.println("Properties File Backup wird erzeugt: "+name);
              backup();
         //     System.out.println("Properties File wird eingelesen: "+PropertiesFile);
              try
                   //opening stream to file for read operations
                   FileInputStream FileInput = new FileInputStream(PropertiesFile);
                   DataInputStream DataInput = new DataInputStream(FileInput);
                   String line = "";
                   //reading line after line of the properties file
                   while ((line = DataInput.readLine()) != null)
                        //just making sure there are no whitespaces at the beginng or end of the line
                        line = cutSpaces(line);
                        if (line.length() > 0)
                             //$ indicates a param-name
                             if (line.startsWith("$"))
                                  // array to store a param/value pair in
                                  propvaluepair = new String[1][2];
                                  //get the param-name
                                  String parameter = line.substring(1, line.indexOf(separator)-1);
                                  //just making sure there are no whitespaces at the beginng or end of the variable
                                  parameter = cutSpaces(parameter);
                                  //get the value
                                  String value = line.substring(line.indexOf(separator)+1, line.length());
                                  //just making sure there are no whitespaces at the beginng or end of the variable
                                  value = cutSpaces(value);
                                  //put the param-name and the value into an array
                                  propvaluepair[0][0] = parameter;
                                  propvaluepair[0][1] = value;
                             //     System.out.println("["+ObjectPropertiesFileName+"] key/value gefunden:"+parameter+";"+value);
                                  //and finaly put the array into the vector
                                  PropertiesSet.addElement(propvaluepair);
              // error handlig
              catch (IOException e)
                   System.out.println("ERROR occured while reading property file for: "+ObjectPropertiesFileName);
                   System.out.println("ERROR CODE: "+e);
                   // System.out.println("in ObjectProperties");
         // function to be called to get the value of a specific paramater 'param'
         // if the specific paramater is not found '-1' is returned to indicate that case
         public String getParam(String param)
              // the return value indicating that the param we are searching for is not found
              String v = "-1";
              // looking up the whole Vector
              for (int i=0; i<PropertiesSet.size(); i++)
                   //the String i want to read the values in again
                   String s[][] = new String[1][2];
                   // trying to get out the array from the vector again
                   s = (String[][]) PropertiesSet.elementAt(i);
                   // comparing the param-name we're looking for with the param-name in the array we took out the vector at position i
                   if (s[0][0].equals(param) == true)
                        //if the param-names are the same, we look up the value and write it in the return variable
                        v = s[0][1];
                        // making sure the for loop ends
                        i = PropertiesSet.size();
              // giving the value back to the calling procedure
              return v;
         // function to be called to set the value of a specific paramater 'param'
         public void setParam(String param, String value)
              // looking up the whole Vector for the specific param if existing or not
              for (int i=0; i<PropertiesSet.size(); i++)
                   //the String i want to read the values in again
                   String s[][] = (String[][]) PropertiesSet.elementAt(i);
                   // comparing the param-name we're looking for with the param-name in the array we took out the vector at position i
                   if (s[0][0].equals(param) == true)
                        //if the param-names are the same, we remove the param/value pair so we can add the new pair later in
                        PropertiesSet.removeElementAt(i);
                        // making sure the for loop ends
                        i = PropertiesSet.size();
              // if we land here, there is no such param in the Vector, either there was none form the beginng
              // or there was one but we took it out.
              // create a string array to place the param/value pair in
              String n[][] = new String[1][2];
              // add the param/value par
              n[0][0] = param;
              n[0][1] = value;
              // add the string array to the vector
              PropertiesSet.addElement(n);
         // function to save all data in the Vector to the properties file
         // must be done because properties might be changing while runtime
         // and changes are just hold in memory while runntime
         public void store()
              backup();
              String outtofile = "# file created/modified on "+createDate("-")+" "+createTime("-")+newline+newline;
              try
                   //opening stream to file for write operations
                   FileOutputStream PropertiesFileOuput = new FileOutputStream(PropertiesFile);
                   DataOutputStream PropertiesDataOutput = new DataOutputStream(PropertiesFileOuput);
                   // looping over all param/value pairs in the vector
                   for (int i=0; i<PropertiesSet.size(); i++)
                        //the String i want to read the values in
                        String s[][] = new String[1][2];
                        // trying to get out the array from the vector again
                        s = (String[][]) PropertiesSet.elementAt(i);
                        String param = "$"+s[0][0];
                        String value = s[0][1];
                        outtofile += param+" = "+value+newline;
                   outtofile += newline+"#end of file"+newline;
                   try
                        PropertiesDataOutput.writeBytes(outtofile);
                   catch (IOException e)
                        System.out.println("ERROR while writing to Properties File: "+e);
              catch (IOException e)
                   System.out.println("ERROR occured while writing to the property file for: "+ObjectPropertiesFileName);
                   System.out.println("ERROR CODE: "+e);
         // sometimes before overwritting old value it's a good idea to backup old values
         public void backup()
              try
                   // reference to the original properties file
                   File OriginalFile = new File(ObjectPropertiesDir+ObjectPropertiesFileName);
                   File BackupFile = new File(ObjectPropertiesDir+"/backup/"+ObjectPropertiesFileName+".backup");
                   //opening stream to original file for read operations
                   FileInputStream OriginalFileInput = new FileInputStream(OriginalFile);
                   DataInputStream OriginalFileDataInput = new DataInputStream(OriginalFileInput);
                   //opening stream to backup file for write operations
                   FileOutputStream BackupFileOutput = new FileOutputStream(BackupFile);
                   DataOutputStream BackupFileDataOutput = new DataOutputStream(BackupFileOutput);
              //     String content = "";
                   String line = "";
                   // do till end of file
                   while ((line = OriginalFileDataInput.readLine()) != null)
                        BackupFileDataOutput.writeBytes(line+newline);
              // error handlig
              catch (IOException e)
                   System.out.println("ERROR occured while back up for property file: "+ObjectPropertiesFileName);
                   System.out.println("ERROR CODE: "+e);
                   System.out.println("this is a serious error - the server must be stopped");
         private String cutSpaces(String s)
              while (s.startsWith(" "))
                   s = s.substring(1, s.length());
              while (s.endsWith(" "))
                   s = s.substring(0, s.length()-1);
              return s;
         public String createDate(String seperator)
              Date datum = new Date();
              String currentdatum = new String();
              int year, month, date;
              year = datum.getYear()+1900;
              month = datum.getMonth()+1;
              date = datum.getDate();
              currentdatum = ""+year+seperator;
              if (month < 10)
                   currentdatum = currentdatum+"0"+month+seperator;
              else
                   currentdatum = currentdatum+month+seperator;
              if (date < 10)
                   currentdatum = currentdatum+"0"+date;
              else
                   currentdatum = currentdatum+date;
              return currentdatum;
         public String createTime(String seperator)
              Date time = new Date();
              String currenttime = new String();
              int hours, minutes, seconds;
              hours = time.getHours();
              minutes = time.getMinutes();
              seconds = time.getSeconds();
              if (hours < 10)
                   currenttime = currenttime+"0"+hours+seperator;
              else
                   currenttime = currenttime+hours+seperator;
              if (minutes < 10)
                   currenttime = currenttime+"0"+minutes+seperator;
              else
                   currenttime = currenttime+minutes+seperator;
              if (seconds < 10)
                   currenttime = currenttime+"0"+seconds;
              else
                   currenttime = currenttime+seconds;
              return currenttime;

  • How can I write from an Include?

    Hi to everybody!!
    I've a problem with my include...inside of this I've to write '2'. for make this I put...
    write: '2'.
    But when I execute the program... the number 2 doesn't appears, somebody told me that I need to put the End-OF-SELECTION, but when I can't see it.
    Does anybody know how can I write something from an include?
    Thanks a lot.
    Regards,
    Rebeca

    Try this way...
    I don't where you placed the include , you place under the event and see.
    REPORT ZTEST.
    END-OF-SELECTION.
    INCLUDE ZINCLUDE.

  • How do we write technical specs?

    How do we write technical specs?

    Hi,
       The points to be included in technical specs are:
    Business Requirement
    From business standpoint describe:
    Objective - What the object(s) are supposed to accomplish?
    Purpose - Describe what are the purposes of these object(s)?
    Users - Describe who will use are these object(s)? And when? And where?
    Known Errors / Issues  - Describe any known errors and issues
    Provide Business Process and data flow diagram
    3.0     Detail Level Design
    3.1     Design Approach
    Provide technical design approach along with alternatives and driver that led to choosing a particular approach
    3.2     Detailed Design
    3.1.1     Technical Configuration Requirements
    What configuration is required to support this process?  Does this process require master data to be loaded?  Specify any application configuration settings, custom table entries, etc.
    3.1.2     Object List
    Give a list of the component/objects that need be created / modified.
    No.     Object Name     Object Type     Description
    1.               
    2.               
    3.               
    3.1.3     Object Relationships
    Provide pictorial representation of technical design and link it to the list of objects defined above.
    u2022     Object relationship diagram
    u2022     Data flow diagram
    u2022     Screen navigation diagram
    u2022     Use-case diagram
    4.0     Object details
    Provide detail for each object defined in 3.1.2
    4.1     Object Name 1
    4.1.1     Attributes
    4.1.2     List each tables and File Structure
    <Enter name(s) of the table(s) be used in the program>
    Object Name     
    Field     Short Text     Data Element
    / Field Type     Field Length     Additional info
    4.1.3     Function / Methods / processing logic
    <Enter name of the functional module used in the programs>
         <Indicate status keys and name of the function to be indicated for screens used in the module pool programs, if any>
    4.1.4     Interfaces / BDC mappings
    Non-EDI Interfaces / Data Mapping
    <For BDC, Run SHDB Transaction and give Session name. >
    <Embed Data Mapping Sheet here>
    <Third party tools such as IM/3>
    EDI Interfaces
         <Message type, Partner profile details>
    4.1.5     Technical configuration / Settings (Including printer settings)
    <Enter settings details >
    4.1.6     Events
    4.1.7     Screen
    Parameter / Select options (selection-screen)
    Screen Name     
    TYPE     Field     Field description     Table     Mandatory /  Non-mandatory     Match Code required  (Y / N)
    u2022     Field Validations
    u2022     Radio Groups
    u2022     Check Boxes
         Push Buttons for Drilldown reports on different levels
    Button     Field name      Drilldown from     Drilldown To
    Screen Layout (In case of Transactions)
         <Enclose the same if applicable and indicate to refer attached sheet>
    Navigation Diagram (or Screen flow)
    <Provide screen navigation diagram>
    4.1.8     Layout  and Presentation
    4.1.9     Sort Options
    4.1.10     <Enter your contents here>
    Report or file Layout (In case of Reports)
    <Enclose the same if applicable and indicate to refer attached sheet>
    < Provide additional information on expectation e.g. Download options>
    4.1.11     SAP Script Layout (In case of SAP Scripts)
              <Enclose the same if applicable and indicate to refer attached sheet>
    Logo for SAPScript in case of non-pre-printed stationary
              <Attach TIF file in Version 6.0 & above>
    Printing of SAPScript
    <Enter printer details, Attach hardcopy of pre-printed Stationary. >
    < Provide additional information on expectation e.g. Font type, size etc.>
    4.1.12     Special Requirements
    <Enter your contents here, if applicable>
    4.1.13     Authorization Check
    <Enter authorization checks to be incorporated, if required>
    4.1.14     Error Control and Handling
    What errors may occur and how they should be treated.
    Message Reference Number     Type
    [I,E,W]     Stop Program (Yes/No)     
    Message Text     Message Display [Selection screen, Popup, etc.]     Conditions Where the Message Should Occur
    999     E     Yes     { e.g. Account group excluded }     End of report     { e.g. If the group is excluded }
    4.1.15     Authorization Groups / Authorization Objects
         Please refer to the functional specification for the appropriate security levels.
    ABAP Considerations: Do any of the programs need special authorization groups, if so, explain?
    Do the users need special security profiles to execute the enhancement, if so, explain?
    {e.g. The transaction program will verify that the user has the correct authority on transaction entry. }
    4.1.16     Internationalization / Localization
    <Enter approach for language translation, currency conversion and compliance to legal requirement here>
    5.0     Test data and Conditions
    Determine how to validate the Object. (e.g. how do you make sure that the Report was run and has worked correctly?)  List any transactional data that will be used to validate the report both in a production state and for testing purposes (i.e. specific types of sales transactional data, adjustments, etc)
    <Enter test related data and testing conditions>
    <Enter Menu path for Transaction ><Enter details of Test Data / Test cases for program & users. >
    6.0     Implementation considerations
    6.1     Dependencies
    If the object has dependencies on the output of another enhancement, interface, background process, month end close, etc.
    6.2     Transitional considerations
    { e.g. If change is being implemented in phased manner, provide the impact of phased implementation on lifecycle and logic of the objects and related configuration and data elements }
    6.3     Related Documents
    { e.g. Give the reference or embed of all the documents related to the object }
    7.0     Basic assumptions (Notes) and limitations (constraints) of the system
    <Include here a description of the architectural constraints, and design assumptions from the perspective of requirements, development, testability and maintainability. >
    No.     Description     Comments / References
    1.          
    2.          
    3.          
    8.0     Open Issues
    <Enter comments/issues or Concerns that donu2019t logically fit in one of the other sections of the specification document. >
    Issue No.     Description     Comments / References
    1.          
    2.          
    3.

Maybe you are looking for

  • How do I add songs to my iTunes Store wish list on my iPod?

    How do I add a song to my iTunes wish list on my iPod? I keep looking up songs/albums I want to buy on my iPod Touch, but I can never add them to a wish list because I can't find the right button to push. I know the button is next to the price on the

  • Ever since upgrading to Firefox 4, my webpages load much much slower. How can I go back to the previous version of Firefox and keep my bookmarks, etc.?

    I don't have any details. The Question explains it all. We just upgraded from 1.5 Mbps to 18 Mbps download speed and webpages opened really quick until I downloaded and installed Firefox 4. I have Internet Explorer 9, but I do not use it. I would jus

  • Reg: Error in scheduling of production order

    Hi experts, I have an issue during creation of production order. During production order creation, if i am giving todays date as start data and scheduling type as forwards (1) and executing it, it is showing the following error message and it is auto

  • Help badly needed

    I just got my new nokia 5800 and i need some help as i am having trouble adding yahoo mail to my phone and how can i delete the email accounts i got wrong,as i can't see a place to do it either. Also what is IM and can you add google chat/yahoo messe

  • Why increase  sysaux tablespace

    Hi Experts, I have a bi-direction oracle 10GR2 stream in window 2003. I got a error message in alert. error 12801 in STREAMS process ORA-12801: error signaled in parallel query server P000 ORA-01653: unable to extend table SYS.STREAMS$_APPLY_SPILL_ME