Business Logic

HELLO,
I have gotten into a unique situation while builiding a business logic for below case. Here is how the process/contracts are set up. Fields: CLAIM_ID is unique and in order of the reciept of claim. M_ID is Member_ID. Reserve_Date
is when Member reserved the Product. Rent_Cost is product rent cost listed in system. Sales Tax is 7% of Rent_Cost. ACC_Rent_Cost is accumulated (rent cost + sales tax), Also can be described as YTD Rent Cost by member by year order by reserve_date, claim_id).
There are two threshholds in this process. 1. ACC_RENT_COST = $200 2. ACC_M_PAID = $400. The fields needed to be calculated are M_PAID, ACC_M_PAID. ( I believe both have to be calculated together claim by claim for this logic to pull
correct numbers).
The terms for M_PAID: Member pays(M_PAID) 75% of the (Rent Cost + Sales Tax) for Product_type: PV6, PV4, DZD. Member pays(M_PAID) 50% of the (Rent Cost + Sales Tax) for all products but PV6, PV4 & DZD. Although, when member's ACC_RENT_COST > 200 THEN
Member pays(M_PAID) 100% of the (Rent Cost + Sales Tax) UNTIL when member's ACC_M_PAID reaches 400. When ACC_M_PAID reaches 400, on remaining amount and futures claims, member only pays(M_PAID) 10% of (rent cost + sales tax ) if (rent cost + sales tax ) > $10, else member pays (rent cost + sales tax ).
CO_PAID will be simply (Rent_Cost + Sales_Tax - M_PAID ) per CLAIM.
Here is walkthrough of M001 from below data:
Total Claims = 6.
CLAIM_ID = 1111: M_PAID = ( 25.06 + 1.75 ) * 50% = 13.41               ACC_M_PAID = 0
CLAIM_ID = 1112: M_PAID = ( 12.06 + 0.84 ) * 50% = 6.45                 ACC_M_PAID = 13.41
CLAIM_ID = 1113: M_PAID = ( 25.06 + 1.75 ) * 50% = 13.41               ACC_M_PAID = 19.86
CLAIM_ID = 1114: M_PAID = ( 25.06 + 1.75 ) * 50% = 13.41               ACC_M_PAID = 33.26
CLAIM_ID = 1115: M_PAID = ( (200(THRESHOLD) - 93.33(ACC_RENT_COST) ) * 75%) + ( ( 125.06 + 8.76 ) - (200(THRESHOLD) - 93.33(ACC_RENT_COST) ) * 100% ) = 107.15                 ACC_M_PAID = 46.67
CLAIM_ID = 1116: M_PAID = ( ( 400(THRESHOLD) - 153.82(ACC_M_PAID )* 100% ) +  ( ( 525.06 + 36.75 ) - ( 400(THRESHOLD) - 153.82(ACC_M_PAID ) ) ) * 10% )                                  ACC_M_PAID = 153.82Again, it seems as if M_PAID, ACC_M_PAID are dependend on each other because the way M_PAID terms are set up which is what I am unable to build logic for. Anyways, Please let me know if I can provide any more detail. Below is sample
data and required result.
--DROP TABLE TMP_COST ;
CREATE TABLE TMP_COST (
CLAIM_ID    VARCHAR2(4),
M_ID    VARCHAR2(4),
RESERVE_DATE    DATE,
RENT_COST    FLOAT,
SALES_TAX   FLOAT,
M_PAID  FLOAT,
ACC_M_PAID  FLOAT,
ACC_RENT_COST   FLOAT,
CO_PAID FLOAT,
PRODUCT_TYPE    VARCHAR2(3),
MEMBER_TYPE     VARCHAR2(3) ) ;
COMMIT ;
INSERT INTO TMP_COST ( CLAIM_ID, M_ID, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, PRODUCT_TYPE, MEMBER_TYPE ) VALUES ( '1111', 'M001', '21-JAN-2011', 25.06, 1.75, 0, 0, 0, 0, 'PV3', 'P' ) ;
INSERT INTO TMP_COST ( CLAIM_ID, M_ID, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, PRODUCT_TYPE, MEMBER_TYPE ) VALUES ( '1112', 'M001', '21-JAN-2011', 12.06, 0.84, 0, 0, 26.81, 0, 'DSD', 'P' ) ;
INSERT INTO TMP_COST ( CLAIM_ID, M_ID, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, PRODUCT_TYPE, MEMBER_TYPE ) VALUES ( '1113', 'M001', '23-JAN-2011', 25.06, 1.75, 0, 0, 39.71, 0, 'PV3', 'P' ) ;
INSERT INTO TMP_COST ( CLAIM_ID, M_ID, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, PRODUCT_TYPE, MEMBER_TYPE ) VALUES ( '1114', 'M001', '24-JAN-2011', 25.06, 1.75, 0, 0, 66.52, 0, 'PV3', 'P' ) ;
INSERT INTO TMP_COST ( CLAIM_ID, M_ID, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, PRODUCT_TYPE, MEMBER_TYPE ) VALUES ( '1115', 'M001', '21-MAR-2011', 125.06, 8.76, 0, 0, 93.33, 0, 'PV4', 'P' ) ;
INSERT INTO TMP_COST ( CLAIM_ID, M_ID, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, PRODUCT_TYPE, MEMBER_TYPE ) VALUES ( '1116', 'M001', '21-APR-2011', 525.06, 36.75, 0, 0, 227.15, 0, 'DZD', 'P' ) ;
INSERT INTO TMP_COST ( CLAIM_ID, M_ID, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, PRODUCT_TYPE, MEMBER_TYPE ) VALUES ( '1117', 'M002', '21-JAN-2011', 125.06, 8.76, 0, 0, 0, 0, 'PV4', 'P' ) ;
INSERT INTO TMP_COST ( CLAIM_ID, M_ID, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, PRODUCT_TYPE, MEMBER_TYPE ) VALUES ( '1118', 'M002', '21-FEB-2011', 1000.06, 70, 0, 0, 133.82, 0, 'PV6', 'P' ) ;
INSERT INTO TMP_COST ( CLAIM_ID, M_ID, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, PRODUCT_TYPE, MEMBER_TYPE ) VALUES ( '1119', 'M002', '21-MAR-2011', 25.06, 1.75, 0, 0, 1203.88, 0, 'PV3', 'P' ) ;
INSERT INTO TMP_COST ( CLAIM_ID, M_ID, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, PRODUCT_TYPE, MEMBER_TYPE ) VALUES ( '1120', 'M002', '21-APR-2011', 25.06, 1.75, 0, 0, 1230.69, 0, 'PV3', 'P' ) ;
INSERT INTO TMP_COST ( CLAIM_ID, M_ID, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, PRODUCT_TYPE, MEMBER_TYPE ) VALUES ( '1121', 'M003', '21-JAN-2011', 5.06, 0.35, 0, 0, 5.41, 0, 'PV1', 'P' ) ;
INSERT INTO TMP_COST ( CLAIM_ID, M_ID, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, PRODUCT_TYPE, MEMBER_TYPE ) VALUES ( '1122', 'M003', '21-JAN-2011', 25.06, 1.75, 0, 0, 5.41, 0, 'PV3', 'P' ) ;
INSERT INTO TMP_COST ( CLAIM_ID, M_ID, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, PRODUCT_TYPE, MEMBER_TYPE ) VALUES ( '1123', 'M004', '21-JAN-2011', 25.06, 1.75, 0, 0, 0, 0, 'PV3', 'P' ) ;
INSERT INTO TMP_COST ( CLAIM_ID, M_ID, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, PRODUCT_TYPE, MEMBER_TYPE ) VALUES ( '1124', 'M005', '21-JAN-2011', 1000.06, 70, 0, 0, 0, 0, 'PV6', 'P' ) ;
INSERT INTO TMP_COST ( CLAIM_ID, M_ID, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, PRODUCT_TYPE, MEMBER_TYPE ) VALUES ( '1125', 'M005', '21-APR-2011', 25.06, 1.75, 0, 0, 1070.06, 0, 'PV3', 'P' ) ;
COMMIT ;Results
CLAIM_ID     M_ID     RESERVE_DATE     RENT_COST     SALES_TAX     M_PAID     ACC_M_PAID     ACC_RENT_COST     CO_PAID     PRODUCT_TYPE     MEMBER_TYPE
1111     M001     01/21/2011 00:00:00     25.06     1.75     13.41     0.00     0.00     13.41     PV3     P
1112     M001     01/21/2011 00:00:00     12.06     0.84     6.45     13.41     26.81     6.45     DSD     P
1113     M001     01/23/2011 00:00:00     25.06     1.75     13.41     19.86     39.71     13.41     PV3     P
1114     M001     01/24/2011 00:00:00     25.06     1.75     13.41     33.26     66.52     13.41     PV3     P
1115     M001     03/21/2011 00:00:00     125.06     8.76     107.15     46.67     93.33     26.67     PV4     P
1116     M001     04/21/2011 00:00:00     525.06     36.75     277.75     153.82     227.15     284.06     DZD     P
1117     M002     01/21/2011 00:00:00     125.06     8.76     100.37     0.00     0.00     33.46     PV4     P
1118     M002     02/21/2011 00:00:00     1000.06     70     419.69     100.37     133.82     650.37     PV6     P
1119     M002     03/21/2011 00:00:00     25.06     1.75     2.68     520.06     1203.88     24.13     PV3     P
1120     M002     04/21/2011 00:00:00     25.06     1.75     2.68     522.74     1230.69     24.13     PV3     P
1121     M003     01/21/2011 00:00:00     5.06     0.35     2.71     0.00     0.00     2.71     PV1     P
1122     M003     01/21/2011 00:00:00     25.06     1.75     13.41     2.71     5.41     13.41     PV3     P
1123     M004     01/21/2011 00:00:00     25.06     1.75     13.41     0.00     0.00     13.41     PV3     P
1124     M005     01/21/2011 00:00:00     1000.06     70     597.01     0.00     0.00     473.05     PV6     P
1125     M005     04/21/2011 00:00:00     25.06     1.75     2.68     597.01     1070.06     24.13     PV3     PI appreciate your time.
Edited by: 788729 on May 14, 2011 5:18 PM

