Dynamic Selection option in the selection screen

Hi ,
I have a requirement like this ....
The user wants some fields to be default available in the selection screen. But they also want to be able to select the data based on additional fields (all the remaining fields ) which they want to see in the dynamic selection .
The basic list for selections should be limited to the fields listed in the specifications provided to me and the remaining fields should be made available through the dynamic selection option.
In the transaction FBL3N , this facility is provided.
Kindly help me with this..
thanks,
Sumit .

Hi Sumit,
To include dynamic selection check this sample code.
TYPE POOLS DECLARATIONS FOR VALUE REQUEST MANAGER AND ICONS
TYPE-POOLS : vrm,
             icon.
*SELECTION SCREEN FIELDS
TABLES : sscrfields.*GLOBAL DECLARATIONS
DATA : flag TYPE c,
      tablename(10),
      mmtable LIKE dd02l-tabname,
      sdtable LIKE dd02l-tabname,
      hrtable LIKE dd02l-tabname.*DECLARATIONS FOR SELECTION SCREEN STATUS
DATA it_ucomm TYPE TABLE OF sy-ucomm.***********SELECTION-SCREENS**********************
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME.*FOR DYNAMIC DISPLAY OF MODULES
PARAMETERS :  pa RADIOBUTTON GROUP rad USER-COMMAND com MODIF ID mod,
              pb RADIOBUTTON GROUP rad MODIF ID rad,
              pc RADIOBUTTON GROUP rad MODIF ID cad.SELECTION-SCREEN SKIP.**TO INCLUDE DYNAMIC ICONS
SELECTION-SCREEN COMMENT 2(6) text_001.*DYNAMIC LIST BOX BASED ON USER SELECTIONS
PARAMETERS one AS LISTBOX VISIBLE LENGTH 20  MODIF ID mod.
PARAMETERS two AS LISTBOX VISIBLE LENGTH 20   MODIF ID rad.
PARAMETERS three AS LISTBOX VISIBLE LENGTH 20 MODIF ID cad.SELECTION-SCREEN END OF BLOCK blk1.*DISPLAY DYNAMIC PUSHBUTTON ON APP TOOLBAR ON USER CLICKS
SELECTION-SCREEN: FUNCTION KEY 1,
                  FUNCTION KEY 2,
                  FUNCTION KEY 3.**EVENT ON SELECTION SCREEN FOR OUTPUT DISPLAY
AT SELECTION-SCREEN OUTPUT.*CLICK OF FIRST RADIO BUTTON
  IF pa = 'X'.
    sscrfields-functxt_01 = 'Materials Management'.
    WRITE icon_plant AS ICON TO text_001.
*CODE TO GET DYNAMICS BASED ON THE SELECTED RADIO
    LOOP AT SCREEN.
      IF screen-group1 = 'MOD'.
        screen-intensified = '1'.
        screen-active = 1.
        screen-display_3d = '1'.
        MODIFY SCREEN.
      ENDIF.
      IF screen-group1 = 'RAD'.
        screen-intensified = '0'.
        screen-active = 0.
        screen-display_3d = '0'.
        MODIFY SCREEN.
      ENDIF.
      IF screen-group1 = 'CAD'.
        screen-intensified = '0'.
        screen-active = 0.
        screen-display_3d = '0'.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ENDIF.*CLICK OF SECOND RADIO
  IF pb = 'X'.
    sscrfields-functxt_02 = 'Sales And Distribution'.
    WRITE icon_ws_ship AS ICON TO text_001.
    LOOP AT SCREEN.
      IF screen-group1 = 'RAD'.
        screen-intensified = '1'.
        screen-active = 1.
        screen-display_3d = '1'.
        MODIFY SCREEN.
      ENDIF.
      IF screen-group1 = 'MOD'.
        screen-intensified = '0'.
        screen-active = 0.
        screen-display_3d = '0'.
        MODIFY SCREEN.
      ENDIF.
      IF screen-group1 = 'CAD'.
        screen-intensified = '0'.
        screen-active = 0.
        screen-display_3d = '0'.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ENDIF.*CLICK OF THIRD RADIO
  IF pc = 'X'.
    sscrfields-functxt_03 = 'Human Resources'.
    WRITE icon_new_employee AS ICON TO text_001.
    LOOP AT SCREEN.
      IF screen-group1 = 'RAD'.
        screen-intensified = '0'.
        screen-active = 0.
        screen-display_3d = '0'.
        MODIFY SCREEN.
      ENDIF.
      IF screen-group1 = 'MOD'.
        screen-intensified = '0'.
        screen-active = 0.
        screen-display_3d = '0'.
        MODIFY SCREEN.
      ENDIF.
      IF screen-group1 = 'CAD'.
        screen-intensified = '1'.
        screen-active = 1.
        screen-display_3d = '1'.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ENDIF.*CUSTOMISING THE TOOLBARS OF THE SELECTION SCREEN
