Convert Select-options into Parameter at runtime.

Dear Friends,
In my selection screen, i have declared select-option, now if i choose the radio button then select option shhould be work like parameter. It means without use of no inervals and no-extension in select option, it will work like no intervals and no-extension.
Can anybody suggest me that is it possible or not???
Thanking you,

HI Aakash,
Copy and paste the following code.
PARAMETERS:
          p_selopt RADIOBUTTON GROUP grp1 DEFAULT 'X' USER-COMMAND d001,
          p_parm RADIOBUTTON GROUP grp1.
SELECT-OPTIONS:
         s_date  FOR  sy-datum.
PARAMETERS :
p_date LIKE sy-datum.
INITIALIZATION.
  LOOP AT SCREEN.
    IF screen-name CS 'P_DATE'.
      screen-invisible = '1'.
      screen-active = '0'.
      MODIFY SCREEN.
    ELSEIF screen-name CS 'S_DATE'.
      screen-invisible = '0'.
      screen-active = '1'.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.
AT SELECTION-SCREEN OUTPUT.
  IF p_parm = 'X'.
    LOOP AT SCREEN.
      IF screen-name CS 'S_DATE'.
        screen-invisible = '1'.
        screen-active = '0'.
        MODIFY SCREEN.
      ELSEIF screen-name CS 'P_DATE'.
        screen-invisible = '0'.
        screen-active = '1'.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ELSEIF p_selopt = 'X'.
    LOOP AT SCREEN.
      IF screen-name CS 'P_DATE'.
        screen-invisible = '1'.
        screen-active = '0'.
        MODIFY SCREEN.
      ELSEIF screen-name CS 'S_DATE'.
        screen-invisible = '0'.
        screen-active = '1'.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ENDIF.
Hope you got the required output.
Thanks,
Susmitha

