Default value in list box

hi,
i need to know how to set default value for a list box in selection screen.

Hi
check this code
at selection-screen output.
  name = 'P_DATE'.
  value-key = '1'.
  value-text = 'Today'.
  append value to list.
  value-key = '2'.
  value-text = 'Last 7 days'.
  append value to list.
  value-key = '3'.
  value-text = 'Last 30 days'.
  append value to list.
  value-key = '4'.
  value-text = 'Last 90 days'.
  append value to list.
  value-key = '5'.
  value-text = 'Last year'.
  append value to list.
Call the ''VRM_SET_VALUES' to display the values in Listbox
  call function 'VRM_SET_VALUES'
    exporting
      id     = name
      values = list.
at selection-screen.
  if sy-ucomm = 'CLI1'.
    sscrfields-ucomm = 'ONLI'(001).
  endif.
  if p_date = '1'.
    p_date11 =  sy-datum .
  elseif p_date = '2'.
    p_date11 = ( sy-datum - 7 ).
  elseif p_date = '3'.
    p_date11 = ( sy-datum - 30 ).
  elseif p_date = '4'.
    p_date11 = ( sy-datum - 90 ).
  elseif p_date = '5'.
    p_date11 = ( sy-datum - 365 ).
  endif.
Reward points if useful...
Regards
Sreenivas

