Not able to display the values on the alv report.

Hi all,
  loop at it_stpo.
    indx = sy-tabix.
    select single bdmng from resb into it_resb-bdmng
                    where matnr = it_stpo-idnrk
                    and xloek ne 'X'.
it_stpo-bdmng = it_resb-bdmng.
modify it_stpo index indx.
  endloop.
in the above code, m fetchin the values of bdmng and populating it in the it_stpo.
the values get populated in the internal table.
But the problem is only the first value of all the entries gets populated.
For ex:
it_stpo-idnrk = C0201AA0800N ** under this components der r three entries***
i want to display all three values of these entries.
1.A0201AD6750N                          990
2.A0201AJ0960N                           1,578
3.A0201AJ1140N                           2,996
but the value 990 gets repeated thrice for the above three entries. n the value 1598 n 2996 is not gettin displayed.
lll, for all other entries. only the first entry value gets displayed for their respective components.
suggest modification in my code so dat i cn display all the values.
thanks in advance.
regards,
purva.

Hi all,
  select bdmng from resb into corresponding fields of table it_stpo2
            for all entries in it_stpo
             where matnr = it_stpo-idnrk
             and xloek ne 'X'.
  loop at it_stpo2.
    move-corresponding it_stpo2 to it_stpo.
    append it_stpo.
  endloop.
In the above code, m able to fetch the records in the table it_stpo2. but the data is not gettin populated in the final internal table it_stpo. Both the internal tables it_stpo & it_stpo2 are same.
The data is gettin moved from it_stpo2 to it_stpo but only upto the header level. its not gettin appended in the table it_stpo even after using append stmt.
Plz help me to resolve this issue. its urgent.
Rgds,
Purva