Similar Messages

  • How to convert select-options into parameters

    hi Abapers,
    i have an urgent requirement, iwant to know how to convert select-options into parameters
    on selection screen,is it possible to do.

    TABLES: spfli.
    SELECTION-SCREEN BEGIN OF BLOCK test.
    SELECT-OPTIONS:
                  s_carrid FOR spfli-carrid NO INTERVALS NO-EXTENSION.
    SELECTION-SCREEN END OF BLOCK test.
    Greetings,
    Blag.

  • How to convert select-options table into single field internal table

    Hi,
    My requirement is to convert select-options table into single internal table which has one field.
    e.g. select-options: s_matnr for mara-matnr.
           select-options table can have options  'BT',"EQ", "NE", "GE", "GT", "LE", "LT", "CP" etc. select-options table
           have   Sign:I ,Option:BT, Low: 1, High.10.The new internal table records should be 1,2,3,4,5,6,7,8,9,10.
    Please suggest any function module available for this scenario in SAP.
    Thanks,
    Somi.
    Edited by: somi reddy satti on Sep 15, 2009 3:18 PM

    Hi Sowmya,
    Here is the answer if I understand well of your question.
    Data: begin of gt_mon OCCURS 0,
                  mon(2)             TYPE n,
             end of gt_mon.
    Data: begin of gt_year OCCURS 0,
                  year(4)             TYPE n,
             end of gt_year.
    Select-options: s_period       FOR ptdw_pws_db-kmonth NO-EXTENSION
                                                                                    DEFAULT sy-datum(6)
                                                                                    TO sy-datum(6).
    For example according to above statement period is 201110 is 201201.
    Period field does n't exists in SAP for selection. If your selection is on date based on period which is given on the selection-screen then you need to convert the period to date by concatenating ( or using FM to convert )01 at the end of each period . You need to declare one range table for date to select the data from table.
    loop at s_period.
    gr_date-sign   = s_period-sign.
    gr_date-option = s_period-option.
    COncatenate s_period-low
                          '01'
    into gr_date-high.
    COncatenate s_period-high                   
                           '01'
    into gr_date-low
    append gr_date.                      
    ENDloop.
    Thanks,
    Satheesh

  • How to get all values in the range of select option into internal table?

    Hi,
    I need to capture all entries coming in the range of select option into one internal table.
    How to do get that?
    For E.g
    select-options: matnr for mara-matnr.(select option)
    IF I enter G0100013507892 as lower value of matnr and G0100014873947 as higher value
    and if there are 10,000 materials in the above range, then I want to capture all theses 10000 materails in one internal table. How to do that?
    Regards,
    Mrunal

    Hello Mrunal Mhaskar  ,
    What i understand you can do one thing  go in debug mode
    Try this code : -
    LOOP AT s_matnr_ex.
      IF s_matnr_ex-low IS NOT INITIAL.
        i_matnr-matnr = s_matnr_ex-low.
        i_matnr-option = s_matnr_ex-option.
        APPEND i_matnr.
        CLEAR : i_matnr.
      ENDIF.
    ENDLOOP.
    LOOP AT s_matnr_ex.
      IF s_matnr_ex-high IS NOT INITIAL.
        i_matnr-matnr = s_matnr_ex-high.
        i_matnr-option = s_matnr_ex-option.
        APPEND i_matnr.
        CLEAR : i_matnr.
      ENDIF.
    ENDLOOP.
    In the i_matnr table high and low values are there.
    Regards,
    Vandana.

  • Select-option or parameter with display mode

    hai experts,
    i need to give select-option or parameter with display mode in selection-screen.
    my requirement is.......
    to give last print out time in selection screen with display mode mean user cant able to change the time......
    reward avail for hope ful answer.....
    thanks in advance...
    regards,
    jai.m

    Hi jaya,
    write the following code.
    parameters: p1 type c.
    initialization.
    p1 = 'c'.
    at  selection-screeen output.
    loop at screen.
           if screen-name = 'P1'.
              screen-input = '0'.
              modify screen.
           endif.
    endloop.
    regards,
    Santosh Thorat

  • Select options and parameter

    We have a parameter and select option in Selection Screen, by using the parameter and select option in the select query, with out passing the any values to the Parameter and SO, how we will get the records?

    hi check this..
    if the parameter is empty if will not work in the select statement..you can get the values for the select options with empty structures..
    check this..
    tables:mara .
    data: begin of itab occurs 0,
    matnr like mara-matnr,
    end of itab .
    parameters:p_matnr like mara-matnr.
    select matnr  from mara into table itab
    where matnr  = p_matnr.
    loop at itab.
    write:/ itab-matnr.
    endloop.
    it will not fetch data..
    for select-options
    tables:mara .
    data: begin of itab occurs 0,
    matnr like mara-matnr,
    end of itab .
    select-options:s_matnr for mara-matnr.
    select matnr  from mara into table itab
    where matnr  in s_matnr.
    loop at itab.
    write:/ itab-matnr.
    endloop.
    it will fetch data..
    regards,
    venkat

  • Select option and parameter.

    I have select options and parameters in my selection screen. While extracting the data I am using both the select option and a parameter in where condition.  But that select statement is not returning any data. Could any body tell me what might be the reason.
    Thanks,
    bsv.

    Hi,
      See this example code it works.
    tables spfli.
    parameters p_carrid type spfli-carrid obligatory.
    select-options s_connid for spfli-connid.
    data itab type table of spfli with header line.
    select *
       from spfli into table itab
    where carrid eq p_carrid
       and connid in s_connid.
    loop at itab.
      write: / itab-carrid,
               itab-connid.
    endloop.
    Note : Dont leave blank for parameters because it take as space and when you select from table it is unsuccessful.
    Plzz Reward if it is useful,
    Mahi.

  • If checkbox is checked, put values in select-options and parameter...

    Hello Experts,
    Based on my selection-screen below, How do I fill p_eindt and p_monat with values if
    the user clicked on the checkbox p_end? Below is my selection-screen:
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-003.
    SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE text-001.
    PARAMETER: p_bukrs TYPE bukrs OBLIGATORY.
    SELECT-OPTIONS: p_werks FOR wa_ekpo-werks OBLIGATORY NO INTERVALS,
                    p_bsart FOR ekko-bsart OBLIGATORY NO INTERVALS,
                    p_eindt FOR eket-eindt OBLIGATORY,
                    p_ebeln FOR ekko-ebeln.
    PARAMETER: p_monat TYPE monat OBLIGATORY,
               p_gjahr TYPE gjahr OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK 1.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-002.
    PARAMETER: p_end AS CHECKBOX.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN END OF BLOCK b2.
    Hope you can help me guys.Thank you and take care!

    Hi,
      For F4 help for any input value in selection screen u can use:
    Ex:
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_eidnt-LOW.
      SELECT DISTINCT edint INTO TABLE IT_ab FROM <tablename>..
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
       EXPORTING
    DDIC_STRUCTURE         =
         RETFIELD               = 'eindt'
        PVALKEY                = ' '
         DYNPPROG               = W_REPID
          DYNPNR                 = W_DYNNR
         DYNPROFIELD            = 'p_eindt-LOW'
        STEPL                  = 0
          WINDOW_TITLE           = 'Plant'
        VALUE                  = ' '
          VALUE_ORG              = 'S'
        MULTIPLE_CHOICE        = 'X'
        DISPLAY                = ' '
        CALLBACK_PROGRAM       = ' '
        CALLBACK_FORM          = ' '
        MARK_TAB               = 'X'
      IMPORTING
        USER_RESET             =
        TABLES
        VALUE_TAB              = it_abc
        FIELD_TAB              =
        RETURN_TAB             = IT_RETURN
        DYNPFLD_MAPPING        =
    EXCEPTIONS
       PARAMETER_ERROR        = 1
       NO_VALUES_FOUND        = 2
       OTHERS                 = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Try this.
    Regards,
    Vani.

  • Select option as parameter in FM.

    Ho to pass select options as a parameters in function module.

    There are ways to do it...
    In the Function module using the Table parameter you can do it.
    Have a table parameter to hold the select option , Don't type refer to any DDIC structure or field.
    In the implementation of the function module you can do some thing like this,.
    "example you want to pass matnr select option
    data: r_selopt type range of matnr.
    data: wa_opt like line of r_selopt.
    r_selopt = table_param[].
    in the call function side you pass the select option directly to the table parameter directly.
    call function 'ZTEST_FUNCTION_SLECTOPTION'
    tables
    table_param = s_matnr.

  • Passing Select-options as parameter to function module

    I need to pass a select-option as a parameter to a function module. Is this possible?
    There is an option of passing all the values of the select-option to an internal table, passing that internal table as parameter to the function module, and then adding it manually again to a select-option in the function module.
    But is there any direct way to do this?

    Hi,
    I have a similar problem: I have RFC function module to which I want to pass select options. Therefore I defined table parameters as follows:
    IT_RUNID     TYPE     EFG_TAB_RANGES
    IT_PERNR      TYPE     EFG_TAB_RANGES
    IT_REINR     TYPE     EFG_TAB_RANGES
    I can successfully pass my values to the module, but if I try to check these parameters
    using
    CHECK IT_TRIPS-RUNID IN IT_RUNID.
        CHECK IT_TRIPS-PERNR IN IT_PERNR.
        CHECK IT_TRIPS-REINR IN IT_REINR.
    the check always fails, I guess because there are leading zeros in the ranges. Is there a way to solve this problem?
    Thanks and regards,
    Martin

  • Selecting user input from Select option into smart form

    Hi,
    when i use parameter then i wil show company code in smart-form output
    but when i use  select option then its throwing error parameter specified here is different
    what should i do in this case i want to design a big select option screen for taking user input
    REPORT  ZMM.
    TABLES BSEG.
    DATA : V_FORMNAME TYPE TDSFNAME VALUE 'ZPUR_REG',
           V_FMNAME TYPE RS38L_FNAM.
    *PARAMETERS SO_BUKRS TYPE BUKRS.
    SELECT-OPTIONS : SO_BUKRS FOR BSEG-BUKRS.
    DATA : Z_CONTROL TYPE SSFCTRLOP,      "Smart Forms: Control structure
            Z_OPTIONS TYPE SSFCOMPOP.      "SAP Smart Forms: Smart Composer (transfer) options.
    MOVE 'X' TO : Z_control-no_dialog,        "SAP Smart Forms: General Indicator
                   Z_options-tdnewid,          "New Spool Request (Print Parameters)
                   z_control-PREVIEW.         "Print preview
    MOVE 'LP01' TO Z_options-tddest.         "Spool: Output device
    MOVE space  TO Z_options-tdimmed.        "Print Immediately (Print Parameters).
    MOVE 'PRINTER' TO Z_control-device.      "Output device
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
      EXPORTING
        FORMNAME = V_FORMNAME
      IMPORTING
        FM_NAME  = V_FMNAME.
    CALL FUNCTION V_FMNAME
      EXPORTING
        CONTROL_PARAMETERS = Z_CONTROL
        OUTPUT_OPTIONS     = Z_OPTIONS
        USER_SETTINGS      = ''
        BUKRS              = SO_BUKRS.
    pls help me in this regards.
    ketan..

    hi
    thnx for your reply
    can u pls elaborate in my code
    now i changed code   BUKRS    = SO_BUKRS-low.
    either i can give low or high but how to select from range
    REPORT  ZMM.
    TABLES BSEG.
    DATA : V_FORMNAME TYPE TDSFNAME VALUE 'ZPUR_REG',
           V_FMNAME TYPE RS38L_FNAM.
    *PARAMETERS SO_BUKRS TYPE BUKRS.
    SELECT-OPTIONS : SO_BUKRS FOR BSEG-BUKRS.
    DATA : Z_CONTROL TYPE SSFCTRLOP,      "Smart Forms: Control structure
            Z_OPTIONS TYPE SSFCOMPOP.      "SAP Smart Forms: Smart Composer (transfer) options.
    MOVE 'X' TO : Z_control-no_dialog,        "SAP Smart Forms: General Indicator
                   Z_options-tdnewid,          "New Spool Request (Print Parameters)
                   z_control-PREVIEW.         "Print preview
    MOVE 'LP01' TO Z_options-tddest.         "Spool: Output device
    MOVE space  TO Z_options-tdimmed.        "Print Immediately (Print Parameters).
    MOVE 'PRINTER' TO Z_control-device.      "Output device
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
      EXPORTING
        FORMNAME = V_FORMNAME
      IMPORTING
        FM_NAME  = V_FMNAME.
    CALL FUNCTION V_FMNAME
      EXPORTING
        CONTROL_PARAMETERS = Z_CONTROL
        OUTPUT_OPTIONS     = Z_OPTIONS
        USER_SETTINGS      = ''
        BUKRS              = SO_BUKRS-low.
    ketan..

  • Dynamic select-options using parameter

    Hi experts,
    It the user selects one value from dropdown list, it should generate one select-option using that name. Is it possible?
    for example, (pls see my code).
    If user selects 'Malek' from parameter, <b>and press 'ENTER'</b>
    <b>select-option should display with that name</b> like
    Malek      malek-low  malek-high
    And if user selects some other like 'Amran'. It should generate(and append)
    Malek      malek-low  malek-high
    amran      amran-low amran-high
    and so on....
    report c.
    data: t_return like ddshretval occurs 0 with header line.
    data: begin of t_names occurs 0,
           name like usr01-bname,
          end of t_names.
    parameters : i_inspec like usr01-bname.
    at selection-screen on value-request for i_inspec.
      perform get_names.
    form get_names.
      t_names-name = 'Malek'.
      append t_names.
      t_names-name = 'Amran'.
      append t_names.
      t_names-name = 'Ow CC'.
      append t_names.
      t_names-name = 'titbit'.
      append t_names.
      call function 'F4IF_INT_TABLE_VALUE_REQUEST'
        exporting
          retfield    = 'T_NAMES-NAME'
          dynpprog    = sy-cprog
          dynpnr      = sy-dynnr
          dynprofield = 'I_INSPEC'
          value_org   = 'S'
        tables
          value_tab   = t_names.
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno with
        sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
      read table t_return index   1.
    endform.                    "GET_NAMES
    Reward guaranteed,
    thanks
    kaki

    Use At selection-screen output,use screen internal table..
    User Dynamic Selection
    at selection-screen output.
      select single * from t000md.
      loop at screen.
        case screen-group1.
          when 'REL'.
            if not  p_old is initial.
              screen-input = '0'.
              screen-required = '0'.
              screen-invisible = '1'.
            endif.
            modify screen.
          when 'BEL'.
            if not p_new is initial.
              screen-input = '0'.
              screen-required = '0'.
              screen-invisible = '1'.
            endif.
            modify screen.
          when 'ARB'.
            if  p_new is initial.
              screen-input = '0'.
              screen-required = '0'.
              screen-invisible = '1'.
            endif.
            modify screen.
          when 'MTA'.
            if  p_new is initial.
              screen-input = '0'.
              screen-required = '0'.
              screen-invisible = '1'.
            endif.
            modify screen.
        endcase.
      endloop.

  • Pass select option and parameter with submit

    Hello,
    I have two programs and what i have to do is to use the selection screen information from program A and submit it to program B so that this second program will generate a report with this information.
    After program B is executed it creates some files in a server, which i will have to use later in program A. I cannot modify the program B since its not part of the requirement.
    But the thing is that i am having problems when submiting a select option and a parameter together.
    It would be really useful if someone could give some examples of this.
    Example of what i want to do:
    SUBMIT PROGRAM_B
    WITH S_MATNR EQ S_MATNR      ->pass all the values from a select option.
    WITH P_WERKS EQ P_WERKS    ->pass a single value from a parameter.
    AND RETURN
    Regards,
    Roberto

    Hi,
    Try this for select-options:
    SUBMIT PROGRAM_B
    WITH S_MATNR *IN* S_MATNR ->pass all the values from a select option.
    WITH P_WERKS EQ P_WERKS ->pass a single value from a parameter.
    AND RETURN
    Hope it helps.
    Regards,
    Gilberto Li
    Edited by: Gilberto Li on Feb 2, 2009 10:24 PM
    Edited by: Gilberto Li on Feb 2, 2009 10:33 PM
    Edited by: Gilberto Li on Feb 2, 2009 10:33 PM

  • Reading all select-option and parameter fields

    Hello All,
        I have a reaquire ment like ' i Will take a report name as input from user , and i  need to read all the fields declared with PARAMETERS and SELECT-OPTIONS. '
         one thing i can read the program and go line by line or scan the program.
    apart from this is there any other way to get all such fields declared with PARAMETERS and SELECT-OPTIONS
    Thanks & Regards
    Amarender Reddy B

    Hi,
      You can fetch it from table TVARV
    Regards,
    Prashant

  • Select (variable) into:parameter from xyz , dynamic sql

    hello everyone
    I have a table with the columns KZ01*01*, KZ01*02*, KZ01*03*.....
    I want to select the value from one column depending of a variable z.b. varable=3 I want the value select KZ01*03*
    I wrote the trigger post_querry:
    declare
         v_kfz string(20);
    begin
    v_kfz:='select KZ010'||:daten.lkw||'into :kennzeichen from r_bestellung@r where nummer=:daten.r_bestell_nummer';
    Forms_DDL(v_kfz);
    end;
    alternativ I tried:
    execute IMMEDIATE 'select KZ010'||:daten.lkw||'from r_bestellung@r where nummer=:daten.r_bestell_nummer'
    I am using Form builder 6.0.... and Oracel 8i
    what I am doing wrong, thanks for helping
    regards
    robert

    I think there was good example in form but here is the example for your crieteria.
    DECLARE
         vSqlStr VARCHAR2(1024);
         cursor_number EXEC_SQL.CursType;
         vRecCount NUMBER;
      vReturnedValue DATATYPE; -- Set this datatype upon table field
    BEGIN
         cursor_number := Exec_SQL.Open_cursor;
         -- Here variable your field name
         -- for numeric
         vSqlStr := 'select '||<VARIABLE>||' from r_bestellung@r where nummer='||:daten.r_bestell_nummer;
         -- for characters
         vSqlStr := 'select '||<VARIABLE>||' from r_bestellung@r where nummer='''||:daten.r_bestell_nummer||'''';
         -- From above use only one on your requirement
         EXEC_SQL.PARSE(cursor_number, vSqlStr);
         EXEC_SQL.DEFINE_COLUMN(cursor_number,1,vReturnedValue,30);
         vRecCount := EXEC_SQL.EXECUTE(cursor_number);
         IF EXEC_SQL.FETCH_ROWS(cursor_number)=1 THEN
           EXEC_SQL.COLUMN_VALUE(cursor_number,1,<:FORM_FIELD_NAME>);  -- Here form_field_name replace with you current form field.
         END IF;
         EXEC_SQL.CLOSE_CURSOR(cursor_number);
    EXCEPTION
      When EXEC_SQL.INVALID_CONNECTION Then
         message('Unexpected Invalid Connection error from EXEC_SQL');
      When EXEC_SQL.PACKAGE_ERROR Then
         message('Unexpected error from EXEC_SQL: '||to_char(EXEC_SQL.LAST_ERROR_CODE)|| EXEC_SQL.LAST_ERROR_MESG);
      If EXEC_SQL.IS_OPEN(cursor_number) Then
        EXEC_SQL.CLOSE_CURSOR(cursor_number);
        message('Exception - Cleaned up Cursor');
      End if;
    END;-Ammad

Maybe you are looking for

  • Adobe Air on Windows Mobile 5.0

    Hello, Are Air Apps supported in Windows Mobile, Palm OS and Symbian ?  If yes what needs to be done to install them on these platforms ? Is Flashlite sufficient ? Also, is there a automatic online/offline synchronization mechanism between server and

  • InOB58 and FSE2 doesnu00B4t find the Financial Statement Version

    Hello I´m find in a programa this:   RFDT-SRTFD = 'BAPTP'.   IMPORT X011Q FROM DATABASE RFDT(BS) ID RFDT-SRTFD. I go to transaction OB58 or FSE2 and I don´t find the version BAPTP. I have to change the names and I don´t find BAPTP. Where I can change

  • HT1175 How do I backup to an older machine's sparsebundle?

    I have done a full restore to a new machine, which has worked...and I am told there should be an option to set to previous backups (to continue backing up to the same history). According to a Macworld article, when I connect to my Time Capsule for ba

  • Generate new p_id ?

    Hi, Is it possible to generate a new p_id value from plsql (Ideally created as part of a page import process)? We have a large APEX report - that we want to modify the exported page source to globally update some values. In addition to the update, we

  • You guys are much smarter than I... Please help!

    I thought I could do it, but I messed up! At first itunes gave me a message "iTunes cannot read library because it was created by a newer version of iTunes" (I have the latest version of iTunes) I took some steps described to me in a link at Apple.co