Similar Messages

  • Set Default Value  In list box

    Dear All,
                   I am using the F4IF_INT_TABLE_VALUE_REQUEST this FM for filling the list box .Now i want to set  default value in the list box
    Example-
    Supose i have 2 List box  A & B and in list box i have to set default value in A list box X value and in B list box Y value .
    X and Y value is coming in the list box from the master table .
    Thanks & Regards

    Code Snippet for your referance:
    *F4 Help for Output Type
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_KSCHL
    DATA: l_repid TYPE syrepid,
            l_dynnr TYPE sydynnr.
      MOVE: sy-repid TO l_repid,
            sy-dynnr TO l_dynnr.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'KSCHL'
          dynpprog        = l_repid
          dynpnr          = l_dynnr
          dynprofield     = 'P_KSCHL'
          window_title    = text-001
          value_org       = 'S'
        TABLES
          value_tab       = it_value_tab
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3

  • How to hold the value in List box.

    Hi All,
    On my screen painter Screen I am displaying the Sold to party and ship to party with thier address.
    I am also displaying the Shipping condition based on ship to party. To display the shipping condition i am using list box. Once the user enter the sold to party automatically all the field is going to populate in their respective fields. I am facing the problem that, The list box getting populated with shipping condition but once you choose the shipping condition and hit the enter the list box getting refreshed. I am using this code in PAI event. And I can Only use this in PAI.
    The Function i am using for list box is CALL FUNCTION 'VRM_SET_VALUES'.
    Pls suggest me how to hold the value in List box.
    Thanks,
    Rakesh

    Hi,
    Now i am using in PBO.
    the code below in in PBO.It is still not holding the value.
          if list[] is initial.
          perform SHP_COND.
          endif.
    form SHP_COND .
    *DATA: SHOP(80).
        clear : GT_VSBED, list.
        refresh : GT_VSBED, list.
         select vsbed
           from knvv AS K
           into table GT_VSBED
          where Kvkorg = vbak-vkorg  "Kkunnr = GV_STPH
          and K~vtweg = vbak-vtweg
          and K~spart = vbak-spart.
        select VSBED vtext
          from TVSBT
        into table list
        for all entries in GT_VSBED
        where spras = sy-langu
        and vsbed = GT_VSBED-VSBED.
    *break-point.
    NAME = 'SHP_CON'.
    CALL FUNCTION 'VRM_SET_VALUES'
      EXPORTING
        id                    = NAME
        values                = LIST[]
    EXCEPTIONS
       ID_ILLEGAL_NAME       = 1
       OTHERS                = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    endform.                    " SHP_COND
    Thanks,
    Rakesh

  • How to populate values in List Box in Adobe form

    Hi,
    How to populate values in List box in adobe forms?
    Thanks
    RB

    if you want to display a fixed values in the dropdown you can use list box ui and can specify values there
    or if u want to display values from the context node of the webdynpro
    1. Drag and drop a Value Help Drop-down List element from the Web Dynpro Library tab to the Body Pages pane.
    2. Drag and drop your node from the Data View tab onto it. This action binds the layout element to the corresponding node.
    with regards
    shanto aloor

  • How to capture the multiple value in list box

    Hi forums,
           How to select the multiple values in list box and how to catch that values in OnInputProcessing.
    Regards,
    Ravi.

    Hi,
    A possible method is:
    Get all fields of the form
        CALL METHOD request->get_form_fields
          CHANGING
            fields = table_fields.
    loop over the fields
        LOOP AT table_fields INTO wa_fields.
    test the name of the field
          CASE wa_fields-name.
            WHEN 'test'.
    retrieve the value of the field
              test = wa_fields-value.
    endcase
    endloop.
    Eddy

  • Set Default value in dropdown box.

    I used selection= "Default Value" in dropdown box to do this functionality.But when i selected other value it is
    selecting the default value and saving also.but i want that page initiated the default value should be there and user can select other values and save.
    Please give me solution for that as soon as possible.
    Thnks in advance.

    Actually i m using the following code and it is fetching value from a table.Can u understand this code n provide me solution for default value.
    <htmlb:gridLayoutCell columnIndex       = "5"
                                  rowIndex          = "2"
                                  colSpan           = "1"
                                  wrapping          = "FALSE"
                                  verticalAlignment = "TOP" >
              <htmlb:dropdownListBox id                = "unitDropdownListBox"
                                     table             = "<%= IT_MSEHI %>"
                                     nameOfKeyColumn   = "MSEHI"
                                     nameOfValueColumn = "ZMSEHI"
                                     onSelect          = "setunitValue"
                                     disabled          = "<%= LV_MODEITEM %>"
                                 selection         = "<%= it_item-unit %>" />

  • Getting values from list box

    i am populating a list box with Id's and names from a database and im trying to get the values from the list box depending what the user chooses, i.e if they choose the first choice in the list box the value i want to put in a variable is 1, etc
    here is the code for the list box, please help
    <select name="lstFilm" size="1">
              <%while (result4.next())
                   {%>
    <option value="<%result4.getInt(1);%>">
    <%out.println(result4.getString(2));%>
    </option>
                   <%}%>
    </select>

    String[] lstFilm = request.getParameterValues("lstFilm");
    Of course, it'll only return selected values. It'll be whatever the option values are.

  • SetSelectedValue for multiple values in List Box

    Hi,
    I want to set the selectedValue for multiple values in the List Box. If i use setSelectedValue for all the values, it just highlights the last one.
    Can anyone tell me how do i highlight multiple values in the List Box?
    Scenario:
    I have one screen where the List Box and "Go" button is placed. When i select multiple values in the list box and hit "Go" it should display what i have selected in the List Box.
    Note: List Box is generated dynamically.
    Thanks,
    Naresh V

    setSelectedValue as the name indicates will set one value and in your case since you are using it multiple times it would pick the last value.
    When the user selects multiple values from the list box and clicks on Go you can capture those values in the controller for processing. What are you trying to achieve by resetting all the selected values on the same listbox ?

  • How to fill the values in List Box?

    Hi Experts,
    Can anyone explain me how to fill the values in the List Box such that the value should be from the table?
    For Example : Fill the EmpID from table T1 into the ListBox?
    Thanks in Advance,
    Regards,
    Raghu

    hi,
    and u doing it through report means from se38 than here is code...
    DATA : BEGIN OF itab OCCURS 0,
            matnr LIKE mara-matnr,
           END OF itab.
    DATA : ok_code LIKE sy-ucomm.
    CALL SCREEN 0200.
    *&      Module  STATUS_0200  OUTPUT
          text
    MODULE status_0200 OUTPUT.
      SET PF-STATUS 'Z200'.
    ENDMODULE.                 " STATUS_0200  OUTPUT
    *&      Module  USER_COMMAND_0200  INPUT
          text
    MODULE user_command_0200 INPUT.
      CASE ok_code.
        WHEN 'BACK' OR 'UP' OR 'CANC'.
          LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0200  INPUT
    *&      Module  mat_val  INPUT
          text
    MODULE mat_val INPUT.
      SELECT matnr FROM mara INTO CORRESPONDING FIELDS OF TABLE itab
        WHERE matnr BETWEEN '000000000000000101' AND '000000000000000109'.
        CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
          EXPORTING
            retfield               = 'MATNR'
           VALUE_ORG              = 'S'
          tables
            value_tab              = itab
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    ENDMODULE.                 " mat_val  INPUT
    <b>And this is flow logic..</b>
    PROCESS BEFORE OUTPUT.
      MODULE status_0200.
    PROCESS AFTER INPUT.
      MODULE user_command_0200.
    PROCESS ON VALUE-REQUEST.
      FIELD itab-matnr MODULE mat_val.

  • How to populate a default value in Text box depending on Poplist selection

    We have a requirement to populate a default value in a Text Box when user chooses a value from poplist (of type MessageChoice adjacent to the Text Box). This page is a Oracle Seeded Page. I understand that this is not possible using personalization. Can please someone guide me as to how should we proceed for this.

    Can I add PPR event to the standard page?
    YesAlso Can I change the Controller code of the standard page to catch the PPR event?
    You need not change the controller, you can extend the controller!Although Oracle discourages extension of controller, but as of now there is no other alternative! These controller extensions will mostly survive upgrades, as Oracle won't be removing all base controller classes.Is it allowed to make changes in standard XML page and import it once again?
    No, standard UIXML should not be changed. But y would u need that, you cando the Ui changes with personlization and if needed programitically in process request method of controller, by takeing control on that particular bean!
    I hope i have resolved your queries.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to show value in list box on screen.

    Hey,
    I'm trying to write a little program to select a value from a listbox on a screen... 
    Filling the listbox, no problem.  But showing the value on screen, and using the selected value isn't working...
    So when i select a value, directly after the listbox 'closes', the selected value disappears...
    I read already different threads regarding this topic, but i don't see a solution :(.
    Below you find the code.  Anyone sees where the problem is?
    Screen number = 300.
    PROCESS BEFORE OUTPUT.
      MODULE status_0300.
      Module init_dropdown_box.
    PROCESS AFTER INPUT.
      MODULE user_command_0300.
    REPORT  ztesttom2                     .
    TABLES: zbadgelinks.
    TYPE-POOLS vrm.
    DATA values TYPE vrm_values WITH HEADER LINE.
    data: name type vrm_id.
    DATA  ok_code LIKE sy-ucomm.
    DATA save_ok LIKE sy-ucomm.
    DATA  init.
    DATA it_badgelinks LIKE zbadgelinks OCCURS 0 WITH HEADER LINE.
    START-OF-SELECTION.
      SELECT * FROM zbadgelinks INTO TABLE it_badgelinks.
      CALL SCREEN 300.
    *&      Module  status_0300  OUTPUT
    *       text
    module status_0300 output.
      SET PF-STATUS 'ST_0300'.
      SET TITLEBAR 'TB_0300'.
    endmodule.                 " status_0300  OUTPUT
    MODULE init_dropdown_box output.
      IF init is initial.
        name = 'LB_SEL_PC'.
        loop at it_badgelinks.
          values-text = it_badgelinks-description.
          values-key = it_badgelinks-id.
          append values.
        endloop.
        CALL FUNCTION 'VRM_SET_VALUES'
             EXPORTING
                  id              = name
                  values          = values[]
             EXCEPTIONS
                  id_illegal_name = 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.
    endif.
    init = 'X'.
    ENDMODULE.
    *&      Module  user_command_0300  INPUT
    *       text
    module user_command_0300 input.
      CASE OK_CODE.
        WHEN 'BACK'. LEAVE TO SCREEN 0.
        WHEN 'EXIT'. LEAVE TO SCREEN 0.
        WHEN 'CANC'. LEAVE TO SCREEN 0.
        WHEN 'CB_CANCEL'. leave to screen 0.
        WHEN 'CB_OK'.
          READ TABLE it_badgelinks WITh KEY ID = it_badgelinks-id.
          IF SY-SUBRC = 0.
            MESSAGE I398(00) WITH 'ID:          ' it_badgelinks-id
                                  'Description: ' it_badgelinks-description.
          ENDIF.
        WHEN 'SEL_PC'.
          CALL FUNCTION 'VRM_GET_VALUES'
            EXPORTING
              id                 = name
            IMPORTING
              VALUES             = values[]
            EXCEPTIONS
              ID_NOT_FOUND       = 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.
      ENDCASE.
    endmodule.                 " user_command_0300  INPUT
    Thanks in advance,
    Kind Regards,
    Tom

    Hi,
    Please check the below modified code of yours.
    Now the value is retained in the list box.
    REPORT  ztest_cert.
    TABLES: t511t.
    TYPE-POOLS vrm.
    DATA: lb_sel_pc(80).
    DATA values TYPE vrm_values WITH HEADER LINE.
    DATA: name TYPE vrm_id.
    DATA  ok_code LIKE sy-ucomm.
    DATA save_ok LIKE sy-ucomm.
    DATA  init.
    DATA it_t511t  LIKE t511t  OCCURS 0 WITH HEADER LINE.
    START-OF-SELECTION.
      SELECT * FROM t511t  INTO TABLE it_t511t WHERE sprsl = 'EN'.
      CALL SCREEN 300.
    *&      Module  status_0300  OUTPUT
          text
    MODULE status_0300 OUTPUT.
      SET PF-STATUS 'ST_0300'.
      SET TITLEBAR 'TB_0300'.
    ENDMODULE.                 " status_0300  OUTPUT
    MODULE init_dropdown_box OUTPUT
    MODULE init_dropdown_box OUTPUT.
      IF init IS INITIAL.
        name = 'LB_SEL_PC'.
        LOOP AT it_t511t.
          values-text = it_t511t-kotxt.
          values-key = it_t511t-konst.
          APPEND values.
        ENDLOOP.
        CALL FUNCTION 'VRM_SET_VALUES'
          EXPORTING
            id              = name
            values          = values[]
          EXCEPTIONS
            id_illegal_name = 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.
      ELSEIF init = 'X'.
      <b>  lb_sel_pc = values-text.</b>
      ENDIF.
      init = 'X'.
    ENDMODULE.                    "init_dropdown_box OUTPUT
    *&      Module  user_command_0300  INPUT
          text
    MODULE user_command_0300 INPUT.
    data: l_code like values-key.
      CASE ok_code.
        WHEN 'BACK'. LEAVE TO SCREEN 0.
        WHEN 'EXIT'. LEAVE TO SCREEN 0.
        WHEN 'CANC'. LEAVE TO SCREEN 0.
        WHEN 'CB_CANCEL'. LEAVE TO SCREEN 0.
        WHEN 'CB_OK'.
          clear: it_t511t.
         lb_sel_pc = l_code.
          READ TABLE it_t511t WITH KEY konst = lb_sel_pc.
          IF sy-subrc = 0.
            CLEAR values.
            values-key = it_t511t-konst.
            values-text = it_t511t-kotxt.
            MESSAGE i398(00) WITH 'ID:          ' it_t511t-konst
                                  'Description: ' it_t511t-kotxt.
          ENDIF.
        WHEN 'SEL_PC'.
          CALL FUNCTION 'VRM_GET_VALUES'
            EXPORTING
              id                 = name
           IMPORTING
             VALUES             = values[]
            EXCEPTIONS
              id_not_found       = 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.
          ELSE.
    <b>        l_code = lb_sel_pc.
            READ TABLE it_t511t WITH KEY konst = lb_sel_pc.
            CLEAR values.
            values-key = it_t511t-konst.
            values-text = it_t511t-kotxt</b>.
          ENDIF.
      ENDCASE.
    ENDMODULE.                 " user_command_0300  INPUT
    Thanks & Regards
    Praba

  • How to set current year,month as default value in combo box

    hi,  im newbie of xcelsius user
    i realize  that hv a issue that display combo box base on year & month
    let said
    <b><u>step 1</u></b>
    I create excel data like this
    <b><u>year___ </u>  </b>    |     <u><b>month_   </b></u> |     <u><b>Product</b></u> |     <u><b>revenue</b></u>
    02-04-09 |     02-04-09 |       a |     $4,154
    03-04-09 |     03-04-09 |       b |     $6,813
    04-05-09 |     04-05-09 |       a |     $9,875
    05-06-09 |     05-06-09 |       b |     $6,813
    06-04-10 |     06-04-10 |       a |     $6,813
    07-04-10 |     07-04-10 |       b |     $9,875
    08-06-10 |     08-06-10 |       a |     $9,875
    22-06-10 |     22-06-10 |       b |     $6,813
    <u><b>Step2</b></u>
    Then i go format cell to format/custom date to year & month
    Eg1: Year u2013>  02-04-09  convert to u2018YYYYu2019 (2009)
    Eg2: Month u2013>  02-04-09  convert to u2018mmmmu2019 (April)
    So output like this
    <u><b>year</b></u> |     <u><b>month</b></u> |     <u><b>Product</b></u> |     <u><b>revenue </b></u>
    2009 |     April |     a |     $4,154
    2009 |     April |     b |     $6,813
    2009 |     May |     a |     $9,875
    2009 |     June |     b |     $6,813
    2010 |     April |     a |     $6,813
    2010 |     April |     b |      $9,875
    2010 |     June |     a |     $9,875
    2010 |     June |     b |     $6,813
    But the problem is when i insert to combo box,use u201Cfilter Row u201D, i excpectation will display only 2009,2010
    But Actual display the Year  in combo box is duplicated :'(
    so any solution ? and then only how to set current year & month as default value  :'(
    thanks,
    regards
    s1
    Edited by: Leong Pui Kee on Feb 25, 2011 5:25 AM
    Edited by: Leong Pui Kee on Feb 25, 2011 5:36 AM

    hi,
    your created  data
    step 1
    I create excel data like this
    year___ | month_ | Product | revenue
    02-04-09 | 02-04-09 | a | $4,154
    03-04-09 | 03-04-09 | b | $6,813
    04-05-09 | 04-05-09 | a | $9,875
    05-06-09 | 05-06-09 | b | $6,813
    06-04-10 | 06-04-10 | a | $6,813
    07-04-10 | 07-04-10 | b | $9,875
    08-06-10 | 08-06-10 | a | $9,875
    22-06-10 | 22-06-10 | b | $6,813
    In this, year and month both are same data, make the diffent data like year  2009, 2010  And month Jan, Feb, March, ...Etc 
    and also one more check you formulas on month and year, select correct source data, destination data  for compoonent..
    OR
    from above, to create a date column and convert  date-->year, date--> month and Explore it.
    All the best,
    Praveen

  • Missing values in list box in SM30 - interval defined for domain

    Hi Experts,
    I'm facing the following problem:
    Table maintenence view has been generated for a z-data table via transaction SE11. For one field list box has been set and even though the domain (SO_ESCAPE; standard) behind the field has (fixed) values they are not displayed (I cannot see them in the dropdown list) in trx SM30 when trying to maintain it .
    Important is that on "Value Range" tab of the domain we can see that interval is defined (satandard).
    In order to test this thing we copied the domain, assigned to a z-data ttpe, z-field, etc. If we remove the interval of the domain we can see the values in the list box in trx SM30.
    Is this standard (=normal behaviour of the system)? Can we display the values somehow for the satndard domain (with interval)?
    remark:
    Removing the lsit box setting we can see values (including the interval) using F4 in trx SM30.
    Thanks in advance,
    Csaba
    Edited by: Csaba Szommer on Jun 18, 2010 8:03 AM

    Hi Experts,
    I'm facing the following problem:
    Table maintenence view has been generated for a z-data table via transaction SE11. For one field list box has been set and even though the domain (SO_ESCAPE; standard) behind the field has (fixed) values they are not displayed (I cannot see them in the dropdown list) in trx SM30 when trying to maintain it .
    Important is that on "Value Range" tab of the domain we can see that interval is defined (satandard).
    In order to test this thing we copied the domain, assigned to a z-data ttpe, z-field, etc. If we remove the interval of the domain we can see the values in the list box in trx SM30.
    Is this standard (=normal behaviour of the system)? Can we display the values somehow for the satndard domain (with interval)?
    remark:
    Removing the lsit box setting we can see values (including the interval) using F4 in trx SM30.
    Thanks in advance,
    Csaba
    Edited by: Csaba Szommer on Jun 18, 2010 8:03 AM

  • Problem in picking up the value from list box

    Hi,
    I have created a parameter list box on the selection screen using VRM_SET_VALUES fn module and populating the list box. Now my problem is when i select one value from the list box and executing, it shows null value.
    AT SELECTION-SCREEN OUTPUT.
    PERFORM f_f4help.
    FORM f_f4help .
      REFRESH: gt_tvaut,
               gs_list.
      CLEAR: gs_tvau,
             gs_value.
      SELECT spras
            augru
            bezei
        FROM tvaut
        INTO TABLE gt_tvaut
        WHERE spras EQ sy-langu.
    IF NOT gt_tvaut[] IS INITIAL.
        LOOP AT gt_tvaut INTO gs_tvau.
          gs_value-key = sy-tabix.
          CONCATENATE gs_tvau-augru
                      gs_tvau-bezei
                 INTO gs_value-text
            SEPARATED BY space.
          APPEND gs_value TO gs_list.
        ENDLOOP.
      ENDIF.
      param = 'P_AUGRU'.
    CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = param
          values          = gs_list
        EXCEPTIONS
          id_illegal_name = 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.
    How to get the value which  is selected in the selection screen becoz i'm using p_augru in further selection queries..
    i have tried reading gs_list table but its not working.

    Move the portion of function call 'VRM_SET_VALUES' to event  at selection-screen on value-request for P_AUGRU. Rest is OK...
    I mean, Your code should be like this.
    AT SELECTION-SCREEN OUTPUT.
    PERFORM f_f4help_values.
    FORM f_f4help_values.
    REFRESH: gt_tvaut,
             gs_list.
    CLEAR: gs_tvau,
           gs_value.
    SELECT spras
           augru
           bezei
           FROM tvaut
           INTO TABLE gt_tvaut
           WHERE spras EQ sy-langu.
    IF NOT gt_tvaut[] IS INITIAL.
      LOOP AT gt_tvaut INTO gs_tvau.
        gs_value-key = sy-tabix.
        CONCATENATE gs_tvau-augru
                    gs_tvau-bezei
               INTO gs_value-text
        SEPARATED BY space.
        APPEND gs_value TO gs_list.
      ENDLOOP.
    ENDIF.
    ENDFORM.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_AUGRU.
    PERFORM f_f4help.
    FORM f_f4help
    param = 'P_AUGRU'.
    CALL FUNCTION 'VRM_SET_VALUES'
      EXPORTING
        id              = param
        values          = gs_list
      EXCEPTIONS
        id_illegal_name = 1
        OTHERS          = 2.
    IF sy-subrc  0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    ENDFORM.
    Rgds,
    Birendra

  • Compare values in list box

    Hi,
    I need to compare initial and current value in the list box. I' am trying to do the comparison in onSelect event.
    Here how can I get the initial value. I guess we will get the current value here. Or let me know if you have
    some better suggestions.
    Thanks,
    Aravind

    In your approach of temp variable, you will have to keep refreshing your variable with the new value in the OnSelect Method.
    For eg: l_temp is initially set in WDDOINIT, now you compare this with the new selected value in the OnSelect method and after displaying the appropriate message you will again have to reset l_temp with the newly selected value.
    " note: I hope l_temp is declared in the attributes tab of the View
    If you wish to implement Context Change log, follow these steps;
    1. Place the following code in the WDDOINIT method of the Component Controller
    * enable context change log
        data: context type ref to if_wd_context.
        context = wd_context->get_context( ).
        context->enable_context_change_log( ).
    2. Create a new method 'GET_CHANGE_LOG' in the Component Controller's Methods Tab
    " Create a Returning Parameter 'CHANGES'  type WDR_CONTEXT_CHANGE_LIST
    method get_change_log .
        data: context type ref to if_wd_context.
        context = wd_context->get_context( ).
        changes = context->get_context_change_log( ).
    endmethod.
    3. When you want to track the changes call his this method as follows,
    DATA: l_ref_componentcontroller TYPE REF TO ig_componentcontroller .
        DATA: l_changes TYPE wdr_context_change_list.
        l_ref_componentcontroller =   wd_this->get_componentcontroller_ctr( ).
        l_changes = l_ref_componentcontroller->get_change_log( ).
    "  l_changes will contain all the details of the changes made.
    For more details refer component DEMO_CONTEXT_CHANGES.
    Regards,
    Radhika.

Maybe you are looking for