JComboBox value to Color, .. help

OK below is the relevent sections of code.
          Color RosyBrown = new Color(188, 143, 143);
          Color SaddleBrown = new Color(139, 69, 19);
          Color SandyBrown = new Color(244, 164, 96);
          Color Beige = new Color(245, 245, 220);
          Color Brown = new Color(165, 42, 42);
          Color Burlywood = new Color(222, 184, 135);
          Color Chocolate = new Color(210, 105, 30);
          Color Peru = new Color(205, 133, 63);
          Color Tan = new Color(210, 180, 140);     
          private String[] colorString = {"RosyBrown", "SaddleBrown", "SandyBrown", "Beige", "Brown"};
               ratsColor = RosyBrown;
               colorChoice = new JComboBox(colorString);
               colorChoice.addActionListener(
                        new ActionListener() {
                            public void actionPerformed(ActionEvent e) {   
                                JComboBox combo = (JComboBox)e.getSource();
                                ratsColor = (Color)combo.getSelectedItem();
                    );Basically, Im trying to display readable text in the combo box when the user is selecting thier color, then translate that text into the actual java code for the color that is then passed to a drawing on screen to use the new selected color.
The error im getting is essentially: java.lang.ClassCastException: java.lang.String
Ive tried a few different ways of getting this to work, but am not having much luck. If anyone could give me a gentle nudge in the right direction it would be appreciated.

honestly...
Create your colors and use an array of those Color objects as the combobox data. Then create a custom cell renderer which takes the int RGB value of the color and looks up the color name in a ResourceBundle...
String name = bundle.getString("color." + Integer.toHexString(color.getRGB()));
color.112233=RosyBrown
color.112244=SaddleBrown
And then put a little color chip next to the color too, so people know what it really is. Or set the background or whatever.

Similar Messages

  • JComboBox in JTable   please help

    I have a JTable in my application which contains two JComboBox
    in two of his column ( suppose column one and column two).
    for each of these column (one and two) i have define a
    renderer.suppose (Combo1Render and Combo2Render).
    The first JComboBox is filled with the columns names of one of
    my database table and the second JComboBox is empty.
    I will like to do the following:
    When i select an item in the first JCombobox i will like to populate the second JComboBox according to the selected item in the first
    JComboBox and i will like to do this only to the "ACTIVE ROW".
    can someone tell me how to do this if possible with a sample code.
    the code i have write does't work wery well because when i choose
    an item in the first JComboBox the second JComboBox is populate (but this is not only done in the active row but in all the row in my JComboBox 2)
    In summary i will like to have the following behaviour:
    row ********** | JComboBox1 |******* JCombobox2
    (number)*******| (selected item) |** (items in JCombobOx2)
    0 ********** item1 *********** "a","b","c","d"
    1 ********** item2 ************ "p", "k", "j"
    2 ********** item3 ******* "h", "v", "l", "3", "x"
    please could you help me to do this?
    thanks you.

    Ok i got you.. Here is what you want.. You can modify it to suit you
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.table.*;
    public class ComboTable     extends     JFrame {
         public ComboTable(){
              super("ComboExample");
              DefaultTableModel dm = new DefaultTableModel();
              dm.setDataVector(
                                   new Object[][]{{"",""},
                                   new Object[]{"Column1","Column2"});
              final JTable table = new JTable(dm);
              // first combo box
              final JComboBox     comboBox = new JComboBox();
              comboBox.addItem("");
              comboBox.addItem("1");
              comboBox.addItem("2");
              comboBox.addItem("3");
              // Custon row editor.. for use in the second col... dif value for each row
              final RowEditor rowEditor=new RowEditor();      
              //add listener
              comboBox.addItemListener(
                                             new     ItemListener(){
                   public void     itemStateChanged(ItemEvent e){
                   if(e.getStateChange()==e.SELECTED){
                   int selRow=table.getEditingRow();
                   if(selRow==-1)
                   return;
                   Object sel=comboBox.getSelectedItem();
                   //update the second  col based on this selected laue
                   Object[] updateValue;// change with row
                   if(sel.equals("1")){
                   updateValue=new String[] {"a","b","c"};
                   rowEditor.setComboBoxValue(selRow,updateValue);       
                   else
                   if(sel.equals("2")){
                   updateValue=new String[] {"d","e","f"};
                   rowEditor.setComboBoxValue(selRow,updateValue);       
                   else
                   if(sel.equals("3")){
                   updateValue=new String[] {"g","h","i"};
                   rowEditor.setComboBoxValue(selRow,updateValue);       
              // make the editor of col1 as the default editor..
              table.getColumn("Column1").setCellEditor(  new DefaultCellEditor(comboBox));
              // make our Custom RowEditor as the editor of col 2...
              table.getColumn("Column2").setCellEditor( rowEditor );
              JScrollPane     scroll = new JScrollPane(table);
              getContentPane().add( scroll , BorderLayout.CENTER);
              setSize( 400, 100 );
              setVisible(true);
         public static     void main(String[] args) {
              ComboTable frame = new ComboTable();
              frame.addWindowListener( new WindowAdapter() {
                   public void windowClosing( WindowEvent e ) {
                   System.exit(0);
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.table.*;
    import javax.swing.event.*;
    public class RowEditor implements TableCellEditor {
         protected Hashtable editors;
         protected TableCellEditor defaultEditor,editor;
         public RowEditor() {
              editors = new Hashtable();
              defaultEditor=new DefaultCellEditor(new JComboBox() );
          * This is what you want....
         //set the value for the row..
         void setComboBoxValue(int row,Object[] values){
              System.out.println("setting ..roww"+row); 
              editors.put(new Integer(row),new  DefaultCellEditor(new JComboBox(values)));
         public boolean isCellEditable(EventObject anEvent) {
              return true;
         public Component getTableCellEditorComponent(JTable table,
                                                                 Object value, boolean isSelected, int row, int column) {
              System.out.println("geting value at"+row);   
              editor = (TableCellEditor)editors.get(new Integer(row));
              if (editor == null) {
                   editor = defaultEditor;
              return editor.getTableCellEditorComponent(table,value,isSelected,row,column)  ;
         public Object getCellEditorValue() {
              return editor.getCellEditorValue();
         public boolean stopCellEditing() {
              return editor.stopCellEditing();
         public void cancelCellEditing() {
              editor.cancelCellEditing();
         public void addCellEditorListener(CellEditorListener l) {
              editor.addCellEditorListener(l);
         public void removeCellEditorListener(CellEditorListener l) {
              editor.removeCellEditorListener(l);
         public boolean shouldSelectCell(EventObject anEvent) {
              return true;
      Hope it helped

  • What is the smallest Gcd value for Colors.

    Can anybody help me .
    Thanks,

    Hi
    From your title,
    >>what is the smallest Gcd value for Colors
    What do you mean about Gcd value?
    Do you have some code that you could show us to illustrate what you are trying to achieve? Or are you just
    talking in vague general terms about how you might go about writing some kind of code
    And the more details the better responses you will get. Thanks.
    Have a nice day!
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Need to restrict values in F4 help for Batch Characteristic

    Hi,
    I need to restrict values in F4 Help for a batch characteristic based on values entered for another characteristic. I could not find any BADI or Exit for this purpose. There is a BADI CACL_VALUE which is triggered after an entry is selected from dropdown list but nothing when we press F4. I thought of using Object Dependency but I need to write a programming logic for the requirement. Please let me know if there is any way to write program in Object Dependency or any other way for this requirement.
    Regards,
    Nikhil

    Hi nikhil simha,
    first of all, find out which search help is called.
    [Hierarchy of the Search Help Call|http://help.sap.com/saphelp_nw70/helpdata/en/0b/32e9b798da11d295b800a0c929b3c3/frameset.htm]
    may help you.
    If you know the search help, you may enhance it, but first of all you should check the where-used-list and make sure that the search help shows the requested behavior only in the context where you want it to.
    If it is your own program, you may be better off to create your own search help and define the triggering fields as search help interface input fields. Then you can use the values to filter results.
    Regards
    Clemens

  • Getting associated values from F4 Help

    Hi all,
    i have already searched about it on SCN but not get any thread where i can resolve my problem so here i am posting it, i have created a screen in which i have provided F4 help, in this F4 help i am showing name and associated number of employeees, when ever user picks any values from F4 help i wants to capture the associated number from the screen, for this what i have done till now is.
    I have created a F4 help and when user enters the values, i have used a PAI event to capture the corresponding values by using translation like shown below. Here ztable-rm_name is the screen field for which F4 help has been provided, and emp_code is the value i have to capture.
    MODULE NUMBER INPUT.
    IF ZTABLE-RM_NAME IS NOT INITIAL.
       IF IT_ZINCEN IS NOT INITIAL.
       SORT IT_ZINCEN BY RM_NAME.
       LOOP AT it_zincen INTO wa_zincen.
           TRANSLATE wa_zincen-RM_NAME TO UPPER CASE.
           wa_zincen1-rm_name = wa_zincen-rm_name.
           wa_zincen1-emp_code = wa_zincen-emp_code.
         APPEND wa_zincen1 TO it_zincen1.
       ENDLOOP.
       READ TABLE it_zincen1 INTO wa_zincen1 WITH KEY RM_NAME = ZSDPROJECT1-RM_NAME.
       IF SY-SUBRC = 0.
         EMP_CODE5 = WA_ZINCEN1-EMP_CODE.
       ENDIF.
    As you can see that i am fetching the emp_code through it_zincen1 which i have already got through the database and it contains the list of all employees
    and its associated numbers, the problem which i am getting is that , while fetching the data by passing rm_name it will provide the emp_code of first matching rm_name, so it will give an ambiguity in result , if there will be more than one employee in the database.
    So, i am looking for any other approach, that will give consistent result , i have done it through DYNP_VALUES_READ also, but not getting proper result, please if someone has the idea about how to achieve it, please tell me the solution.
    Thanks in advance.

    This is the code i have written in my program, please tell me what is wrong with this code
    MODULE GET_VALUES INPUT.
         IF ZSDPROJECT1-TYPE IS NOT INITIAL.
         IF ZSDPROJECT1-TYPE = '1'.
           SELECT EMP_CODE
                  DOJ
                  NAME
                  FROM ZDST INTO TABLE IT_ZDST.
            SORT IT_ZDST BY EMP_CODE NAME.
            DELETE ADJACENT DUPLICATES FROM IT_ZDST COMPARING EMP_CODE NAME.
        s_mapping-fldname     = 'F0001'.
        s_mapping-dyfldname   = 'NAME'.
        APPEND s_mapping TO t_mapping.
        CLEAR s_mapping.
        s_mapping-fldname     = 'F0002'.
        s_mapping-dyfldname   = 'EMP_CODE'.
        APPEND s_mapping TO t_mapping.
        CLEAR s_mapping.
    IF IT_ZDST[] IS NOT INITIAL.
       CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
         EXPORTING
    *     DDIC_STRUCTURE         = ' '
           RETFIELD               = 'NAME'
    *     PVALKEY                = ' '
          DYNPPROG               = SY-REPID
          DYNPNR                 = SY-DYNNR
          DYNPROFIELD            = 'ZSDPROJECT1-RM_NAME'
    *     STEPL                  = 0
          WINDOW_TITLE           = 'Select the Value'
    *     VALUE                  = ' '
          VALUE_ORG              = 'S'
    *     MULTIPLE_CHOICE        = ' '
    *     DISPLAY                = ' '
    *     CALLBACK_PROGRAM       = ' '
    *     CALLBACK_FORM          = ' '
    *     CALLBACK_METHOD        =
    *     MARK_TAB               =
    *   IMPORTING
    *     USER_RESET             =
         TABLES
           VALUE_TAB              = IT_ZDST
    *     FIELD_TAB              =
          RETURN_TAB             = T_RETURN
          DYNPFLD_MAPPING        = T_MAPPING
        EXCEPTIONS
          PARAMETER_ERROR        = 1
          NO_VALUES_FOUND        = 2
          OTHERS                 = 3
       IF SY-SUBRC <> 0.
    * Implement suitable error handling here
       ENDIF.
    ENDIF.
    ENDMODULE.

  • Dynamically passing the values to search help

    hi
    can I pass some values dynamically to search help input field.
    If I select a profit centre value from a drop down in separate field it should reflect the corresponding values in
    search help which is cost centre input field ( i/p fields is in a column of a UI element table).
    If I add one more row also the corresponding column should bears the search help...
    thanx in advance.......

    Data dictionary based search helps can have multiple importing parameters within Web Dynpro.  There are few rules that are documented in the online help however:
    Be aware that import and export parameters for the search help are determined only within the same context node (see also Transport of Values for the Input Help), and even then only if a Dictionary structure is assigned to the node.
    http://help.sap.com/saphelp_nw70/helpdata/EN/35/bdb6e2c48411d1950800a0c929b3c3/frameset.htm

  • Restrict User to specific Values in F4 Help.

    Hi All,
    How do we restrict user to some specific values in F4 Help. ?
    Thanks & Regards
    Himanshu Bhusan Sahoo.

    Hi,
    use this function module CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST''
    @  AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_werks(Field).
    and pass only those values to this function which must be shown to the user.
    Hope this helps you,
    Regards,
    Abhijit G. Borkar

  • Selected value in search help cannot be returned

    Hi experts!
    When I select value in search help, selected value is not returned to the field.
    I did like this.
    1. I enhanced BP using EEW.
    2. I created a new view and display an enhanced field via BSP workbench.
    (an enhanced field is assigned to a check table)
    3. I created GET_V_XX method as follows.
    method GET_V_ZZBUT000000102.
      DATA:
        ls_map    TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping,
        lt_inmap  TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping_tab,
        lt_outmap TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping_tab.
      ls_map-context_attr = 'STRUCT.ZZBUT000000102'.
      ls_map-f4_attr      = 'KEY'.
      APPEND ls_map TO: lt_inmap, lt_outmap.
      CREATE OBJECT rv_valuehelp_descriptor
        TYPE
          cl_bsp_wd_valuehelp_f4descr
        EXPORTING
          iv_help_id                  = 'CRMST_HEADER_OBJECT_BUIL-ZZBUT000000102'
          iv_help_id_kind             = if_bsp_wd_valuehelp_f4descr=>help_id_kind_comp
          iv_input_mapping            = lt_inmap
          iv_output_mapping           = lt_outmap.
    endmethod.
    Does anyone know what is wrong?

    Hi Yohei,
    You could resolve your issue by changing the value of the "ls_map-context_attr" to the attribute value seen on the F2 help on WebUI screen.
    If you change the value   ls_map-context_attr  to   'ZZBUT000000102' , then F4 help would work properly.
    Hence the correct code would be:
    method GET_V_ZZBUT000000102.
      DATA:
        ls_map    TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping,
        lt_inmap  TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping_tab,
        lt_outmap TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping_tab.
      ls_map-context_attr = 'ZZBUT000000102'.
      ls_map-f4_attr      = 'KEY'.
      APPEND ls_map TO: lt_inmap, lt_outmap.
      CREATE OBJECT rv_valuehelp_descriptor
        TYPE
          cl_bsp_wd_valuehelp_f4descr
        EXPORTING
          iv_help_id                  = 'CRMST_HEADER_OBJECT_BUIL-ZZBUT000000102'
          iv_help_id_kind             = if_bsp_wd_valuehelp_f4descr=>help_id_kind_comp
          iv_input_mapping            = lt_inmap
          iv_output_mapping           = lt_outmap.
    endmethod.
    Regards,
    Pratik Gandhi

  • Elementary Search help with distinct values. Kindly help!

    Hi Experts,
        I have to create a search help for Plant field. The Plant field is in a custom table YPLANT_DET. Unfortunately the plant field in this table is not unique.
    So the elementary search help will show duplicate plant entries.
    How to customize the elementary search help so that I get only distict values on F4 help?
    KIndly help!
    Thanks
    Gopal

    Hi,
    You need to use Search help exit...
    i am attaching below sample code..write the select query at appropriate location and pass the internal table to sub FM mentioned in the code..
    Code Sample
    BEGIN OF CODE SAMPLE -
    BEGIN OF INCLUDE LZSHLPTOP -
    FUNCTION-POOL zshlp. "MESSAGE-ID ..
    TYPE-POOLS shlp.
    TYPES:
    BEGIN OF t_knvp,
    kunnr TYPE kna1-kunnr,
    name1 TYPE kna1-name1,
    ort01 TYPE ort01_gp,
    stras TYPE stras_gp,
    kunn2 TYPE knvp-kunn2,
    name1_2 TYPE kna1-name1,
    END OF t_knvp.
    DATA: i_knvp TYPE TABLE OF t_knvp,
    wa_knvp TYPE t_knvp,
    wa_selopt TYPE ddshselopt,
    wa_fielddescr TYPE dfies.
    DATA:
    rc TYPE i,
    v_tabix LIKE sy-tabix.
    RANGES: r_ktokd FOR kna1-ktokd,
    r_mcod1 FOR kna1-name1,
    r_sortl FOR kna1-sortl,
    r_kunnr FOR kna1-kunnr,
    r_ort01 FOR kna1-ort01.
    END OF INCLUDE LZSHLPTOP -
    BEGIN OF FUNCTION MODULE Z_CUSTOM_SEARCH -
    FUNCTION z_custom_search.
    ""Local interface:
    *" TABLES
    *" SHLP_TAB TYPE SHLP_DESCR_TAB_T
    *" RECORD_TAB STRUCTURE SEAHLPRES
    *" CHANGING
    *" VALUE(SHLP) TYPE SHLP_DESCR_T
    *" VALUE(CALLCONTROL) LIKE DDSHF4CTRL STRUCTURE DDSHF4CTRL
    EXIT immediately, if you do not want to handle this step
    CASE callcontrol-step.
    STEP SELECT (Select values)
    This step may be used to overtake the data selection completely.
    To skip the standard seletion, you should return 'DISP' as following
    step in CALLCONTROL-STEP.
    Normally RECORD_TAB should be filled after this step.
    WHEN 'SELECT'.
    Change column header texts appearing on the search help hit list
    LOOP AT shlp-fielddescr INTO wa_fielddescr.
    v_tabix = sy-tabix.
    CASE wa_fielddescr-fieldname.
    WHEN 'KUNNR'.
    wa_fielddescr-fieldtext = 'ShipToCustomer#'.
    wa_fielddescr-reptext = 'ShipToCustomer#'.
    wa_fielddescr-scrtext_s = 'ShipTo #'.
    wa_fielddescr-scrtext_m = 'ShipToCustomer#'.
    wa_fielddescr-scrtext_l = 'ShipToCustomer#'.
    MODIFY shlp-fielddescr FROM wa_fielddescr
    INDEX v_tabix TRANSPORTING fieldtext reptext scrtext_s
    scrtext_m scrtext_l.
    WHEN 'KUNN2'.
    wa_fielddescr-reptext = 'BillToCustomer#'.
    wa_fielddescr-fieldtext = 'BillToCustomer#'.
    wa_fielddescr-scrtext_s = 'BillTo #'.
    wa_fielddescr-scrtext_m = 'BillToCustomer #'.
    wa_fielddescr-scrtext_l = 'BillToCustomer #'.
    MODIFY shlp-fielddescr FROM wa_fielddescr
    INDEX v_tabix TRANSPORTING fieldtext reptext scrtext_s
    scrtext_m scrtext_l.
    WHEN 'NAME1'.
    wa_fielddescr-fieldtext = 'ShipToCustomer Name'.
    wa_fielddescr-reptext = 'ShipToCustomer Name'.
    wa_fielddescr-scrtext_s = 'ShipTo Name'.
    wa_fielddescr-scrtext_m = 'ShipToCustomer Name'.
    wa_fielddescr-scrtext_l = 'ShipToCustomer Name'.
    MODIFY shlp-fielddescr FROM wa_fielddescr
    INDEX v_tabix TRANSPORTING fieldtext reptext scrtext_s
    scrtext_m scrtext_l.
    ENDCASE.
    ENDLOOP.
    Select the Bill to party customer based on the select options
    FREE: r_ktokd, r_kunnr, r_sortl, r_mcod1, r_ort01, i_knvp.
    LOOP AT shlp-selopt INTO wa_selopt.
    Build a Range for the 5 selection options of the search help
    CASE wa_selopt-shlpfield.
    WHEN 'KTOKD'.
    r_ktokd-sign = wa_selopt-sign.
    r_ktokd-option = wa_selopt-option.
    r_ktokd-low = wa_selopt-low.
    r_ktokd-high = wa_selopt-high.
    APPEND r_ktokd.
    CLEAR r_ktokd.
    WHEN 'KUNNR'.
    r_kunnr-sign = wa_selopt-sign.
    r_kunnr-option = wa_selopt-option.
    r_kunnr-low = wa_selopt-low.
    r_kunnr-high = wa_selopt-high.
    APPEND r_kunnr.
    CLEAR r_kunnr.
    WHEN 'SORTL'.
    r_sortl-sign = wa_selopt-sign.
    r_sortl-option = wa_selopt-option.
    r_sortl-low = wa_selopt-low.
    r_sortl-high = wa_selopt-high.
    APPEND r_sortl.
    CLEAR r_sortl.
    WHEN 'MCOD1'.
    r_mcod1-sign = wa_selopt-sign.
    r_mcod1-option = wa_selopt-option.
    r_mcod1-low = wa_selopt-low.
    r_mcod1-high = wa_selopt-high.
    APPEND r_mcod1.
    CLEAR r_mcod1.
    WHEN 'ORT01'.
    r_ort01-sign = wa_selopt-sign.
    r_ort01-option = wa_selopt-option.
    r_ort01-low = wa_selopt-low.
    r_ort01-high = wa_selopt-high.
    APPEND r_ort01.
    CLEAR r_ort01.
    ENDCASE.
    ENDLOOP.
    Retrieve data from KNVP table for the above selected ranges
    Doing query to retrieve data for the search help
    SELECT knvp~kunnr
    kna1~name1
    kna1~ort01
    kna1~stras
    knvp~kunn2
    INTO TABLE i_knvp
    FROM knvp
    INNER JOIN kna1
    ON knvpkunnr = kna1kunnr
    WHERE
    knvp~parvw = 'RE' AND " Bill to Party
    knvp~kunnr IN r_kunnr AND
    kna1~ktokd IN r_ktokd AND
    kna1~sortl IN r_sortl AND
    kna1~mcod1 IN r_mcod1 AND
    kna1~ort01 IN r_ort01.
    CHECK sy-subrc = 0.
    DELETE ADJACENT DUPLICATES FROM i_knvp.
    Select the short text for kunn2 from kna1.
    Move all the selected records to Record_Tab
    LOOP AT i_knvp INTO wa_knvp.
    v_tabix = sy-tabix.
    SELECT SINGLE name1 FROM kna1
    INTO wa_knvp-name1_2
    WHERE kunnr = wa_knvp-kunnr.
    MOVE wa_knvp TO record_tab-string.
    APPEND record_tab.
    CLEAR record_tab.
    MODIFY i_knvp FROM wa_knvp INDEX v_tabix.
    CLEAR wa_knvp.
    ENDLOOP.
    rc = 0.
    IF rc = 0.
    callcontrol-step = 'DISP'.
    ELSE.
    callcontrol-step = 'EXIT'.
    ENDIF.
    EXIT. "Don't process STEP DISP additionally in this call.
    WHEN 'PRESEL1'.
    WHEN 'DISP'.
    WHEN OTHERS.
    ENDCASE.
    ENDFUNCTION.
    END OF FUNCTION MODULE Z_CUSTOM_SEARCH -
    END OF CODE SAMPLE -
    Save and activate at every step.
    Regards,
    Chandra
    (Award points if helpful)

  • Restricting the Value of Search help in MIRO based on vendor

    Dear all,
    I had a problem in resticting the values of search help for vendor in the Po reference tab.  the Seach help is KRED  .  I had written a search help exit in it but i dont know how to restrict the vaues. I have to restict the Vendors Which starts with 1 series like 10000001,1000002 etc.
    Can any one help me out where to write the code in search help exit like CALLCONTROL-STEP = 'SELONE' or 'SELECT' or 'DISP' and what logic i need to use.
    Thanks & regards
    sreehari p

    Hi Sreehari,
    Write your Select query inside  IF callcontrol-step = 'DISP'.
    Use below code.
    *Types
      TYPES: BEGIN OF l_ty_tab,
             lifnr TYPE lifnr,
             END OF l_ty_tab.
      DATA: l_t_tab TYPE TABLE OF l_ty_tab,
            l_wa_tab TYPE l_ty_tab,
            l_wa_recordtab TYPE seahlpres.
    *Before displaying hitlist
      IF callcontrol-step = 'DISP'.
        REFRESH: record_tab[],l_t_tab[].
    SELECT LIFNR FROM lfa1 INTO TABLE l_t_tab WHERE lifnr LIKE '1%'.
    IF NOT l_t_tab[] IS INITIAL.
    *Pass hitlist to standard table record_tab
        LOOP AT l_t_tab INTO l_wa_tab.
          l_wa_recordtab-string = l_wa_tab.
          APPEND l_wa_recordtab TO record_tab.
          clear l_wa_recordtab.
        ENDLOOP.
      ENDIF.
      ENDIF.
    Thanks,
    Sap Fan

  • Color help please!

    Color help please!
    When I view a file in CS5, the colors are vastly different than when I view the same file from any other program on my computer.  I calibrate regularly and want to be viewing as per the calibration on CS5- are there setting I need to change in CS5 or are those accurate and I need to change the settings in my control panel??  Thank you!!

    So that you can be better helped,what OS/version are you running,what software/hardware do you calibrate your monitor with,and what are the Color Preference settings in Photoshop?  That can be accessed with Ctrl + Shift + k in Photoshop. If you can manage a screenshot of just that Preference dialog,it will help a lot.
    I'll add that Windows applications are not color managed as Photoshop is. Windows and many files you see on the web are sRGB. If Photoshop's Color Workspace  is set to either Adobe RGB or Pro-Photo, a regular color graphics file  will show up with the colors saturated. That's because most color files do not have a tag telling Photoshop what color space it came from and Photoshop if set to other than sRGB will not display it properly.
    You could set Photoshop's Working space to sRGB (North American General Defaults 2) if your pictures are intended for the web, or if you must use Adobe RGB (commercial press work),then you must tag or Assign an sRGB profile if your file has no profile assigned. If it already has a tag other than sRGB, then you make a copy and Convert it to sRGB to display properly in Windows apps.
    That's a rough guess as to why your files do not display properly in CS5. Assign Profile and Convert to Profile are both under PS's Edit Menu.
    Gene

  • Illustrator cs5 changes Kuler color values when importing, Help!

    I am using Illustrator cs5. I access the Kuler Color theme feature for color themes. I will select a them from the Kuler feature
    and then choose to add that theme to my swatch panel. I then check the individual colors in the color panel. Here is the
    problem: when illustrator brings in the Kuler colors to the Illustrator color panel it will change the values of that color which
    changes the actual color. For instance a bright green becomes a muted turquoise. This conclusion is not by my sight,
    because I have opened the specific color theme at the Kuler Web sight and obtained the CMYK values for those colors,
    and then gone back to the Illustrator color panel and compared then values there. The values are changed which creates
    a different color --- obviously. So how can I use the Kuler feature when illustrator changes the values on me which then
    changes the color? Help

    I dont know what my color settings are at this point.
    I download the Kuler color theme straight from the Kuler panel open on my desktop. I open
    the drop down menu options and choose: add this theme to your color swatches. The
    theme is moved over to the swatch panel while I am using Illustrator.
    I don't know what you mean by your last question.

  • Use a parameter value in F4 help / Implement a wildcard F4 help

    Hi,
    I would like to implement a F4 help for a parameter. The user should be able to enter a text to the parameter field hit F4 and get and help screen related to the text he just entered. (pretty much like the F4 help for SE16 or SE83)
    My problem is, that the entered text is not available in the report.
    REPORT SELECTION_SCREEN_F4_DEMO.
    PARAMETERS: filename TYPE localfile LOWER CASE.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR filename.
      CALL SCREEN 100 STARTING AT 10 5
                      ENDING   AT 50 10.
    MODULE VALUE_LIST OUTPUT.
      SUPPRESS DIALOG.
      LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.
      SET PF-STATUS SPACE.
      NEW-PAGE NO-TITLE.
      WRITE: 'Pattern:', filename COLOR COL_HEADING.
    * selection of filenames ...
      CLEAR filename.
    ENDMODULE.
    AT LINE-SELECTION.
      CHECK NOT filename IS INITIAL.
      LEAVE TO SCREEN 0.
    If a value was entered at the selection screen and a break point is set in MODULE VALUE_LIST OUTPUT, value filename is always empty.
    How can the current value of parameter filename be accessed in the program?
    Thanks in advance
    Dominik

    You would have to use a form, with hidden parameters and a method="post". Your Next link could be a submit button, or be a link with an onclick event that submitted the form:
    <c:url var="thisURL" value="homer.jsp"/>
    <form name="iqform" action="<c:out value="${thisURL}"/>">
      <input type="hidden" name="iq" value="<c:out value="${homer.iq}"/>"/>
      <input type="hidden" name="checkAgainst" value="marge simpson"/>
      <input type="submit" value="Next"/>
      <!-- or -->
      <script type="text/javascript">
        function submitIqForm() {
          document.iqform.submit();
      </script>
      <a href="javascript: submitIqForm()">Next</a>
    </form>

  • Photoshop CS5 color help.

    Hey, I tried figuring this out myself but to no avail. so I am asking anyone here for some advice.
    I am trying to make a "lightsaber" effect on some images. In an earlier version of photoshop (earlier than the CS versions i think) it ended up as the blade with its color on a black background. This image was placed on top of my image, the blending mode changed to screen, and it turned out fine. The black disappeared, and the blade kept its vibrant color.
    Tutorial I used: http://alienryderflex.com/rotoscope/
    Blade image before "screeining" over background image: http://i447.photobucket.com/albums/qq192/CrazedOne1988/lasers.jpg
    I've tried this in cs3 and cs5, but something in the program must have changed. When I set the "blades" image to screen, the blade color ends up blending into the background color (altering the blades color) and ends up completely disappearing against a white background. The blade color alters based on what color the image behind it is. I want the blades to keep their vibrant color regardless of what background it is against. Any advice?
    Pre-CS: http://i447.photobucket.com/albums/qq192/CrazedOne1988/endoftheworld.jpg
    CS3 CS5: http://fc09.deviantart.net/fs37/i/2008/284/8/1/Halo_Star_Wars_by_CrazedOne1988.jpg (blade color in this image was set to Red:0 Green: 127 Blue: 255, a clear cyan blue color, and it's blending into the orange, creating a purplish blue color)

    When I set the "blades" image to screen, the blade color ends up blending into the background color (altering the blades color) and ends up completely disappearing against a white background.
    Of course they will disappear against a white background.
    The Blending Mode Screen can only produce lighter values (you can figure out the math yourself or check out the Help, »Blending mode descriptions«) so on white it will result in white.
    Anyway, I guess the intended effect may possibly be approximated with Blend Mode Normal.
    In the case of your example a Selection based on Green used to make a Green (0/255/0) Solid Color Layer, a Selection based on either Red or Blue as the basis of a white Solid Color Layer could be used.
    On Black the results are identical, on lighter backgrounds the result will differ increasingly, but one can still control the aura via Opacity.

  • Calculated value and color change

    I am a newbie desiging a form in Livecycle. 
    Have a table with some calculated fields - using formcalc. 
    I want to change the color of these fields based on the calculated value but I don't know how to have multiple events occurring in the one cell. 
    I can get it working if I put the color change script into the exit event of the cell but as it's a read only cell, the user will not be exiting the cell.  I have had no luck putting the color change script elsewhere.  Any help would be appreciated.

    Actually, in full screen mode the top is cut off! I never noticed that since I always use full screen. This only happens in ACR. All other screens are fully represented. I may cut back on the height adjustment and see if I can see the top. Thanks for pointing it out, Ramon.
    Back to the problem at hand, if you notice, all sliders are at -0-, and if you could look at all the adjustment panels, everything is neutral. So, what is it adjusting?
    If I open a RAW file I also get the triangle, but when it disappears only the slightest change is noticeable in the histogram, and nothing in the image itself. This is true even with the .nefs tweaked.
    Finally, the image 1 is correct with respect to the same file in PS. I compared the screen shot to the full image side by side, in PS. Image 2 is not. If I do a tweak in ACR then open in PS, it's not what I want to see.
    This particular frame is tagged with the ACR icon in Bridge, but I have other tiffs that are not, and the same thing occurs.
    FAPP, I cannot not color correct in ACR with a tiff. I do it as an .nef

Maybe you are looking for