*WITH F8 BUTTON DISABLED  APPEND :  'PRIN' TO it_ucomm,
            'SPOS' TO it_ucomm,
            'ONLI' TO it_ucomm.  CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
    EXPORTING
      p_status  = sy-pfkey
    TABLES
      p_exclude = it_ucomm.
**EVENT ON THE SELECTION
AT SELECTION-SCREEN.* LIST BOX ONE VALUES
  CASE one.
    WHEN '1'.
      mmtable = 'MARC'.
    WHEN '2'.
      mmtable = 'MARA'.
    WHEN '3'.
      mmtable = 'MARD'.
    WHEN '4'.
      mmtable = 'MARM'.
  ENDCASE.* LIST BOX TWO VALUES
  CASE two.
    WHEN '1'.
      sdtable = 'VBAK'.
    WHEN '2'.
      sdtable = 'VBAP'.
    WHEN '3'.
      sdtable = 'VBUK'.
    WHEN '4'.
      sdtable = 'VBUP'.
  ENDCASE.* LIST BOX THREE VALUES
  CASE three.
    WHEN '1'.
      hrtable = 'PA0001'.
    WHEN '2'.
      hrtable = 'PA0006'.
    WHEN '3'.
      hrtable = 'PA0022'.
    WHEN '4'.
      hrtable = 'PA0008'.
  ENDCASE.*VALUES FOR CLICK OF THE PUSHBUTTON ON APP TOOLBAR
*AND ENABLING THE BUTTONS TO PERFORM F8
  CASE sscrfields-ucomm.
    WHEN 'FC01'.
      tablename = mmtable.
      sscrfields-ucomm = 'ONLI'.
    WHEN 'FC02'.
      tablename = sdtable.
      sscrfields-ucomm = 'ONLI'.
    WHEN 'FC03'.
      tablename = hrtable.
      sscrfields-ucomm = 'ONLI'.
  ENDCASE.*INITIALIZATION EVENT
INITIALIZATION.*VALUES ASSIGNED TO DROPDOWNLISTS IN THE SUBROUTINES
  PERFORM f4_value_request_pa.
  PERFORM f4_value_request_pb.
  PERFORM f4_value_request_pc.*START OF SELECTION EVENT
START-OF-SELECTION.*SUBROUTINE FOR OUTPUT
  PERFORM output.*&----------------------------------------------------------------*
*&      Form  f4_value_request_PA
*       text
*SUBROUTINE TO PROVIDE DROPDOWN VALUES TO LIST1
FORM f4_value_request_pa.  DATA: l_name TYPE vrm_id,
        li_list TYPE vrm_values,
        l_value LIKE LINE OF li_list.  l_value-key = '1'.
  l_value-text = 'Plant Data for Material'.
  APPEND l_value TO li_list.
  CLEAR l_value.  l_value-key = '2'.
  l_value-text = 'General Material Data'.
  APPEND l_value TO li_list.
  CLEAR l_value.  l_value-key = '3'.
  l_value-text = 'Storage Location Data for Material'.
  APPEND l_value TO li_list.
  CLEAR l_value.  l_value-key = '4'.
  l_value-text = 'Units of Measure for Material'.
  APPEND l_value TO li_list.
  CLEAR l_value.
  l_name = 'ONE'.  CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
      id              = l_name
      values          = li_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. " f4_value_request_tabname*&----------------------------------------------------------------*
*&      Form  f4_value_request_PB
*       text
*SUBROUTINE TO PROVIDE DROPDOWN VALUES TO LIST2FORM f4_value_request_pb.  DATA: l_name TYPE vrm_id,
        li_list TYPE vrm_values,
        l_value LIKE LINE OF li_list.  l_value-key = '1'.
  l_value-text = 'Sales Document: Header Data'.
  APPEND l_value TO li_list.
  CLEAR l_value.  l_value-key = '2'.
  l_value-text = 'Sales Document: Item Data'.
  APPEND l_value TO li_list.
  CLEAR l_value.  l_value-key = '3'.
  l_value-text = 'Sales Document:Header Status'.
  APPEND l_value TO li_list.
  CLEAR l_value.  l_value-key = '4'.
  l_value-text = 'Sales Document: Item Status'.
  APPEND l_value TO li_list.
  CLEAR l_value.
  l_name = 'TWO'.
  CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
      id              = l_name
      values          = li_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. " f4_value_request_PB*&----------------------------------------------------------------*
