How to design this BO?

This picture shows the result which I want ,however,I don't konw how to design the BO! Can anybody help me ?
Best Regards!

Hi,
Have a main view with 3 viewcontainer ui elements. Have 3 more views, with each control in the view. Have 3 attributes defined in a node of the component controller, one each for the tree selection, ALV selection and button enabling. All these attributes will be of type char01. Map the component controller node to all your view nodes.
In the click event of the tree, set the first attribute. In the click event of the ALV, set the second attribute. In the wddoinit of the 3rd view, do a get_attribute to see if both the previous attributes are 'X'. Then do a set_attribute of the 3rd one. Bind the 3rd attribute to the 'Enabled' property of the button. By default it will be greyed out.
But why do you need each control in a separate view? You could very well place them in transparent containers or some other element inside the same view right? From your description, I dont really see a need for separate views.
Hope this helps.
Regards,
Nithya

Similar Messages

  • How to design this report ?

    Hi experts,
    How to design the customer total outstanding report as on a particular date ?
    We also want Debit amount and Credit amount in the query output..
    Regards,
    Nishuv V.

    HI,
    if u want the current date u go for the customer exit (that means daily)if he wants aparticular date then u go for the user entry variable in 0calday,in variable screen he sould mention the date for that date only the out standing report will come .0calday and customer u keep in rows and those debit and credit u keep in the columns.
    if daily as on date they want outstanding u go for the customer exit just u create the variable on 0calday with customer exit if variable name is 'zcedate' go to the tcode CMOD and write the below mention code.
    when 'zcedate'.
    clear l_s_range.
    l_s_range-sign = 'i'.
    l_s_range-opt = 'eq'.
    l_s_range-low = sy-datum.
    append l_s_range to e_t_range.
    Thanks  for giving this opportunity.
    Thanks & Regards
    k.sathish

  • How to design this complex report

    I'm getting crazy======
    my mdb file is like this.
    For example, "PointName" has many pointname, like C1, C2, C3..........,[they are vertical tunnels].
    For every point/tunnel, like C1,
    we mearsure it every few days, and get the displacement with the depth.
    Point C1 ---- 2014/2/19 ---- depth: -1 ---- it's displacement is 0.4
    And for the report, I want every point have a crosstab and graph.
    How to do this report, many thanks!!!

    Hi, Jamie
    I think I haven't say it clear. The final report is all C1 in one crosstab, all C2 in one crosstab.......this is the key.
    I followed as you say, it shows, there are many c1 and c2, and the crosstab is wrong.
    Then I tried to use subreport
    it shows
    I want one C1 and one C2 and so on, and all C1's data in one crosstab and all C2's data in one crosstab.
    That's it.
    A'm I clear? If not, please tell me. Thanks.

  • How to design this application with Struts?

    I want to disign an application like this:
    Input the students data to the database(or xml)
    e.g:student_id,student_name,subject_id,subject_name,achievement...
    If i submit one record each time, it's easy to do it.
    use the tag of Struts as:
    <html:form ...>
    <html:text property="student_id"/>
    <html:text property="student_name"/>
    <html:text property="achievement"/>
    </html:form>
    And then create an ActionForm which attributes are correspondint to these input fields and create the Getters and Setters.
    But,if i want to input multi-record(e.g:10 records each time), how can i design the input page and how can i design the ActionForm?
    Frustrating...

    You could use struts indexed properties.
    http://struts.apache.org/faqs/indexedprops.html
    It is quite fiddly, but it does work.

  • How to design this requirement  by GP, webdynpro, Adobe and UWL?

    The scenario is :
    The supplier logs in the SAP Portal
    1) The first screen should be WebDynpro  screen with some filter selection which have drop downs etc populating from R/3
    After selecting particular values and clicking on a button on screen an adobe form should open upon fetching detail from R/3
    2) This adobe form will have certian prefilled information and certian fields will be editable for the supplier to fill in.
    After the supplier fills in the remaining data he clicks on "Submit" button on the form (Assuming this is online scenario).
    3) Now this form should go for approval as line item in inbox (portal inbox can be UWL/GP).
    4) Once the manager clicks on the line item which has come for approval, on click the filled adobe form should open up and
    the Manager should have option to approve/reject. If approved the data should load in SAP R/3 (I assume to send data back to R/3 i will have to make this also WebDynpro  but how will it have the values that the supplier filled in and how can be it be open when clicked on line item in GP?)
    Note: This all has to be achieved by using WebDynpro  for Java/GP/Adobe, no SAP R/3 workflow has to be used.
    Kindly let me know how can I break this requirements into WebDynpro ,GP and adobe?
    Need Help in designing and whether its possible or not? Helpful answers will be rewarded.
    Regards,
    VD

    Hi Vishal,
    try this link...
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e0957cb6-5103-2a10-6d9d-a0a4d68c8bf1
    Regards,
    Sudheer.

  • How to design this requirement  by GP, Webdnpro , Adobe and UWL?

    The scenario is :
    The supplier logs in the SAP Portal
    1) The first screen should be WebDynpro  screen with some filter selection which have drop downs etc populating from R/3
    After selecting particular values and clicking on a button on screen an adobe form should open upon fetching detail from R/3
    2) This adobe form will have certian prefilled information and certian fields will be editable for the supplier to fill in.
    After the supplier fills in the remaining data he clicks on "Submit" button on the form (Assuming this is online scenario).
    3) Now this form should go for approval as line item in inbox (portal inbox can be UWL/GP).
    4) Once the manager clicks on the line item which has come for approval, on click the filled adobe form should open up and
    the Manager should have option to approve/reject. If approved the data should load in SAP R/3 (I assume to send data back to R/3 i will have to make this also WebDynpro  but how will it have the values that the supplier filled in and how can be it be open when clicked on line item in GP?)
    Note: This all has to be achieved by using WebDynpro  for Java/GP/Adobe, no SAP R/3 workflow has to be used.
    Kindly let me know how can I break this requirements into WebDynpro ,GP and adobe?
    Need Help in designing and whether its possible or not? Helpful answers will be rewarded.
    Regards,
    VD

    Hi vishal,
    We have similar requirement and currently I am working on it. One solution we have got is using portal database (MaxDB) for storing data temporarily.
    Once the employee submits the data, it is stored in MaxDB, later manager can fetch it from here, and once approved it will be updated in SAP backend. Later a WD application callable object can be created in GP.
    This link /people/karthikeyan.rammohan/blog/2007/12/06/jdbc-connectivity-with-webdynpro-and-max-db can help you in creating the table in database.
    Please let me know if you have any better ideas.
    Hope this helps you,
    Amit

  • How to Design this Class while Reding a Csv File.

    i[b] want to make this more Design orinted. This code is for reading A csv file and scnning it for Duplicate data in that Csv file.public Vector upLoadCsv(String csvFile) throws Exception
              boolean flag =false;
               Connection conn    = null;
             PreparedStatement  stmt    = null;
               Vector upload_data=new Vector();
               patternMapDescs = new Vector();
               patternFroms     = new Vector();
               patternTos     = new Vector();
               oprNetIds     = new Vector();
               circleIds     = new Vector();
               ldcaIds          = new Vector();
               sdcaIds          = new Vector();
         try{
              fileOut = new FileOutputStream(patrnBulkFailureFilePath, true);
              patternMapList=readFile(csvFile);
              System.out.println("PatternMapList is "+patternMapList); 
              Vector Patter_From=(Vector)patternMapList.get(0);
              Vector Pattern_To=(Vector)patternMapList.get(1);
              Vector Opr_Net_Id=(Vector)patternMapList.get(2);
              Vector Circle_Id=(Vector)patternMapList.get(3);
              Vector Ldca_Id=(Vector)patternMapList.get(4);
              Vector Sdca_Id=(Vector)patternMapList.get(5);
              Vector Msc_Id=(Vector)patternMapList.get(6);
              Vector Cell_Id=(Vector)patternMapList.get(7);
              Vector Pattern_Desc=(Vector)patternMapList.get(8);
              try
                        conn = DBHelper.getConnection();
                        System.out.println("Size is "+Patter_From.size());
                        for(int i=0;i<Patter_From.size();i++)
                             try
                             int result = 0;
                             System.out.println("Count value is "+i);
                             stmt = conn.prepareStatement("update lcorating.PATTERN_MAP set PATTERN_FROM=?,PATTERN_TO=?,OPR_NET_ID=?,CIRCLE_ID=?,LDCA_ID=?,SDCA_ID=?,MSC_ID=?,CELL_ID=?,PATTERN_DESC=? where pattern_from=? and pattern_to=?");                         
                             stmt.setString(1,(String)Patter_From.get(i));
                             stmt.setString(2,(String)Pattern_To.get(i));
                             stmt.setString(3,(String)Opr_Net_Id.get(i));
                             stmt.setString(4,(String)Circle_Id.get(i));
                             stmt.setString(5,(String)Ldca_Id.get(i));
                             stmt.setString(6,(String)Sdca_Id.get(i));
                             stmt.setString(7,(String)Msc_Id.get(i));
                             stmt.setString(8,(String)Cell_Id.get(i));
                             stmt.setString(9,(String)Pattern_Desc.get(i));
                             stmt.setString(10,(String)Patter_From.get(i));
                             stmt.setString(11,(String)Pattern_To.get(i));
                             result = stmt.executeUpdate();
                             System.out.println("result is "+result + "for "+(String)Patter_From.get(i));
              if(result==1)
                             upload_data.add((String)Patter_From.get(i));
                             upload_data.add((String)Pattern_To.get(i));
                             upload_data.add((String)Opr_Net_Id.get(i));
                             upload_data.add((String)Circle_Id.get(i));
                             upload_data.add((String)Ldca_Id.get(i));
                             upload_data.add((String)Sdca_Id.get(i));
                             upload_data.add((String)Msc_Id.get(i));
                             upload_data.add((String)Cell_Id.get(i));
                             upload_data.add((String)Pattern_Desc.get(i));
                             patternFroms.add((String)Patter_From.get(i));
                             patternTos.add((String)Pattern_To.get(i));
                             oprNetIds.add((String)Opr_Net_Id.get(i));
                             circleIds.add((String)Circle_Id.get(i));
                             ldcaIds.add((String)Ldca_Id.get(i));
                             sdcaIds.add((String)Sdca_Id.get(i));
                             patternMapDescs.add((String)Pattern_Desc.get(i));
                        if(result==0)
                             stmt = conn.prepareStatement("insert into lcorating.PATTERN_MAP values(?,?,?,?,?,?,?,?,?)");
                             stmt.setString(1,(String)Patter_From.get(i));
                             stmt.setString(2,(String)Pattern_To.get(i));
                             stmt.setString(3,(String)Opr_Net_Id.get(i));
                             stmt.setString(4,(String)Circle_Id.get(i));
                             stmt.setString(5,(String)Ldca_Id.get(i));
                             stmt.setString(6,(String)Sdca_Id.get(i));
                             stmt.setString(7,(String)Msc_Id.get(i));
                             stmt.setString(8,(String)Cell_Id.get(i));
                             stmt.setString(9,(String)Pattern_Desc.get(i));
                             stmt.executeUpdate();
    upload_data.add((String)Patter_From.get(i));
    upload_data.add((String)Pattern_To.get(i));
    upload_data.add((String)Opr_Net_Id.get(i));
    upload_data.add((String)Circle_Id.get(i));
    upload_data.add((String)Ldca_Id.get(i));
    upload_data.add((String)Sdca_Id.get(i));
    upload_data.add((String)Msc_Id.get(i));
    upload_data.add((String)Cell_Id.get(i));
    upload_data.add((String)Pattern_Desc.get(i));
                             catch(Exception e)
                                  System.out.println("Exception entry "+i);
                                  String strFailure = (String)Patter_From.get(i) + ","+
                                                           (String)Pattern_To.get(i) + ","+
                                                           (String)Opr_Net_Id.get(i) + ","+
                                                           (String)Circle_Id.get(i) + ","+
                                                           (String)Ldca_Id.get(i) + ","+
                                                           (String)Sdca_Id.get(i) + ","+
                                                           (String)Msc_Id.get(i) + ","+
                                                           (String)Cell_Id.get(i) + ","+
                                                           (String)Pattern_Desc.get(i)+ "," + new java.util.Date()+ "\n";
                                  System.out.println("writing "+ (String)Patter_From.get(i));
                                  fileOut.write(strFailure.getBytes());
                                  continue;
                        }catch(Exception e)
                             System.out.println("Excepion is "+e);                         
                   flag=true;
                   catch(Exception e)
                   flag=false;
                   System.out.println("Exception in Reading File===>"+e);
    System.out.println("Uploaded data is ");
    System.out.println(upload_data);
              return      upload_data;
    // This method "readFile"  Reads the CSV file in the form of StringToken
    private List readFile(String fileName)
              BufferedReader     br;
              String               record;
              StringTokenizer     st;
              Vector     vPatternFrom= new Vector();
              Vector vectorPatternFrom= new Vector();
              Vector vectorPatternTo= new Vector();
              Vector vectorOpertorNetworkId= new Vector();
              Vector vectorCircleId= new Vector();
              Vector vectorLdcaId= new Vector();
              Vector vectorSdcaId= new Vector();
              Vector vectorMscId= new Vector();
              Vector vectorCellId= new Vector();
              Vector vectorPatternDesc= new Vector();
              ArrayList totalList=new ArrayList();
              boolean isExist=false;
               boolean duplicateOrgNUmFlag=false;
              try
                   br = new BufferedReader(new InputStreamReader(new FileInputStream(fileName)));
                   while ((record = br.readLine()) != null)
                        st = new StringTokenizer(record,",");
                        try
                             while (st.hasMoreTokens())
                                  vPatternFrom.add(st.nextToken());
                                  vPatternFrom.add(st.nextToken());
                                  vPatternFrom.add(st.nextToken());
                                  vPatternFrom.add(st.nextToken());
                                  vPatternFrom.add(st.nextToken());
                                  vPatternFrom.add(st.nextToken());
                                  vPatternFrom.add(st.nextToken());
                                  vPatternFrom.add(st.nextToken());
                                  vPatternFrom.add(st.nextToken());     
                        catch(NoSuchElementException nseex)
                             System.out.println("Record without valid data :: " + record);
              catch(FileNotFoundException fnfex)
                   System.out.println("exception is"+fnfex.toString());
              catch (IOException ioex)
                   System.out.println("exception is"+ioex.toString());
              catch(Exception e){
                   System.out.println("praveen is stupid");
              System.out.println("vPatternFrom"+vPatternFrom);
              int noOfRecords = vPatternFrom.size();
              //System.out.println("Size of record is "+noOfRecords);
              for(int i=0;i<vPatternFrom.size();i=i+9)
                        String sPatternFrom=(String)vPatternFrom.get(i);
                        vectorPatternFrom.add(sPatternFrom);
                        String sPatternTo     =(String)vPatternFrom.get(i+1);
                        vectorPatternTo.add(sPatternTo);
                        String sOpertorNetworkId=(String)vPatternFrom.get(i+2);
                        vectorOpertorNetworkId.add(sOpertorNetworkId);
                        String sCircleId=(String)vPatternFrom.get(i+3);
                        vectorCircleId.add(sCircleId);
                        String sLdcaId=(String)vPatternFrom.get(i+4);     
                        vectorLdcaId.add(sLdcaId);
                        String sSdcaId=(String)vPatternFrom.get(i+5);
                        vectorSdcaId.add(sSdcaId);     
                        String sMscId=(String)vPatternFrom.get(i+6);
                        vectorMscId.add(sMscId);
                        String sCellId=(String)vPatternFrom.get(i+7);
                        vectorCellId.add(sCellId);
                        String sPatternDesc =(String)vPatternFrom.get(i+8);
                        vectorPatternDesc.add(sPatternDesc);
         totalList.add(vectorPatternFrom);
         totalList.add(vectorPatternTo);
         totalList.add(vectorOpertorNetworkId);
         totalList.add(vectorCircleId);
         totalList.add(vectorLdcaId);
         totalList.add(vectorSdcaId);
         totalList.add(vectorMscId);
         totalList.add(vectorCellId);
         totalList.add(vectorPatternDesc);
    ArrayList rrList=new ArrayList();
    try{
              rrList=verifyTotalPatternData(totalList);
    }catch(Exception e){
         System.out.println("excpetion is bothering");
              return rrList;
    public ArrayList verifyTotalPatternData(ArrayList totalList)
              Vector pattern_from=(Vector)totalList.get(0);
              Vector pattern_to=(Vector)totalList.get(1);
              Vector opr_net_id=(Vector)totalList.get(2);
              Vector circle_id=(Vector)totalList.get(3);
              Vector ldca_id=(Vector)totalList.get(4);
              Vector sdca_id=(Vector)totalList.get(5);
              Vector msc_id=(Vector)totalList.get(6);
              Vector cell_id=(Vector)totalList.get(7);
              Vector pattern_desc=(Vector)totalList.get(8);
              String strFailure = "";
              for(int i=0;i<pattern_from.size();i++){
                   for(int j=i+1;j<pattern_from.size();j++){
                        if((pattern_from.get(j)).equals(pattern_from.get(i))){
                             if((pattern_to.get(j)).equals(pattern_to.get(i))){
                                  try{
                                  strFailure=(String)pattern_from.get(i) + ","+
                                                 (String)pattern_to.get(i) + ","+
                                                 (String)opr_net_id.get(i) + ","+
                                                 (String)circle_id.get(i) + ","+
                                                 (String)ldca_id.get(i) + ","+
                                                 (String)sdca_id.get(i) + ","+
                                                 (String)msc_id.get(i) + ","+
                                                 (String)cell_id.get(i) + ","+
                                                 (String)pattern_desc.get(i) + "," + new java.util.Date()+"\n";
                                  //System.out.println("writing "+ (String)pattern_from.get(i));
                                  fileOut.write(strFailure.getBytes());
                                  catch(Exception e)
                                       System.out.println("Exception while adding entry in bulkFailureData.csv "+e);
                                  pattern_from.removeElementAt(j);
                                  pattern_to.removeElementAt(j);
                                  opr_net_id.removeElementAt(j);
                                  circle_id.removeElementAt(j);
                                  ldca_id.removeElementAt(j);
                                  sdca_id.removeElementAt(j);
                                  msc_id.removeElementAt(j);
                                  cell_id.removeElementAt(j);
                                  pattern_desc.removeElementAt(j);
                                  j--;
              ArrayList ret_list = new ArrayList();
              ret_list.add(pattern_from);
              ret_list.add(pattern_to);
              ret_list.add(opr_net_id);
              ret_list.add(circle_id);
              ret_list.add(ldca_id);
              ret_list.add(sdca_id);
              ret_list.add(msc_id);
              ret_list.add(cell_id);
              ret_list.add(pattern_desc);
              //System.out.println("The filtered list is "+ret_list);
              return ret_list;
         }

    I was bored, so I took a stab at cleaning your code up a bit. You need
    to take advantage of the Collections API, and you desparately
    need to learn how to use data structures. Some would argue
    that my get???Statement methods are really bad, fyi. They might
    very well be right -- it's hard to tell from the few methods provided.
    You should also take a serious look at Log4j, or at least the
    java standard logger.
    import java.io.BufferedReader;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.FileReader;
    import java.io.IOException;
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.sql.SQLException;
    import java.util.Collection;
    import java.util.HashSet;
    import java.util.Iterator;
    import java.util.Set;
    import java.util.Vector;
    public class Foo {
        private final FileOutputStream fileOut;       
        public Foo() throws FileNotFoundException {
            this.fileOut = new FileOutputStream(patrnBulkFailureFilePath, true);
        public Set uploadCsv(final String csvFile) {
            final Set uploadedData = new HashSet();
            Connection conn = null;
            Vector upload_data = new Vector();
            final Collection patternDataSet = this.readFile(csvFile);
            try {
                conn = DBHelper.getConnection();
                for (final Iterator i = patternDataSet.iterator(); i.hasNext(); ) {
                    final PatternData patternData = (PatternData) i.next();
                    final PreparedStatement updateStatement =
                        patternData.getUpdateStatement(conn);
                    try {
                        final int result = updateStatement.executeUpdate();
                        if (result == 1) {
                            uploadedData.add(patternData);
                        if (result == 0) {
                            final PreparedStatement insertStatement =
                                patternData.getInsertStatement(conn);
                            insertStatement.executeUpdate();
                            uploadedData.add(patternData);
                    } catch (final SQLException se) {
                        final String errorMsg =
                            patternData.toString() + "," +
                            System.currentTimeMillis();
                        this.fileOut.write(errorMsg.getBytes());
            } catch (final SQLException se) {
                System.err.println("Unexpected SQL Exception");
                se.printStackTrace(System.err);
            return uploadedData;
        private Collection readFile(final String fileName) {
            final FileReader fileReader;
            final BufferedReader bufferedReader;
            final Set patternData = new HashSet();
            try {
                fileReader = new FileReader(fileName);
                bufferedReader = new BufferedReader(fileReader);
                while (bufferedReader.ready()) {
                    final String dataLine = bufferedReader.readLine();
                    final String[] values = dataLine.split(",");
                    final PatternData data = new PatternData(values);
                    if (patternData.contains(data)) {
                        final String errorMsg =
                            data.toString() + "," + System.currentTimeMillis();
                        this.fileOut.write(errorMsg.getBytes());                   
                    } else {
                        patternData.add(new PatternData(values));
            } catch (final FileNotFoundException fnfe) {
                System.err.println("Unable to locate file: " + fileName);
            } catch (final IOException ioe) {
                System.err.println("Unexpected IO Exception");
                ioe.printStackTrace(System.err);
            return patternData;
        private static class PatternData {
            private final String patternFrom;
            private final String patternTo;
            private final String oprNetID;
            private final String circleID;
            private final String ldcaID;
            private final String sdcaID;
            private final String mscID;
            private final String cellID;
            private final String patternDesc;
            public PatternData(final String patternFrom, final String patternTo,
                    final String oprNetID, final String circleID, final String
                    ldcaID, final String sdcaID, final String mscID,
                    final String cellID, final String patternDesc) {
                this.patternFrom = patternFrom;
                this.patternTo = patternTo;
                this.oprNetID = oprNetID;
                this.circleID = circleID;
                this.ldcaID = ldcaID;
                this.sdcaID = sdcaID;
                this.mscID = mscID;
                this.cellID = cellID;
                this.patternDesc = patternDesc;
            public PatternData(final String[] dataValues)
            throws IllegalArgumentException {
                if (dataValues == null) {
                    throw new IllegalArgumentException("The dataValues " +
                            "parameter may not be null.");
                if (dataValues.length != 9) {
                    throw new IllegalArgumentException("The dataValues parameter " +
                            "must have a length of 9, not " + dataValues.length);
                this.patternFrom = dataValues[0];
                this.patternTo = dataValues[1];
                this.oprNetID = dataValues[2];
                this.circleID = dataValues[3];
                this.ldcaID = dataValues[4];
                this.sdcaID = dataValues[5];
                this.mscID = dataValues[6];
                this.cellID = dataValues[7];
                this.patternDesc = dataValues[8];
            public boolean equals(final Object obj) {
                if (this == obj) {
                    return true;
                if (!(obj instanceof PatternData)) {
                    return false;
                final PatternData otherData = (PatternData) obj;
                if (this.patternFrom.equals(otherData.patternFrom) &&
                        this.patternTo.equals(otherData.patternTo)) {
                    return true;
                return false;
            public int hashCode() {
                int hash = 17;
                hash = 37 * hash + this.patternFrom.hashCode();
                hash = 37 * hash + this.patternTo.hashCode();
                return hash;
            public String toString() {
                return this.patternFrom + "," + this.patternTo + "," +
                     this.oprNetID + "," + this.circleID + "," +
                     this.ldcaID + "," + this.sdcaID + "," + this.mscID + "," +
                     this.cellID + "," + this.patternDesc;
            public PreparedStatement getUpdateStatement(final Connection conn)
            throws SQLException {
                final PreparedStatement statement =
                    conn.prepareStatement("update lcorating.PATTERN_MAP set " +
                            "PATTERN_FROM=?,PATTERN_TO=?,OPR_NET_ID=?," +
                            "CIRCLE_ID=?,LDCA_ID=?,SDCA_ID=?,MSC_ID=?,CELL_ID=?" +
                            ",PATTERN_DESC=? where pattern_from=? and " +
                            "pattern_to=?");                                  
                statement.setString(1, this.patternFrom);
                statement.setString(2, this.patternTo);
                statement.setString(3, this.oprNetID);
                statement.setString(4, this.circleID);
                statement.setString(5, this.ldcaID);
                statement.setString(6, this.sdcaID);
                statement.setString(7, this.mscID);
                statement.setString(8, this.cellID);
                statement.setString(9, this.patternDesc);
                statement.setString(10, this.patternFrom);
                statement.setString(11, this.patternTo);
                return statement;
            public PreparedStatement getInsertStatement(final Connection conn)
            throws SQLException {
                final PreparedStatement statement =
                    conn.prepareStatement("insert into lcorating.PATTERN_MAP " +
                            "values(?,?,?,?,?,?,?,?,?)");
                statement.setString(1, this.patternFrom);
                statement.setString(2, this.patternTo);
                statement.setString(3, this.oprNetID);
                statement.setString(4, this.circleID);
                statement.setString(5, this.ldcaID);
                statement.setString(6, this.sdcaID);
                statement.setString(7, this.mscID);
                statement.setString(8, this.cellID);
                statement.setString(9, this.patternDesc);
                return statement;
    }

  • Help! How to design this mutithreading application??

    Hi, Guys
    I need some advise to meet following requirements. I have also posted how I have done it after the requirement. However, I am looking for better approaches, coz I think mine is not good enough. Can you please help to review it and let me what do you think from the architecture perspective?
    Briefly, the requirement as follows,
    The server should, upon starting up, load into memory a “dictionary” of synonyms words from a text file. The dictionary will be loaded in to a collection.
    The client, which should run in a separate JVM, should, upon starting, enter an iterative cycle in which it repeatedly asks the end user the meaning of a word chosen “at random” from the dictionary. The user’s answer should be checked against the dictionary. A correct answer is one which matches.
    The client must be as thin as possible, and must not cache dictionary contents.
    If, upon attempting to retrieve a question or validate an answer, the client experiences a problem communicating with the server it should automatically recover if the server becomes available again, however the current question may be discarded in this case.
    The dictionary may be huge containing hundreds of thousands of entries. It is most important that when the server is still loading the words, it be able to select random word from dictionary loaded so far and provide it as a question to client. Also, be able to check the answer returned from server is correct or not. So if the client has just restored contact with the server, there must be no noticeable delay before the first question is asked.
    The server should not employ any kind of polling when determining the current size of its in-memory dictionary. You should make best use of multi-threading in order to optimise the implementation.
    The server should allow large numbers of clients to connect to it simultaneously.
    You may use either RMI or Sockets (of the blocking variety) to implement inter-process communication.
    My answer:
    For the inter-process communication, I have used RMI to implements.
    The dictionary content has been stored in a concurrentHashMap.
    The key of the map is a single word and the value is the list of synonyms words (List of strings).
    The reason I have chose this type of collection is that it is efficient when it looks for the synonyms words for a given word.
    Using concurrentHashMap allows different threads access it concurrently.
    The DictionaryServer starts three separate threads
    Thread 1: working on loading the dictionary
    Thread 2: looping through the dictionary to set the random keyword
    In this case, the dictionaryServer is available to the client to query from the beginning. There won’t be a noticeable delay
    when the dictionary size is getting bigger and bigger because the Thread2 – LoopThread will always iterate the dictionary key
    size and provides a random keyword whenever you needs. No polling of dictionary size is needed to determin the random keyword.
    However, while the Thread 1 – loading process is running at the same time, it might causes some delays as it consumed lots of resources.
    On the client side, if the server is down, I use a separated thread to ping the server to see if it is up running. However,
    personally, I don’t think this is the best solution to implements this as pinging can be expensive over the network.
    It would be good to have a push back from the server to tell all the clients when it starts up. But I found it is difficult to do
    with RMI, maybe using JMS is easier to do.
    I have send you the code if any body interested. Seems doesn't allow me to attached my zip file.
    Many thanks.
    ksh29

    kajbj wrote:
    ksh29 wrote:
    kajbj wrote:
    >
    Sounds ok, but what do you mean by "The server should not employ any kind of polling when determining the current size of its in-memory dictionary."
    Why would calling size() be bad?I think size() is bad, especially the response time with size() will increase when the size of the list increases.That is only true for a few collections. Most collections can return the size directly.
    Okay, I don't know. Maybe you are right. Then how to explain "The server should not employ any kind of polling when determining the current size of its in-memory dictionary."???
    I didn't write the requirements and I just got it from a interview and the answer I provided was what I submitted, however, the feedback was no good. So, I don't know what is the best answer and I don't know my understanding of the requirement is correct or not. But seems to me, following two requirement are very important,
    1. The dictionary may be huge containing hundreds of thousands of entries. It is most important that when the server is still loading the words, it be able to select random word from dictionary loaded so far and provide it as a question to client. Also, be able to check the answer returned from server is correct or not. So if the client has just restored contact with the server, there must be no noticeable delay before the first question is asked.
    2. "The server should not employ any kind of polling when determining the current size of its in-memory dictionary."
    And that's why I didn't choose use size().
    >>>
    Btw. You could use something else than a List as value in the concurrent map.
    On the client side, if the server is down, I use a separated thread to ping the server to see if it is up running. However,
    personally, I don&#146;t think this is the best solution to implements this as pinging can be expensive over the network. Huh? Just try to reconnect in a loop, with a delay in between each attempt.That's how I did it, but this is still pulling. Is there any way to solve this from the server side?? Open to suggestions and discussions.
    No there isn't. The server can't tell a client that it is available. The only thing that the client can do is to try to connect periodically.That's good then. Because that's how I thought and I just want to know if there are any other ways to do this.
    Cheers,
    kai

  • How to Design This

    I have an ITEM table. I need to add or delete item records to it. But, after we do a DELETE ITEM operation we need to make sure the deleted item is still available to the Querying Deleted Item operation. What is the possible schema design to handle this requirement?
    I can think of 2 options (1) use one single ITEM table with a STATUS column to indicate if a column is 'deleted' or 'available' (2) use 1 ITEM table to store current item and a ITEM HISTORY table to stored deleted items.
    I need to decide which approach to use. Does anyone has similar experience and what are the potential problems/benefit of each approach?

    From my experience I’d stay away from a single table solution that utilizes a status column “if” you’re truly dealing with archival data that is not accessed as much as the “active” data. A single table/status sounds like a good idea until your main on-line table has millions of records and performance/backups becomes an issue. Your backup strategy for the on-line table would be quick/painless during the day while the archived data could get backed up nightly when usage is low. Again, this assumes users accessing the main on-line table far out number the users accessing the archived data. I’d have a secondary _ARC table that is populated via a nightly batch moving archived data from on-line table keeping that table trim.  I would also have one entry point into both of these tables so there’s no need for views or any triggers, it looks like this:
    •     Inside the Stored Procedure:
    o     An intial SELECT INTO FROM MAIN TABLE is issued for a given id/acct_num/etc.
    o     If data is returned:
    &#61607;     The stored procedure returns the data from the “active” on-line table via an Oracle TYPE (this doesn’t have to be a TYPE, it could simply be returning a single value)
    o     If data is NOT returned the “WHEN NO_DATA_FOUND” is invoked in the EXCEPTION:
    &#61607;     The stored procedure will then return the data from the _ARC table via an Oracle TYPE (again, this doesn’t have to be a TYPE, it could simply be returning a single value)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Advice on how to design this style of icons

    I am very new to AI and want to develop some icons for Android OS (Please see the image below as an example of what I am referring to).
    It seems they all have a similar style -- simple, clean, drop shadows around the icon, and linear gradients.
    1. Are the gradients lighter on top and darker on bottom (I can not tell for sure)? Is the effect to make them seem like they are being top lit?
    2. Can anyone recommend some tips for making my icons appear consistent with the style displayed in the attached file?
    Thanks!

    Stan,
    You have different options to create all sorts of gradients and similar transitions.
    One is the normal linear and radial gradients, possibly with careful positioning of stops/centre.
    Another one is blends which may take on more kinds of shapes.
    Yet another one is gradient meshes.
    A special case is the radar/conic/conical gradient
    http://forums.adobe.com/message/3032428
    http://forums.adobe.com/message/1273721
    The helpfile can help at least some of the way.

  • Please help me in designing this complicated database

    Can some one give me a better idea on how to design this complicated database.The database should capture the following business rule.
    I am working for a company which collects all the health information of patients from various hospitals and then using this data ,generate useful reports ,which will then be forwarded to health minister so that he can allocate money to particular area of health.
    We have some list number codes 1,2,3,4,5,6,7,8,9 etc and each list number has thousands of diseases under it.Hence cancer,TB,heart attack,flu,diarhoea comes under list number 1 and amnesia,dehydration,small pox comes under list number 2 ,and so on so forth.Now if a patient say has a disease from list number 1 and another disease from list number 2 and then from list number 3 then he is grouped in one category say group1.If he has a disease from only list 1 and 2 then he is grouped as group2.And if only list number 1 then group3.In short the data is something like this
    1,2,3,group1
    1,2, group2
    1, group3
    1,3,6,7,8,grou7
    1,8,group2
    1,9,group3
    etc.

    Table Name
    List_Codes
    List_Code Number(3); Primary Key
    Disease_Codes
    Disease_Code Number(3)
    Disease_Desc Varchar2(100)
    List_Code Number(3);
    Primary Key : Disease_Codes + List_Code
    Foriegn Key : List_Code ( References table
    List_Codes )
    List_Groups
    Group_Id Number(2) Primary Key
    List_Group_Details
    Group_Id Number(2)
    Disease_Code Number(3)
    List_Code Number(3)
    Primary Key : Group Id + Disease_Codes +
    List_Code
    Foriegn Key : Group Id ( List_Groups )
    Foriegn Key : Disease Code + List_Code (
    Disease_Codes )
    Patient_Details
    Patient_Id Number Primary Key
    Patient_Name Varchar2(50);
    Group_Id Number(2);
    Foriegn Key : Group Id ( List_Groups )
    Shailender Mehta

  • How to design multiple file polling BPEL process?

    Hi all,
    I am trying to solve/design the following in BPEL process:
    - The integration process flow I am trying to design is an interaction b/n system A (FTP server), an Integration platform and system B.
    - The integration platform will poll files from an internal FTP server. It has 2 Time files (“Time1” and “Time2”) alternatives to poll from the FTP server. It will then transform the message/information inside the files (time information) to an internal XML format. At the end it shall send the message to system B.
    - The information inside the files is identical. The reason to have 2 files with identical information is for redundancy. The integration-platform shall only poll file “TIME1” as long as the conditions are met. If the conditions are not met, then it polls file “Time2”.
    Normal succeeded scenario:
    1- The integration platform polls the latest “Time1” file from the internal FTP server. The polling is done every 15th minute.
    2- The integration platform logs to BAM and reports that the file is received.
    3- The platform then converts the message to an internal format.
    4- The platform sends the converted message/time information to system B.
    5 - The use-case ends.
    Not normal scenario:
    1- The platform cannot get/receive file “Time1” file.
    - The platform logs to BAM and reports that the file could not be received.
    - The platform polls file “Time2” from the FTP server and it does the same normal scenario as above. The use case ends.
    2 - Time message/information from the Time1 file has not full information (less than 24 rows). The file is supposed to have 24 rows (for 24 hours).
    - The platform logs to BAM and reports that there is missing information on the message.
    - The platform gets/polls instead the “Time2” file from the FTP server and it does the normal scenario.
    - The use case ends.
    3- The platform can find/get neither file “Time1” nor “Time2”.
    - The platform alarms to BAM that it could not get/find the files.
    ** I am considering either the pick activity or the switch activity solution. Does any one of you have an idea how to design this in oracle BPEL process?
    Thanks.

    Not sure I understand your use case completly so if I'm off track I apploigise.
    I think there are 3 ways to solve this. The 3rd may be closest to what you are looking for.
    1. Have 2 processes that read into a common area, e.g. database where you can compare. From there you can choose which file to pick. This is high leve but I think this would be dificult to implement.
    2. Implement a combination of a rejectedMessage handler and error processing witn the BPEL process itself. The rejecte message handler can call another BPEL process if the time1 file is in a invalid state. This process will then read the time2 file. The issue with this is that the rejecte message handler will only get invoked when the file doesn't conform to the schema.
    3. Use the quarts scheduler whcih invokes a BPEL process every 15 miniutes. Using the file adapter to perform a synchronous read to read time1, analyse it, if it fails read time2 using synchronous read. Then perform the approprate action id this fails.
    hope this give some ideas.
    cheers
    James

  • Please help how to design query to implement this requirement.

    Dear Expert,
    Here is what I have and what the requirement is:
    I have a InfoCube:
    Dimensions:
    1. Material
    2. Currency
    Key Figures:
    1. Qty
    2. Amount
    We want to get the Qty and Amount by Material, but use Currency to be the filter.
    It means for example, if the Currency have CNY for one material, we need to show all the Qty/Amount, not only Qty/Amount in CNY.
    So please help give some idea about how to design the query to implement this requirement.
    Thank you,
    Andy

    Hi Andy:
    To accomplish your requirement you need to do 2 things:
    1. Create a Variable for the Currency (to be used as the Target Currency not as a filter for the Characteristic itself).
    2. Use the Standard Currency Conversion for the Amount Key Figure (Conversion Tab).
    This way, while executing the report you can select any currency you want and all the amounts will be converted to that currency.
    Take a look at this paper:
    "How to... Use Variables for Currency Conversion"
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/287bab90-0201-0010-f48e-cc55b0cd13d0?quicklink=index&overridelayout=true
    A more detailed explanation can be found on this article provided by Ramakrishna Gattikoppula:
    "Currency Conversion in BI 7.0"
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a0d5bf96-b19b-2c10-e3b6-e2f12a3de99a?quicklink=index&overridelayout=true
    In summary, to work with the Standard Currency Conversion you need to define 4 things:
    - Exchange Rate Type.
    - Source Currency.
    - Target Currency.
    - Time Reference.
    Regards,
    Francisco Milán.
    Edited by: Francisco Milan on May 31, 2010 11:19 AM

  • Which Design Pattern and how to design using OOP this scenario

    I am having trouble designing a module, can anybody help me?
    Because it will be hard to maintain this kind of module, I also think that this can test my skill of design pattern usage.
    Requirement
    This is basically an agricultural project (web application). I need to design a module where some calculation takes place.
    There are different crops involved like maize, tomato, okra etc. Each of these crops has different traits.
    Each trait has a measurement scale which lies in integer like 200-1000. Now let's say I have planted the crop and done measurement noted down the traits. Now I want to do some sort of measurement. Some measurements are simple and some are complex.
    Example
    Lets take an example of crop maize. I have recorded observations for 15 traits. (We'll use trait1-trait15 as examples, the actual name can be like plt_ht, yld, etc.)
    I recorded 5 observations for each trait:
    trait1 trait2 trait3 trait5 trait6..... trait15
    01,02,03,04 01,02,03,04 01,02,03,04
    User logs into system and selects his crops and enters data for these observations. I have to calculate either average or sum of the data entered for each trait.
    Complexity / centre of the problem
    So far it's simple but complexity comes when I have some different formulas for some of the traits.
    Example: trait YLD has a formula based on which I have to calculate its value, which may also depend on some other traits. Each different crop can have different traits.
    All this I am able to do - whenever user selects crop I will check for those specific traits and do calculations (if it's not a special trait then I either average or sum it, based on db entry), but there is a lot of hard coding.
    I would like to have suggestions on a better way of handling this.
    My code needs to handle both simple and complex calculations.
    Simple calculations are easy, I have take average of value entered for trait.
    The problem comes when I have to do complex calculations, since each crop have different traits with their own formulas, so to calculate I have to check for crop and then for complex trait. So I have to hardcode the trait name of complex traits.
    Can any tell me how I can design this using Java oops [?!?] so that I can make it generic?
    I have about 10 different crops. Some calculations are specific to crops, so there will be lot of code like the if below:
    hasZeroValue = (HashMap<String, ArrayList<String>>) dataValues[1];
    } else if(cropId.equalsIgnoreCase("MZ") && traitName.equalsIgnoreCase("Shelling")) {
        avg=HybridTestDataUtility.calculateAvg(traitName, dataPoint, dataTraits, traitValues,dataPvalues, dataPoint, type);
        avg=avg*dataPoint;
        traitAvg=getMaizeYeild(traitName, traitAvg, population, avg, hybrid, area);
    } else if(cropId.equalsIgnoreCase("OK") && traitName.equalsIgnoreCase("YLDGM")) {
        avg=HybridTestDataUtility.calculateAvg(traitName, dataPoint, dataTraits, traitValues,dataPvalues, dataPoint, type);
        //avg=avg*dataPoint;
        Object[] dataValues=getOKRAYield(traitName, traitAvg, population, avg, dividend,hasZeroValue,hybrid,repl);
        traitAvg = (HashMap<String, Float>) dataValues[0];
        hasZeroValue = (HashMap<String, ArrayList<String>>) dataValues[1];
    } else if(cropId.equalsIgnoreCase("HP") && traitName.equalsIgnoreCase("w1-w10")) {
        avg=HybridTestDataUtility.calculateAvg(traitName, dataPts, dataTraits, traitValues,dataPvalues, dataPoint, type);
        avg=avg*dataPoint;
        Object[] dataValues=getHotPepperYield(traitName, traitAvg, population, avg,dividend,hasZeroValue,hybrid,repl);
        traitAvg = (HashMap<String, Float>) dataValues[0];
        hasZeroValue = (HashMap<String, ArrayList<String>>) dataValues[1];
    } else if(cropId.equalsIgnoreCase("TO") && traitName.equalsIgnoreCase("TLSSG_70")) {
        traitAvg=calculateTLCV(traitName, traitAvg,dataPoint, dataTraits, hybrid, repl, traitValues, dataPvalues,50);
    } else if(cropId.equalsIgnoreCase("TO") && traitName.equalsIgnoreCase("TLSSG_100")) {
        traitAvg=calculateTLCV(traitName, traitAvg,dataPoint, dataTraits, hybrid, repl, traitValues, dataPvalues,50);
    } else if(cropId.equalsIgnoreCase("TO") && traitName.equalsIgnoreCase("YVMV_60")) {
        traitAvg=tomatoYVMVCalculation(traitName, traitAvg,dataPoint, dataTraits, hybrid, repl, traitValues, dataPvalues);
    } else if(cropId.equalsIgnoreCase("TO") && traitName.equalsIgnoreCase("YVMV_90")) {
        traitAvg=tomatoYVMVCalculation(traitName, traitAvg,dataPoint, dataTraits, hybrid, repl, traitValues, dataPvalues);
    } else if(cropId.equalsIgnoreCase("TO") && traitName.equalsIgnoreCase("YVMV_120")) {
        traitAvg=tomatoYVMVCalculation(traitName, traitAvg,dataPoint, dataTraits, hybrid, repl, traitValues, dataPvalues);
    } else if(cropId.equalsIgnoreCase("TO") && traitName.equalsIgnoreCase("ELCV_60")) {
        traitAvg=tomatoYVMVCalculation(traitName, traitAvg,dataPoint, dataTraits, hybrid, repl, traitValues, dataPvalues);
    } else if(cropId.equalsIgnoreCase("TO") && traitName.equalsIgnoreCase("ELCV_90")) {
        traitAvg=tomatoYVMVCalculation(traitName, traitAvg,dataPoint, dataTraits, hybrid, repl, traitValues, dataPvalues);
    } else if(cropId.equalsIgnoreCase("TO") && traitName.equalsIgnoreCase("ELCV_120")) {
        traitAvg=tomatoYVMVCalculation(traitName, traitAvg,dataPoint, dataTraits, hybrid, repl, traitValues, dataPvalues);
    } else if(cropId.equalsIgnoreCase("OK") && traitName.equalsIgnoreCase("YVMV_60")) {
        traitAvg=tomatoYVMVCalculation(traitName, traitAvg,dataPoint, dataTraits, hybrid, repl, traitValues, dataPvalues);
    } else if(cropId.equalsIgnoreCase("OK") && traitName.equalsIgnoreCase("YVMV_90")) {
        traitAvg=tomatoYVMVCalculation(traitName, traitAvg,dataPoint, dataTraits, hybrid, repl, traitValues, dataPvalues);
    } else if(cropId.equalsIgnoreCase("OK") && traitName.equalsIgnoreCase("YVMV_120")) {
        traitAvg=tomatoYVMVCalculation(traitName, traitAvg, dataPoint, dataTraits, hybrid, repl, traitValues, dataPvalues);
    } else if(cropId.equalsIgnoreCase("OK") && traitName.equalsIgnoreCase("ELCV_60")) {Can anybody think of a way to make a generic approach to this?

    There are crops and each crop have traits , traits are actually a mesuremet
    scale to decide growth of a seed of a particular crop.
    This module is to for planters to observe growth of seeds sowed of certain
    crops and take down n no of observation for each trait and upload in csv format.Once they enter
    data i have to either avg out the values or sum the values or sometimes
    there are more complex function that i have to apply it may differe for each
    trait .This is the whole module about.Just to give an idea about how they
    will enter data
    Hyubrid(seed) trait1 trait2 trait3 trait5 trait6..... trait15
    Hybrid1 01 02 03 04 01
    HYbrid2 04 06 08 04 01
    HYbrid2 04 06 08 04 01
    HYbrid2 04 06 08 04 01
    HYbrid2 04 06 08 04 01
    Once they enter data in this format i have to give result something like
    this.
    Here avg colum does not necessaryly mean avg it can be sum or any formula
    based resutl.Hybrid is the seed for which they record the observation.
    I have shown avg column only for two tratis it is actually for all the
    traits.
    Hyubrid(seed) trait1 Avg trait2 avg trait3 trait5 trait6..... trait15
    Hybrid1 01 01 02 04 03 04 01
    HYbrid2 04 04 06 10 08 04 01
    HYbrid2 04 04 06 12 08 04 01
    HYbrid2 04 04 06 14 08 04 01
    HYbrid2 04 04 06 12 08 04 01
    Hope this clarifies atleat a but
    The data are not correctly indented but there is no way i can format it.

  • JDeveloper ESB designer view points a server, how to change this to another

    Hi,
    I have developed a ESB service that deployed and tested on my Local system. Its tested and running well.
    However now I have to develop another service that has to be registered under one of the existing service group.
    But in the eSB designer view I can see only localsysem specific EBS systems/and service groups. How to change this to point to other server.
    -- Khaleel

    Hi Chandrasekhar,
    Thanks for your reply. Yes thats correct. Infact after doing some research finally I got it.
    However I hope a restart of the JDeveloper as a 4th step is required. but it works well.
    Thanks.
    --Khalee                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Maybe you are looking for