How to edit the list box items in labwindow/​CVI?

 how to edit the list box items in labwindow/CVI?

Listbox items cannot be edited directly in the control: what you can do is to select a line an, transfer its content to a textbox control, edit text there and move text back to the listbox control. Available interactions with the listbox control are listed in the help.
An alternative to it is to use a tree customized to appear like a listbox: tree item labels can be edited directly in the control, at least those in the base column of the tree. You can look at the example \samples\userint\treelist.cws that shows how a tree can be customized this way. I haven't opened it, but this old example too should show the ability to edit tree cells.
Proud to use LW/CVI from 3.1 on.
My contributions to the Developer Zone Community
If I have helped you, why not giving me a kudos?

Similar Messages

  • How to create the list box in the selection screen.

    hai friends..
    i want to create the list box for the selection screen input boxes.
    thanks,
    velu.

    hi..
    1. There are two important things :
    a)PARAMETERS : a(10) TYPE c AS LISTBOX VISIBLE LENGTH 10.
    b) Fm VRM_SET_VALUES
    2. just copy paste
    3.
    REPORT abc.
    TYPE-POOLS : vrm.
    DATA : v TYPE vrm_values.
    DATA : vw LIKE LINE OF v.
    PARAMETERS : a(10) TYPE c AS LISTBOX VISIBLE LENGTH 10.
    INITIALIZATION.
    vw-key = '1'.
    vw-text = 'Jan'.
    APPEND vw TO v.
    vw-key = '2'.
    vw-text = 'Feb'.
    APPEND vw TO v.
    vw-key = '3'.
    vw-text = 'Mar'.
    APPEND vw TO v.
    CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
    id = 'A'
    values = v
    EXCEPTIONS
    id_illegal_name = 1
    OTHERS = 2.
    regards,
    veeresh

  • How to change the list box to F4 Help for Billing type in VF01

    Hi All,
    In VF01 for Billing type i am getting List box. Now  I have to add one more field to that list box.
    like  F1 invoice
           F2 Invoice returns.
    or
    Is there any possiblity of making it as F4 Help instead of List Box.
    Please throw some lite on this issue.
    Regards,
    Rohit.

    Hi ,
    The list box is getting the value from the table TVFK .
    You can get the table name from the VALUE  TABLE of  FKART which is the domain
    for the field Billing Type .
    You need to Update the table TVFk programatically. Like  - -
    TABLES : tvfk.
    tvfk-FKART = 'F1'.  " Billing type
    tvfk-KOPGR =
    tvfk-VTEXT = 'Invoice '.  " Billing type description
    UPDATE TVKF FROM TVKF.  " Update the table
    Similarly you have to update the table by the F2 and and description.
    tvfk-FKART = 'F2'.
    tvfk-KOPGR =
    tvfk-VTEXT = 'Invoice returns'.
    UPDATE TVKF FROM TVKF.
    Regards
    Pinaki

  • How to color a list box item at run time

    I do not want to change colors in a selected or a highlighted item.  I want to color foreground on any item based on a program condition.
    IN windows forms I could change the drawmode property to ownerdrawfixed and then override the listbox rendering event and paint the item based on condition.
    I don not find such a property in the WPF listbox.  Is there a different way to do this?
    NR

    Thanks Olaf.   I changed the section below to my code as you suggested and it works fine now.  I can now modify it to make it applicable to other scenarios.
    public
    partial
    class
    MainWindow
    : Window
    public
    System.Collections.ObjectModel.ObservableCollection<string>
    MyItems { get;
    set;
    public
    MainWindow()
    MyItems =
    new
    System.Collections.ObjectModel.ObservableCollection<string>();
    InitializeComponent();
    private
    void
    button1_Click(object
    sender, RoutedEventArgs
    e)
    MyItems.Add(textBox1.Text);
    this.DataContext
    = this;
    NR

  • How to move up the List Box for para. values in the "Edit Values" window?

    Hi,
    I am using Crystal Reprots 11.
    I create 10 subreports, and each subreport contains a Parameters Field.
    The 10 subreports are put in 10 footer sections in increasing order, i.e. subreport1, subreport2, subreport3, ..., subreport10.
    When I use "Print Preview" to take a look at the whole report, CR prompts a "Edit Values" window for selecting parameter values.
    Maybe because I created subreport3 & subreport4 after I completed other subreports, the List Box with the values required to select for subreport3 & subreport4 were located at the bottom of the "Edit Values" window.
    How to move List Box with the values required to select for subreport3 & subreport4 up to the proper location (based on the order of subreports) in the "Edit Values" window?
    Thank you in adavance.

    Hi,
    Yes, that is true. The subreport parameters are prompted in the order you insert the subreport.
    The only way to fix this is to save subreports from 5 through 10 (Right-click subreport > select Save Subreport as) first.
    So, now all you have is Subreports 1, 2 and 3. Go ahead and add the Subreports from 5 to 10 in order and the prompts should be in order too.
    -Abhilash

  • How to limit the number of items in a KPI Status list web part?

    How to limit the number of items in a KPI Status list web part? There is no paging option for Business Category Status list or any limit can be made by changing the Item limit in default view unlike other SharePoint List web parts. So How to achieve it?
    Kindly help.
    Regards,
    ZA
    zzzSharePoint

    Hi,
    According your post, I know you would like to set the item display limit in Status List web part.
    In the web part, the number of items to display is based on the view which you selected when configuring the web part. The default view for status list is status list view.
    However, I am not able to limit the items’ display number of the status list view. After changing the items limit, the list item displayed would not match the number specified by Item Limit. Thus, it is not possible to limit the number
    of items in the Status list web part.
    It could be a potential issue in SharePoint 2010.
    We will log this issue to our suggestion box. As after the submission, we may not have any time guarantee when the fix may be released, but it may come out on next cumulative update.
    Appreciate your time and efforts.
    Thanks.
    Tracy Cai
    TechNet Community Support

  • How do  we check the check box items based on the databse fields.

    Hi All,
    I have a requirement like as mentioned below#
    1. I have a combox box whcih i will be populated from database.
    2. I have created two check box as "Stategric " and "Non Stategric".
    3. Now when i select the combox box condition i need to select the check box items.
    4. But the problem is i wil be knowing weather it is a stategric or Non stategirc based on the database column.
    5. How do i need to map the database point of view and correlacte with javascript pont of view.
    6. Do we need to write any Application process to achieve this task and who we can do that.
    Thanks,
    Anoo..

    Hi VC,
    As per my understanding the code should be placed between --.
    Based on this i have placed the code
    function setCheckbox(pThis, pItem){
    alert('inside');
        var l_code = '';
        // Get checkbox name
        rName = document.getElementsById('P1_ENG_BAU').firstChild.name;
    alert("The value is"+rName);
        // Fire AJAX
        var get = new htmldb_Get(null,html_GetElement('pFlowId').value,'APPLICATION_PROCESS=CHECKBOX_LIST',0);
        get.add('F120_COMPANY',pThis.value);
        gReturn = get.get('XML');
        if (gReturn) {
          var values = gReturn.getElementsByTagName('value');
          var messages = gReturn.getElementsByTagName('message');
          // Build the checkbox
          for (i=0; i<values.length; i++) {
            var rValue = values.firstChild.nodeValue;
    var rMessage = messages[i].firstChild.nodeValue;
    l_code+='<input id='+P1_ENG_BAU+'_'+i+' type=checkbox value='+rValue+' name='+rName+'>';
    l_code+='<label for='+P1_ENG_BAU+'_'+i+'>'+rMessage+'</label>
    document.getElementsById('P1_ENG_BAU').innerHTML = l_code;
    Correct me if iam understanding is wrong.
    Thanks,
    Anoo..
    Edited by: Anoo on May 31, 2012 11:04 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to change the order of the List box entries in GET attributes - Account

    Hi,
    We have four entries in the List box for the GET attribute in the Account. Please help me out, how we could change the order of the entries ? Is there any place in PCUI I can do the changes ?
    Thanks & Regards,
    Jagadees K Arumugam

    Hey Doc!
    Thanks for your effort!
    Seems like the picture I posted was confusing, I actually wanted to show, what indesign does, not what I want to achieve!
    I downloaded your template and that's exactly what I want to achieve! But I still have trouble reconstructing what you did:
    How did you link the captions to the TOC?
    The captions have a paragraph style which looks exactly like mine, also the paragraph style of the TOC doesn't look much different. So where does the difference hide?
    EDIT: Kannst Du mir sagen, wie diese Verlinkung auf Deutsch heißt? Dann find ich's vielleicht auch von selbst

  • How to limit the number of items that a list control can hold?

    Hi,
    I am using a Flex3 List control for one of my projects.
    I add drag & drop functionality to it, so that i can drag & drop elements from one control to another.
    How to limit the number of items that a list control can hold / can be dropped in a list control ?
    - Sen.

    1. Listen for the dragdrop event on the control you are dragging onto.
    2. check the length of the items in the dataprovider - if it exceeds your maximum override the default drop action with e.preventDefault(); (assuming you used e for the event on the handler).
    Regards,
    Mark.

  • How do I clear list of items purchased without deleting the apps?

    How do I clear list of items purchased without deleting the apps? Also, is there away to attach photos from camera roll when replying or writing a new email?

    There is no way to remove items from the purchased list on the iPad.
    You can send a photo from the mail app by tapping and holding down in the body of the email and select - Insert Photo or Video - from the black options bar that will pop up.

  • How scroll through a list of items in list box with code in C# winforms to create auto scrolling

    I am new to programming and I have been tasked to create a form to display information in list box controls on a big screen. The list boxes have to show all data by auto scrolling through all data row by row then start again at the top once it has displayed
    all data. Is there a way to do this automatically in code using a timer? I look all over the web and have not found any way to do this in win win forms. Is it possible?
    Thanks 

    Here's the c# code
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Text;
    using System.Windows.Forms;
    namespace WindowsApplication13
    public partial class Form1 : Form
    System.Timers.Timer timer = new System.Timers.Timer();
    int position = 0;
    public delegate void delegateUpdateListbox();
    public Form1()
    InitializeComponent();
    private void Form1_Load(object sender, EventArgs e)
    timer.Interval = 1000;
    timer.Enabled = true;
    timer.Elapsed += new System.Timers.ElapsedEventHandler(timer_Elapsed);
    void timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
    position += 1;
    if (position == listBox1.Items.Count)
    position = 0;
    delegateUpdateListbox deleg = new delegateUpdateListbox(updateListbox);
    this.Invoke(deleg);
    void updateListbox()
    listBox1.SelectedIndex = position;
    As long as the listbox's SelectionMode is set to "One" (the default), you don't have to do anything to un-select the previous item.
    For your secnd question, the code inside the timer checks whether the position is the same as the length of the contents of the listbox and resets its value to zero, so that the selection will go back to the first item in the list.

  • Hi gurus in ALV how to edit the fields on out put list

    hi gurus in ALV how to edit the fields on out put list

    hi
    REPORT ZSB_ALV_EDITABLE_SAMPLE.
    TABLES: SFLIGHT.
    DATA: gc_container TYPE scrfname VALUE 'LIST_AREA',
    gc_custom_container TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
    gc_grid TYPE REF TO CL_GUI_ALV_GRID,
    gs_layout TYPE LVC_S_LAYO,
    gt_fieldcat TYPE LVC_T_FCAT.
    DATA: ok_code TYPE SY-UCOMM.
    DATA: gt_outtab TYPE TABLE OF SFLIGHT.
    *DYNPRO
    CALL SCREEN 100.
    *& Module STATUS_0100 OUTPUT
    MODULE STATUS_0100 OUTPUT.
    SET PF-STATUS '100'.
    CREATE OBJECT gc_custom_container
    EXPORTING
    container_name = gc_container
    EXCEPTIONS
    cntl_error = 1
    cntl_system_error = 2
    create_error = 3
    lifetime_error = 4
    lifetime_dynpro_dynpro_link = 5
    OTHERS = 6.
    CREATE OBJECT gc_grid
    EXPORTING
    i_parent = gc_custom_container
    EXCEPTIONS
    error_cntl_create = 1
    error_cntl_init = 2
    error_cntl_link = 3
    error_dp_create = 4
    OTHERS = 5 .
    PERFORM prepare_field_catalog CHANGING gt_fieldcat .
    PERFORM prepare_layout CHANGING gs_layout .
    PERFORM get_alv_display.
    ENDMODULE.
    *& Module USER_COMMAND_0100 INPUT
    MODULE USER_COMMAND_0100 INPUT.
    OK_CODE = SY-UCOMM.
    IF OK_CODE = 'BACK'.
    SET SCREEN 0.
    LEAVE SCREEN.
    CLEAR OK_CODE.
    ENDIF.
    ENDMODULE.
    FORM prepare_field_catalog CHANGING gt_fieldcat TYPE LVC_T_FCAT.
    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
    EXPORTING
    I_BUFFER_ACTIVE =
    I_STRUCTURE_NAME = 'SFLIGHT'
    I_CLIENT_NEVER_DISPLAY = 'X'
    I_BYPASSING_BUFFER =
    I_INTERNAL_TABNAME =
    CHANGING
    ct_fieldcat = gt_fieldcat[].
    ENDFORM.
    FORM prepare_layout changing p_gs_layout TYPE lvc_s_layo.
    p_gs_layout-zebra = 'X'.
    p_gs_layout-edit = 'X'.
    ENDFORM. " prepare_layout
    FORM get_alv_display .
    SELECT * FROM sflight INTO TABLE gt_outtab UP TO 10 ROWS.
    CALL METHOD gc_grid->set_table_for_first_display
    EXPORTING
    I_STRUCTURE_NAME = 'SFLIGHT'
    IS_LAYOUT = gs_layout
    CHANGING
    it_outtab = gt_outtab
    IT_FIELDCATALOG = gt_fieldcat
    ENDFORM. " get_alv_display

  • How to edit the find-and-replace dialog in Dreamweaver 8

    For over 13 years I have been a happy user of Macromedia Dreamweaver 8. And I still see no reason to use any other program for editting PHP.
    However, 1 thing has been bugging me for years. In the find-and-replace dialog there is a select "Find in". The options are in a dropdown.
    I want this select to be a multiselector (not in functionality, but just so I don't need to click to get the dropdown, but just one click to select).
    I read in the help at 'Customizing the appearance of dialog boxes' at point 4
    On your disk, find the appropriate HTM file in the Configuration/Objects, Configuration/ Commands, or Configuration/Behaviors folder.
    I've been searching but can not find the code for that dialog, althou it should be easy. Also did a search for that 'save' image, because once I find that, I can find this form, but its not in the macromedia folder.
    how to edit the find-and-replace dialog in Dreamweaver 8?

    It's looks less like an image and more like a form drop list to me.
    Yes its a dropdown list. But to find the code for that select I tried to find the htm file that code is on by searching for the save-image which is also on that page (next to the yellow folder). I did a search on all folders in c:/programfiles/macromedia and that image is not in there. If I could find the image name, I could search the code for that and should find that htm (or javascript) which is outputting it, then the select must be near to that.
    I also searched the code for the various texts on the page and got many hits, but not from the dialog page. I can't search dll files, so maybe thats where that code is in.

  • Event for the List Box in ALV Grid Control

    Hello,
    I have the below urgent requirment.
    I have an ALV Grid Control built using ABAP Objects. In the grid, I have few fields and one of these fields is a List Box. Depending on the values selected, I need to enable or disable some fields. So, is there any event for the List box in ALV Grid Control.
    For ex: I have 2 Fields, Designation and Commission. The designation field is a List Box field having 'Software Engineer' and 'Manager' as values. When I select 'Software Engineer', the commission field should be disabled. When I select 'Manager', the comission field should be enabled.
    Early reply is hightly appreciated.
    Priya

    REPORT  ZTEST1234    MESSAGE-ID ZZ                           .
    DATA: G_GRID TYPE REF TO CL_GUI_ALV_GRID.
    DATA: L_VALID TYPE C,
          V_FLAG,
          V_DATA_CHANGE,
          V_ROW TYPE LVC_S_ROW,
          V_COLUMN TYPE LVC_S_COL,
          V_ROW_NUM TYPE LVC_S_ROID.
    DATA: OK_CODE LIKE SY-UCOMM,
          SAVE_OK LIKE SY-UCOMM,
          G_CONTAINER1 TYPE SCRFNAME VALUE 'TEST',
          GS_LAYOUT TYPE LVC_S_LAYO.
    DATA:BEGIN OF  ITAB OCCURS 0,
         VBELN LIKE LIKP-VBELN,
         POSNR LIKE LIPS-POSNR,
         COMISN(10),
         CELLCOLOR TYPE LVC_T_SCOL, "required for color
         DROP(20),
        <b> HANDLE_STYLE TYPE LVC_T_STYL,</b>
         END OF ITAB.
    *       CLASS lcl_event_handler DEFINITION
    CLASS LCL_EVENT_HANDLER DEFINITION .
      PUBLIC SECTION .
        METHODS:
    **Hot spot Handler
        HANDLE_HOTSPOT_CLICK FOR EVENT HOTSPOT_CLICK OF CL_GUI_ALV_GRID
                          IMPORTING E_ROW_ID E_COLUMN_ID ES_ROW_NO,
    <b>**Handler to Check the Data Change
        HANDLE_DATA_CHANGED FOR EVENT DATA_CHANGED
                             OF CL_GUI_ALV_GRID
                             IMPORTING ER_DATA_CHANGED
                                       E_ONF4
                                       E_ONF4_BEFORE
                                       E_ONF4_AFTER,</b>
    **Double Click Handler
        HANDLE_DOUBLE_CLICK FOR EVENT DOUBLE_CLICK OF CL_GUI_ALV_GRID
                                         IMPORTING E_ROW E_COLUMN ES_ROW_NO.
    ENDCLASS.                    "lcl_event_handler DEFINITION
    *       CLASS lcl_event_handler IMPLEMENTATION
    CLASS LCL_EVENT_HANDLER IMPLEMENTATION.
    *Handle Hotspot Click
      METHOD HANDLE_HOTSPOT_CLICK .
        CLEAR: V_ROW,V_COLUMN,V_ROW_NUM.
        V_ROW  = E_ROW_ID.
        V_COLUMN = E_COLUMN_ID.
        V_ROW_NUM = ES_ROW_NO.
        MESSAGE I000 WITH V_ROW 'clicked'.
      ENDMETHOD.                    "lcl_event_handler
    *Handle Double Click
      METHOD  HANDLE_DOUBLE_CLICK.
      ENDMETHOD.                    "handle_double_click
    <b>**Handle Data Change
      METHOD HANDLE_DATA_CHANGED.
        DATA: X_CHANGE TYPE LVC_S_MODI,
                X_FINAL TYPE ITAB,
                L_FLAG,
                LS_OUTTAB LIKE LINE OF ITAB.
        DATA: LS_EDIT TYPE LVC_S_STYL,
              LT_EDIT TYPE LVC_T_STYL.
        LOOP AT ER_DATA_CHANGED->MT_GOOD_CELLS INTO X_CHANGE.
          IF X_CHANGE-FIELDNAME = 'DROP' AND X_CHANGE-VALUE = 'S/W ENGINEER'.
            LS_EDIT-FIELDNAME = 'COMISN'.
            LS_EDIT-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_DISABLED.
            LS_EDIT-STYLE2 = SPACE.
            LS_EDIT-STYLE3 = SPACE.
            LS_EDIT-STYLE4 = SPACE.
            LS_EDIT-MAXLEN = 8.
            INSERT LS_EDIT INTO TABLE LT_EDIT.
            INSERT LINES OF LT_EDIT INTO TABLE LS_OUTTAB-HANDLE_STYLE.
            MODIFY ITAB INDEX X_CHANGE-ROW_ID FROM LS_OUTTAB  TRANSPORTING
                                              HANDLE_STYLE .
          else.
            LS_EDIT-FIELDNAME = 'COMISN'.
            LS_EDIT-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_ENABLED.
            LS_EDIT-STYLE2 = SPACE.
            LS_EDIT-STYLE3 = SPACE.
            LS_EDIT-STYLE4 = SPACE.
            LS_EDIT-MAXLEN = 8.
            INSERT LS_EDIT INTO TABLE LT_EDIT.
            INSERT LINES OF LT_EDIT INTO TABLE LS_OUTTAB-HANDLE_STYLE.
            MODIFY ITAB INDEX X_CHANGE-ROW_ID FROM LS_OUTTAB  TRANSPORTING
                                              HANDLE_STYLE .
          ENDIF.
        ENDLOOP.
        CALL METHOD G_GRID->REFRESH_TABLE_DISPLAY
          EXCEPTIONS
            FINISHED = 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.
      ENDMETHOD.                    "HANDLE_DATA_CHANGED</b>
    ENDCLASS.                    "LCL_EVENT_HANDLER IMPLEMENTATION
    *&             Global Definitions
    DATA:      G_CUSTOM_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER,"Container1
                G_HANDLER TYPE REF TO LCL_EVENT_HANDLER. "handler
    *- Fieldcatalog for First and second Report
    DATA: IT_FIELDCAT  TYPE  LVC_T_FCAT,
          X_FIELDCAT TYPE LVC_S_FCAT,
          LS_VARI  TYPE DISVARIANT.
    *                START-OF_SELECTION
    START-OF-SELECTION.
      SELECT VBELN
             POSNR
             FROM LIPS
             UP TO 20 ROWS
             INTO CORRESPONDING FIELDS OF TABLE ITAB.
    END-OF-SELECTION.
      IF NOT ITAB[] IS INITIAL.
        CALL SCREEN 100.
      ELSE.
        MESSAGE I002 WITH 'NO DATA FOR THE SELECTION'(004).
      ENDIF.
    *&      Form  CREATE_AND_INIT_ALV
    *       text
    FORM CREATE_AND_INIT_ALV .
      DATA: LT_EXCLUDE TYPE UI_FUNCTIONS.
      CREATE OBJECT G_CUSTOM_CONTAINER
             EXPORTING CONTAINER_NAME = G_CONTAINER1.
      CREATE OBJECT G_GRID
             EXPORTING I_PARENT = G_CUSTOM_CONTAINER.
    * Set a titlebar for the grid control
      CLEAR GS_LAYOUT.
      GS_LAYOUT-GRID_TITLE = TEXT-003.
       <b>GS_LAYOUT-STYLEFNAME = 'HANDLE_STYLE'.</b>
      GS_LAYOUT-ZEBRA = SPACE.
      GS_LAYOUT-CWIDTH_OPT = 'X'.
      GS_LAYOUT-NO_ROWMARK = 'X'.
      GS_LAYOUT-CTAB_FNAME = 'CELLCOLOR'.
    <b>  CALL METHOD G_GRID->REGISTER_EDIT_EVENT
        EXPORTING
          I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_MODIFIED.</b>
      CREATE OBJECT G_HANDLER.
      SET HANDLER G_HANDLER->HANDLE_DOUBLE_CLICK FOR G_GRID.
      SET HANDLER G_HANDLER->HANDLE_HOTSPOT_CLICK FOR G_GRID.
    <b>  SET HANDLER G_HANDLER->HANDLE_DATA_CHANGED FOR G_GRID.</b>
      DATA: LS_CELLCOLOR TYPE LVC_S_SCOL. "required for color
      DATA: L_INDEX TYPE SY-TABIX.
      "Here i am changing the color of line 1,5,10...
      "so you can change the color of font conditionally
      LOOP AT ITAB.
        L_INDEX = SY-TABIX.
        IF L_INDEX = 1 OR L_INDEX = 5 OR L_INDEX = 10.
          LS_CELLCOLOR-FNAME = 'VBELN'.
          LS_CELLCOLOR-COLOR-COL = '6'.
          LS_CELLCOLOR-COLOR-INT = '0'.
          LS_CELLCOLOR-COLOR-INV = '1'.
          APPEND LS_CELLCOLOR TO ITAB-CELLCOLOR.
          MODIFY ITAB INDEX L_INDEX TRANSPORTING CELLCOLOR.
          LS_CELLCOLOR-FNAME = 'POSNR'.
          LS_CELLCOLOR-COLOR-COL = '6'.
          LS_CELLCOLOR-COLOR-INT = '0'.
          LS_CELLCOLOR-COLOR-INV = '1'.
          APPEND LS_CELLCOLOR TO ITAB-CELLCOLOR.
          MODIFY ITAB INDEX L_INDEX TRANSPORTING CELLCOLOR.
        ENDIF.
      ENDLOOP.
    * setting focus for created grid control
      CALL METHOD CL_GUI_CONTROL=>SET_FOCUS
        EXPORTING
          CONTROL = G_GRID.
    * Build fieldcat and set editable for date and reason code
    * edit enabled. Assign a handle for the dropdown listbox.
      PERFORM BUILD_FIELDCAT.
      PERFORM  SET_DRDN_TABLE.
    * Optionally restrict generic functions to 'change only'.
    *   (The user shall not be able to add new lines).
      PERFORM EXCLUDE_TB_FUNCTIONS CHANGING LT_EXCLUDE.
    **Vaiant to save the layout
      LS_VARI-REPORT      = SY-REPID.
      LS_VARI-HANDLE      = SPACE.
      LS_VARI-LOG_GROUP   = SPACE.
      LS_VARI-USERNAME    = SPACE.
      LS_VARI-VARIANT     = SPACE.
      LS_VARI-TEXT        = SPACE.
      LS_VARI-DEPENDVARS  = SPACE.
      CALL METHOD G_GRID->REGISTER_EDIT_EVENT
        EXPORTING
          I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_MODIFIED.
    **Calling the Method for ALV output
      CALL METHOD G_GRID->SET_TABLE_FOR_FIRST_DISPLAY
        EXPORTING
          IT_TOOLBAR_EXCLUDING = LT_EXCLUDE
          IS_VARIANT           = LS_VARI
          IS_LAYOUT            = GS_LAYOUT
          I_SAVE               = 'A'
        CHANGING
          IT_FIELDCATALOG      = IT_FIELDCAT
          IT_OUTTAB            = ITAB[].
    * Set editable cells to ready for input initially
      CALL METHOD G_GRID->SET_READY_FOR_INPUT
        EXPORTING
          I_READY_FOR_INPUT = 1.
    ENDFORM.                               "CREATE_AND_INIT_ALV
    *&      Form  EXCLUDE_TB_FUNCTIONS
    *       text
    *      -->PT_EXCLUDE text
    FORM EXCLUDE_TB_FUNCTIONS CHANGING PT_EXCLUDE TYPE UI_FUNCTIONS.
    * Only allow to change data not to create new entries (exclude
    * generic functions).
      DATA LS_EXCLUDE TYPE UI_FUNC.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_COPY_ROW.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_DELETE_ROW.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_APPEND_ROW.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_INSERT_ROW.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_MOVE_ROW.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_COPY.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_CUT.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_PASTE.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_PASTE_NEW_ROW.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_UNDO.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
    ENDFORM.                               " EXCLUDE_TB_FUNCTIONS
    *&      Form  build_fieldcat
    *       Fieldcatalog
    FORM BUILD_FIELDCAT .
      DATA: L_POS TYPE I.
      L_POS = L_POS + 1.
      X_FIELDCAT-SCRTEXT_M = 'Delivery'(024).
      X_FIELDCAT-FIELDNAME = 'VBELN'.
      X_FIELDCAT-TABNAME = 'ITAB'.
      X_FIELDCAT-COL_POS    = L_POS.
      X_FIELDCAT-NO_ZERO    = 'X'.
      X_FIELDCAT-OUTPUTLEN = '10'.
      X_FIELDCAT-HOTSPOT = 'X'.
      APPEND X_FIELDCAT TO IT_FIELDCAT.
      CLEAR X_FIELDCAT.
      L_POS = L_POS + 1.
      X_FIELDCAT-SCRTEXT_M = 'Item'(025).
      X_FIELDCAT-FIELDNAME = 'POSNR'.
      X_FIELDCAT-TABNAME = 'ITAB'.
      X_FIELDCAT-COL_POS    = L_POS.
      X_FIELDCAT-OUTPUTLEN = '5'.
      APPEND X_FIELDCAT TO IT_FIELDCAT.
      CLEAR X_FIELDCAT.
      L_POS = L_POS + 1.
      X_FIELDCAT-SCRTEXT_M = 'Drop'(025).
      X_FIELDCAT-FIELDNAME = 'DROP'.
      X_FIELDCAT-TABNAME = 'ITAB'.
      X_FIELDCAT-COL_POS    = L_POS.
      X_FIELDCAT-OUTPUTLEN = '5'.
      X_FIELDCAT-EDIT = 'X'.
      X_FIELDCAT-DRDN_HNDL = '1'.
      X_FIELDCAT-DRDN_ALIAS = 'X'.
      APPEND X_FIELDCAT TO IT_FIELDCAT.
      CLEAR X_FIELDCAT.
      L_POS = L_POS + 1.
      X_FIELDCAT-SCRTEXT_M = 'Comissn'(025).
      X_FIELDCAT-FIELDNAME = 'COMISN'.
      X_FIELDCAT-TABNAME = 'ITAB'.
      X_FIELDCAT-COL_POS    = L_POS.
      X_FIELDCAT-OUTPUTLEN = '10'.
      X_FIELDCAT-EDIT = 'X'.
      APPEND X_FIELDCAT TO IT_FIELDCAT.
      CLEAR X_FIELDCAT.
    ENDFORM.                    " build_fieldcat
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'MAIN100'.
      SET TITLEBAR 'MAIN100'.
      IF G_CUSTOM_CONTAINER IS INITIAL.
    **Initializing the grid and calling the fm to Display the O/P
        PERFORM CREATE_AND_INIT_ALV.
      ENDIF.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE USER_COMMAND_0100 INPUT.
      CASE SY-UCOMM.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Form  SET_DRDN_TABLE
    *       text
    FORM SET_DRDN_TABLE.
      DATA:LT_DRAL TYPE LVC_T_DRAL,
            LS_DRAL TYPE LVC_S_DRAL.
      LS_DRAL-HANDLE = '1'.
      LS_DRAL-VALUE =  'S/W Engineer'.
      LS_DRAL-INT_VALUE =  'S/W Engineer'.
      APPEND LS_DRAL TO LT_DRAL.
      LS_DRAL-HANDLE = '1'.
      LS_DRAL-VALUE =  'Manager'.
      LS_DRAL-INT_VALUE =  'Manager'.
      APPEND LS_DRAL TO LT_DRAL.
    **Setting the Drop down table for Reason Code
      CALL METHOD G_GRID->SET_DROP_DOWN_TABLE
        EXPORTING
          IT_DROP_DOWN_ALIAS = LT_DRAL.
    ENDFORM.                               " set_drdn_table
    Regards
    vijay

  • Combo/List Box Item List in Properties

    Im creating a form in Acrobat.  Used a list box instead of combo box.  But need to change to combo box.  I already entered in all the items for the list.  I don't want to spend too much time on this.  Is there a way to copy the list from properties on the list box and past into the new combo box?

    You can use Acrobat JavaScript to convert the current items, getItemAt,
    in the list box/combo box to an array or list that could be edited in array definition, edit that list and then use JavaScript, setItems, to use that array to populate the field.

Maybe you are looking for

  • Lightroom 5 catalogue in lightroom 4

    Hello, Here's the deal. I had been using the trial version of Lightroom 5, thinking that I would be able to upgrade after the first 30 days. I have used Lightroom for years with school, and I wanted it for myself. Financially, however, this was not p

  • Programs don't respond with ipod plugged in

    This is really a pain. Whenever I plug my 30gb 5G ipod into my computer my programs don't respond. This makes it impossible to put songs onto my ipod. I have tried reinstalling itunes and the ipod updater and restoring my ipod, but it only makes it s

  • Reports WI on Dashboard

    I am developing a control panel and am using reports WebIntelligence and dashboards Xcelsius, I am using a browse list and a viewer for the control panel. What is the problem that the reports are reports and when I display in the viewfinder reports a

  • Plant calendar in infopackage period selection

    Hi , i have a requirement texts for which i am pasting ! "In some of the infopackages on Production system , period selections are calculated dynamically via ABAP program. Check all info packs for the use of a plant calendar and rewrite the program w

  • Challan list

    hi The attached Returnable Gatepass are not appearing in the list of 57F4 challan. please suggest