*&      Form  f4_value_request_PC
*       text
*SUBROUTINE TO PROVIDE DROPDOWN VALUES TO LIST3FORM f4_value_request_pc.  DATA: l_name TYPE vrm_id,
        li_list TYPE vrm_values,
        l_value LIKE LINE OF li_list.  l_value-key = '1'.
  l_value-text = 'HR Master :Infotype 0001 (Org. Assignment)'.
  APPEND l_value TO li_list.
  CLEAR l_value.  l_value-key = '2'.
  l_value-text = 'Address Infotype 0006'.
  APPEND l_value TO li_list.
  CLEAR l_value.  l_value-key = '3'.
  l_value-text = 'Education Infotype 0022'.
  APPEND l_value TO li_list.
  CLEAR l_value.  l_value-key = '4'.
  l_value-text = 'Basic Pay Infotype 0008'.
  APPEND l_value TO li_list.
  CLEAR l_value.
  l_name = 'THREE'.
  CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
      id              = l_name
      values          = li_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. " f4_value_request_PC
*&      Form  OUTPUT
*       text
*      -->P_TABLENAME  text
*fINAL OUTPUT
FORM output.  DATA p_table(10).  p_table = tablename.*popup to display teh selected table and
*Continue button is clicked
  CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'
    EXPORTING
      titel        = 'User Selections '
      textline1    = p_table
      textline2    = 'is the Selected table'
      start_column = 25
      start_row    = 6.*assigning the table value in p_table to the
* Table in SE16 transaction by explicitly calling
  SET PARAMETER ID 'DTB' FIELD p_table.
  CALL TRANSACTION 'SE16'.
ENDFORM.                    "OUTPUT
Regards,
Manoj Kumar P

