Filling select-option dynamically

Hi,
I have two radio buttons.
I want to fill the select-options (account group ktokk) when i click a radio button.
I tried to fill them at INITIALIZATION event. But it is not working.
Is it possible to do so.
Please answer my question.
Thanks
Rekha

Hi rekha,
try like this.
TABLES:vbak.
PARAMETERS:p_1   RADIOBUTTON GROUP g1 USER-COMMAND cmd1,
p_2   RADIOBUTTON GROUP g1.
SELECT-OPTIONS:s_vbeln for vbak-vbeln.
*SELECTION-SCREEN :PUSHBUTTON /2(10) but1 USER-COMMAND fcode .
*INITIALIZATION.
but1 = 'GET List'.
AT SELECTION-SCREEN.
  IF p_1 = 'X'.
    s_vbeln-low = '1000'.
    s_vbeln-option = 'EQ'.
    s_vbeln-sign = 'I'.
    APPEND s_vbeln.
  ELSE.
    REFRESH s_vbeln.
  ENDIF.

Similar Messages

  • Populating select-options dynamically

    Hey Everybody,
    I've done some reports with Select-options, but all the fields directly related to some field in a transparent table. As many of you might have experienced, things changed with the latest report that I have to develop.
    I have to derive the drop-down for the select-options dynamically.
    Could anybody provide me with the details, code snippets, hints on how to do this.
    Thank You.
    Sumit.

    Here is an example program where you are generically defining the select-option and building its F4 help at runtime.
    report zrich_0001 .
    data: begin of ihelp occurs 0,
          field type char10,
          ftext type char50,
          end of ihelp.
    data: a_field(20) type c.
    select-options s_field for a_field.
    initialization.
      ihelp-field = 'A'.
      ihelp-ftext = 'Description A'.
      append ihelp.
      ihelp-field = 'B'.
      ihelp-ftext = 'Description B'.
      append ihelp.
      ihelp-field = 'C'.
      ihelp-ftext = 'Description C'.
      append ihelp.
    at selection-screen on value-request for s_field-low.
      call function 'F4IF_INT_TABLE_VALUE_REQUEST'
           exporting
                retfield    = 'FIELD'
                dynprofield = 'S_FIELD'
                dynpprog    = sy-cprog
                dynpnr      = sy-dynnr
                value_org   = 'S'
           tables
                value_tab   = ihelp.
    start-of-selection.
    REgards,
    Rich Heilman

  • Can I put a text view next to a select-options dynamically aligned?

    Hello,
    I need a text view next to a select-options aligned.
    I think the only way to do it is dynamically and in the same container.
    I tried putting textviews beside the container and aligns them, but I couldn't.
    Thanks,
    Rodrigo.

    Hi,
    Can you please let me know what type of layout manager you are using?
    You may use Matrix layout to align the elements without using dummy textview.
    -Ashutosh

  • Fill select options field

    Hi friends,
    I'm trying to fill the select option field.
    I get wrong values.
    s_date. lt_wd_date contains many date.
    data: lt_wd_date TYPE TABLE OF sy-datum,
             lw_wd_date TYPE sy-datum.
    SELECT-OPTIONS   s_date    FOR    ccihs_ialhiot-evdat.
        PERFORM weekday_to_date TABLES lt_wd_date
                                USING  p_week
                                       s_date-low
                                       s_date-high.
        LOOP AT lt_wd_date INTO lw_wd_date.
         s_date-low = lw_wd_date.
         s_date-sign = 'I'.
         s_date-option = 'EQ'.
         APPEND lw_wd_date TO s_date.
        ENDLOOP.
    Regards
    sas erdem

    the problem is that you are appending the wrong work area.
    check the code in "  "
    data: lt_wd_date TYPE TABLE OF sy-datum,
             lw_wd_date TYPE sy-datum.
    SELECT-OPTIONS   s_date    FOR    ccihs_ialhiot-evdat.
        PERFORM weekday_to_date TABLES lt_wd_date
                                USING  p_week
                                       s_date-low
                                       s_date-high.
        LOOP AT lt_wd_date INTO lw_wd_date.
         s_date-low = lw_wd_date.
         s_date-sign = 'I'.
         s_date-option = 'EQ'.
    " APPEND S_DATE."
        ENDLOOP.

  • Creating select-options dynamically

    Hello Gurus,
    I have following program with me.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
    EXPORTING
    it_fieldcatalog = itab_display
    IMPORTING
    ep_table = d_ref.
    ASSIGN d_ref->* TO <F_FS>.
    SELECT * FROM (table) INTO CORRESPONDING FIELDS OF TABLE <F_FS>.
    I want to select from table dynamically. i.e.
    I want my select query as :
    *SELECT * FROM (table) INTO CORRESPONDING FIELDS OF TABLE <F_FS> where field1 = ' x' and field2 = 'y' etc ....*
    " field1 , field2 " ....i should be able to give using select-options.
    Please tell me is it possible ?
    Thanks.

    Hi,
    Check the Following code
    DATA  tabname(10).
    DATA: BEGIN OF wa,
            id   TYPE scustom-id,
            name TYPE scustom-name,
          END OF wa.
    tabname = 'SCUSTOM'.
    SELECT id name INTO CORRESPONDING FIELDS OF wa FROM (tabname).
      WRITE: / wa-id, wa-name.
    ENDSELECT.
    Cheers,
    Kothand

  • Disable the select-options dynamically based on value selected in listbox

    Hi friends,
    I have a peculiar problem in my program.
    I have a list box with two values.
    1) With Ref to Reservation No.
    2) Production order.
    I am doing the object for Transfer Posting ( Similar to MIGO).
    The contents of the listbox here are acting as the label to my select-options.
    I have two select-options in my program.
    1) Reservation No (s_rsnum for rsnum)
    2) Production Order (s_porder for aufnr)
    In runtime, based on the label selected in the listbox, the corresponding select-option should be in visible mode.
    for eg: if i select "With ref to Reservation No" S_rsnum should be enabled and vice-versa.

    Hi,
    here an example with listbox:
    TABLES: MARA.
    PARAMETERS: P0 DEFAULT 'KAUF' LIKE MARA-MTART AS LISTBOX VISIBLE LENGTH 8 USER-COMMAND DUMMY.
    SELECTION-SCREEN: SKIP 3.
    SELECT-OPTIONS: S_MATNR FOR MARA-MATNR MODIF ID DI1.
    SELECTION-SCREEN: SKIP 3.
    SELECT-OPTIONS: S_MATKL FOR MARA-MATKL MODIF ID DI2.
    AT SELECTION-SCREEN OUTPUT.
      IF P0 = 'KAUF'.
        LOOP AT SCREEN.
          IF SCREEN-GROUP1 EQ 'DI1'.
            SCREEN-ACTIVE      = '1'.
            SCREEN-INPUT       = '1'.
            MODIFY SCREEN.
          ENDIF.
          IF SCREEN-GROUP1 EQ 'DI2'.
            SCREEN-ACTIVE      = '0'.
            SCREEN-INPUT       = '0'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
      IF P0 <> 'KAUF'.
        LOOP AT SCREEN.
          IF SCREEN-GROUP1 EQ 'DI1'.
            SCREEN-ACTIVE      = '0'.
            SCREEN-INPUT       = '0'.
            MODIFY SCREEN.
          ENDIF.
          IF SCREEN-GROUP1 EQ 'DI2'.
            SCREEN-ACTIVE      = '1'.
            SCREEN-INPUT       = '1'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    use your own listbox in If-Clauses.
    Regards, Dieter

  • Fill select-options in Page with flow logic ???

    Hello All,
              I created a BSP Application using Page with Flow Logic.
    In the first page of my Application I'm using 2 input fields as select-options.
    Now I'm populating a Ranges of that Field using the type :-
    selopttab
    I populated the ranges table like :-
    wa_bname_sel-sign   = 'I'.
              wa_bname_sel-option = 'BT'.
              wa_bname_sel-low    = '*'.
              wa_bname_sel-high   = 'Z'.
            ELSE.
              wa_bname_sel-sign   = 'I'.
              wa_bname_sel-option = 'EQ'.
              wa_bname_sel-low    = p_bname.
              wa_bname_sel-high   = p_bname.
            ENDIF.
            APPEND wa_bname_sel TO p_bname_sel.
            CLEAR  wa_bname_sel.
    But the problem is I checked the corresponding DATABASE Table entries by passing thesame value .
    i.e I passed the low and high values to the field as '*' and 'Z'.
    The total number of entries differ when passing '*' and 'Z' to when passing SPACE.
    I tried even with contains Pattern .This time the total number of records fetching has Increased but the sum is not exact when passed SPACE to the Database Table.
    So what should I pass to the Low and High values of my Ranges Table to get all the entries ????
    DOes this type of building the Ranges work in BSP's ?
    How are u people working out for the select-options functionality in Page with flow logic ?
    Message was edited by:
            deepu k

    Hello Jessy,
    To populate select-options or Ranges in Page with flow logic I used the following code :
    ************************ Bulid the Select-Options**************************************
          DATA: p_bname_sel     TYPE STANDARD TABLE OF selopttab,
                p_bsp_name_sel  TYPE STANDARD TABLE OF selopttab,
                p_tcode_sel     TYPE STANDARD TABLE OF selopttab.
          DATA: wa_bname_sel    TYPE selopttab,
                wa_bsp_name_sel TYPE selopttab,
                wa_tcode_sel    TYPE selopttab.
    * Select-Options for Username
          REFRESH p_bname_sel.
          CLEAR   wa_bname_sel.
          IF ( p_bname IS INITIAL  ).
            wa_bname_sel-sign   = 'I'.
            wa_bname_sel-option = 'CP'.
            wa_bname_sel-low    = '*'.
            wa_bname_sel-high   = ''.
          ELSE.
            wa_bname_sel-sign   = 'I'.
            wa_bname_sel-option = 'EQ'.
            wa_bname_sel-low    = p_bname.  " p_bname is the Input field and the value is taken from it
            wa_bname_sel-high   = p_bname.
          ENDIF.
          APPEND wa_bname_sel TO p_bname_sel.
          CLEAR  wa_bname_sel.
    * Select-Options for BSP_Application
          REFRESH p_bsp_name_sel.        
          CLEAR   wa_bsp_name_sel.
          IF ( p_bsp_name IS INITIAL  ).
            wa_bsp_name_sel-sign   = 'I'.
            wa_bsp_name_sel-option = 'CP'.
            wa_bsp_name_sel-low    = '*'.
            wa_bsp_name_sel-high   = ''.
          ELSE.
            wa_bsp_name_sel-sign   = 'I'.
            wa_bsp_name_sel-option = 'EQ'.
            wa_bsp_name_sel-low    = p_bsp_name.       " Input field
            wa_bsp_name_sel-high   = p_bsp_name.
          ENDIF.
          APPEND wa_bsp_name_sel TO p_bsp_name_sel.
          CLEAR  wa_bsp_name_sel.
    * Select-Options for TCODE
          REFRESH p_tcode_sel.
          CLEAR   wa_bsp_name_sel.
          IF ( p_tcode IS INITIAL  ).
            wa_tcode_sel-sign   = 'I'.
            wa_tcode_sel-option = 'CP'.
            wa_tcode_sel-low    = '*'.
            wa_tcode_sel-high   = ''.
          ELSE.
            wa_tcode_sel-sign   = 'I'.
            wa_tcode_sel-option = 'EQ'.
            wa_tcode_sel-low    = p_tcode.       " Input field
            wa_tcode_sel-high   = p_tcode.
          ENDIF.
          APPEND wa_tcode_sel TO p_tcode_sel.
          CLEAR  wa_tcode_sel.
    * Select all the related entries when either BSP or TCode is choosen
          IF ( ( p_bsp_name IS NOT INITIAL ) AND ( p_tcode IS INITIAL ) )
                     OR
             ( ( p_bsp_name IS INITIAL ) AND ( p_tcode IS INITIAL ) ).
            REFRESH gt_final.
            SELECT bname
                   bsp_name
                   description
                   ldate
                   ltime
                   calls
                   FROM <custom_table>
                   INTO TABLE gt_final
                   AND   bsp_name  IN p_bsp_name_sel
                   AND   ldate          IN p_ldate_sel.
    endif.
    Hope that wud help u !!!
    Regards,
    Deepu.K

  • How to create select-options for 3 fields out of 5 by FREE_SELECTIONS_INIT

    Hi Experts,
    I am using the Function Modules FREE_SELECTIONS_INIT and FREE_SELECTIONS_DIALOG to create the select-options dynamically on the selection screen.
    My problem is that I am passing a field list of 10 fields in the FIELDS_TAB of the function.
    Now it creates the select-options for all 10 fields. I want to create select-options for only 5 fields initially and let the user select out of the remaining 5 fields to create the select-options.
    How to achieve this.?
    I tried by passing the 5 fields in FIELDS_NOT_SELECTED table but they get hidden and once hidden I am not able to get them back in my field list.
    Please help me out.
    Useful answers will be suitably rewarded.
    Thanks in advance.
    Regards,
    Himanshu

    Hi Experts,
    I am using the Function Modules FREE_SELECTIONS_INIT and FREE_SELECTIONS_DIALOG to create the select-options dynamically on the selection screen.
    My problem is that I am passing a field list of 10 fields in the FIELDS_TAB of the function.
    Now it creates the select-options for all 10 fields. I want to create select-options for only 5 fields initially and let the user select out of the remaining 5 fields to create the select-options.
    How to achieve this.?
    I tried by passing the 5 fields in FIELDS_NOT_SELECTED table but they get hidden and once hidden I am not able to get them back in my field list.
    Please help me out.
    Useful answers will be suitably rewarded.
    Thanks in advance.
    Regards,
    Himanshu

  • Select options using OVS empty

    Hi all,
    I have created a select options dynamically using OVS.
    If the output table is empty my OVS appears empty and i don't want that this appears.
    The search help must appear only when the output table is not empty.
    How do i solve this?
    Thanks

    Hi.
    My problem has not been repair.
    There is no way to disable an OVS at runtime.
    See:
    cancelling an OVS help?
    Thanks a lot.

  • How to fill empty parameter (selection-option)

    Hi!
    On selection screen I have two parameters (s_egrid and s_empid). If user enter something in first (but not in second) one, second one should be filled from database.
    The problem is that I don't know how to fill the empty parameter.
    Let's say that i have an internal table i_zemployee with list of all necessary employee Id's (stored in field empid)
    if I Ioop like this
    loop at i_zemployee into wa_zemployee.
        insert wa_zemployee-empid into s_empid.
      endloop.
    ... I did something stupid but i hope that you understand what i need:
    s_emipd[1] = 'u1'.
    s_emipd[2] = 'u7'.
    s_emipd[3] = 'u9'.
    ... like array of user id's.
    and this s_empid I need in my next SELECT statement like
    SELECT * FROM ...
        WHERE empid in s_empid.
    if someone knows the solution thanks in advance!
    T.

    HI try something like this...
    tables: mara, makt.
    data: begin of itab occurs 0,
    matnr like mara-matnr,
    end of itab.
    data : begin of btab occurs 0,
    maktx like makt-maktx,
    end of btab.
    ata mak like makt-maktx.
    DATA : return like ddshretval occurs 0 with header line.
      data: begin of dynpfields occurs 3.
              include structure dynpread.
      data: end of dynpfields.
    select-options: p_matnr for mara-matnr.
    select matnr from mara into table itab where matnr IN p_matnr.
    loop at itab.
    write: / itab-matnr.
    endloop.
    Initialization.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_matnr.
    REFRESH ITAB.
    SELECT matnr FROM mara INTO TABLE ITAB.
    call function 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    retfield = 'MATNR '
    dynprofield = 'P_MATNR '
    dynpprog = sy-REPID
    dynpnr = sy-dynnr
    value_org = 'S'
    TABLES
    value_tab = ITAB
    return_tab = return.
    select single maktx from makt into  mak where matnr = return-fieldval.
    p_matnr = return-fieldval.
    refresh return.
    clear return.
    move 'P_MAKTX' to dynpfields-fieldname.
    move mak to dynpfields-fieldvalue.
    append dynpfields.
    CALL FUNCTION 'DYNP_VALUES_UPDATE'
      EXPORTING
        dyname                     = 'SY-REPID'
        dynumb                     = '1000'
      tables
        dynpfields                 = dynpfields
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    refresh return.
    clear return.
    validate according to ur requirement.
    Regards
    Syed A

  • How can i create a dynamic structure based on my input from a select-option

    Hello,
    This is to develop a custom report in FI for G/L Balance based on company code.
    I have an input select-option for Company code.
    Based on the range of company code my output layout should be modified.
    I am not very much sure to create a dynamic internal based on the input from a select-option.
    Can any one please let me know how can i do this.
    I would appreciate for anyone who turns up quickly.
    Thank you,
    With regs,
    Anitha Joss.

    See the following program, it builds a dynamic internal table based on the company codes from the select option. 
    report zrich_0001 .
    type-pools: slis.
    field-symbols: <dyn_table> type standard table,
                   <dyn_wa>.
    data: alv_fldcat type slis_t_fieldcat_alv,
          it_fldcat type lvc_t_fcat.
    data: it001 type table of t001 with header line.
    selection-screen begin of block b1 with frame title text-001.
    select-options: s_bukrs for it001-bukrs.
    selection-screen end of block b1.
    start-of-selection.
      select * into table it001 from t001
                     where bukrs in s_bukrs.
      perform build_dyn_itab.
    *  Build_dyn_itab
    form build_dyn_itab.
      data: index(3) type c.
      data: new_table type ref to data,
            new_line  type ref to data,
            wa_it_fldcat type lvc_s_fcat.
      clear wa_it_fldcat.
      wa_it_fldcat-fieldname = 'PERIOD' .
      wa_it_fldcat-datatype = 'CHAR'.
      wa_it_fldcat-intlen = 6.
      append wa_it_fldcat to it_fldcat .
      loop at it001.
        clear wa_it_fldcat.
        wa_it_fldcat-fieldname = it001-bukrs .
        wa_it_fldcat-datatype = 'CHAR'.
        wa_it_fldcat-intlen = 4.
        append wa_it_fldcat to it_fldcat .
      endloop.
    * Create dynamic internal table and assign to FS
      call method cl_alv_table_create=>create_dynamic_table
                   exporting
                      it_fieldcatalog = it_fldcat
                   importing
                      ep_table        = new_table.
      assign new_table->* to <dyn_table>.
    * Create dynamic work area and assign to FS
      create data new_line like line of <dyn_table>.
      assign new_line->* to <dyn_wa>.
    endform.
    Regards,
    Rich Heilman

  • Need to disable one of the select-options in dynamic selection screen

    Hi,
    we have copied the Standard program: RFDOPR00 into Z, my requirement is to disable one of the select-options in dynamic selection screen for ex: Reason code(User shouldnot able to enter anything in it).
    Can anyone please tell me the procedure to do it... I had tried using at selection-screen but it doesnt work as it in 'LOOP AT SCREEN', i am not able to capture the Parameter name(screen-name).
    Thanks,
    Ravi

    Hi,
    Get inside your selection screen, by executing your program.
    Now type /h in the field where you enter transaction code and press enter.
    Now again press enter, this will take you debugger starting from your Selection screen.
    You might be knowing this, still if you are not aware of this, this might be a valuable tip.
    From here , you can trace your Parameter name.

  • How to get dynamic select options from logical database?

    Hi,
    in one of my extended reports (means - overwritten standard SAP functionality in Z-namespace) I'm using LDB 'DDF'. I've been requested to validate some of the dynamic selection options (for example - field HKONT at Document level) and to split the logic depending on the particular value(s).
    Tracking what is happened in the LDB program I found that this select option is added as dynamic WHERE clause to the SELECT statement - in a way:
    WHERE bukrs = p_burks AND ... AND
    (where_tab)
    Is there a way to get values of these LDB dynamic select options into my report and if yes - how?
    Thanks in advance.
    Regards,
    Ivaylo Mutafchiev
    Senior SAP Abap Consultant

    Hi,
    Try to use the following fm in your report and check
      call function 'RS_REFRESH_FROM_DYNAMICAL_SEL'
        exporting
          curr_report        = sy-cprog
          mode_write_or_move = 'M'
        importing
          p_trange           = gt_dyn_trange
        exceptions
          not_found          = 1
          wrong_type         = 2
          others             = 3.
    PS please make a whereused of this fm , how it has been used in LDB's to get dynmic selection values

  • How to change the select options selection text dynamically in webdynpro abap ?

    I am using standard interface WDR_SELECT_OPTIONS.... i want to change the Selection text dynamically in my select options.I.E. if the select option is for VBELN field than i want to change its description SALES ORDER Number through Code to some other text.
    If anyone can please help me in this.

    Hi,
    You can achieve your requirement as below
    Get the range table of your selection field as below
              data lt_range_table type ref to data.
              wd_this->m_handler->GET_RANGE_TABLE_OF_SEL_FIELD(
                        exporting
                        i_id = 'VBELN'
                        receiving
                        rt_range_table = lt_range_table ).
    Update the selection field with new description - 'Your New Text'
              wd_this->m_handler->UPD_SELECTION_FIELD(
                        exporting
                             I_ID = 'VBELN'
                             I_DESCRIPTION = 'Your New text'
                             I_IS_AUTO_DESCRIPTION = abap_false
                             IT_RESULT = lt_range_table ).
    You can also pass the other parameters as per your requirement
    Hope this helps you.
    Regards,
    Rama

  • How to set a dynamic variant for date in select-options in the upper field

    Hi  Variant experts Good Evening!
           I have the following problem while setting up a dynamic varinat .
    Ex: select-options: dat for sy-datum.  
    I am able to save the lower limit as a dynamic value but not able to save the upper values as dynamic in the select-options. Could any of you please help me in this.
    Regards
    Ravi.

    i hope dynamic variant concept is not there,
    but u can use the fn module DYPRO_GET_VALUES  and
    DYNPRO_SET_VALUES
    DYNPRO_GET_VALUES gets the values in the screen,
    DYNPRO_SET VALUES sets the values.
    first get the values, compare and set the values as u want

