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.

Similar Messages

  • From ALV output list to selection screen

    Hi,
    I created one ALV report.
    After executing the program, it displays an ALV list.
    When I click on the back/exit/cancel buttons on the screen, it should take me to the selection screen.
    But that is not happening. it is taking to one screen which shows the report heading. IF i click back/cancel/exit buttons in this screen, it is taking me to the selection screen.
    I checked the program for any write statement, but therre are no write statements.
    Even i tried to remove the end-of-selection event in the program. but not working.
    Can any one help me on this how to overcome this issue.
    Thank you.
    Kumar

    hi check this example...
    REPORT zalv_sel_screen .TABLES: mara.DATA: BEGIN OF i_alv OCCURS 0,
          matnr TYPE mara-matnr,
          mtart TYPE mara-mtart,
          matkl TYPE mara-matkl,
          groes TYPE mara-groes,
          maktx TYPE makt-maktx,
          END OF i_alv.DATA: alv_container  TYPE REF TO cl_gui_docking_container.
    DATA: alv_grid       TYPE REF TO cl_gui_alv_grid.
    DATA: layout    TYPE lvc_s_layo.
    DATA: fieldcat  TYPE lvc_t_fcat.PARAMETERS: p_check.INITIALIZATION.  PERFORM get_data.AT SELECTION-SCREEN OUTPUT.  DATA: variant TYPE  disvariant.
      DATA: repid TYPE sy-repid.  repid = sy-repid.  variant-report = sy-repid.
      variant-username = sy-uname.  layout-zebra = 'X'.
      layout-edit_mode = 'X'.  CHECK alv_container IS INITIAL.  CREATE OBJECT alv_container
                  EXPORTING repid     = repid
                            dynnr     = sy-dynnr
                            side      = alv_container->dock_at_left
                            extension = 1500.  CREATE OBJECT alv_grid
             EXPORTING
                   i_parent          =  alv_container.*  ALV Specific. Data selection.
    Populate Field Catalog
      PERFORM get_fieldcatalog.  CALL METHOD alv_grid->set_table_for_first_display
        EXPORTING
          is_layout        = layout
          is_variant       = variant
          i_save           = 'U'
          i_structure_name = 'I_ALV'
        CHANGING
          it_outtab        = i_alv[]
          it_fieldcatalog  = fieldcat[].
    START-OF-SELECTION.
    FORM GET_DATA
    FORM get_data.  SELECT * INTO CORRESPONDING FIELDS OF TABLE i_alv
            FROM mara
              INNER JOIN makt
                ON maramatnr = maktmatnr
                       UP TO 100 ROWS
                   WHERE makt~spras = sy-langu.  SORT i_alv ASCENDING BY matnr.ENDFORM.                    "get_data***************************************************************
         Form  Get_Fieldcatalog - Set Up Columns/Headers
    FORM get_fieldcatalog.  DATA: ls_fcat TYPE lvc_s_fcat.
      REFRESH: fieldcat.  CLEAR: ls_fcat.
      ls_fcat-reptext    = 'Material Number'.
      ls_fcat-fieldname  = 'MATNR'.
      ls_fcat-ref_table  = 'I_ALV'.
      ls_fcat-outputlen  = '18'.
      ls_fcat-fix_column = 'X'.
      ls_fcat-key        = 'X'.
      ls_fcat-col_pos    = '1'.
      APPEND ls_fcat TO fieldcat.  CLEAR: ls_fcat.
      ls_fcat-reptext    = 'Material Type'.
      ls_fcat-fieldname  = 'MTART'.
      ls_fcat-ref_table  = 'I_ALV'.
      ls_fcat-outputlen  = '10'.
      ls_fcat-fix_column = 'X'.
      ls_fcat-key        = 'X'.
      ls_fcat-col_pos    = '2'.
      APPEND ls_fcat TO fieldcat.  CLEAR: ls_fcat.
      ls_fcat-reptext    = 'Material Group'.
      ls_fcat-fieldname  = 'MATKL'.
      ls_fcat-ref_table  = 'I_ALV'.
      ls_fcat-outputlen  = '12'.
      ls_fcat-col_pos    = '3'.
      APPEND ls_fcat TO fieldcat.  CLEAR: ls_fcat.
      ls_fcat-reptext    = 'Size'.
      ls_fcat-fieldname  = 'GROES'.
      ls_fcat-ref_table  = 'I_ALV'.
      ls_fcat-outputlen  = '30'.  ls_fcat-col_pos    = '4'.
      APPEND ls_fcat TO fieldcat.  CLEAR: ls_fcat.
      ls_fcat-reptext    = 'Material Description'.
      ls_fcat-fieldname  = 'MAKTX'.
      ls_fcat-ref_table  = 'I_ALV'.
      ls_fcat-outputlen  = '40'.  ls_fcat-col_pos    = '5'.
      APPEND ls_fcat TO fieldcat.ENDFORM.                    "get_fieldcatalog
    regards,
    venkat

  • How to get rid of the loop in ALV output from At selection screen event?

    I have several push buttons on a selection screen.
    Clikc on a button, then it pops up an editable ALV report. (This gets triggered AT SELECTION SCREEN event.). REUSE_ALV_GRID_DISPLAY_LVC..
    On the ALV output, I enabled F4 for a couple of fields. Once I click on the F4 button, ONF4 method gets triggerd and a pop up appears with custom search helps.
    choose a line and it fills the cell.
    Upto this it works fine.
    Now I click on the BACK button at the ALV output, it takes me to the selection screen. I click on the button again, it show the editable ALV. Now when I click on the F4 button, the pop up comes up twice and the cell gets filled from the second pop - up.
    How to control this?
    Probably I am not refreshing something?
    (I am using REUSE_ALV_GRID_DISPLAY_LVC and tooks ome code for ONF4 event from BCALV_*DATATYPES (forgot the exact name) program.)
    Thanks,
    Ven

    Hi,
    FORM refresh_grid USING  pw_grid TYPE REF TO cl_gui_alv_grid.
    *Work area
      DATA : wal_stable TYPE lvc_s_stbl.
      CHECK NOT pw_grid IS INITIAL.
      wal_stable-col = c_check.
      wal_stable-row = c_check.
    *Method to refresh grid
      CALL METHOD  pw_grid->refresh_table_display
           EXPORTING
             is_stable      = wal_stable
             i_soft_refresh = c_check
           EXCEPTIONS
             finished       = 1
             OTHERS         = 2.
    ENDFORM.                    " refresh_grid
    Thanks,
    Sree.

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

  • At selection-screen output and  at selection-screen on

    Hi Experts,
    I had coded in both at selection-screen output for disabling input of certain fields and at selection-screen for validation like this:
    AT SELECTION-SCREEN output.
      IF p_amt = 'X'.
        LOOP AT SCREEN.
          CASE screen-name.
            WHEN 'P_AMT'.
              screen-input = '1'.
            WHEN 'P_TST'.
              screen-input = '1'.
            WHEN 'P_B4C'.
              screen-input = '1'.
            WHEN 'P_AFC'.
              screen-input = '1'.
            WHEN 'P_COM'.
              screen-input = '1'.
            WHEN 'P_COM1'.
              screen-input = '1'.
            WHEN 'P_COM2'.
              screen-input = '1'.
            WHEN OTHERS.
              screen-input = '0'.
          ENDCASE.
          MODIFY SCREEN.
        ENDLOOP.
      ENDIF.
      IF p_amt = 'X'.
        LOOP AT SCREEN.
          CASE screen-name.
            WHEN 'P_AMT'.
              screen-input = '1'.
            WHEN 'P_TST'.
              screen-input = '1'.
            WHEN 'P_B4C'.
              screen-input = '1'.
            WHEN 'P_AFC'.
              screen-input = '1'.
            WHEN 'P_COM'.
              screen-input = '1'.
            WHEN 'P_COM1'.
              screen-input = '1'.
            WHEN 'P_COM2'.
              screen-input = '1'.
            WHEN OTHERS.
              screen-input = '0'.
          ENDCASE.
          MODIFY SCREEN.
        ENDLOOP.
      ENDIF.
      IF p_pdf = 'X'.
        LOOP AT SCREEN.
          CASE screen-name.
            WHEN 'P_PDF'.
              screen-input = '1'.
            WHEN 'P_TST'.
              screen-input = '1'.
            WHEN 'P_PATH'.
              screen-input = '1'.
            WHEN OTHERS.
              screen-input = '0'.
          ENDCASE.
          MODIFY SCREEN.
        ENDLOOP.
      ENDIF.
      IF p_afc = 'X'.
        LOOP AT SCREEN.
          CASE screen-name.
            WHEN 'P_TST'.
              screen-input = '1'.
            WHEN 'S_FID-LOW' OR 'S_FID-HIGH'.
              screen-input = '0'.
            WHEN 'S_ORG-LOW' OR 'S_ORG-HIGH'.
              screen-input = '0'.
            WHEN 'S_OFF-LOW' OR 'S_OFF-HIGH'.
              screen-input = '0'.
            WHEN 'S_DAT-LOW' OR 'S_DAT-HIGH'.
              screen-input = '0'.
          ENDCASE.
          MODIFY SCREEN.
        ENDLOOP.
      ENDIF.
    AT selection-screen on block b5.
    if p_tst is initial.
      message text-016 type 'E'.
    endif.
    AT selection-screen on block b2.
    if p_amt ne 'X' and p_pdf ne 'X'.
    if s_fid is initial and s_org is initial.
    message text-000 type 'E'.
    endif.
    if s_dat is initial.
    message text-000 type 'E'.
    endif.
    endif.
    when i comment out at selection-screen validations the input is disabled for the screen fields as set, else the validations are executed first.
    Any solution for this???
    Thanks in advance.

    AT SELECTION-SCREEN
    Syntax
    AT SELECTION-SCREEN selscreen_event.
    Effect
    This statement defines event blocks for different events selscreen_event that are triggered by the ABAP runtime environment during selection screen processing.
    Selection screen events occur immediately before sending a selection screen and after certain user actions on a displayed selection screen. They assist in selection screen processing in the ABAP program.
    AT SELECTION-SCREEN is triggered at least twice during actions on selection screens that are linked into another selection screen as a subscreen - first for the linked selection screen itself, and then for the linking selection screens.
    Note
    The event blocks after AT SELECTION-SCREEN are implemented internally as procedures. Declarative statments in these event blocks create local data.

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

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

  • PF status in dynamic selection screen

    Hi,
    I am creating a dynamic selection screen ,it is having the default PF_status .But now i want to give a different PF_status in that dynamic selection screen.
    Like if i press the back button it should take me to the previous screen,but now it is going to next screen.So,Please help to change the functionality of the BACK button.
    thanks in advance
    Sravanthi

    Hi Sravanthi,
    Set your PF status in event 'At selection-screen output' of your dynamic selection screen.
    Handle Back operation in event 'At selection-screen'.
    AT SELECTION-SCREEN OUTPUT.
      SET PF-STATUS 'TEST'.
    AT SELECTION-SCREEN.
      CASE sy-ucomm.
        WHEN 'BACK'.
      " Ur code
      ENDCASE.
    Thanks,

  • 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

  • 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

  • DYNAMIC SELECTION SCREEN uisng FREE_SELECTIONS_INIT

    Hi,
    I am facing a problem regarding the dynamic selection screen using FREE_SELECTIONS_INIT and FREE_SELECTIONS_DIALOG .After entering the values in Dynamic Selections on pressing Enter, the values are  getting distorted.For example if i gave the purchase order no as 0099994434 it is getting truncated to four digits no like 0099.
    Its a bit urgent .Can any body help me out in resolving this isuue.

    Hi,
    You may refer this http://help.sap.com/saphelp_47x200/helpdata/en/9f/db996135c111d1829f0000e829fbfe/frameset.htm
    Raja T
    Message was edited by:
            Raja T

  • 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

  • Problems creating dynamic selection screen

    Hi all,
    i'm trying to dynamically generate a selection screen and show it as subscreen using the two function modules FREE_SELECTIONS_INIT and FREE_SELECTIONS_DIALOG. I call the function modules in the PBO of the therefor defined subscreen. The FREE_SELECTIONS_DIALOG fm has the two import parameter "as_subscreen" and "as_window". If i use the "as_window" parameter the selection screen comes up as popup. If i use the "as_subscreen" parameter, i can't see anything in my defined subscreen.
    Any suggestions ?
    Thanks in Advance
    Dirk

    Hi,
    The above requirement is not possible without using logical database.
    The reason is that the compiler identifies the below syntax only inside a LDB program .
    SELECTION-SCREEN DYNAMIC SELECTIONS
                     FOR {NODE|TABLE} node [ID id].
    The above syntax creates a subscreen container on the standard selection screen of the program during generation
    and we are able to view the dynamic selections icon on the selection screen.
    Hence it is not possible to use the FM 'FREE_SELECTIONS_DIALOG' as a subscreen without using a
    logical database of the relevant table.
    However if you dont want to create a new LDB for each table, there is a trick which needs to be performed
    once in your SAP system and all custom programs can use this FM to create a dynamic selection screen
    as a subscreen of the standard selection screen.
    The prerequisite steps are as follows:
    1: Create a dummy  / test database table in SE11 with a single field i.e. for example mandt , matnr
    2: Create a new logical database program for this table in SE36. Save and activate.
    This will create dynamic selections for the fields of the table created in step 1.
    Steps to be followed in the required custom ABAP program to create the dynamic selection screen as a subscreen.
    A: Include the LDB program created in step 2, in the attributes of the custom ABAP program.
    Now when you execute the program, you can see the dynamic selection icon for the dummy table created in step 1.
    B: In your custom program we need to suppress the icon for 'Dynamic Selections' from the standard selection screen.
       We need to perform this action, because the 'Dynamic Selections' icon always triggers a call to the
       dynamic selection screen of the included LDB progam. ( In our case a dummy table created in step 1 ).
       Whereas we want to trigger a call of the dynamic selection screen of our desired table.
       Logic is as follows:
       In 'AT SELECTION-SCREEN OUTPUT' event call the FM RS_SET_SELSCREEN_STATUS to exclude the fcode 'DYNS'.
    C: Add a pushbutton / checkbox on your selection screen to trigger a call to the FM 'FREE_SELECTIONS_INIT' &
       'FREE_SELECTIONS_DIALOG' in the 'AT SELECTION-SCREEN' event.
    D: When the user clicks the pushbutton / checkbox for dynamic selections call the above 2 FM for the desired table
        with the AS_SUBSCREEN flag of FREE_SELECTIONS_DIALOG = 'X'
    Result: Your dynamic selections screen will be created as a subscreen of the standard selection screen and not as a pop-up.
    Advantage: With the creation of the single custom table & LDB, you are now able to create dynamic selections as subscreen
    in any program in the system. All we need to do is follow the steps A, B & C in each program.
    Note: Your other restrictions with dynamic selection screen ie. submit in background , save as variant still remain and
    you need to handle them accordingly.
    let me know if you need sample code.
    Regards,
    Bhawit Kumar

Maybe you are looking for

  • Save Open dialog box opening very slow

    I have windows 7 professional 64bit OS. whenever i try to open/save as dialog box it appears very slow, then it will say it is not responding then after 10-15sec it will come alive. Need help!!!!!!

  • How do I upgrade Adobe acrobat?  Cannot follow your instructions!

    How do I upgrade Adobe acrobat?  Cannot follow your instructions. It used to be so easy>

  • Transport Control program tp edded with error code 0247

    Hi Guys I have co setup TMS in a three system landscape, with the PRD server being the transport domain controller. The three systems are running on the HP -UX OS. The import queue of the PRD server remains empty. All the checks on the TMS configurat

  • Resizing an image in Aperture

    I guess there is no way to do this. In PS you can specifiy a very specific image size and resolution. Is there any way to do this in Aperture? When you export a version you get a couple of choices for image size but I cannot find anywhere that you ca

  • IPhone and BlueAnt V1 Issue

    I have been using a BlueAnt V1 with my iPhone for three weeks now without a problem. Today, everything changed when I attempted a phone call with mu headset; I heard a buzzing sound and the call was terminated. This was true for incoming calls as wel