Similar Messages

  • 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.

  • Dynamic selection screen fetching the value from table fields

    hi gurus,
    i have one table say ztable...and i should create a dynamic selection screen which should populate the selection screen by the table field names.
    example..if i have 3 fields im my table..my selection screen should have three selection option fields..and in future if i add one more field in my table it should automatically create another slection-option in selection screen..
    thanks
    Sudheer

    Do you mean like SE16 works. If so, you should notice that if you  amend the selection fields, the screen program is actually re-generated.
    That is what is happening. A program is being created and re-generated.
    To create a dynamic selection screen in a single program is not possible ( I may be wrong ). If it is possible, then you would have problems in defining selection screen field names and using them.

  • How to add a new Field in the Dynamic Selection screen section.

    HI,
    There is a requirement in which I need to add a field in existing program of dynamic selections.
    I need to add a field KNKK-DBRTG (Customer Rating) in dynamic selections screen of some existing report
    which has a dynamic selection screen with other fields like customer account, company code etc. Along with this i need to add Customer rating field also in the selection screen.
    I have used GET KNKK statement to select this in the Dynamic selection screen. But I need to make it appear
    on the screen.
    LDB used is the Customer Database.
    I have added GET KNKK statement after GET KNA1 statement.
    Can any one help me how we can make this rating field appear in the selection screen.
    With the GET statement Credit control area Fields can be selected in the selection screen but I have to permanantly add the field in the selection screen.
    Regards
    Prashant Prabhu

    Hi,
    So you need that this new field have data in old records?
    1.- If you are in BI 7.0 and the logic or data for that New field are in the same Dimension, you can use a Remodeling to fill it. I mean if you want if you want to load from a Master Data from other InfoObject in the same Dim.
    2.- If condition "1" is not yours.
    First add the new field, then create a Backup Cube (both cubes with the new field) and make a full update with all information in the original Cube. The new field willl be empty in both cubes.
    Create an UR from BackUp_Cube to Original_Cube with all direct mapping and create a logic in the Start Routine of the UR (modiying the data_package) you can look for the data in the DSO that you often use to load.
    To do that both cubes have to be Datasources ( right click on Cube-> aditional function-> and I think is "Extract Datasource")
    Hope it helps. Regards, Federico

  • Adding a BSEG field to the FB03 dynamic selection screen

    Hello,
    We have a requirement wherein we want to add a field from BSEG in the dynamic selection screen of FB03.
    We found that the logical database behind this is BRF.  So we created a u2018CUSu2019 selection view for the logical database and added the field from BSEG to the functional group
    and checked the checkbox u201CPreselectu201D for it to appear automatically in the FB03 screen.
    But we still couldnu2019t see the field in FB03 dynamic selection.
    On analysis, we found that only tables are that are defined in the nodes (Extras  Selection views) can be used to create the dynamic selection and BSEG was not available
    as one of the node.  So we added BSEG as one of the node by adding the below code to the SELECTION of the logical database.
    SELECTION-SCREEN DYNAMIC SELECTIONS FOR TABLE BSEG.
    Even after that, we couldnu2019t see the field from BSEG in the dynamic selection.
    Are we missing anything here?
    I see many threads here on similar lines but no one has posted the exact step. Any help is highly appreciated.
    Thanks a lot.
    Regards,
    Suganya

    Hi
    If you want to take the line item details than you can refer these t-codes rather than customizing.
    S_AC0_52000887 - Receivables: Profit Center
    S_AC0_52000888 - Payables: Profit Center
    S_ALR_87012332 - G/L Account Statements
    Here by using the dynamic selection you can get the results. Use object list display and select the layout for more fields.
    Thanks

  • Exclude one field from Logical Database's dynamic selection screen

    Hi Guru,
    I have a requirement to amend a program to exclude the document number field (bsik-belnr) from the dynamic selection-screen of the logical database KDF(Vendor Database) so that the program will not filter according to the document number.
    I have use the below syntax in my zprogram.
      selection-screen exclude select-options: doc-no.
    However I get syntax error "The addition EXCLUDE is only allowed in INCLUDE DBKDFSEL".
    Please advice.
    Best Regards,
    Fung

    The selection part of the logical database defines input fields for selecting data.
              The runtime environment displays these on the selection screen when you run an executable program linked to the logical database.
              Include called DB<ldbname>SEL.
            SELECTION-SCREEN BEGIN OF VERSION ver TEXT-xxx.
                                                                    SELECTION-SCREEN EXCLUDE ... .
                                                    SELECTION-SCREEN END OF VERSION ver.
    Defines a selection screen version (with a three-character name ver ). Between BEGIN OF VERSION and END OF VERSION , you can exclude selection screen objects for the version ver , i.e. remove them from the selection screen with SELECTION-SCREEN EXCLUDE.
              SELECTION-SCREEN DYNAMIC SELECTIONS FOR TABLE dbtab
    If one of these tables is active in the report (i.e. it is declared under TABLES or lies somewhere on the path from the root of the database hierarchy to a table declared with TABLES ), a pushbutton called 'Dynamic selections' appears on the selection screen.

  • How to retrieve values from Dynamic Selection screen while using LDB  - PSJ

    I am having problem in PSJ Logical database. In a custom report which is using PSJ LDB, we are using PROJ and PRPS_R tables.
    When I run program it displays one dynamic selection screen, there we are giving selection criteria for PRPS (Master data WBS element) - Created on (giving some range like 2011/01/01 to 2011/01/31).
    So I want to display all WBS element which are created during the period (2011/01/01 - 2011/01/31).
    How do I retrieve the select-option low and high value of the field Created on Of WBS element if we Select data from any table based on this condition.
               Please help me.
    Thanks.

    in fact you don't have to get the values, you only need to tell to the program to take them into account :
    GET PRPS.
      CHECK SELECT-OPTIONS.

  • Dynamic selection-screen parameters

    Hi All,
    Is it possible to create a dynamic selection-screen checkbox parameters at runtime. My requirement is :
    I have Object parameter on the selection-screen, based on this it has to fetch the info structures and display it with checkboxes on the same selection-screen, so that the user can select which info structures to be processed and can save it as a variant.
    Thanks,
    Satya Priya

    as per ur requirment....execute it and see
    tables :DD02L,t002t,t002.
    data :  begin of itab occurs 0,
                tabname like DD02L-TABNAME,
            end of itab.
            data : tabname1 like DFIES-TABNAME,
            RSSELTEXTS1 type table of RSSELTEXTS with header line.
    data : begin of RSSELTEXTS2 occurs 0,
             RSSEL type  RSSELTEXTS,
             initial type c,
           end of RSSELTEXTS2.
    data : begin of imakt occurs 0 .
           include structure t002.
    data : end of imakt.
    data : begin of ipara occurs 0,
             name(132) type c,
             text(132) type c,
            end of ipara.
    data :srch_str(10) TYPE c,
         tot type i,
         ind type sy-tabix.
    select-options : s_lang for t002-spras.
    *PARAMETERS show_all AS CHECKBOX USER-COMMAND flag.
    PARAMETERS showall1 AS CHECKBOX USER-COMMAND flag modif id sd.
    PARAMETERS showall2 AS CHECKBOX USER-COMMAND flag modif id sd.
    PARAMETERS showall3 AS CHECKBOX USER-COMMAND flag modif id sd.
    PARAMETERS showall4 AS CHECKBOX USER-COMMAND flag modif id sd.
    PARAMETERS showall5 AS CHECKBOX USER-COMMAND flag modif id sd.
    PARAMETERS showall6 AS CHECKBOX USER-COMMAND flag modif id sd.
    PARAMETERS showall7 AS CHECKBOX USER-COMMAND flag modif id sd.
    PARAMETERS showall8 AS CHECKBOX USER-COMMAND flag modif id sd.
    PARAMETERS showall9 AS CHECKBOX USER-COMMAND flag modif id sd.
    PARAMETERS showal10 AS CHECKBOX USER-COMMAND flag modif id sd.
    PARAMETERS showal11 AS CHECKBOX USER-COMMAND flag modif id sd.
    PARAMETERS showal12 AS CHECKBOX USER-COMMAND flag modif id sd.
    PARAMETERS showal13 AS CHECKBOX USER-COMMAND flag modif id sd.
    PARAMETERS showal14 AS CHECKBOX USER-COMMAND flag modif id sd.
    PARAMETERS showal15 AS CHECKBOX USER-COMMAND flag modif id sd.
    PARAMETERS showal16 AS CHECKBOX USER-COMMAND flag modif id sd.
    PARAMETERS showal17 AS CHECKBOX USER-COMMAND flag modif id sd.
    PARAMETERS showal18 AS CHECKBOX USER-COMMAND flag modif id sd.
    PARAMETERS showal19 AS CHECKBOX USER-COMMAND flag modif id sd.
    PARAMETERS showal20 AS CHECKBOX USER-COMMAND flag modif id sd.
    initialization.
    at selection-screen output.
    if s_lang ne ' '.
    select * from t002 into table imakt where spras in s_lang.
    describe table imakt lines tot.
    loop at screen  .
        if screen-group1 = 'SD'
           and screen-group3 = 'PAR'.
               ipara-name = screen-name.
               ind = screen-group4.
            read table imakt index ind.
               ipara-text = imakt-laiso.
               append ipara.
               clear ipara.
        endif.
      endloop.
    endif.
    loop at ipara.
    RSSELTEXTS1-name = ipara-name.
    RSSELTEXTS1-kind = 'P'.
    RSSELTEXTS1-text = ipara-text.
    append RSSELTEXTS1.
    clear RSSELTEXTS1.
    endloop.
    CALL FUNCTION 'SELECTION_TEXTS_MODIFY'
      EXPORTING
        PROGRAM                           = sy-repid
      TABLES
        SELTEXTS                          = RSSELTEXTS1
    EXCEPTIONS
      PROGRAM_NOT_FOUND                 = 1
      PROGRAM_CANNOT_BE_GENERATED       = 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.
    if s_lang ne ' '.
    loop at screen  .
        if screen-group1 = 'SD'
           and screen-group3 = 'PAR'
           and    screen-group4 > tot.
           screen-input = '0'.
           screen-active = '0'.
         modify screen.
        endif.
      endloop.
    endif.
    if s_lang = ' '.
      loop at screen .
        if screen-group1 = 'SD'.
           screen-input = '0'.
           screen-active = '0'.
         modify screen.
        endif.
      endloop.
    endif.

  • Dynamic selection screen

    Hello all,
    I have a requirement to create a 'dynamic' selection screen with 2 sections(vertical).
    The first section contains set of selection options for which the type comes from the values stored in the internal table(populated at runtime). The second section contains checkbox corresponding to each selection option generated/created in the first section mentioned above.
    So the number of fields and checkboxes to be created are identified only at the runtime.
    Note: I already tried to use FMs FREE_SELECTIONS* but it is not serving my purpose.
    Looking forward to your inputs.
    Thanks & Regards,
    Rajat
    Edited by: rajat.sap123 on Feb 7, 2012 7:18 PM

    Why don't you use the At selection-screen output event.
    As i have understood your scenario you have two sections. with the first one containing the select-options. The second will change on basis of the first section selection.
    Hope it helps you.
    Elaborate a bit more so i can paste a code.

  • Need to generate dynamic selection screen

    Hi,
    'am looking for a requirement in ABAP Programming which is <b>feasible</b>!
      While executing my report, std. selection screen ( 1000) gets displayed and it gives the output list which consists of only one field that will have TABLE NAMES. Once the user selects any one of the record on this output list, I need to display another screen ( selection screen ) with all the key fields of that table that got seleted.
      <b>How do I populate a dynamic selection screen by passing <i>TABLE NAME</i> as parameter with all the <i>keyfields of that table as select-options</i>.</b>
      Awaiting your quick positive reply..
    Regards,
    Kriss.

    hii
    check this one
    SELECTION-SCREEN BEGIN OF BLOCK blk.
    PARAMETERS : p_rb1 TYPE c RADIOBUTTON GROUP rad1 DEFAULT 'X' USER-COMMAND FC,
                 p_rb2 TYPE c RADIOBUTTON GROUP rad1.
    SELECTION-SCREEN END OF BLOCK blk.
    SELECTION-SCREEN BEGIN OF BLOCK blk_1 WITH FRAME.
    PARAMETERS : p_werks1 TYPE werks_d MODIF ID bk1.
    SELECTION-SCREEN END OF BLOCK blk_1.
    SELECTION-SCREEN BEGIN OF BLOCK blk_2 WITH FRAME.
    PARAMETERS : p_werks2 TYPE werks_d MODIF ID bk2,
                 p_matnr2 TYPE matnr   MODIF ID bk2.
    SELECTION-SCREEN END OF BLOCK blk_2.
    AT SELECTION-SCREEN OUTPUT.
      IF p_rb1 = 'X'.
        LOOP AT SCREEN.
          IF screen-group1 = 'BK1'.
            screen-active = 0.
            MODIFY SCREEN.
          ELSE.
            screen-active = 1.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ELSE.
        LOOP AT SCREEN.
          IF screen-group1 = 'BK2'.
            screen-active = 0.
            MODIFY SCREEN.
          ELSE.
            screen-active = 1.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    Regards
    Naresh

  • Alv Output after dynamic selection screen

    Hi Guys
    I have coded a dynamic selection screen (shown below). I want to create an ALV report based on what the user enters in the selection screen. Is the right way of doing this to code an IF s_matnr is not initial statement then call all the subroutines for output of material data and then else call a second batch of subroutines for billing data. It seems a bit long winded to me but I haven't been able to find anything on google that clearly explains the approach.
    REPORT  ZTREVOR_DYNAMIC_ALV_MAKT_VBRP.
    TABLES : makt,
    marc,
    t001w,
    vbrk,
    vbrp.
    CONSTANTS : c_yes TYPE c VALUE '1',
    c_no TYPE c VALUE '0'.
    Selection-screen begin of block b1 with frame title text-sc1.
    PARAMETERS : p_opt1 TYPE c RADIOBUTTON GROUP radi USER-COMMAND op1, "Material
    p_opt2 TYPE c RADIOBUTTON GROUP radi.                  "Billing Document
    Selection-screen end of block b1.
    Selection-screen begin of block b2 with frame title text-sc2.
    SELECT-OPTIONS : s_matnr FOR makt-matnr MODIF ID op1, "Material
    s_vbeln FOR vbrp-vbeln MODIF ID op2. "Billing Document
    Selection-screen end of block b2.
    T SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN .
    IF screen-group1 = 'OP1' .
    IF p_opt1 = 'X' .
    screen-invisible = c_no .
    screen-active = c_yes .
    ELSE.
    screen-invisible = c_yes .
    screen-active = c_no .
    ENDIF.
    MODIFY SCREEN .
    ENDIF.
    IF screen-group1 = 'OP2' .
    IF p_opt2 = 'X' .
    screen-invisible = c_no .
    screen-active = c_yes .
    ELSE.
    screen-invisible = c_yes .
    screen-active = c_no .
    ENDIF.
    MODIFY SCREEN .
    ENDIF.
    ENDLOOP.

    Hi,
    First of all, you should check your radiobutton instead of select-option...
    Then you will have to build the output internal table dynamically based on the option chosen. There are lot of example on SDN...
    Here is a start: http://wiki.sdn.sap.com/wiki/display/Snippets/Tutorialabap-CodeforDynamicAlv+grid
    Kr,
    m.

  • How to generate dynamic selection-screen?

    Hi all,
    I have two radio buttons on selection-screen.
    If user-selects the one, Then under the radio button another parameter should be displayed
    if he selects another radio button, the previous parameter should not  be displayed and another parameter should appear in the selection screen under the second radio button.
    Please help by giving the code to solve this problem?
    Thanks,
    Vamshi.

    Hi Vamsi,
    By using AT SELECTION-SCREEN OUTPUT and creating the MOdif id for the selection screen parameter you can achieve the dynamic selection scree..
    AT SELECTION-SCREEN OUTPUT.
    * Modify selection screen as per the radio buttons selected.
      PERFORM modify_sel-screen.
    FORM modify_sel-screen .
    * If radio button - process in range of STR's selected, display STR
    * range and Date range as input
      IF p_rb1 EQ c_x.
        LOOP AT SCREEN.
          IF screen-group1 = c_ir2.
            screen-active  = c_0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
    * If radio button - process from excel is selected, give option for
    * user to upload file
      ELSEIF p_rb2 EQ c_x.
        LOOP AT SCREEN.
          IF screen-group1 = c_ir1.
            screen-active  = c_0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " MODIFY_SEL-SCREEN
    see the below example....
    copy the below code you can come to know how the dynamic selection screen happens..
    *                   S E L E C T I O N  S C R E E N                     *
    * Selection criteria
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: p_rb1  RADIOBUTTON GROUP gr1 USER-COMMAND com1 DEFAULT 'X',
                                             "Process STR's in date range
               p_rb2  RADIOBUTTON GROUP gr1. "Process STR's from Excel
    SELECTION-SCREEN BEGIN OF BLOCK c1 WITH FRAME .
    PARAMETERS : p_apover TYPE zcpeg_fg_related-pl_version OBLIGATORY.
                                                                "PJ1031008
    SELECTION-SCREEN END OF BLOCK c1.
    SELECTION-SCREEN END OF BLOCK b1.
    * Display date range to process STR's
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    SELECT-OPTIONS: s_banfn FOR w_preq MODIF ID ir1,
                                        "Purchase requisition number
                    s_lfdat FOR w_lfdat MODIF ID ir1.
    "Date range
    SELECTION-SCREEN END OF BLOCK b2.
    * Option for uploading file to process STR's
    SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
    PARAMETERS: p_file TYPE rlgrap-filename MODIF ID ir2. "File name
    SELECTION-SCREEN END OF BLOCK b3.
    AT SELECTION-SCREEN OUTPUT.
    * Modify selection screen as per the radio buttons selected.
      PERFORM modify_sel-screen.
    FORM modify_sel-screen .
    * If radio button - process in range of STR's selected, display STR
    * range and Date range as input
      IF p_rb1 EQ c_x.
        LOOP AT SCREEN.
          IF screen-group1 = c_ir2.
            screen-active  = c_0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
    * If radio button - process from excel is selected, give option for
    * user to upload file
      ELSEIF p_rb2 EQ c_x.
        LOOP AT SCREEN.
          IF screen-group1 = c_ir1.
            screen-active  = c_0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " MODIFY_SEL-SCREEN
    Regards,
    Prabhudas

  • How to generate a dynamic selection-screen

    Hi folks,
    I have a itab with all fields and descriptions of a database-table. Now i want to generate a selection screen dynamically. I want to create a select-option for every field of the table.
    First I read all fields of a database table into my intern table:
    CALL FUNCTION 'DDIF_FIELDINFO_GET'
      EXPORTING
        tabname              = 'database_tabname'
      TABLES
        dfies_tab            = it_tabname_fields.
    Then I tried to generate a dynamic selection-screen with a select-options statement per field of the itab, but it doesn't work:
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001 NO INTERVALS.
    LOOP AT it_tabname_fields INTO s_tabname_fields. "should be 14 loops and 14 lines
      SELECTION-SCREEN BEGIN OF LINE.
      SELECTION-SCREEN COMMENT (25) s_tabname_fields-SCRTEXT_S FOR FIELD var1. "the name of the field should be set dynamically from the itab
      SELECT-OPTIONS var1 FOR tabname-s_tabname_fields-fieldname. "s_tabname_fields-fieldname should be set dynamically for each line
      SELECTION-SCREEN END OF LINE.
    ENDLOOP.
    SELECTION-SCREEN END OF BLOCK b2.
    I know that this doesn't work but it should help you to understand what i want to do. It doesn't create more than one select-option (it should be 14 because there are 14 lines in the table) and it doesn't get the values from the table.
    I hope you can help me...
    Regards,
    Sebastian

    hi
    Firstly, have a look at the following code to see how this can be implemented -
    REPORT ZTEST.
    perform test.
    class test definition.
      public section.
        methods: create_screen.
    endclass.
    class test implementation.
      method create_screen.
        data:  report_line(72),
               report_source like table of report_line.
        data: err_message(240),
              err_line type i,
              err_word(100).
        report_line = 'REPORT TEST.'.
        append report_line to report_source.
        report_line = 'PARAMETERS: P_TEST TYPE I.'.
        append report_line to report_source.
        report_line = 'START-OF-SELECTION.'.
        append report_line to report_source.
        report_line = 'WRITE : P_TEST.'.
        append report_line to report_source.
        syntax-check for report_source message err_message
                                       line    err_line
                                       word    err_word.
        if err_message is initial.
          INSERT REPORT 'ZZZTESTZZZ' FROM REPORT_SOURCE.
          SUBMIT ZZZTESTZZZ VIA SELECTION-SCREEN AND RETURN.
        endif.
      endmethod.
    endclass.
    form test.
      data test type ref to test.
      CREATE OBJECT TEST.
      call method test->create_screen.
    endform.
    As you can see, the report is being written dynamically. Once the INSERT REPORT statement is executed, the program is available. you can you external subroutine calls to pass the data between the programs now.
    Regards,
    ravish
    <b>plz dont forget to reward points if helpful</b>

  • Dynamic Selection screen in FDK43 transaction

    HI,
    The transaction FDK43 has a dynamic selection screen used from LDB DDF .It does not show all selections views in the dynamic selection but when I test the LDB from se36 its shows all the selections in dynamic selections.
    Any idea why it is not showind in the transaction FDK43 ??
    Regards,
    Shital

    Hi,
    LDB fields are nothing to do with Dynamic Selection. It is not necessary that all the field of LDB should be visible in Dynamic Selection. FDK43 is a standard screen and SAP has designed the dynamic selection with limited option. If you want additional fields, you need to do the enhancement with the help of ABAPer.
    Regards,
    Ravi

  • How to deal with dynamic selection screen elements when macros are used?

    Hello experts,
    This is regarding the dynamic selection screen elements. Actually the requirement is to modify the existing standard report program RFUMSV00 by copying it into a Z report, adding a few selection screen elements and new fields in the output. I actually did everything required except for the one thing that is going out of my reach.
    There are a certain fields which are coming when they are not supposed to get displayed. I don't understand the code because of its obsoleteness. Neither can I debug it because it is just data declaration.
    This is the code where there is a fault. If I copy the entire code into a new Z report, I'm getting new fields like Entry Date, Document Type, Reference Transaction,  Reference key, Logical system.
      DEFINE selection_screen_line.
      selection-screen: begin of line.
      parameters &3 like &4 default 'X' modif id mc4.
      selection-screen: comment (30) &1 for field &3 modif id mc4.
      selection-screen: comment pos_low(10) text-019
                        for field &2 modif id mc4.  "neu
      parameters &2 like rfums_alv-variante modif id mc4.
      selection-screen:
          position pos_high.
      selection-screen: pushbutton (15) text-028
                        user-command &5 modif id mc4.
      selection-screen end of line.
    END-OF-DEFINITION.
    Kindly, suggest me the right solution.

    In the program attributes ( SE38 > RFUMSV00 > GOTO > Properties ), you will find a logical database BRF declared. The include DBBRFSEL is part of the selection screen of this logical database.
    The selection screen is actually the selection screen of this logical database.
    Under the Logical Database field, there is a Selection screen field where you can input which selection screen of the logical database to be used.
    But, this is just to change the selection screen that is displayed. To completely suppress it you need to remove logical database declaration from the properties of the program and call it inside your program through function module.
    You cannot just remove it from the declaration because many of its variables are used in the program.
    So call it using function module as the first step in INITIALIZATION section of the program.
    The syntax and function module to call it in your program can be found in the following thread :
    How to hide the selection screen of a Logical datebase?
    Regards,
    Ashish

  • How to use dynamic selection screen inputs in main program

    hi all,
      its a report where in it calls one dynamic selection screen( user need to enter the parameters here) after that i need to use those inputs for some check, can any buddy help how to use/ get that input parameters into main program.
    regards,
    vara..

    Hi,
    i think u have created that dynamic selection screen in seperate program and calling to ur main program.instead of that u just create that synamic selection screen program as include program and include it in ur main program.
    or u need to use set/get parameter id concept.
    rgds,
    bharat.