Maybe you are looking for

  • Satellite L750D - no HDMI video out on external TV

    I have a Satellite L750D and a SyncMaster Smart TV I want to hook up my laptop to the TV with a HDMI cable. When connected, my laptop discovers the TV and can create an extended desktop but the TV says no signal. I have tested the TV with another lap

  • Stuck with a partially downloaded song

    On my 3rd generation iPad, I am stuck with a song I partially downloaded. In iTunes>Purchases, I clicked on the cloud next to the song title. It started to download on my iPad. Somehow, I thought the better of it, I didn't need the song on my iPad, s

  • Start to learn J2EE

    Hi, I want to learn J2EE. Would someone advise me where should I start? I had been doing Java, Struts, Servlet and JSP for a few years. Thanks.

  • CC Teams account on the Mac is asking for serial number

    Hi We've got a large CC Teams account and we've signed in, downloaded the desktop app, installed Photoshop, buts its asking for a Serial Number... we checked online and made sure it was set to international English on the Mac ...Any ideas

  • I can't install latest version of iTunes on my macbook pro

    Hello, Im trying to get the latest version of iTunes on my MBP (Mac OS X Lion 10.7.5) but at the end of the install process it reads 'Install Error' and nothing else. I've backed up, reinstalled lion and she still won't work. help