Similar Messages

  • Not able to get changed values in the SAVE EVENT in ServHPartnerDet view

    Hi Experts,
    I am new CRM WEB IC, i have requirement like need to access four IBASE fields from BupaIbaseDetail and need to display those fiedls in ServHPartnerDet view. I am able display the fields and its values in the target view. But when user press change button and changes those four fields and press save button not able get the changed values in to the SAVE EVENT.Anyone please help me in this.
    IBHEADER , IBASEADDRESS  are the CONTEXT NODE CREATED in target view. I have binded IBHEADER to CuCoIbase custom controller and getting four fields data from IBASEADDRESS. below is the code for CREATE_CONTEXT_NODES.
    METHOD create_ibaseaddress.
      DATA:
        model        TYPE REF TO if_bsp_model,
        coll_wrapper TYPE REF TO cl_bsp_wd_collection_wrapper,
        entity       TYPE REF TO cl_crm_bol_entity,              "#EC *
        entity_col   TYPE REF TO if_bol_entity_col.             "#EC *
      model = owner->create_model(
          class_name     = 'ZL_CRM_IC_SERVHPDET_CN00'
          model_id       = 'IBaseAddress' ).                    "#EC NOTEXT
      ibaseaddress ?= model.
      CLEAR model.
      coll_wrapper =
        ibheader->get_collection_wrapper( ).
    TRY.
          entity ?= coll_wrapper->get_current( ).
        CATCH cx_sy_move_cast_error.
      ENDTRY.
      IF entity IS BOUND.
        TRY.
            entity_col = entity->get_related_entities(
                            iv_relation_name = 'FirstLevelComponent' ).
          CATCH cx_crm_genil_model_error.
        ENDTRY.
        TRY.
            entity ?= entity_col->get_current( ).
          CATCH cx_sy_move_cast_error.
        ENDTRY.
        CLEAR entity_col.
        IF entity IS BOUND.
          TRY.
              entity_col = entity->get_related_entities(
                              iv_relation_name = 'ComponentAddress' ).
              ibaseaddress->set_collection( entity_col ).
            CATCH cx_crm_genil_model_error.
          ENDTRY.
        ENDIF.
      ENDIF.
    ENDMETHOD.

    Code i have written in the CREATE_CONTEXT_NODE method for my custom context nodes( IBHEADER,IBASEADDRESS).
    this  CREATE_IBHEADER some data related to IBASE header then from this reading the IBASEADDRESS contextnode fields for displaying in the ServHPartnerDet. It is working fine but After changing the four fields values in the ServHPartnerDet view and trying to save, then context is not reading the new values it gives the old values only.
      TRY.
          lr_coll_wr = ztyped_context->ibaseaddress->get_collection_wrapper( ).
          IF lr_coll_wr IS BOUND.
            lr_entity ?= lr_coll_wr->get_current( ).
          ENDIF.
        CATCH cx_crm_genil_model_error.
      ENDTRY.
      CALL METHOD lr_entity->if_bol_bo_property_access~get_property_as_value
        EXPORTING
          iv_attr_name = 'BUILDING'
        IMPORTING
          ev_result    = lw_building.
    the building has got result of old value no the new value.
    method CREATE_IBHEADER.
        DATA:
          model        TYPE REF TO if_bsp_model,
          coll_wrapper TYPE REF TO cl_bsp_wd_collection_wrapper,
          entity       TYPE REF TO cl_crm_bol_entity,    "#EC *
          entity_col   TYPE REF TO if_bol_entity_col.    "#EC *
        model = owner->create_model(
            class_name     = 'ZL_CRM_IC_SERVHPDET_CN01'
            model_id       = 'IBHEADER' ). "#EC NOTEXT
        IBHEADER ?= model.
        CLEAR model.
    bind to custom controller
      DATA:
          cuco TYPE REF TO cl_crm_ic_cucoibase_impl,
          cnode TYPE REF TO cl_bsp_wd_context_node.
      cuco ?= owner->get_custom_controller(
            'CuCoIbase' ).                                      "#EC NOTEXT
      cnode ?=
        cuco->typed_context->ibaseheader.
      coll_wrapper = cnode->get_collection_wrapper( ).
      ibheader->set_collection_wrapper( coll_wrapper ).
    endmethod.

  • Not able populate correct data into fields in alv report

    hi experts,
    question: from delivery document number(likp-vbeln) go to delivery items to get lips-matnr,lips-lgort
    TYPE-POOLS:SLIS.
    TABLES: MARC,LIPS,LIKP,VBAK,VBAP,VBRP.
    SELECT-OPTIONS:S_VKORG FOR LIKP-VKORG,
                   S_VBELN FOR LIKP-VBELN,
                   S_MATGR FOR MARC-MATGR,
                   S_AUART FOR VBAK-AUART.
    DATA: BEGIN OF ITAB OCCURS  0  ,
           MATGR LIKE MARC-MATGR,
           MATNR LIKE LIPS-MATNR,
           LGORT LIKE LIPS-LGORT,
           WADAT_IST LIKE LIKP-WADAT_IST,
           AUART LIKE VBAK-AUART,
           WAVWR LIKE VBRP-WAVWR,
           KWMENG LIKE VBAP-KWMENG,
           VBELN LIKE LIKP-VBELN,
          VBELN LIKE VBAK-VBELN,
          <GORT TYPE LIPS-LGORT,
           END OF ITAB.
       DATA: BEGIN OF JTAB OCCURS 0,
             VBELN LIKE VBAK-VBELN,
             END OF JTAB.
      DATA: I_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
             I_EVENTCAT TYPE SLIS_T_EVENT WITH HEADER LINE.
      START-OF-SELECTION.
      SELECT AMATNR ALGORT INTO TABLE ITAB   FROM LIPS AS
    A INNER JOIN
    LIKP AS B ON BVBELN EQ AVBELN  WHERE BVBELN IN S_VBELN AND BVKORG
    IN
    S_VKORG.
    ENDSELECT.
    *I_FIELDCAT-COL_POS = 1.
    *I_FIELDCAT-FIELDNAME = 'VBELN'.
    *I_FIELDCAT-TABNAME = 'ITAB'.
    *APPEND I_FIELDCAT TO I_FIELDCAT.
    *CLEAR I_FIELDCAT.
    I_FIELDCAT-COL_POS = 1.
    I_FIELDCAT-FIELDNAME = 'MATNR'.
    *I_FIELDCAT-TABNAME = 'ITAB'.
    I_FIELDCAT-REF_TABNAME = 'MATNR'.
    I_FIELDCAT-REF_TABNAME = 'LIPS'.
    APPEND I_FIELDCAT .
    *CLEAR I_FIELDCAT.
    I_FIELDCAT-COL_POS = 2.
    I_FIELDCAT-FIELDNAME = 'LGORT'.
    *I_FIELDCAT-TABNAME = 'ITAB'.
    I_FIELDCAT-REF_TABNAME = 'LIPS'.
    APPEND I_FIELDCAT .
    *CLEAR I_FIELDCAT.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
        I_INTERFACE_CHECK              = ' '
        I_BYPASSING_BUFFER             =
        I_BUFFER_ACTIVE                = ' '
         I_CALLBACK_PROGRAM             = SY-REPID
        I_CALLBACK_PF_STATUS_SET       = ' '
        I_CALLBACK_USER_COMMAND        = ' '
        I_STRUCTURE_NAME               =
        IS_LAYOUT                      =
         IT_FIELDCAT                    = I_FIELDCAT[]
        IT_EXCLUDING                   =
        IT_SPECIAL_GROUPS              =
        IT_SORT                        =
        IT_FILTER                      =
        IS_SEL_HIDE                    =
        I_DEFAULT                      = 'X'
        I_SAVE                         = ' '
        IS_VARIANT                     =
         IT_EVENTS                      = I_EVENTCAT[]
        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                       = ITAB
      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.
    i am unable to populate correct data into fields i am getting matnr values as all 1's
    and lgort as empty
    can anyone help me out
    thanks.

    HI there
    This is what i found on the Forum
    "You can use FM RS_VARIANT_CONTENTS to display ONE variant associated to a report
    If you want to see the information of ALL VARIANTS associated to a report I think the only way is checking table VARID to get all the variants associated to the report and then do a loop and call RS_VARIANT_CONTENTS for each variant."
    Regards
    Tatenda

  • Flash File not Able to Display using ADF Trinidad components..

    Hi All,
    I am trying to display a flash file using ADF trinidad component for one our project but not able to display when embeded inside the code.
    However I am able to directly access the flash file using http://localhost:7101/test/pages/test.swf
    The below Object code is included inside the tr:panelHorizontalLayout tag. I also tried using tr:media but doesnt display anything on the browser.
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="210" height="230" id="footer_ad1" align="bottom">
    <param name="allowScriptAccess" value="sameDomain"/>
    <param name="allowFullScreen" value="false"/>
    <param name="movie" value="http://localhost:7101/test/pages/test.swf"/>
    <param name="quality" value="high"/>
    <param name="bgcolor" value="#ffffff"/>
    <embed src="http://localhost:7101/test/pages/test.swf" quality="high" bgcolor="#ffffff" width="210" height="230" name="test" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave- flash" pluginspage="http://www.adobe.com/go/getflashplayer"/>
    </object>-->
    Thanks
    Chetan

    Hi Ramandeep,
    I tried that option early but did not work. Not able to understand why.
    Below is the code snippet.
    <tr:panelGroupLayout layout="vertical">
    <tr:panelHorizontalLayout>
    <!--Some Portlets are added-->
    <f:verbatim>
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="210" height="230" id="footer_ad1" align="bottom">
    <param name="allowScriptAccess" value="sameDomain"/>
    <param name="allowFullScreen" value="false"/>
    <param name="movie" value="http://localhost:7101/test/pages/test.swf"/>
    <param name="quality" value="high"/>
    <param name="bgcolor" value="#ffffff"/>
    <embed src="http://localhost:7101/test/pages/test.swf" quality="high" bgcolor="#ffffff" width="210" height="230" name="test" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave- flash" pluginspage="http://www.adobe.com/go/getflashplayer"/>
    </object>
    </f:verbatim>
    </tr:panelHorizontalLayout>
    </tr:panelGroupLayout>
    And as I mentioned it works fine when I directly access the flash file by using http://localhost:7101/test/pages/test.swf.
    Thanks
    Chetan

  • Not able to get the value in the next page

    Hi,
    I am newbee for JSF and this question may sound silly. I tried to search through this
    forum, google....but did not find a solution....I hope some one here could please help
    me :-(
    I have Page1 and Page2. Page1 has a h:inputText field and a submit button.
    On click of the "Submit" button in Page1, I have to pass this text value entered by
    the user to Page2. In Page2, I have <h:inputText readonly="true" /> field,
    which will display the value that the user entered in Page1. Also, Page2 has a "Submit"
    button. On click of Page2.Submit button, the value displayed in the Page2.textfield
    is not getting populated to the Page2 bean attribute.
    Here are the code that I am using
    1. Page1:
    <f:view>
    <h:form id="Page1">
         <h:inputText id="primaryKey" required="true" value="#{Page1.primaryKey}" />
         <h:commandButton id="command" value="Submit" action="Page1"/>
    </h:form>
    </f:view>
    2. Page2:
    <f:view>
    <h:form id="Page2">
         // Yes, Value attribute points to Page1.primaryKey to display user entered value in this page.
         <h:inputText id="test" value="#{Page1.primaryKey}" readonly="true" />
         <h:commandButton id="command" value="Submit" action="#{Page2.save()}"/>
    </h:form>
    </f:view>
    3. faces-config.xml
    <navigation-rule>
    <from-view-id>/Page1.jsp</from-view-id>
    <navigation-case>
    <from-outcome>Page1</from-outcome>
    <to-view-id>/Page2.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    <managed-bean>
    <managed-bean-name>Page1</managed-bean-name>
    <managed-bean-class>com.Page1Bean</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <navigation-rule>
    <from-view-id>/Page2.jsp</from-view-id>
    <navigation-case>
    <from-outcome>success</from-outcome>
    <to-view-id>/success.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    <managed-bean>
    <managed-bean-name>Page2</managed-bean-name>
    <managed-bean-class>com.Page2Bean</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    4. com.Page1Bean.java
    public class Page1Bean {
         private String primaryKey;
         //getter and setter method below
    5. com.Page2Bean.java
    public class Page2Bean {
         private String test;
         //getter and setter method below
         public String save() {
    Now let me explain my issue, I enter a value in Page1 -> click on submit -> I see this value in the text field of
    Page2. But when I click on submit button of Page2, test attribute is still null. Could you please suggest me what
    am I suppose to do inorder to get this value in Page2Bean when I click on save button?
    Hope to listen from one of you,
    Thank you,
    VinodRamu

    Go here
    http://jsffaq.com/
    Many of your questions will be answered

  • Not able to view the values on the report viewed using Query Report Viewer

    Hi all,
    There seems to be some unknown problem with the Report Template I have prepared and uploaded on PIA XML Publisher. When I run it with some ID set, it doesn't seem to show the values from the Data I give. For example if I have a field called ChartField in my report Template, It doesn't seem to get populated when I do SetID.
    Why is it so?

    Hi all,
      select bdmng from resb into corresponding fields of table it_stpo2
                for all entries in it_stpo
                 where matnr = it_stpo-idnrk
                 and xloek ne 'X'.
      loop at it_stpo2.
        move-corresponding it_stpo2 to it_stpo.
        append it_stpo.
      endloop.
    In the above code, m able to fetch the records in the table it_stpo2. but the data is not gettin populated in the final internal table it_stpo. Both the internal tables it_stpo & it_stpo2 are same.
    The data is gettin moved from it_stpo2 to it_stpo but only upto the header level. its not gettin appended in the table it_stpo even after using append stmt.
    Plz help me to resolve this issue. its urgent.
    Rgds,
    Purva

  • Not able to display the Node context attributes to table

    Hi Friends,
    Issue: Currently i am reading the Node parameters and assigning the parameters to the Context of the mainView.
    Then displaying the attributes into table here i am using a iterator to fetch the attributes.
    But its reading only one record to the table not all the attributes.
    Here i am attaching the code:
    Node is EvaluationDimensions and attributes are Dimension and Selected_values.
    Line: -
    public void wdDoInit()
       //@@begin wdDoInit()
    try
    IBONodeElement test = null;
    test = (IBONodeElement)wdThis.wdGetDefinedimensiongafController().wdGetContext().nodeEvaluationDimensions().currentEvaluationDimensionsElement().model();
    IBONode testNode = test.getBONode();
    Iterator it = testNode.iterator();
    IBONodeElement itElement = null;
    while(it.hasNext())
    itElement = (IBONodeElement)it.next();
    //wdContext.nodeEvaluationDimensions().createAndAddEvaluationDimensionsElement();
    wdContext.createAndAddEvaluationDimensionsElement();
    wdContext.currentEvaluationDimensionsElement().setDimension(itElement.getAttributeValue("KPIParameterDefinitionName").toString());
    wdContext.currentEvaluationDimensionsElement().setSelected_Values(itElement.getAttributeValue("ParameterSelectedValuesText").toString());
    } catch (RuntimeException e) {
    e.printStackTrace();
    wdThis.wdGetDefinedimensiongafController().wdGetAPI().getComponent().getMessageManager().reportSuccess(e.toString());
        //@@end
    Line: -
    Could you suggest me some alternatives to show all records into table??
    Thanks & Best Regards, Prabhu(9886855725)
    Edited by: Armin Reichert on Apr 24, 2008 12:57 PM

    Hi Prabhu
    IBONodeElement test = null;
    test = (IBONodeElement)wdThis.wdGetDefinedimensiongafController().wdGetContext().nodeEvaluationDimensions().currentEvaluationDimensionsElement().model();
    What is this model() .
    You remove the try catch method once and test it to trace the error.Why cant you use typed AccessAPI to fetch the values from the node element.Is your node have more elements test it.By getting the size of the node.
    That too you are setting values to only current context element .Not for other elements.Everytime you are setting the values to current context element,thats why you are getting only one element values at a time.Iterate properly and try to set the values for each element
    wdContext.currentEvaluationDimensionsElement().setDimension(itElement.getAttributeValue("KPIParameterDefinitionName").toString());
    See the above code every time you are setting to currentNode lement notforother elements.
    Regards
    kalyan

  • OAF page is not able to display the custom error messages

    Hi,
    I have extended a seeded CO and trying to throw few custom error messages.
    It was working fine, but suddenly it is not able to display the error messages(but checked that the error messages are still present in application) and saying "Message not found. Application: PER, Message Name: ...."
    Is there any profile option which enables the custom messages?
    Thanks,
    Ranita

    Hi,
    There is no profile to enable the Custom error Messages, u will use the diagnostistics for showing the messages in the custom page
    use the following syntax for writing a msg in Jdeveloper
    pageContext.writeDiagnostics(strClassName, "Initializing the vo....", OAWebBeanConstants.STATEMENT);
    and enable the following profile option to yes
    Fnd:Diagnostics
    Regards
    Chanu

  • I am not able to display the text conditionally

    i am not able to display the text conditionally

    Please check the below formula.
    i am not able to print all the below text,the text is printing only one line and some is missing.
    Please do the needful.
    @(If(("@Endrdesc1."=="EWWC006"),"12 It is hereby understood and agreed that any work in connection with the delivery or cartage of goods other than by hand, handcart, cycle or bicycle is expressly excluded from the indemnity granted under this policy 97 It is hereby understood and agreed that any work away from shop or studio is expressly excluded from the indemnity granted under this policy.",""))

  • Not able to display the Installation Base of once it unassigned from upper level Installation IBase.

    Hi All
    I am working on IBase scenario for my client, I am new to the IBase scenario. Here we are creating installation base for two to five levels of product.
    Once we create IBase for lower level then this IBase is inserted in upper level IBase. Like this we assign all levels based on product.In some cases we need to unassign any of IBase from its upper level IBase. When it is unassigned we are not able to display the IBase which unassigned. When it is unassigned from upper level how come system not able to display this IBase. If we speak functionally the part (IBase) which is unassigned should be valid to assign in any other upper level IBase in feature.
    The error I am getting for above is
    Serial number XXXXXXX for material XXXXXXX does not exist in any IBase
    Message no. IQ122
    Diagnosis
    Serial number BMF3000106 for material S24-D5022-C100-6 does not exist in any installed base on 31.03.2015 at 10:22:09.
    System Response
    The system cancels processing.
    Hi experts please suggest.
    Regards
    Kesava

    Hello Kesava
    Can you please explain in detail what exactly you are trying to do while assigning and unassigning Ibase.
    Regards
    Naresh

  • Not able to display the image on the popup.

    hi,
    my requirement is: i have command link on the form.which on clicked should display a popup and with in that popup a image should be shown. I have stored that image in the form of byte array.
    On clicking the link i am able to show the popup.But,not able to display the image on the popup.
    thanks in advance.
    Srikanth.V

    Hi,
    how do you access the image? Put yourself in our shoes and look at your question and then add the missing information. E.g. does the image show if loaded on a page itself and not a popup ?
    Frank

  • Not able to display the simple Node Text

    Hi All,
    I am creating a simple tree. Even though I pass the node-text  , I am not not to see the node-text in the screen.
    Nevertheless, when I try to debug and analyse, I am able to see the node-text in the node table that is formed.
    The simple error is annoying me.
    Any help would be highly appreciated...
    Thanks a lot!
    Best Regards,
    Vignesh Ravikumar

    Hi Prabhu
    IBONodeElement test = null;
    test = (IBONodeElement)wdThis.wdGetDefinedimensiongafController().wdGetContext().nodeEvaluationDimensions().currentEvaluationDimensionsElement().model();
    What is this model() .
    You remove the try catch method once and test it to trace the error.Why cant you use typed AccessAPI to fetch the values from the node element.Is your node have more elements test it.By getting the size of the node.
    That too you are setting values to only current context element .Not for other elements.Everytime you are setting the values to current context element,thats why you are getting only one element values at a time.Iterate properly and try to set the values for each element
    wdContext.currentEvaluationDimensionsElement().setDimension(itElement.getAttributeValue("KPIParameterDefinitionName").toString());
    See the above code every time you are setting to currentNode lement notforother elements.
    Regards
    kalyan

  • Not Updating the Values in the JComboBox and JTable

    Hi Friends
    In my program i hava Two JComboBox and One JTable. I Update the ComboBox with different field on A Table. and then Display a list of record in the JTable.
    It is Displaying the Values in the Begining But when i try to Select the Next Item in the ComboBox it is not Updating the Records Eeither to JComboBox or JTable.
    MY CODE is this
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.DefaultComboBoxModel.*;
    import javax.swing.table.*;
    import java.sql.*;
    import java.util.*;
    public class SearchBook extends JDialog implements ActionListener
         private JComboBox comboCategory,comboAuthor;
         private JSplitPane splitpane;
         private JTable table;
         private JToolBar toolBar;
         private JButton btnclose, btncancel;
         private JPanel panel1,panel2,panel3,panel4;
         private JLabel lblCategory,lblAuthor;
         private Container c;
         //DefaultTableModel model;
         Statement st;
         ResultSet rs;
         Vector v = new Vector();
         public SearchBook (Connection con)
              // Property for JDialog
              setTitle("Search Books");
              setLocation(40,110);
              setModal(true);
              setSize(750,450);
              // Creating ToolBar Button
              btnclose = new JButton(new ImageIcon("Images/export.gif"));
              btnclose.addActionListener(this);
              // Creating Tool Bar
              toolBar = new JToolBar();
              toolBar.add(btnclose);
              try
                   st=con.createStatement();
                   rs =st.executeQuery("SELECT BCat from Books Group By Books.BCat");
                   while(rs.next())
                        v.add(rs.getString(1));
              catch(SQLException ex)
                   System.out.println("Error");
              panel1= new JPanel();
              panel1.setLayout(new GridBagLayout());
              GridBagConstraints c = new GridBagConstraints();
              c.fill = GridBagConstraints.HORIZONTAL;
              lblCategory = new JLabel("Category:");
              lblCategory.setHorizontalAlignment (JTextField.CENTER);
              c.gridx=2;
              c.gridy=2;
              panel1.add(lblCategory,c);
              comboCategory = new JComboBox(v);
              comboCategory.addActionListener(this);
              c.ipadx=20;
              c.gridx=3;
              c.gridwidth=1;
              c.gridy=2;
              panel1.add(comboCategory,c);
              lblAuthor = new JLabel("Author/Publisher:");
              c.gridwidth=2;
              c.gridx=1;
              c.gridy=4;
              panel1.add(lblAuthor,c);
              lblAuthor.setHorizontalAlignment (JTextField.LEFT);
              comboAuthor = new JComboBox();
              comboAuthor.addActionListener(this);
              c.insets= new Insets(20,0,0,0);
              c.ipadx=20;
              c.gridx=3;
              c.gridy=4;
              panel1.add(comboAuthor,c);
              comboAuthor.setBounds (125, 165, 175, 25);
              table = new JTable();
              JScrollPane scrollpane = new JScrollPane(table);
              //panel2 = new JPanel();
              //panel2.add(scrollpane);
              splitpane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,panel1,scrollpane);
              splitpane.setDividerSize(15);
              splitpane.setDividerLocation(190);
              getContentPane().add(toolBar,BorderLayout.NORTH);
              getContentPane().add(splitpane);
         public void actionPerformed(ActionEvent ae)
              Object obj= ae.getSource();
              if(obj==comboCategory)
                   String selecteditem = (String)comboCategory.getSelectedItem();
                   displayAuthor(selecteditem);
                   System.out.println("Selected Item"+selecteditem);
              else if(obj==btnclose)
                   setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
              else if(obj==comboAuthor)
                   String selecteditem1 = (String)comboAuthor.getSelectedItem();
                   displayavailablity(selecteditem1);
                   //System.out.println("Selected Item"+selecteditem1);
                   System.out.println("Selected Author"+selecteditem1);
         private void displayAuthor(String selecteditem)
              try
              {     Vector data = new Vector();
                   rs= st.executeQuery("SELECT BAuthorandPublisher FROM Books where BCat='" + selecteditem + "' Group By Books.BAuthorandPublisher");
                   System.out.println("Executing");
                   while(rs.next())
                        data.add(rs.getString(1));
                   //((DefaultComboBoxModel)comboAuthor.getModel()).setVectorData(data);
                   comboAuthor.setModel(new DefaultComboBoxModel(data));
              catch(SQLException ex)
                   System.out.println("ERROR");
         private void displayavailablity(String selecteditem1)
                   try
                        Vector columnNames = new Vector();
                        Vector data1 = new Vector();
                        rs= st.executeQuery("SELECT * FROM Books where BAuthorandPublisher='" + selecteditem1 +"'");     
                        ResultSetMetaData md= rs.getMetaData();
                        int columns =md.getColumnCount();
                        String booktblheading[]={"Book ID","Book NAME","BOOK AUTHOR/PUBLISHER","REFRENCE","CATEGORY"};
                        for(int i=1; i<= booktblheading.length;i++)
                             columnNames.addElement(booktblheading[i-1]);
                        while(rs.next())
                             Vector row = new Vector(columns);
                             for(int i=1;i<=columns;i++)
                                  row.addElement(rs.getObject(i));
                             data1.addElement(row);
                             //System.out.println("data is:"+data);
                        ((DefaultTableModel)table.getModel()).setDataVector(data1,columnNames);
                        //DefaultTableModel model = new DefaultTableModel(data1,columnNames);
                        //table.setModel(model);
                        rs.close();
                        st.close();
                   catch(SQLException ex)
    }Please check my code and give me some Better Solution
    Thank you

    You already have a posting on this topic:
    http://forum.java.sun.com/thread.jspa?threadID=5143235

  • The value in flexfield context reference web bean does not match with the value in the context of the Descriptive flexfield web bean BranchDescFlex. If this in not intended, please go back to correct the data or contact your Systems Administrator for assi

    Hi ,
    We have enabled context sensitive DFF in Bank Branch Page for HZ_PARTIES DFF , We have created Flex Map so that only bank branch context fields are only displayed in the bank branch page and  as we know party information DFF is shared by supplier and Customer Page so we dint want to see any Bank Branch fields or context information in those pages.
    We have achieved the requirement but when open existing branches bank branch update is throwing below error message :
    "The value in flexfield context reference web bean does not match with the value in the context of the Descriptive flexfield web bean BranchDescFlex. If this in not intended, please go back to correct the data or contact your Systems Administrator for assistance."
    this error is thrown only when we open existing branches, if we save existing branch and open then it is not throwing any error message.
    Please let us know reason behind this error message.
    Thanks,
    Mruduala

    You are kidding?  It took me about 3 minutes to scroll down on my tab to get to the triplex button!
    Habe you read the error message? 
    Quote:
    java.sql.SQLSyntaxErrorException: ORA-04098: trigger 'PMS.PROJECT_SEQ' is invalid and failed re-validation
    Check the trigger and it should work again.
    Timo

  • Displaying the current users information instead of the value of the person who completed the form in the first place.

    I found this fantatic post regarding querying the user profile service 
    http://blogs.technet.com/b/anneste/archive/2011/11/02/how-to-create-an-infopath-form-to-auto-populate-data-in-sharepoint-2010.aspx?pi47623=2#comments 
    However i have an issue whenever the form is opened again either to view or edit, it displays the current users information
    instead of the value of the person who completed the form in the first place.
    Please help me, I'm turning more grey each minute

    I think it is how the current user information is stored based on your logic.
    You might be quering current value again when loading the form (Form load Rule).
    you have to tweak your logic, after the user submits the form you can set the username to the one who saved it.
    or in form load, write a logic to see if the form was not saved before and then query the username( by using internal field like "formstatue")
    Hope this helps!
    Ram - SharePoint Architect
    Blog - SharePointDeveloper.in
    Please vote or mark your question answered, if the reply helps you

  • Problem in JFreeChart to display the value of the axies????

    Hi!!!
    I have about 500 points, and I display with setValue. The problem is that I can't see the value below the graph, like this picture :
    http://putfile.com/pic.php?pic=8/23007045084.jpg&s=x1
    Is there a solution to not display all the value (for instance, one value of the ten value) or maybe to display an another way?
    Thanks

    wormseric, I guess this one is a minor case of cross-posting (I assume you posted there a while ago and nothing happened), but if you're going to do it next time, at least provide a link to the other forum's thread so we can see whether you already got an answer or not. Us writing yet another reply that was already given somewhere else is a waste of time.
    And second: please stay on topic. This is a forum about Java Programming with Sun's JDK, and no 3rd-party product support forum, however short the reply time may be.

Maybe you are looking for

  • How to get planned % complete based on number of days

    Hello: I a trying to figure out a way(best way) to determine a "planned % complete" simply based on the number of days in a task. For example: Task Start Date = 3/1/15 Task Finish Date = 3/20/15 So the task is 20 days long Today is 3/10/15 so "planne

  • DBMS_LOB and memory management

    Hello all, When I declare a CLOB variable (myclob) do I always have to free it with dbms_lob.freetemporary(myclob) at the end of my procedure ? I know I have to free it if it was created with dbms.createtemporary(myclob,....) but what happens when I

  • Number of rows in Excel sheet

    In ABAP reports, is there any logic to find number of rows in Excel sheet. Regards, Naseer.

  • How can I recover deleted iPhoto photos

    Hello, Just a few weeks ago, I noticed my hard drive was nearly to capacity on my imac, so thanks to the boards here, I moved my entire iPhoto library to an external hard drive.  The move was successful, however, recently I was organizing photos in i

  • Phone call times

    During a call, you can see the timer giving the duration of the call. Where do I look after the call, to find out how long it was?