Maybe you are looking for

  • Calling a VI which uses "system exec.vi" with LabVIEW run-time engine as adapter

    Hi, My TestStand sequence calls a VI which includes a call to "system exec.vi". When I try to load it in TestStand and if LabVIEW adapter is set to run-time engine, I get an error message "Unable to load Vi...". If I switch the adapter to "Developmen

  • How can I create a data connection without ODBC (directly with OLE DB)

    If connecting to an OLE DB data source, which is not defined as ODBC, the well known error message appears in Acrobat, that the environment is not trusted. The Designer Help says, that the document must be certified in Acrobat to run OLE DB without O

  • Increased harshness in ACR 4.2

    I'm working in PS CS3 and using ACR 4.2 on a Mac. I noticed that the files got a somewhat harsh graininess that I could possibly describe as "rice grains" and that details seemed smeared in an artificial way that I don't recall from previous versions

  • Solaris9 installation is extremely slow

    I have been trying to installing Solaris 9 on Sun V100 via CDROM, and it has been going extremely slow. Anyone has any suggestions? Thanks in advance!

  • N73 theme 7 application Mgr.

    Hey every one I bought N73 before one month and the problem came when I installed some themes on it. I cannot deleted with (c) button in themes and I can't found some of theme I installed it in application Mgr. Some times when I installed some themes