Hi,
First, I apoogize. I miscalculated few things and also didn't read full contract. There are few more terms that are included in the contract for the crossover claims(claims that fall in two phases) and few other scenarios/challenges.
1. PHASE-1: ACC_RENT_COST = $0 to $2840 PHASE-2: ACC_M_PAID = After ACC_RENT_COST - $2840 but before ACC_M_PAID - $4550. PHASE-3: After ACC_M_PAID of $4550. The fields needed to be calculated are M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, MBR_DSCNT.
( AGAIN, all these fields are depended on each other especially ACC_RENT_COST AND ACC_M_PAID to determine in what phase the member is in during each claim ). You are a genious. I believe you already know how to resolve that part. Everything should be sorted by CLM_RECIEVE_DATE to CALCULATE ACCUMULATED fields.
The terms for M_PAID:
1. Before Phase-1 threshold -- Member pays(M_PAID) MBR_CAP rate based on ITEM_ROW. MBR_CAP are given in below table. These CAP rates apply until ACC_RENT_COST reaches 2840. Please note that for ITEM_ROW 4, member pays
33% of the (RENT_COST+SALES_TAX).
2. After Phase-1 but before Phase-2: Member pays(M_PAID) following ways:
1. If PRODUCT_CODE = P then M_PAID = 93% of the (RENT_COST + SALES_TAX). This is what goes into ACC_M_PAID.
2. AA - If PRODUCT_CODE = V and LABEL_TYPE starts with 5 (so all 500 series) then M_PAID = ((RENT_COST+SALES_TAX)-(RENT_COST/2)). The remaining RENT_COST/2 goes to MBR_DSCNT. Although
ENTIRE AMOUNT (M_PAID + MBR_DSCNT) goes into ACC_M_PAID.
BB - If PRODUCT_CODE = V and LABEL_TYPE doesn't start with 5 then M_PAID = (RENT_COST+SALES_TAX). 0 goes to MBR_DSCNT. This also counts in ACC_M_PAID.
3. In Phase -3 -- Member pays if PRODUCT_CODE = P then Greater of $2.5 or 5% of remaining or full amount
if PRODUCT_CODE = V then Greater of $6.30 or 5% of remaining or full amount.
CO_PAID will simply be ( RENT_COST + SALES_TAX - M_PAID - MBRDSCNT )
For claims that crossover 2 or more phases, M_PAID will be lesser of 100% of RENT_COST+SALES_TAX. Below is an example for
Here is walkthrough of M001 from below data:
Total Claims = 20.
CLAIM_ID = 1111: M_PAID = $20 (MBR_CAP for ITEM_ROW - 2) -- NO MBR_DSCNT even though LABEL_TYPE starts with 5.( bcz this is in phase 1)
CLAIM_ID = 1112: M_PAID = ( 60 + ( ( 2840 - 2310.52(ACC_RENT_COST) ) * 93% ) = 130.8 ( there is an error here. 60 is not added in this example but, logic needs to be built as if 60 CAP + 93% on remaining )
CLAIM_ID = 1113: M_PAID = ( 159 + 1.25 ) * 93% = 149.03
CLAIM_ID = 1114: M_PAID = ((1.21 + 1.95) - (( 1.21 + 1.95 ) * 50% )) = 2.55 Remaining (1.21+1.95)*50% goes to MBR_DSCNT --Please note that entire M_PAID + MBR_DSCNT goes into ACC_M_PAID.
CLAIM_ID = 1115: M_PAID = ((14.26 + 1.95 ) * 93% ) = 15.08
skipping because of same logic
CLAIM_ID = 1124: M_PAID = ((4550 - 4190.2(ACC_M_PAID))/2 + greater of $6.30 or 5% of ( (2306.2 + 1.25 ) - ((4550 - 4190.2(ACC_M_PAID)) which is 97.38 so total M_PAID = 277.28 Please note that both MBR_DSCNT & M_PAID
were deducteed to get remaining balance * applied 5% on that.
CLAIM_ID = 1127 : M_PAID = $2.5 or 5% of (RENT_COST + SALES_TAX). In this case, $2.5 is greater so M_PAID = $2.5
Again, I really really appreciate your time and effort. I hope this is great challenege and learning experience for you. If you have any questions, please let me know. Sorry agaoin for incomplete info on previous post.
DROP TABLE TMP_COST ;
CREATE TABLE TMP_COST (
CLAIM_ID    VARCHAR2(4),
M_ID    VARCHAR2(4),
CLM_RECEIVE_DATE    VARCHAR2(255),
LABEL_TYPE  VARCHAR2(3),
PRODUCT_CODE  VARCHAR2(1),
ITEM_ROW    VARCHAR2(1),
RESERVE_DATE    DATE,
RENT_COST    FLOAT,
SALES_TAX   FLOAT,
M_PAID  FLOAT,
ACC_M_PAID  FLOAT,
ACC_RENT_COST   FLOAT,
CO_PAID FLOAT,
MBR_DSCNT   FLOAT,
MBR_CAP FLOAT ) ;
COMMIT ;
INSERT INTO TMP_COST ( CLAIM_ID, M_ID, CLM_RECEIVE_DATE, LABEL_TYPE, PRODUCT_CODE, ITEM_ROW, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, MBR_DSCNT, MBR_CAP ) VALUES ( '1111', 'M001', '2011-01-05-16.31.47.000000', '551', 'V', '2', '04-JAN-2011', 2306.2, 1.25, 0, 0, 0, 0, 0, 20 ) ;
INSERT INTO TMP_COST ( CLAIM_ID, M_ID, CLM_RECEIVE_DATE, LABEL_TYPE, PRODUCT_CODE, ITEM_ROW, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, MBR_DSCNT, MBR_CAP ) VALUES ( '1112', 'M001', '2011-01-07-19.17.26.000000', '221', 'P', '3', '04-JAN-2011', 668.88, 1.25, 0, 0, 0, 0, 0, 60 ) ;
INSERT INTO TMP_COST ( CLAIM_ID, M_ID, CLM_RECEIVE_DATE, LABEL_TYPE, PRODUCT_CODE, ITEM_ROW, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, MBR_DSCNT, MBR_CAP ) VALUES ( '1113', 'M001', '2011-01-07-19.18.05.000000', '223', 'P', '3', '04-JAN-2011', 159, 1.25, 0, 0, 0, 0, 0, 60 ) ;
INSERT INTO TMP_COST ( CLAIM_ID, M_ID, CLM_RECEIVE_DATE, LABEL_TYPE, PRODUCT_CODE, ITEM_ROW, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, MBR_DSCNT, MBR_CAP ) VALUES ( '1114', 'M001', '2011-01-14-18.47.44.000000', '551', 'V', '1', '14-JAN-2011', 1.21, 1.95, 0, 0, 0, 0, 0, 0 ) ;
INSERT INTO TMP_COST ( CLAIM_ID, M_ID, CLM_RECEIVE_DATE, LABEL_TYPE, PRODUCT_CODE, ITEM_ROW, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, MBR_DSCNT, MBR_CAP ) VALUES ( '1115', 'M001', '2011-01-19-23.02.32.000000', '279', 'P', '1', '19-JAN-2011', 14.26, 1.95, 0, 0, 0, 0, 0, 0 ) ;
INSERT INTO TMP_COST ( CLAIM_ID, M_ID, CLM_RECEIVE_DATE, LABEL_TYPE, PRODUCT_CODE, ITEM_ROW, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, MBR_DSCNT, MBR_CAP ) VALUES ( '1116', 'M001', '2011-02-08-16.44.54.000000', '297', 'P', '3', '08-FEB-2011', 668.88, 1.25, 0, 0, 0, 0, 0, 60 ) ;
INSERT INTO TMP_COST ( CLAIM_ID, M_ID, CLM_RECEIVE_DATE, LABEL_TYPE, PRODUCT_CODE, ITEM_ROW, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, MBR_DSCNT, MBR_CAP ) VALUES ( '1117', 'M001', '2011-02-08-16.45.25.000000', '288', 'P', '3', '08-FEB-2011', 159, 1.25, 0, 0, 0, 0, 0, 60 ) ;
INSERT INTO TMP_COST ( CLAIM_ID, M_ID, CLM_RECEIVE_DATE, LABEL_TYPE, PRODUCT_CODE, ITEM_ROW, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, MBR_DSCNT, MBR_CAP ) VALUES ( '1118', 'M001', '2011-02-08-16.46.24.000000', '287', 'P', '1', '08-FEB-2011', 5.44, 1.25, 0, 0, 0, 0, 0, 0 ) ;
INSERT INTO TMP_COST ( CLAIM_ID, M_ID, CLM_RECEIVE_DATE, LABEL_TYPE, PRODUCT_CODE, ITEM_ROW, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, MBR_DSCNT, MBR_CAP ) VALUES ( '1119', 'M001', '2011-02-08-16.47.54.000000', '553', 'V', '2', '08-FEB-2011', 2306.2, 1.25, 0, 0, 0, 0, 0, 20 ) ;
INSERT INTO TMP_COST ( CLAIM_ID, M_ID, CLM_RECEIVE_DATE, LABEL_TYPE, PRODUCT_CODE, ITEM_ROW, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, MBR_DSCNT, MBR_CAP ) VALUES ( '1120', 'M001', '2011-02-15-14.25.54.000000', '501', 'V', '1', '15-FEB-2011', 2.42, 1.95, 0, 0, 0, 0, 0, 0 ) ;
INSERT INTO TMP_COST ( CLAIM_ID, M_ID, CLM_RECEIVE_DATE, LABEL_TYPE, PRODUCT_CODE, ITEM_ROW, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, MBR_DSCNT, MBR_CAP ) VALUES ( '1121', 'M001', '2011-03-02-16.46.15.000000', '289', 'P', '3', '02-MAR-2011', 668.88, 1.25, 0, 0, 0, 0, 0, 60 ) ;
INSERT INTO TMP_COST ( CLAIM_ID, M_ID, CLM_RECEIVE_DATE, LABEL_TYPE, PRODUCT_CODE, ITEM_ROW, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, MBR_DSCNT, MBR_CAP ) VALUES ( '1122', 'M001', '2011-03-02-16.48.52.000000', '268', 'P', '3', '02-MAR-2011', 159, 1.25, 0, 0, 0, 0, 0, 60 ) ;
INSERT INTO TMP_COST ( CLAIM_ID, M_ID, CLM_RECEIVE_DATE, LABEL_TYPE, PRODUCT_CODE, ITEM_ROW, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, MBR_DSCNT, MBR_CAP ) VALUES ( '1123', 'M001', '2011-03-02-16.50.46.000000', '267', 'P', '1', '02-MAR-2011', 5.44, 1.25, 0, 0, 0, 0, 0, 0 ) ;
INSERT INTO TMP_COST ( CLAIM_ID, M_ID, CLM_RECEIVE_DATE, LABEL_TYPE, PRODUCT_CODE, ITEM_ROW, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, MBR_DSCNT, MBR_CAP ) VALUES ( '1124', 'M001', '2011-03-02-16.52.11.000000', '564', 'V', '2', '02-MAR-2011', 2306.2, 1.25, 0, 0, 0, 0, 0, 20 ) ;
INSERT INTO TMP_COST ( CLAIM_ID, M_ID, CLM_RECEIVE_DATE, LABEL_TYPE, PRODUCT_CODE, ITEM_ROW, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, MBR_DSCNT, MBR_CAP ) VALUES ( '1125', 'M001', '2011-03-08-05.20.54.000000', '227', 'P', '1', '08-MAR-2011', 14.26, 1.95, 0, 0, 0, 0, 0, 0 ) ;
INSERT INTO TMP_COST ( CLAIM_ID, M_ID, CLM_RECEIVE_DATE, LABEL_TYPE, PRODUCT_CODE, ITEM_ROW, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, MBR_DSCNT, MBR_CAP ) VALUES ( '1126', 'M001', '2011-03-23-18.00.36.000000', '551', 'V', '2', '23-MAR-2011', 2306.2, 1.25, 0, 0, 0, 0, 0, 20 ) ;
INSERT INTO TMP_COST ( CLAIM_ID, M_ID, CLM_RECEIVE_DATE, LABEL_TYPE, PRODUCT_CODE, ITEM_ROW, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, MBR_DSCNT, MBR_CAP ) VALUES ( '1127', 'M001', '2011-03-23-18.18.17.000000', '254', 'P', '1', '23-MAR-2011', 5.44, 1.25, 0, 0, 0, 0, 0, 0 ) ;
INSERT INTO TMP_COST ( CLAIM_ID, M_ID, CLM_RECEIVE_DATE, LABEL_TYPE, PRODUCT_CODE, ITEM_ROW, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, MBR_DSCNT, MBR_CAP ) VALUES ( '1128', 'M001', '2011-03-23-18.21.32.000000', '241', 'P', '3', '23-MAR-2011', 668.88, 1.25,  0, 0, 0, 0, 0, 60 ) ;
INSERT INTO TMP_COST ( CLAIM_ID, M_ID, CLM_RECEIVE_DATE, LABEL_TYPE, PRODUCT_CODE, ITEM_ROW, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, MBR_DSCNT, MBR_CAP ) VALUES ( '1129', 'M001', '2011-03-23-18.23.38.000000', '246', 'P', '4', '23-MAR-2011', 159, 1.25, 0, 0, 0, 0, 0, 0.33 ) ;
INSERT INTO TMP_COST ( CLAIM_ID, M_ID, CLM_RECEIVE_DATE, LABEL_TYPE, PRODUCT_CODE, ITEM_ROW, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, MBR_DSCNT, MBR_CAP ) VALUES ( '1130', 'M001', '2011-03-28-16.05.06.000000', '599', 'V', '4', '25-MAR-2011', 155.38, 1.95, 0, 0, 0, 0, 0, 0.33 ) ;
COMMIT ;Results:
CLAIM_ID     M_ID     CLM_RECEIVE_DATE     LABEL_TYPE     PRODUCT_CODE     ITEM_ROW     RESERVE_DATE     RENT_COST     SALES_TAX     M_PAID     ACC_M_PAID     ACC_RENT_COST     CO_PAID     MBR_DSCNT
1111     M001     2011-01-05-16.31.47.000000     551     V     2     01/04/2011 00:00:00     2306.2     1.25     20     0     0     2287.45     0
1112     M001     2011-01-07-19.17.26.000000     221     P     3     01/04/2011 00:00:00     668.88     1.25     130.8     20     2310.52     539.33     0
1113     M001     2011-01-07-19.18.05.000000     223     P     3     01/04/2011 00:00:00     159     1.25     149.03     150.8     2980.65     11.22     0
1114     M001     2011-01-14-18.47.44.000000     551     V     1     01/14/2011 00:00:00     1.21     1.95     2.55     299.83     3140.9     0     0.61
1115     M001     2011-01-19-23.02.32.000000     279     P     1     01/19/2011 00:00:00     14.26     1.95     15.08     306.36     3147.68     1.13     0
1116     M001     2011-02-08-16.44.54.000000     297     P     3     02/08/2011 00:00:00     668.88     1.25     623.22     321.44     3163.89     46.91     0
1117     M001     2011-02-08-16.45.25.000000     288     P     3     02/08/2011 00:00:00     159     1.25     149.03     944.66     3834.02     11.22     0
1118     M001     2011-02-08-16.46.24.000000     287     P     1     02/08/2011 00:00:00     5.44     1.25     6.22     1093.69     3994.27     0.47     0
1119     M001     2011-02-08-16.47.54.000000     553     V     2     02/08/2011 00:00:00     2306.2     1.25     1154.35     1099.91     4000.96     0     1153.1
1120     M001     2011-02-15-14.25.54.000000     501     V     1     02/15/2011 00:00:00     2.42     1.95     3.16     3407.36     6308.41     0     1.21
1121     M001     2011-03-02-16.46.15.000000     289     P     3     03/02/2011 00:00:00     668.88     1.25     623.22     3411.73     6312.78     46.91     0
1122     M001     2011-03-02-16.48.52.000000     268     P     3     03/02/2011 00:00:00     159     1.25     149.03     4034.95     6982.91     11.22     0
1123     M001     2011-03-02-16.50.46.000000     267     P     1     03/02/2011 00:00:00     5.44     1.25     6.22     4183.98     7143.16     0.47     0
1124     M001     2011-03-02-16.52.11.000000     564     V     2     03/02/2011 00:00:00     2306.2     1.25     277.28     4190.2     7149.85     1850.27     179.9
1125     M001     2011-03-08-05.20.54.000000     227     P     1     03/08/2011 00:00:00     14.26     1.95     2.5     4550     9457.3     13.71     0
1126     M001     2011-03-23-18.00.36.000000     551     V     2     03/23/2011 00:00:00     2306.2     1.25     115.37     4550     9473.51     2192.08     0
1127     M001     2011-03-23-18.18.17.000000     254     P     1     03/23/2011 00:00:00     5.44     1.25     2.5     4550     11780.96     4.19     0
1128     M001     2011-03-23-18.21.32.000000     241     P     3     03/23/2011 00:00:00     668.88     1.25     33.51     4550     11787.65     636.62     0
1129     M001     2011-03-23-18.23.38.000000     246     P     3     03/23/2011 00:00:00     159     1.25     8.01     4550     12457.78     152.24     0
1130     M001     2011-03-28-16.05.06.000000     599     V     3     03/25/2011 00:00:00     155.38     1.95     7.87     4550     12618.03     149.46     0Edited by: 788729 on May 14, 2011 5:20 PM

Similar Messages

  • Can we use WHO columns in Business Logic implementation

    Hi,
    Can we use WHO columns for business logic implementation..?
    From one table I need to pick up the latest record. I have a ActionDate column in the table which stores the date of the action.
    But on the same day there can be multiple action records. ie Multiple records have same ActionDate.
    Select * from action_table where action_date=(maximum action_date)
    The above query will return more than 1 record.
    Now can I use the Creation_Date which is a WHO column to identify the latest record..?
    Will it introduce any issues if I use creation_date WHO column?
    Usage of WHO column in application logic, Is it against the Standards ?
    Thanks a lot.

    I guess you are talking about populating the value using the history column creation_dt from EO.
    If so, you can use then. We are using them in all our applications to populate WHO columns of our table.
    Infact as far as I know, even Oracle application uses them.
    They generally populate the timestamp, so you may need to format them when doing date comparisons.
    Hope that helps.
    Amit

  • Problem in creating a callable object of type Business Logic

    Hi SDN,
    I am trying to create a callable object of type Business Logic in CE.
    When I give all information and click Next, I get this error message.
    Error while loading configuration dialog: Failed to create delegate for component com.sap.caf.eu.gp.ui.co.CExpConfig. (Hint: Is the corresponding DC deployed correctly? Does the DC contain the component?)
    Can anybody help me out with this problem.
    Regards,
    Sumangala

    Hi.
    I'm having the same problem as Senthil in NW2004s SP15 with my application service and methods not showing up in the Callable Object wizard for Composite Application Services after I choose the Endpoint.  The only application name that shows up in the wizard is caf.tc, and the only service names that show up for it are LDDataAccessor, Metadata, and PropPermissionService.
    My IDE is on one machine and the application server I deploy to is located on a different machine.  My endpoint to the remote application server looks to be correctly configured.  The Composite Application Service seems to be deployed properly as I'm able to see it and test that it works in the Web Services Navigator <http://remotehost:50000/wsnavigator/>
    My deployed application service is a remote enabled service and is also web services enabled as well.
    I'm not sure if this is relevant, but I noticed that the generated Java code does not create any remote EJB interfaces (only home and local interfaces were generated).
    Something else I noticed is that when I proceed to the External Service Configuration -> Business Entities screen <http://remotehost:50000/webdynpro/dispatcher/sap.com/cafUIconfiguration>, I only see three business entities displayed, and the following error message is displayed: "Corrupt metadata has been detected. This may prevent some objects from being displayed. Check the server log for more details."  I was unable to find anything in the instance log files.  Is the error message indicative of the problem?
    I am developing locally without a NetWeaver Development Infrastructure (NWDI) in place.
    I'm wondering if the credentials specified in the endpoint require any special roles or privileges.
    Senthil, do any of these additional descriptions apply to you as well?
    Edited by: Ric Leeds on Jun 20, 2008 4:37 PM

  • Future support for using PL/SQL core business logic with ADF BC

    We want to migrate our large Forms client/server (6i) application to ADF, possibly using a migration tool like Ciphersoft Exodus.
    One scenario could be to use ADF BC and ADF-Faces or a different JSF-Implementation for presentation and business layer but keep our heavy PL/SQL-businesslogic inside the Oracle database in packages, triggers, functions and procedures.
    This scenario could be chosen due to the huge amount of interconnected logic inside the database (10 years of development; no technical components; any package may access any table and more of this kind of dependencies). The business logic nowadays held in Forms client will be moved mainly into the database as a prerequisite to this scenario.
    Choosing this "keep-logic-in-DB"-scenario we need a good support by ADF BC to do so. We know and prototyped that it is possible to call some PL/SQL via JDBC from ADF BC and it is possible to use stored procedure calls for standard business entity data access (ins, del, upd, ..). But this does not solve our problems. We want to reuse core business logic coded in PL/SQL. This is much more than change the ADF standard behavior for an update with an own PL/SQL-call.
    Now my question:
    Will there be a kind of sophisticated support to use ADF BC in combination with database-kept logic?
    If so, when will this happen and how will the common problems of transactional state inside the database and inside the ADF BC be solved? Any plans or ideas yet?
    Many other clients do have similar applications built in Forms and PL/SQL and would be glad to hear about a path of direction.
    I've read the technical article 'understanding the ADF BC state management feature' which you have contributed to. One current limitation is pointed out there: Using PL/SQL with ADF BC limits ADF AM pooling to 'restricted level' which reduces scalability.
    Are you aware of additional main problems/tasks to solve when using PL/SQL heavily with ADF BC, which we have to think about?
    Thank you for any response.
    Ingmar

    My main problem is two 'concurrent' areas holding state in an application system based on DB-stored PL/SQL-logic in combination with ADF BC.
    For a new System everything can be made ok:
    Sure, it is possible to build a new system with the business logic included in ADF BC only. All long-living state will be handled in the BC layer ( including support for UnitsOfWork longer than the webside short HTTP-requests and HTTP-sessions and longer than the database transactions.
    For an old system these problems arise:
    1. DB data changes not reflected in BC layer:
    Our PL/SQL-logic changes data in tables without notifying the ADF BC layer (and its cache). To keep the data in ADF BC entity objects identical to the changed database content a synchronization is needed. BC does not know which part of the application data has been changed because it has not initiated the changes through its entity objects. Therefore a full refresh is needed. In a Forms4GL environment the behavior is similar: We do frequently requeries of all relevant (base)tables after calling database stored logic to be sure to get the changed data to display and to operate on it.
    -> Reengineering of the PL/SQL-logic to make the ADF BC layer aware of the changes is a big effort (notifying BC about any change)
    2. longer living database transactions
    Our PL/SQL-logic in some areas makes use of lengthy database transactions. The technical DB-transaction is similar to the UnitOfWork. If we call this existing logic from ADF BC, database state is produced which will not be DB-committed in the same cycle.
    This reduces scalability of ADF BC AM pooling.
    Example:
    a) Call a DB-stored logic to check if some business data is consistent and prepare some data for versioning. This starts a DB-transaction but does not commit it.
    b) Control is handed back to the user interface. Successful result of step a) is displayed
    c) User now executes the versioning operation
    d) Call another DB-stored logic to execute the versioning. DB-transaction is still open
    e) Business layer commits the transaction automatically after successful finishing step d). Otherwise everything from a) to e) is rolled back.
    -> redesign of this behavior (= cutting the 1to1 relation between LogicalUnitOfWork and the technicalDatabaseTransaction is a big effort due to the big amount of code.

  • Problem with Business Logic Services Logic Editor

    Hi,
    I am trying to go to Logic Editor under Business Logic Services. I'm getting error that "Unable to launch xMII"
    Is there any java related problem in my machine?
    Regards,
    Amalesh

    Amalesh,
    What version of xMII are you using 12.0 by chance.  If so goto the Java Web Start -> File -> Preferences -> and set your proxy to "None".  I would not recommend reinstalling Java as this will not solve your problem and if you are on xMII 12.0, the recommended version is 1.4.2_13 as a minimum.
    Regards,
    Erik

  • How To Set the Resultstate of Business Logic CO for Loop Decision Action

    Hi,
    I'm using a pre-conditional loop block in my GP process and using a Business Logic CO for the loop decision action. My expectation is the business logic CO should be executed at background and based on its resultstate the loop flow will happen. I've 2 resultstates in the loop decision (bus logic CO) - Continue and Break. I'm setting these two resultstates in the following way :
    Continue : BOOL(@currentLevel < @totalLevel)
    Break : !BOOL(@currentLevel < @totalLevel)
    currentLevel and totalLevel are the two input parameters (unsigned int type) of the business logic CO. If I test the CO it works fine and displays the correct resultstate. But at runtime the process gets paused at the loop decision action CO. I see the loop decision action link in my GP workcenter and UWL and on clicking of it nothing happens. If I refresh the screen still it's there as before.
    Anybody who can throw any light on this issue will be highly appreciated. And reward points guranteed for any help to solve the issue
    Thanks in advance,
    Dipankar

    Hi,
    Well I solved this issue myself ! After lot of research I found out that the resultstates should be in all small case <b>continue</b> and <b>break</b> and NOT Continue or Break.
    But now I've a different issue:
    I've an initial action under a sequential block. Then the pre-conditional loop block with a loop decision action and a loop body block(seq block).
    The expectation is initially the decision action should get the output param passed by the initial action and then in the iterations it will get the values passed by the output params of the loop body action. To achieve that I have mapped the output param of the initial action to the input param of the decision action and the input and output param of the loop body action. But it seems that the loop decision action though mapped to both the output of the initial action and the loop body action takes the value only from the initial action over the iterations and the values from the loop body action are not getting passed to the loop decision action. The context parameter value of the loop decision action remains static and it becomes an infinite loop.
    Any help to resolve this issue will be highly appreciated.
    Thanks,
    Dipankar

  • How to Display Multiple Rows in Business Logic Editor

    Hi Friends, I took the standard BAPI:   BAPI_MATERIAL_GETLIST and followed the SAP- xMII documentation. It is not showing any records. Does any one have good example. Please let me know.
    If I run the same BAPI from R3 system, it is showing 7 records.
    Can I display the data in Business Logic editor? Please help.

    Hi Dilip
              I have gone through your post and I think that the info provided by yu is not sufficent to answer yur question exactly but i would suggest yu the following solutions :-
    1. It may be the case that yu are not looping on the Response XML from the BAPI. You need to loop on the repeating node of the Response XML of the BAPI and on each loop yu need to append the record read to a xMII Output XML document using Row structure. Finally Yu can assign the document to the Output variable.
    2. Check for the type of Output Variable. I guess that it's String type. In that case, convert it to xml type.
    Hope it helps.
    Amit

  • BPEL Process with complex Business logic

    Hi,
    So far my knowledge,complex business logic can be implemented by different way in bpel process.
    1. Business rule
    2. ejb with java callout
    3.ADF BC as servcie
    Can anybody please suggest which approach do I need to follow,what are the pros and cons of each one,and best practices to use when and where?
    Thanx in advance.-Aswini

    Hi
    In addition to what Naresh already mentioned, you can consider these points also.
    1. If your process is complex, see if some part of the process can be common across and it can run by itself. Then you can use SubProcess concepts also. Say for example, if process involves credit card processing, it can be in a sub-process and you can call it in the main process. Like that any common approval flows can be put in a separate sub-process.
    2. I would discourage using Java invocations if possible as they have some limitations and you can use reasonable amout of code in invoking java code within the bpel process. If you have lots of validations to do on a bpel process, you can consider using CallBackHandlers and do the validation on a task assignment, submission or any task action in general.
    3. Business Rules can be used to control the actual flow of the process itself. Based on busiiness rule, you can decide if a set of tasks needs to be included or not in the approval flow. This is in addtion to the actual data that controls the business rules, that can be changed dynamically without the code change to core bpel process.
    Which version of SOA are you using or plan to use. I would recommend the latest version SOA 11.5 + Feature Pack applied.

  • How to display values after doing some business logic in data action

    hi guys i got the same problem but iam unable to display the values..in my display page when iam trying to do some business logic in my data action class..
    can u guys help me out
    iam pasting my code which iam working here
    my struts-config.xml
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
    <struts-config>
    <form-beans>
    <form-bean name="DataForm" type="oracle.adf.controller.struts.forms.BindingContainerActionForm"/>
    </form-beans>
    <action-mappings>
    <action path="/inputform" className="oracle.adf.controller.struts.actions.DataActionMapping" type="oracle.adf.controller.struts.actions.DataForwardAction" name="DataForm" parameter="/inputform.uix">
    <set-property property="modelReference" value="inputformUIModel"/>
    <forward name="success" path="/inputAction.do"/>
    </action>
    <action path="/inputAction" className="oracle.adf.controller.struts.actions.DataActionMapping" type="order.view.InputAction" name="DataForm">
    <set-property property="modelReference" value="displaypageUIModel"/>
    <forward name="success" path="/displaypage.do"/>
    </action>
    <action path="/displaypage" className="oracle.adf.controller.struts.actions.DataActionMapping" type="oracle.adf.controller.struts.actions.DataForwardAction" name="DataForm" parameter="/displaypage.uix">
    <set-property property="modelReference" value="displaypageUIModel"/>
    </action>
    </action-mappings>
    <message-resources parameter="order.view.ApplicationResources"/>
    </struts-config>
    my input form uix
    <?xml version="1.0" encoding="windows-1252"?>
    <page xmlns="http://xmlns.oracle.com/uix/controller"
    xmlns:ui="http://xmlns.oracle.com/uix/ui"
    xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
    xmlns:html="http://www.w3.org/TR/REC-html40"
    expressionLanguage="el">
    <content>
    <dataScope xmlns="http://xmlns.oracle.com/uix/ui">
    <provider>
    <!-- Add DataProviders (<data> elements) here -->
    </provider>
    <contents>
    <document>
    <metaContainer>
    <!-- Set the page title -->
    <head title=""/>
    </metaContainer>
    <contents>
    <body>
    <contents>
    <form name="form0" method="post">
    <contents>
    <messageTextInput model="${bindings.password}" text="username"/>
    <messageTextInput model="${bindings.username}" text="password"/>
    <submitButton text="submit" event="success" destination="inputAction.do"/>
    </contents>
    </form>
    </contents>
    </body>
    </contents>
    </document>
    </contents>
    </dataScope>
    </content>
    <handlers>
    <!-- Add EventHandlers (<event> elements) here -->
    </handlers>
    </page>
    my display uix
    <?xml version="1.0" encoding="windows-1252"?>
    <page xmlns="http://xmlns.oracle.com/uix/controller"
    xmlns:ui="http://xmlns.oracle.com/uix/ui"
    xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
    xmlns:html="http://www.w3.org/TR/REC-html40"
    expressionLanguage="el">
    <content>
    <dataScope xmlns="http://xmlns.oracle.com/uix/ui">
    <provider>
    <!-- Add DataProviders (<data> elements) here -->
    </provider>
    <contents>
    <document>
    <metaContainer>
    <!-- Set the page title -->
    <head title=""/>
    </metaContainer>
    <contents>
    <body>
    <contents>
    <form name="form0">
    <contents>
    <messageStyledText model="${bindings.password}" prompt="Prompt 0"/>
    <messageStyledText model="${bindings.username}" prompt="Prompt 1"/>
    </contents>
    </form>
    </contents>
    </body>
    </contents>
    </document>
    </contents>
    </dataScope>
    </content>
    <handlers>
    <!-- Add EventHandlers (<event> elements) here -->
    </handlers>
    </page>
    my model bean
    package order.model;
    public class TestBean
    private String username;
    private String password;
    public TestBean()
    public String getUsername()
    return username;
    public void setUsername(String username)
    this.username=username;
    System.out.println("the username after actions class:"+username);
    public String getPassword()
    return password;
    public void setPassword(String password)
    this.password=password;
    my data Action class
    package order.view;
    import oracle.adf.controller.struts.actions.DataAction;
    import oracle.adf.controller.struts.actions.DataActionContext;
    import oracle.jbo.uicli.binding.JUCtrlActionBinding;
    import oracle.jbo.uicli.binding.JUCtrlAttrsBinding;
    import order.model.TestBean;
    import org.apache.struts.action.ActionMapping;
    import org.apache.struts.action.ActionForward;
    public class InputAction extends DataAction
    * Delegate to the Struts page lifecycle implementation
    * {@link StrutsJspLifecycle#findForward findForward}
    * @param actionContext the lifecycle context for the DataAction
    * @throws Exception
    protected void findForward(DataActionContext actionContext) throws Exception
    // TODO: Override this oracle.adf.controller.struts.actions.DataAction method
    //super.findForward(actionContext);
    TestBean testbean=new TestBean();
    System.out.println("this is action form"+actionContext.getActionForm());
    String username=(String)((JUCtrlAttrsBinding)actionContext.getBindingContainer().findCtrlBinding("username")).getInputValue();
    System.out.println("this is username"+username);
    String username1=username+"hye wats up";
    testbean.setUsername(username1);
    ActionForward forward=actionContext.getActionForward();
    ActionMapping mapping =actionContext.getActionMapping();
    System.out.println("this is mapping"+mapping);
    mapping.findForward("success");
    // To handle an event named "yourname" add a method:
    // public void onYourname(DataActionContext ctx)
    // To override a method of the lifecycle, go to
    // the main menu "Tools/Override Methods...".
    check this out iam unable to display in my display page so help me out if any one can

    No, in this case, I'm using standard JSP with ADF and struts validator.
    If I don't use struts validator and there are errors (such as putting a string into a number which produces a jbo-25009), the list value will be retained.
    When using the validator, it appears that it is NOT retained.
    I've written some code to attempt to set the list element back, which "looks like" it's working right now.
    There's still a problem with the second scenario:
    1. user clicks checkbox and hits [submit]
    2. get's error - you have to enter 5 address items
    3. User wants to backout, so he unchecks the box and resubmits
    4. The box redisplays as "checked"
    SO, at that point, I thought... can't I use YOUR EXAMPLE on how to handle a checkbox.
    I place some code in the reset method of the form to perform this:
    map.put("AddressChangeFlag", (String) "" );
    (that is, I've detected via the request that this flag is null), so I'm trying to make sure it retains it!
    I do that and it runs into a problem during the processUpdateModel aT:
    BindingContainerValidationForm updateForm= (BindingContainerValidationForm) actionContext.getActionForm();
    //Get the binding for our particular column JUCtrlAttrsBinding checkBoxBinding = (JUCtrlAttrsBinding)updateForm.get("AddressChangeFlag");
    call, with an error:
    JBO-29000: Unexpected exception caught: java.lang.ClassCastException, msg=java.lang.String
    java.lang.String
    The value for updateForm.get("AddressChangeFlag") is "", which I'm assuming means the form field is no longer in the request object??
    I'm lost at this point, and have been working on it for more than 1 day.
    Thanks for responding though, and I await feedback ;)

  • Push messages from business logic into backing bean

    In my simple web application a table with the contents of a database table is shown to the client. Now I want this table in the browser to be updated each time the db table is updated. In my business logic a jms message is fired to a specified topic each time the db table is updated. The reverse ajax stuff needed for the client update is provided by the Icefaces jsf implementation. There is a backing bean for each session which is responsible for the server side rerendering of the client. Now my question is: How do I connect the bussiness logic firing a jms message if the db table is updated, with the backing bean?
    My thoughts:
    1. Create a message listener for the topic. Each time the message listener receives a message it notifies the backing beans of each session to rerender the client. But how does the message listener know about the backing beans?
    2. The backing bean responsible for rerendering the client adds itself as a listener. But where? As I understand it cannot be a backing bean and a jms MessageListener at the same time.
    Has anyone an idea/pattern for this problem?

    You could keep a list of beans that need to be notified in the application scope. (You should probably use weak references so that they may be garbage collected.) Then you JMS listener could get access to them.
    Somebody posted a thread recently where they were doing something very similar, you might want to try to find it.

  • Bean containing both UI components and business logic

    Hello  ADF design experts,  please guide me.   I came across a critical design aspects.  I have main page having bunch of UI components,   Region 1,  Region 2. I will have to bind the UI components of the page to a managed bean having session scope and the reason is,  when control goes to region 1 or region 2, I will be doing lot of  processing of business logic  and then based on this,  I will have to update the UI components of the page.   Same thing with region 2 also.  And then,  I should be able to access the information    across regions and also across other UI components etc.
    I am seeing only  session scoped bean will be able to help me here to get my tasks done across regions and across all other UI components of the page because I am not in a position to pass too many parameters across regions.     Now the problem is,  I can not serialize this bean  because as I mentioned  lot of UI components are updated based on logic. 
    If I do not serialize the bean, I may have problem in future when application has to be deployed to cluster envt.
    I do not know how should I go with my design now.   Please provide me brilliant ideas and very thankful to your guidance.
    thanks

    Hi ADF,
    I dont want to disturb the discussion with you and Alej. I'm rising some question from your first post.
    I have main page having bunch of UI components, 
    ok fine.
    Region 1,  Region 2. I will have to bind the UI components of the page to a managed bean having session scope
    1.why need to do this binding for all ui components .?
    2.this question lead ask another question are you using ADFBc.? if so binding layer will take care why you bind all those things.
    3.why you need to put session scope.?
    if you are using region. the region can only be bounded TF right, then communicate with help of pageflow. inside the bounded you may have jsff/jspx,
    reason is,  when control goes to region 1 or region 2, I will be doing lot of  processing of business logic  and then based on this,  I will have to update the UI components of the page.   Same thing with region 2 also.
    from the reason i have question? why you need to communicate between two region instead of using Taskflow communication.
    And then,  I should be able to access the information  across regions and also across other UI components etc.
    ok fine.
    I am seeing only  session scoped bean will be able to help me here to get my tasks done across regions and across all other UI components of the page because I am not in a position to pass too many parameters across regions.     Now the problem is,  I can not serialize this bean  because as I mentioned  lot of UI components are updated based on logic. 
    from my point of view. your are using all powerful feature session bean, region communication to do your requirement.
    mixing all those things so only you can't able to get consistent results.
    I do not know how should I go with my design now.
    could you please explain your usecase.
    Please provide me brilliant ideas and very thankful to your guidance.
    yeah sure. people will do.
    thanks

  • Unable to create Business logic Callable Object

    Hi All,
    We are working on CE 7.1 SDN trial version.
    while creating Business Logic Callble object, it is giving an error: Error while loading configuration dialog: Failed to create delegate for component com.sap.caf.eu.gp.ui.co.CExpConfig. (Hint: Is the corresponding DC deployed correctly? Does the DC contain the component?)
    Waht is the problem?.
    Thanks
    Sampath

    Hi All,
    when i try to create business logic CO, in Default Trace files it is giving following errrors:
    This callable object type is not deployed on the system: sap.com/cafeueruico~bi
    This callable object type is not deployed on the system: sap.com/cafcoregpuibackgroundco~admin
    This callable object type is not deployed on the system: sap.com/cafcoregpuivisibleco~admin
    This callable object type is not deployed on the system: sap.com/cafeueruico~r3transaction
    This callable object type is not deployed on the system: sap.com/cafeueruico~km
    Do we need to deploy any extra DCs.
    Sampath

  • Urgent: how to really seperate business logic class from data access class

    Hello,
    I've this problem here on my hand and i really need help urgently. so please allow me to thank anyone who replies to this thread =)
    Before i go any futhur, let me present a scenario. this will help make my question clearer.
    "A user choose to view his account information"
    here, i've attempted to do the following. i've tried to seperate my application into 3 layers, the GUI layer, the business logic layer, and the data access layer.
    classically, the GUI layer only knows which object it should invoke, for example in the case above, the GUI would instantiate an Account object and prob the displayAcctInfo method of the Account object.
    here is how my Account class looks like:
    public class Account
    private acctNo;
    private userid;
    private password;
    private Customer acctOwner;
    the way this class is being modelled is that there is a handle to a customer object.
    that being the case, when i want to retrieve back account information, how do i go about retrieveing the information on the customer? should my data access class have knowledge on how the customer is being programmed? ie setName, getName, setAge, getAge all these methods etc? if not, how do i restore the state of the Customer object nested inside?
    is there a better way to archieve the solution to my problem above? i would appriciate it for any help rendered =)
    Yours sincerely,
    Javier

    public class AccountThat looks like a business layer object to me.
    In a large application the GUI probably shouldn't ever touch business objects. It makes requests to the business layer for specific information. For example you might have a class called CustomerAccountSummary - the data for that might come entirely from the Account object or it might come from Account and Customer.
    When the GUI requests information it receives it as a 'primitive' - which is a class that has no behaviour (methods), just data. This keeps the interface between the GUI and business layer simple and makes it easier to maintain.
    When using a primitive there are four operations: query, create, update and delete.
    For a query the gui sets only the attributes in the primitive that will be specifically queried for (or a specialized primitive can be created for this.) The result of a query is either a single primitive or a collection of primitives. Each primitive will have all the attributes defined.
    For a create all of the attributes are set. The gui calls a method and passes the primtive.
    For an update, usually all fields are defined although this can vary. The gui calls a method and passes the primitive.
    For a delete, only the 'key' fields are set (more can be but they are not used.) The gui calls a method and passes the primitive.
    Also keep in mind that a clean seperation is always an idealization. For example verify that duplicate records are not created is a business logic requirement (the database doesn't care.) However, it is much easier and more efficient to handle that rule in the database rather than in the business layer.

  • What can be considered as the business logic of simple data entry form

    Hi all,
    I want to separate my applications logic into layers. It is a simple data entry form and doesn't contain any complex business logic. So I want to get this simple business logic to different layer. But the problem is, I cannot clearly identify what are business logic of this kind of simple data entry form.
    How do I separate business logic of this simple data entry form to another layer?
    any help is appreciated,
    Thanks in advance,
    Dil.

    dcminter wrote:
    It is a [form] and doesn't contain any complex business logic. So I want to get this simple business logic to different layer. But the problem is, I cannot clearly identify what are business logic of this kind of [form].Are you asking which bits are business logic?
    Suppose that the data comes into your system immaculate from some external system. Imagine that it will go out into some other system. The bits that you would still have to write are your business logic.That's a nice practical definition. Thank you, I'm stealing it.
    Also interesting to note that validation falls into that category... say you're recieving data from a magical external source... you still have to validate it.
    And of course you'd still have to store it somewhere, ans retrieve it.
    Yep, I definately like that definition.
    Cheers. Keith.

  • How to get Custom Time Correction business logic implement for ESS in R/3?

    Hi Experts,
    I am in trouble of implementing the custom requirement of correcting the time in ESS. I have to implement the time corrections as per business logic.
    Can any body tell me where to do this?
    What I need is suppose employee DWS is from 9:30 AM to 6:00 PM and suppose he forgot to punch the In time and then corects the entry for 9:30 AM in ESS then it get inserted into the R/3 data but now requirement is if support the employee has punched but at 10:00 AM and then corrects to 9:30 AM then it does not change the 10:00 AM and we wanna deleted these 10 AM entry.
    Thanks in advance.

    I have solved by created enhancement spot in PT_COR_REQ
    for method IF_EX_PT_COR_REQ~POST_VIA_BLOP
    Regards,
    Gaurav Patwari

  • Different business logic

    Hi Friends
    I have installed 0CML_DELTA extractions from business content and in my testing i found that for amount field the program logic is different than my business logic.That's why the amount field is not reflecting in BW with same amount.
    What sould i do to correct?
    Your reply would be appreciated with points.
    Regards,
    Chama.

    if the only problem is your amount, you can use a user-exit to overwrite the standard amount with the value that you want (with your own logic)
    if there are other issues, you are better off creating a new generic extractor with the same structure and put your business logic in a FM to pass data to BW

Maybe you are looking for

  • Doesn't "just work" - it just doesn't work

    While the 802.11n is certainly zippy, using the time capsule as a base station is a complete disaster. My airport express is now useless and not configurable (error -6765). Tech support says that apple has been aware of the problems but didn't have t

  • MDB Container Managed Transaction and Log4J

    Hi, I'm programming and MDB that reads and updates a database then sends out an HTTP Post and logs using log4j. I've read that when an MDB is configured as CMT or container managed transaction and the OnMessage method executes without errors, the tra

  • VOF dilemma - will stripping EXE's etc. hurt VOF?

    Dilemma - since VOF (Virus Outbreak Filters) are the last step in the message pipeline, do you hurt VOF performance by stripping attachments with filters? Specifically for attachment types you never would allow in anyway (EXE, COM, etc)? Scenario One

  • Incompatible versions -- gsearch.jsp

    When i enter http://localhost/ultrasearch/query/jsp/gsearch.jsp the page display Incompatible versions: PL/SQL Package Version: null Ultra Search Query Tool Version: 1.0.3.0.0

  • PSE-5 Photo Degradation HELP

    I am using PSE-5 on window XP media edition. I was opening 5, when all of a sudden it started adding photos that were already in my organizor. Of course, I hit the cancel button, and it closed. I then clicked on a recently added JPG and it was degrad