Complicated Code HELP!

<br><br>
Hi Below is my code that works out the start date - the end date * the lpa_amount divided by 7,
If the is more than one ent_seqno it will do the same for the 2nd, 3rd etc ent_seqno and total them up.
claim_no     Ent_seqno    Start_date    End_date        lpa_amt
1000052847     1     01/04/2008     18/05/2008     0.762     
1000052847     2     19/05/2008     31/03/2009     0.71     But my problem is if i try to choose the start and end dates, i thought simply by inputing
SUM ((:p_end_date - :p_start_date +1 )
instead of
SUM ((lpa_history.p_end_date - lpa_history.START_DATE +1)
It would work but it doesnt, it only works out calculations for just the first ent_seqno and ignors any others.
Please Please help!!!
SELECT DISTINCT
  LPA_INPUT.CLAIM_NO,
     LPA_INPUT.INPUT_SURNAME,
     LPA_INPUT.INPUT_FORENAME,
      LPA_INPUT.INPUT_TITLE,
      LPA_INPUT.INPUT_HOUSE_NO||' '||LPA_INPUT.INPUT_ADDRESS_LINE1||', '||      LPA_INPUT.INPUT_ADDRESS_LINE2||', '||LPA_INPUT.INPUT_ADDRESS_LINE3||', '||
LPA_INPUT.INPUT_POST_CODE,
      LPA_INPUT.INPUT_START_DATE,
      LPA_INPUT.INPUT_END_DATE,
      TO_CHAR(hist.total,9999990.909999) AS TOTAL
FROM   LPA_CLAIM,
       LPA_INPUT,
        LPA_HISTORY,
       (SELECT lpa_history.claim_no,
        SUM ((lpa_history.p_end_date - lpa_history.START_DATE +1 ) * (ROUND(LPA_HISTORY.LPA_AMT,2))/7) total
FROM LPA_HISTORY, LPA_CLAIM, LPA_INPUT
where lpa_history.claim_no = LPA_CLAIM.claim_no
and lpa_history.claim_no = LPA_INPUT.claim_no
and ((ent_seqno = (select max(ent_seqno) from lpa_history where lpa_claim.claim_no = claim_no and start_date
= (select min(start_date) from lpa_history where lpa_claim.claim_no = claim_no)))
or
(ent_seqno > (select max(ent_seqno) from lpa_history where lpa_claim.claim_no = claim_no and start_date
= (select min(start_date) from lpa_history where lpa_claim.claim_no = claim_no))))
group by lpa_history.claim_no) hist
WHERE  LPA_CLAIM.CLAIM_NO = LPA_INPUT.CLAIM_NO
AND    LPA_CLAIM.CLAIM_NO = LPA_HISTORY.CLAIM_NO
AND    LPA_CLAIM.CLAIM_NO = hist.CLAIM_NO
AND    LPA_CLAIM.TENANCY_TYPE = 'PTEN'
AND    LPA_CLAIM.TENURE_TYPE = 'HA'
and LPA_HISTORY.DATE_CREATED >= :p_start_date
and LPA_HISTORY.DATE_CREATED < :p_end_date + 1
AND    (LPA_INPUT.INPUT_DECISION = 'Eligible'
        OR
        LPA_INPUT.INPUT_DECISION IS NULL)
ORDER BY LPA_INPUT.INPUT_SURNAME;

Hello, sorry people it is quite, complicated and i will try to explain in more dept!!!
claim_no     Ent_seqno    Start_date    End_date        lpa_amt
1000052847     1     01/04/2008     18/05/2008     0.762     
1000052847     2     19/05/2008     31/03/2009     0.71
[pre]
Basicly my code picks up claims, that are PTEN, HA, and ELIGIBLE, from the CLAIM table,
once it has a claim, it then has to work out they payment from the history table,
an example of a claim from the history show above.
it subtracts the start date from the end date +1 and multiplies it by the amount and then divides by 7,
so the answer for the above would be:
01/04 - 18/05  +1 = 48 * 0.762 = 5.21
19/05 - 31/03 + 1 = 317 * 0.71 = 32.15
                                                  37.36 TOTAL
My code does this fine, but i want to be able to choose the end date in my code i.e work out the payment to,
i.e todays date:
01/04 - 18/05  +1 = 48 * 0.762 = 5.21
19/05 - *09/12* + 1 = 205 * 0.71 = 20.79
                                                     26.00 TOTAL
An important feature is that it that the code know to work out the multiple entries in the history table (shown above)
and ((ent_seqno = (select max(ent_seqno) from lpa_history where lpa_claim.claim_no = claim_no and start_date
= (select min(start_date) from lpa_history where lpa_claim.claim_no = claim_no)))
or
(ent_seqno > (select max(ent_seqno) from lpa_history where lpa_claim.claim_no = claim_no and start_date
= (select min(start_date) from lpa_history where lpa_claim.claim_no = claim_no))))
group by lpa_history.claim_no) histHope this helps?!
Edited by: Sq....what? on 09-Dec-2008 02:08                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • Survey creation abap code help needed

    hello experts,
    I need to create a survey in crm, by taking values from end-user from a webpage
    A sample code help is needed.
    Thanks in advance

    Take a look at this SAP note - It does a pretty good job of detailing the steps for you.  No coding necessary, it worked out of the box for us after patching this note.
    https://service.sap.com/sap/support/notes/638320

  • Inquiring minds may find this error code helpful: 0x207

    Hopefully I'm asking this in the right forum. I just downloaded the update for Microsoft Remote Desktop for Windows Phone 8.1 (I am actually running Denim on a 1520 but that may not matter). The version is 8.1.8.13 released 3/4/2015. I am trying to connect
    to a RemoteApp application but I am receiving the following error message shortly after it tries the redirection process (I think it fails at the securing remote connection part after it attemps the redirction to the RemoteApp application collection server):
    Connection error
    We couldn't connect to the remote PC. This might be due to an expired password. If this keeps happening, ask your admin or tech support for help.
    Inquiring minds may find this error code helpful: 0x207
    I am able to connect directly to both the broker server as well as the RemoteApp collection server with this application with the same credentials and am only experiencing this when trying to connect to a RemoteApp application.
    We are running Server 2012 R2 for both the broker/web and the collection servers. We are not using a gateway server as we use an SSL VPN concentrator instead for access outside of our network. We have server farms set up as well in the RemoteApp topology.
    Any info would help or let me know if I'm not posting in the right forum for this issue. I know this is a very recent release so I'm trying to figure out if I should wait for a bug fix or if there's something that I can do on my end.
    Thank you in advance for your time!

    Hi Scott,
    Please check your configuration once again and the certificate must be well configured. Also for accessing RemoteApp there might be the permission issue for your use, recheck once and verify. You can also got through
    this article for information.
    Hope it helps!
    Thanks.
    Dharmesh Solanki
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Redemption code help that you keep sending everyone to is NOT HELPING. It just tells you to put in the redemption code. IF I HAD THE CODE I WOULD HAVE PUT IT IN!! How do I find the code?

    Redemption code help that you keep sending everyone to is NOT HELPING. It just tells you to put in the redemption code. IF I HAD THE CODE I WOULD HAVE PUT IT IN!! How do I find the code?

    Version 5.5 was/is not part of the Cloud, so you could not have subscribed to that version
    You install version 5.5 on a 2nd computer exactly the same way you did the 1st time... put the disc in the drive and enter your serial number when asked
    Does your serial number show on your account page?
    https://www.adobe.com/account.html for serial numbers on your Adobe page... or
    Lost serial # http://helpx.adobe.com/x-productkb/global/find-serial-number.html

  • Code help in writing  report Program

    Hello experts
    I have to write a selection screen program based on the following requirements (only for sales Org:5090, plant:9000, Outbound delivery type= "LF")
    Selection parameters:
    Material (lips-matnr)
    Sold to party(likp-kunag): can hardcode it to 5090
    Sales Org(likp-vkorg)
    Plant(lips-werks) : hard code it to plant:9000
    Sales order(likp-vbeln)
    Actual goods movement dates(likp-wadat_ist)
    Invoice number
    Sales order
    Output
    material numberlips~matnr ( should Display only S* materials  and  material type FERT)
      Serial number of the device shipped (objk-sernr)
    Delivery number (lips~vbeln)
    Invoice number (vbrp-vbeln)
    Invoice price=Vbrp-vbeln/quantity (invoice price)
      Notification number (Viqmel-QMNUm)
      KBB Repair Level(VIQMEL-QMTXT from QMCOD ) 
      KBC Repair level(VIQMMA-MNCOD from KBC-SM07 code group(VIQMMA-MNGRP))
    code help is higly appreciated,
    Thanks
    Sp

    Hi anurag,
    Code is going like this, i could able to display it but when i run it ABAP Dump is coming.
    what could be the reason?
    Tahnks
    SP
    *& Report  ZSDR_PRICING_KSE_RPT                                        *
    REPORT  ZSDR_PRICING_KSE_RPT          .
    TABLES: likp, lips, vbfa, vbak.
    TYPE-POOLS: slis.
    */ Selection and Input Parameters
    SELECTION-SCREEN BEGIN OF BLOCK block2 WITH FRAME TITLE text-003.
    SELECT-OPTIONS: s_matnr FOR lips-matnr,
                    s_kunag FOR likp-kunag.
    SELECT-OPTIONS: s_vkorg FOR likp-vkorg NO INTERVALS,
                    s_werks FOR lips-werks.
    SELECT-OPTIONS: s_vbeln FOR likp-vbeln,
                    s_waist FOR likp-wadat_ist.
    SELECT-OPTIONS: s_vgbel FOR lips-vgbel.
    SELECTION-SCREEN END OF BLOCK block2.
    DATA: gt_fieldcat TYPE slis_t_fieldcat_alv.
    TYPES: BEGIN OF ty_data,
           matnr TYPE lips-matnr,
           sernr TYPE equi-sernr,
           vbeln TYPE lips-vbeln,
           invno TYPE vbfa-vbeln,
           qmnum TYPE vbak-qmnum,
           netwr type vbrp-netwr,
           END OF ty_data.
    DATA: gt_data TYPE TABLE OF ty_data WITH HEADER LINE.
    TYPES: BEGIN OF ty_lips,
           vbeln TYPE likp-vbeln,
           matnr TYPE lips-matnr,
           wersk TYPE lips-werks,
           vgbel TYPE lips-vgbel,
           END OF ty_lips.
    DATA: gt_lips TYPE TABLE OF ty_lips WITH HEADER LINE.
    DATA: gt_vbfa TYPE TABLE OF vbfa WITH HEADER LINE.
    DATA: gt_vbrp TYPE TABLE OF vbrp WITH HEADER LINE.
    TYPES: BEGIN OF ty_ser01,
           lief_nr TYPE ser01-lief_nr,
           obknr TYPE ser01-obknr,
           sernr TYPE objk-obknr,
           END OF ty_ser01.
    DATA: gt_ser01 TYPE TABLE OF ty_ser01 WITH HEADER LINE.
    START-OF-SELECTION.
      PERFORM get_data.
      PERFORM display_data.
    *& Form get_data
    FORM get_data.
      SELECT likpvbeln lipsmatnr lipswerks lipsvgbel
             INTO CORRESPONDING FIELDS OF TABLE gt_lips
             FROM likp INNER JOIN lips ON lipsvbeln = likpvbeln
             WHERE lips~matnr IN s_matnr
             AND lips~werks IN s_werks
             AND likp~kunag IN s_kunag
             AND likp~wadat_ist IN s_waist
             AND lips~vgbel IN s_vgbel
             AND likp~vkorg IN s_vkorg.
      IF NOT gt_lips[] IS INITIAL.
        SELECT vbeln vbelv INTO CORRESPONDING FIELDS OF TABLE gt_vbfa
        FROM vbfa
        FOR ALL ENTRIES IN gt_lips
          WHERE vbelv = gt_lips-vgbel
          AND vbtyp_n = 'M'.
        IF NOT gt_vbfa[] IS INITIAL.
          SELECT vbeln matnr netwr
          INTO CORRESPONDING FIELDS OF TABLE gt_vbrp
          FROM vbrp FOR ALL ENTRIES IN gt_vbfa
          WHERE vbeln = gt_vbfa-vbeln.
          SELECT ser01lief_nr ser01obknr objk~sernr
          INTO CORRESPONDING FIELDS OF TABLE gt_ser01
          FROM ser01 INNER JOIN objk ON objkobknr = ser01obknr
          FOR ALL entries IN gt_vbfa
          WHERE ser01~lief_nr = gt_vbfa-vbeln
          AND taser EQ 'SER01'.
        ENDIF.
      ENDIF.
      clear: gt_data[].
      LOOP AT gt_lips.
        LOOP AT gt_vbfa WHERE vbelv = gt_lips-vgbel.
          READ TABLE gt_vbrp WITH KEY vbeln = gt_vbfa-vbeln
          matnr = gt_lips-matnr.
          LOOP AT gt_ser01 WHERE lief_nr = gt_vbfa-vbeln.
            gt_data-matnr = gt_lips-matnr.
            gt_data-sernr = gt_ser01-sernr.
            gt_data-vbeln = gt_lips-vbeln.
            gt_data-invno = gt_vbfa-vbeln.
            gt_data-netwr = gt_vbrp-netwr.
            APPEND gt_data.
          ENDLOOP.
        ENDLOOP.
      ENDLOOP.
    ENDFORM. " get_data
    *& Form display_data
    FORM display_data.
      DATA: lv_repid TYPE sy-repid.
      lv_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
      EXPORTING
      i_program_name = lv_repid
    I_INTERNAL_TABNAME =
      i_structure_name = gt_data
    I_CLIENT_NEVER_DISPLAY = 'X'
    I_INCLNAME =
    I_BYPASSING_BUFFER =
    I_BUFFER_ACTIVE =
      CHANGING
      ct_fieldcat = gt_fieldcat
    EXCEPTIONS
    INCONSISTENT_INTERFACE = 1
    PROGRAM_ERROR = 2
    OTHERS = 3
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    I_INTERFACE_CHECK = ' '
    I_BYPASSING_BUFFER =
    I_BUFFER_ACTIVE = ' '
    i_callback_program = lv_repid
    I_CALLBACK_PF_STATUS_SET = ' '
    I_CALLBACK_USER_COMMAND = ' '
    I_STRUCTURE_NAME =
    IS_LAYOUT =
    it_fieldcat = gt_fieldcat
    IT_EXCLUDING =
    IT_SPECIAL_GROUPS =
    IT_SORT =
    IT_FILTER =
    IS_SEL_HIDE =
    I_DEFAULT = 'X'
    I_SAVE = ' '
    IS_VARIANT =
    IT_EVENTS =
    IT_EVENT_EXIT =
    IS_PRINT =
    IS_REPREP_ID =
    I_SCREEN_START_COLUMN = 0
    I_SCREEN_START_LINE = 0
    I_SCREEN_END_COLUMN = 0
    I_SCREEN_END_LINE = 0
    IMPORTING
    E_EXIT_CAUSED_BY_CALLER =
    ES_EXIT_CAUSED_BY_USER =
    TABLES
    t_outtab = gt_data
    EXCEPTIONS
    PROGRAM_ERROR = 1
    OTHERS = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.

  • I was messing around with my iPad and put in a in app purchese and forgot the pass code help!

    I was messing around with my iPad and put in a in app purchese and forgot the pass code help!

    Do you mean you forgot the passcode for your iPad?  If so you need to restore it through the recovery mode described in http://support.apple.com/kb/HT1808

  • Redemption Code Help, where do I locate it?

    Redemption Code Help, where do I locate it?

    You have activate the subscription only once in the month of August 2014, so you can activate it one more time, if the Cc is asking for serial number then please follow the steps:
    Creative cloud do not need a serial number. it will be using your Adobe ID on which you have purchased the creative cloud membership.
    So you need to login with your Adobe ID and password to activate the cloud membership.
    Log out & log back in of the CC Desktop App.
    In case it is not signing in successfully please try the following:
    I don't know which operating system you are working on so i am giving you some steps windows and MAC OS:
       Windows:
       In windows 7 navigate to following location:
         /windows/system32/drivers/etc
       1. look out for "Hosts" file
       2. Open it with notepad
       3. Check if you have any entry for Adobe
       4. Remove the entries and try again launching any product from CC
       On Windows XP navigate to following location:
       \windows\system32\drivers\etc
       1. look out for "Hosts" file
       2. Open it with notepad
       3. Check if you have any entry for Adobe
       4. Remove the entries and try again launching any product from CC
       Mac:
       1. Please click on "Go" and navigate to /private/etc
       2. Open "hosts" file and check out for any entries for Adobe.com
       3. Remove the entries and save the file
       4.  try again launching any product from CC
    You can refer :
    http://helpx.adobe.com/creative-cloud/kb/ccm-prompt-serial-number.html
    http://helpx.adobe.com/x-productkb/policy-pricing/activation-network-i ssues.html.
    Please let us know if it worked.
    Regards,
    Rajshree

  • HT201209 When I try to redeem it says error invalid code help me please.

    When I try to redeem it says error invalid code help me please.

    Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact
    Note: iTunes Gift Cards are only Valid in Country of issue

  • I just had to buy a new computer because my "vintage" Mac died. after migrating my backup drive over my Adobe creative suite no longer wroks I get a 150:30 error code HELP!

    I just had to buy a new computer because my "vintage" Mac died. After migrating my backup drive over to my New mac book my Adobe CS no longer works. I get a 150:30 error code HELP!

    You need to reinstall it properly, not use migration.
    Mylenium

  • Swing code help

    Guys,
    Thanks first of all to those of you who have been a great help over the past few days. I have one last problem that i'm not sure how to tackle.
    I'm doing a theatre booking system which has a GUI. My main screen is using a card layout.
    I have a theatre class, a booking class, performance and seating classes. I want to implement code for making a booking which will display a graphical representation of the seats for a particular section of the theatre. My seating is divided into stalls, royal circle, upper circle etc. Each of these blocks of seating has x rows and y columns.
    I want to show on a panel all seats. Booked ones coloured red, free ones coloured green - or some other approach which would be just as effective. I want to click a seat or several seats to book them for one customer.
    What approach is best for this problem? How should I draw the seats? Line drawings? Components? Suggestions on how to tackle this problem please.
    Many thanks.

    How bout this:
    Create your own subclas of Shape (sub class Rectangle if you just want your seats as rectangles or if they need to be a more complicated shape use Polygon) but add your own field colour (of type Color!, defaulted to green) which has a getter and a setter method for colour (or just setred, setgreen methods) and just one constuctor which takes a location. size and colour are set by default in the constructor. Iterate over your x and y axis creating these and storing them in an array, something line:
    int xmax = 5;
    int ymax = 3;
    int gap = 5;
    Seat[] seats = new Seat[xmax * ymax]; //Where seat is you Shape (also array should be class level)
    int count = 0;
    for (int  x = 0; x < xmax; x++){
       for (int y = 0; y < ymax; y++){
           seats[count] = new Seat( gap * x, gap * y); //Obviously this would be alot more complicated if you use Polygon as all points would need offsetting by x, y.
    }then in your draw method:
    for (allseats using i) {
         Seat seat = seats;
    g2.setColor(seat.getColour());
    g2.draw(seat)
    Add a mouselistener to the component you are drawing on which checks if a seat was clicked on:
    mouseClicked(MouseEvent me {
    for (allseats using i) {
         Seat seat = seats;
    if (seat.contains(me.getPoint()) {
    seat.setColour(Color.RED);
    //And anything else you want to do
    repaint();
    None of this is very thought through and all just typed straight into reply box so probably loads of little mistakes and improvements but somewhere to start from perhaps.
    Hope this helps,
    Alex.

  • Source Code help!!!!!

    Hi everyone,
    I have a problem in tracing back my codes, which I have been working on for sometime. Since I have the benefit of time, I am actually looking thru some codes, (developed by ancestors of the co.), and I am unable to derive the output....Its relatively complicated as its reading the value located in the i18nGB.properties file and displaying the output.
    The value is shown correctly but I have no idea how to understand how it works....
    package com.embrace.ehrms.dao.ecc;
    import com.embrace.ehrms.dao.common.AbstractSearchECCEmployee;
    import com.embrace.ehrms.context.Context;
    public class SearchEmployeeECCList extends AbstractSearchECCEmployee
         public SearchEmployeeECCList(Context ctx)
             super(ctx);
        public String getTitle(){return "Title.ECC";
    }My doubt lies in "Title.ECC" prints the word Employee Centre....which is found in i18nGB.properties....How do I trace back the functionality of calling it?
    in i18nGB.properties, it is like this
    Title.ECC=Employee Centre
    Your help is greatly appreciated.....
    Best Regards

    We need to find out where the getTitle method is being called from.
    If you have a copy of the source, not the production environment, within the get title method, you coule create a new throwable object and then print the stack trace to the standard output.
    This effectivly breaks the system but it will allow the compiler to give you a bunch of errors when ever the method is called.
    Another option would be if you are using an IDE like Netbeans, you could put a break point in that method and then debug the system.
    I am weary of telling you to do either of these because I do not know if you have a development environment that mirrors the production environment. And I dont want you to break something your company depends on.
    It boils down to this... Somewhere in the system, there is an object that instantiates the class you posted. At some point, the getTitle method is called and the result is used to look up a value in a paramater file or property file. And that value is printed out.
    If you are using Netbeans, there is a nice function that will look throughout a project to fina all uses of a method.
    You will have to look through the other code to find out what class is using the class you posted.
    JJ

  • Problem with JTextArea or is it my code, Help!!!

    Hi,
    I am going crazy. I am sending a message to a JTextArea and I get some very wierd things happening? I really need help because this is driving me crazy. Please see the following code to see my annotations for the problems. Has anyone else experienced problems with this component?
    Thanks,
    Steve
    // THIS IS THE CLASS THAT HANDLES ALL OF THE WORK
    public class UpdateDataFields implements ActionListener {     // 400
         JTextArea msg;
         JPanel frameForCardPane;
         CardLayout cardPane;
         TestQuestionPanel fromRadio;
         public UpdateDataFields( JTextArea msgout ) {     // 100
              msg = msgout;
          }       // 100
         public void actionPerformed(ActionEvent evt) {     // 200
              String command = evt.getActionCommand();
              String reset = "Test of reset.";
              try{
                   if (command.equals("TestMe")){     // 300
                        msg.append("\nSuccessful");
                        Interface.changeCards();
                        }     // 300
              catch(Exception e){
                   e.printStackTrace();
              try{
                   if (command.equals("ButtonA")){     // 300
    // WHEN I CALL BOTH OF THE FOLLOWING METHODS THE DISPLAY WORKS
    // BUT THE CHANGECARDS METHOD DOES NOT WORK.  WHEN I COMMENT OUT
    // THE CALL TO THE DISPLAYMESSAGE METHOD THEN THE CHANGECARDS WORKS
    // FINE.  PLEASE THE INTERFACE CLASS NEXT.
                        Interface.changeCards();
                        Interface.displayMessage("test of xyz");
                        }     // 300
              catch(Exception e){
                   e.printStackTrace();
         }     // 200
    }     // 400
    // END OF UPDATEDATAFIELS  END END END
    public class Interface extends JFrame {     // 300
         static JPanel frameForCardPane;
         static CardLayout cardPane;
         static JTextArea msgout;
         TestQuestionPanel radio;
         Interface () {     // 100
              super("This is a JFrame");
            setSize(800, 400);  // width, height
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              // set-up card layout
              cardPane = new CardLayout();
              frameForCardPane = new JPanel();     // for CardLayout
              frameForCardPane.setLayout(cardPane);     // set the layout to cardPane = CardLayout
              TestQuestionPanel cardOne = new TestQuestionPanel("ABC", "DEF", msgout, radio);
              TestQuestionPanel cardTwo = new TestQuestionPanel("GHI", "JKL", msgout, radio);
              frameForCardPane.add(cardOne, "first");
              frameForCardPane.add(cardTwo, "second");
              // end set-up card layout
              // set-up main pane
              // declare components
              msgout = new JTextArea( 8, 40 );
              ButtonPanel commandButtons = new ButtonPanel(msgout);
              JPanel pane = new JPanel();
              pane.setLayout(new GridLayout(2, 4, 5, 15));             pane.setBorder(BorderFactory.createEmptyBorder(30, 20, 10, 30));
              pane.add(frameForCardPane);
                 pane.add( new JScrollPane(msgout));
                 pane.add(commandButtons);
              msgout.append("Successful");
              setContentPane(pane);
              setVisible(true);
         }     // 100
    // HERE ARE THE METHODS THAT SHOULD HANDLE THE UPDATING
         static void changeCards() {     // 200
                   cardPane.next(frameForCardPane);
                   System.out.println("Calling methods works!");
         }     // 200
         static void displayMessage(String test) {     // 200
                   String reset = "Test of reset.";
                   String passMessage = test;
                   cardPane.next(frameForCardPane);
                   System.out.println("Calling methods works!");
                   msgout.append("\n"+ test);
         }     // 200
    }     // 300

    Hi,
    I instantiate it in this class. Does that change your opinion or the advice you gave me? Please help!
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    class CardLayoutQuestionsv2 {
        public static void main(String[] arguments) {
            JFrame frame = new Interface();
            frame.show();
    }

  • I am unable to get into my IPhone.  My 4 digit code is not working and my cell is disabled. I've tried connecting to iTunes to do a reset to factory default however I need the password (my 4 digit code) help!! I've been without my iPhone for 2 days.

    I'm locked out of my iPhone.   My 4 digit security code is not working.  I've tried to connect to iTunes to do a recovery however I. Order to do this it asks me for the 4 digit code.  I need to reset it but unable to get into reset as well.  Help!!t can I reset it using my iPad which is registered to the same account

    See Here  >  http://support.apple.com/kb/HT1808
    You may need to try this More than Once...  Be sure to Follow ALL the Steps..

  • ABAP Code Help needed in DSO

    Hi All,
    My requirement is below :
    In my DSO I have the data as below
    doc number     item     con type     Agreement
    100     10     adc     1234
              efg     5678
              hij      ' '
    200     20     adc     1234
              efg     ' '
              hij      5678
    Now I have created a New Info object named flag. So now I am doing a self myself data mart where i need to write my routine to set data in the flag.
    The data should be like
    doc number     item     con type     Agreement   Flag
    100     10     adc     1234               X
              efg     5678               X
              hij      ' '                     X
    200     20     adc     1234               X
              efg     ' '                    X
              hij      5678              X
    Note:- even if agreement is blank for hij we need to put X since agreement is available for the remaining two condition types.
    Please can any one help with the code.and also please let meknow whether we shold write it in start routine or end routine
    Thanks In advance
    Sree

    Hi Rookie ,
    If i write the code below
    DATA: ITAB TYPE TABLE OF tys_TG_1,
               ITAB_WA TYPE tys_TG_1.
    MOVE RESULT_PACKAGE[] TO ITAB[].
    LOOP AT RESULT_PACKAGE ASSIGNING <RESULT_FIELDS>.
       IF <RESULT_FIELDS>-AGREEMENT IS NOT INITIAL.
            <RESULT_FIELDS>-FLAG = 'X'.
       ELSE.
            LOOP AT ITAB INTO ITAB_WA WHERE AGREEMENT IS NOT INITIAL AND
                                    DOC_NO = <RESULT_FIELDS>-DOC_NO AND
                                    ITM_NO = <RESULT_FIELDS>-DOC_NO.
                 <RESULT_FIELDS>-FLAG = 'X'.
                  EXIT.
            ENDLOOP.
       ENDIF.
    ENDLOOP.
    My requirement doesnt match
    My requirement is below
    doc number    item     con type        Agreement
    100                 10           adc            1234
                                         efg             5678
                                          hij                ' '
    200                  20          adc             ' '
                                         efg               ' '
                                          hij                ' '
    Expected result is
    doc number    item     con type        Agreement    flag
    100                 10           adc            1234                x
                                         efg             5678                 x
                                          hij                ' '                     x
    200                  20          adc             ' '                     ' '  
                                         efg               ' '                    ' '
                                          hij                ' '                     ' '
    regards
    Sree

  • Iframe shows only code - Help, please!

    I'm on OS X 10.4.5 and have designed a website that uses iframes (this is a must as there is a lot of content and I do not want the page bigger than the set size, so I need a way to scroll the content within the page size (955x600). I use Firefox for myself (and it looks great) but the person I'm doing the site for uses Safari. When he sees it, needless to say, it isn't going to look right. All it's displaying is the code for the iframe page as if I'm viewing the source for the page (within the iframe on the main page). Have they fixed the problem with iframes in Safari? And if so, what do I need to make it work in both browsers? Or is there another design tactic I can use instead of iframes?
    Any help or suggestions are very appreciated.
    Thanks!
    Mac mini   Mac OS X (10.4.5)  

    I actually found my error. It wasn't code within the file but I had saved it as a .php file (based on a file I found at another website that used it for their iframe) and when I changed it to .html it worked! But thanks, again, for your advice because it caused me to research iframes and I found they were all using .html/.htm files to call on.

Maybe you are looking for

  • Swing layout/size problem with JFrame and JApplet.

    I have a class that extends a JFrame, the classes layout is BorderLayout. I then have a class that extend JApplet, this classes layout is GridBagLayout (this class has a JTabbedPane - which contains JPanels). The problem I'm having is no matter how b

  • Applet is viewed by appletviewer but not browser

    Hello All: I have created several applets, and they all can be viewed by appletviewer. Some of them can be viewed by both appletviewer and the browser, and I have Internet Explorer. I realized that if in an applet a class extends JApplet, then that a

  • Printing mailbox list

    Hi - is there an easy way to print the list of mailbox messages? I think I must be overlooking something obvious, but I can't seem to find this info. Thanks in advance for any assistance.

  • Dynamic Stamp Help

    Hi All,      I'm a bit of a Newbie to dynamic stamps and need a little help with some code. I had an issue with stamp prompting before i could place it, even then after entering a valid response it would still not let me place a stamp. I added the hi

  • Error when calling BAPI_MATERIAL_SAVEDATA

    Hi all, I'm calling BAPI_MATERIAL_SAVEDATA through a RFC. I use SAP PI to call a function module and the function module calls the BAPI like this: call function 'BAPI_MATERIAL_SAVEDATA'       exporting         headdata             = ls_headdata