Working with dynamic selection screen in LDB FMF

Hi Guys,
I am working with LDB FMF and I have a requirement where user need the selection field in initial screen which is already comming in dynamic selection option.
Is it possible without changing the standerd LDB.
Atul
Edited by: Atul Dhariwal on Jun 16, 2009 6:27 AM

Hi,
my requirement is to list fields from dynamic selection to appear in the main selection screen.
user doesn't want's to click on dynamic selection option and select the fields.
I hope i am clear this time.
Atul

Similar Messages

  • 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

  • Program with Dynamic selection but no LDB is used

    Hello Friends,
    Can any one tell me the any standard program name, In which Dynamic selection (Free Selection) is used but LDB(Logical Data Base) is not used.
    Lalit Soni

    Not possoble with out LDB, it uses selection-screen dynamic selections for table <tabname> in ldb, one alternative is using the screen table to hide selection.
    E,.g
        loop at screen.
          if screen-group1 = 'FS1' .
            screen-active = 1.
            modify screen.
          endif.
        endloop.

  • Problem with Dynamic Selection Screen

    Hi ppl,
    I have this part of code in my program. But it is not working as desired. Please could somebody let me know what is wrong with it.
    TYPES: BEGIN OF tp_selscr,
             klart TYPE klah-klart,
             class TYPE klah-class,
           END OF tp_selscr.
    DATA: wa_selscr TYPE tp_selscr.
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN BEGIN OF BLOCK cls WITH FRAME TITLE text-s01.
    PARAMETERS:     p_cls AS CHECKBOX USER-COMMAND chk.
    SELECT-OPTIONS: s_klart FOR wa_selscr-klart MODIF ID cls,    "Class type
                        s_class FOR wa_selscr-class MODIF ID cls
                            MATCHCODE OBJECT clas.
    SELECTION-SCREEN END OF BLOCK cls.
    AT SELECTION-SCREEN.
    *AT SELECTION-SCREEN ON p_cls.
      PERFORM dynamic_sel.  "Selection based on class
    *&      Form  dynamic_sel
    *       Selection based on class option
    FORM dynamic_sel.
      IF p_cls EQ 'X'.
        LOOP AT SCREEN.
          IF screen-group1 = 'CLS'.
            screen-active = 1.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ELSE.
        LOOP AT SCREEN.
          IF screen-group1 = 'CLS'.
            screen-active = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " dynamic_sel
    Regards.

    The event is wrong. It should be AT SELECTON SCREEN OUTPUT
    TYPES: BEGIN OF tp_selscr,
             klart TYPE klah-klart,
             class TYPE klah-class,
           END OF tp_selscr.
    DATA: wa_selscr TYPE tp_selscr.
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN BEGIN OF BLOCK cls WITH FRAME TITLE text-s01.
    PARAMETERS:     p_cls AS CHECKBOX USER-COMMAND chk.
    SELECT-OPTIONS: s_klart FOR wa_selscr-klart MODIF ID cls,    "Class type
                     s_class FOR wa_selscr-class MODIF ID cls
                            MATCHCODE OBJECT clas.
    SELECTION-SCREEN END OF BLOCK cls.
    AT SELECTION-SCREEN OUTPUT.       """ Instead of AT SELECTION SCREEN
    *AT SELECTION-SCREEN ON p_cls.
      PERFORM dynamic_sel.  "Selection based on class
    *&      Form  dynamic_sel
    *       Selection based on class option
    FORM dynamic_sel.
      IF p_cls EQ 'X'.
        LOOP AT SCREEN.
          IF screen-group1 = 'CLS'.
            screen-active = 1.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ELSE.
        LOOP AT SCREEN.
          IF screen-group1 = 'CLS'.
            screen-active = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDFORM.
    Vikranth

  • Access field from dynamic selection screen of LDB in local program

    I am using ldb PSJ in my program. I want to use input given in fields "Plant" and "Business Area" in my program and do some process based on input in this field. Both these fields come as part of dynamic selection. How can I access this field in my program?

    Take a look at [Dynamic Selections in the Database Program|http://help.sap.com/saphelp_nw04/helpdata/en/67/93b80914a911d2953c0000e8353423/frameset.htm]
    You may try to access this LDB program data via field-symbols and assign to (SAPDBPSJ)DYN_SEL.
    > TYPE-POOLS rsds.
    > DATA: l_dyn_sel TYPE rsds_type.
    > FIELD-SYMBOLS: <fs> TYPE rsds_type.
    > DATA: name(17) VALUE '(SAPDBPSJ)DYN_SEL'.
    > ASSIGN (name) TO <fs>.
    > l_dyn_sel = <fs>.
    > UNASSIGN <fs>.
    Regards

  • How to create dynamic selection-screen

    Hi all,
    I want to create dynamic selection-screen.in that dynamic selectio-screen i want to display date fields based on table name given in the selection-screen.
    Regards,
    Billa

    Hi Billa,
    Look into the function group SSEL, this has some SAP standard functions to work with dynamic selection screens.
    Below is sample FM, I wrote making use of standard FM from the above. This FM will take table name as input and will display a screen with all the fields within that table for selection. This can also be customized to restrict the fields for display.
    Hope this helps,
    Sumant.
    FUNCTION y_ss_test_dynamic_selection.
    ""Local interface:
    *"  IMPORTING
    *"     REFERENCE(TABNAME) LIKE  DD02L-TABNAME
    *"  EXPORTING
    *"     REFERENCE(DS_CLAUSES) TYPE  RSDS_WHERE
    *"  EXCEPTIONS
    *"      TABLE_NOT_VALID
    *"      OTHER_ERROR
      DATA texpr TYPE rsds_texpr.
      DATA twhere TYPE rsds_twhere.
      DATA trange TYPE rsds_trange.
      DATA BEGIN OF qcat.                    "Selections View for
              INCLUDE STRUCTURE rsdsqcat.    "Free Selectoptions
      DATA END OF qcat.
      DATA BEGIN OF tabs OCCURS 10.
              INCLUDE STRUCTURE rsdstabs.
      DATA END   OF tabs.
      DATA BEGIN OF fields OCCURS 10.
              INCLUDE STRUCTURE rsdsfields.
      DATA END   OF fields.
      DATA BEGIN OF efields OCCURS 10.
              INCLUDE STRUCTURE rsdsfields.
      DATA END   OF efields.
      DATA selid LIKE rsdynsel-selid.
      DATA actnum LIKE sy-tfill.
      DATA title LIKE sy-title VALUE 'Selection Screen'.
      DATA: maxnum LIKE sy-subrc VALUE '69'.
      CLEAR    tabs.
      tabs-prim_tab = tabname.
      COLLECT  tabs.
      DATA: position LIKE dd03l-position.
      DATA: keyflag  LIKE dd03l-keyflag.
      CLEAR fields.
      fields-tablename = tabname.
      fields-sign      = 'I'.
      DATA: step LIKE sy-subrc.
      SELECT fieldname keyflag position
        INTO (fields-fieldname, keyflag, position)
        FROM dd03l
        WHERE tabname = tabname
          AND fieldname NOT LIKE '.INCLU%'
          AND datatype NE 'CLNT'
        ORDER BY position.
        ADD 1 TO step.
        CHECK step LE maxnum.
        IF keyflag <> 'X'.
          efields = fields.
          APPEND efields.
        ENDIF.
        APPEND fields.
      ENDSELECT.
      IF sy-subrc <> 0.
        RAISE table_not_valid.
      ENDIF.
      CALL FUNCTION 'FREE_SELECTIONS_INIT'
           EXPORTING
                expressions              = texpr
                kind                     = 'F'
           IMPORTING
                selection_id             = selid
                expressions              = texpr
                where_clauses            = twhere
                field_ranges             = trange
                number_of_active_fields  = actnum
           TABLES
                tables_tab               = tabs
                fields_tab               = fields
                fields_not_selected      = efields
           EXCEPTIONS
                fields_incomplete        = 01
                fields_no_join           = 02
                field_not_found          = 03
                no_tables                = 04
                table_not_found          = 05
                expression_not_supported = 06
                incorrect_expression     = 07
                illegal_kind             = 08
                area_not_found           = 09
                inconsistent_area        = 10
                kind_f_no_fields_left    = 11
                kind_f_no_fields         = 12
                too_many_fields          = 13.
      IF sy-subrc = 0.
        CALL FUNCTION 'FREE_SELECTIONS_DIALOG'
             EXPORTING
                  selection_id            = selid
                  title                   = title
             IMPORTING
                  where_clauses           = twhere
                  expressions             = texpr
                  field_ranges            = trange
                  number_of_active_fields = actnum
             TABLES
                  fields_tab              = fields
             EXCEPTIONS
                  internal_error          = 01
                  no_action               = 02
                  no_fields_selected      = 03
                  no_tables_selected      = 04
                  selid_not_found         = 05.
        IF sy-subrc = 0.
          CLEAR ds_clauses.
          MOVE tabname TO ds_clauses-tablename.
          READ TABLE twhere WITH KEY ds_clauses-tablename INTO ds_clauses.
          IF sy-subrc <> 0.
            RAISE other_error.
          ENDIF.
        ELSE.
          RAISE other_error.
        ENDIF.
      ELSE.
        RAISE other_error.
      ENDIF.
    ENDFUNCTION.

  • 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

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

  • Adding new table dynamic selection screen of transaction FBL5N (LDB DDF).

    Hi,
    I have a requirement to add SEGMENT (CEPC-SEGMENT) field on the dynamic selection screen of transaction FBL5N (LDB DDF).
    Please let me know how can I meet this requirement
    Thanks

    I did not find any screen exits for this Tcode, may be you need to use enhancement spots.

  • Issue with MB25 BDC for Dynamic Selection Screen

    Hi Experts,
    I recorded one BDC for MB25 Tcode regarding to determine Open Reservation(s) in E Mode (Display Mode). I am passing 3 parameters.
    1. Plant,
    2. Requirement Date
    3. Multiple Reservation Numbers i.e. RSNUM from Dynamic Selection i.e. 2nd Button -> Header Data for Reservation -> Reservation -> Multiple Selection Icon.
    But while executing that BDC, I need to manually click every time on 'Header Data for Reservation' Tree and then Multiple Selection for Reservation Icon.
    I want below steps automatically while executing:
    - Open 'Header Data for Reservation' Tree
    - Click Reservation
    - Open Popup for 'Multiple Selection'.
    So no need to click every time on Dynamic Selection Screen i.e. Header Data for Reservation -> Reservation -> Multiple Selection Icon.
    Please find attached screen shot for your reference.
    Please guide.
    Thanks and Regards,
    Emon Master

    Hello Jainam,
    submit (sy-repid) with selection-table v_sp
                             with free selections EXPRESSIONS
                             via selection-screen.
    Without going through the details, dont you think this will cause an inifinite loop as the calling & the called programs are the same.
    Please enlighten me !!
    BR,
    Suhas

  • Dynamic selection screen with ABAP web dynpro

    Hi all.
        How can I create dynamic selection screen with ABAP web dynpro? Thank you in advance.

    hi yinglak.....
             this is possible........ all the ui elelments has the property called visible and enabled.... just assign an attribute of type wdui_visibility to the visible property....
    in the wddomodify method..... check for the radio button value and pass the value true or false to this attribute and it gets changed automatically.
    ---regards,
       alex b justin

  • 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

  • Passing values to a dynamic selection screen via a report

    Hi,
    I have the following problem and need to seek your expertise urgently.
    In my program, I need to call another report by passing in parameters to the selection screen of other report. However, I could not pass values into a dynamic selection screen. I tried to use submit (report) with free selection but do not know how it works.
    Currently, I tried calling the function RS_REFRESH_FROM_DYNAMICAL_SEL and FREE_SELECTIONS_RANGE_2_EX. Using the object the first function has returned to me, I tried to append values such as fieldname etc to it. However, I realised the field names of a dynamic selection screen keeps changing. So I would not know how to pass a particular value to a selection field.
    Appreciate any help given.
    Thanks,
    CK

    Hello CK,
    Are you using logical database in your selection screen program attributes? If it is, look at include file DBxxxSEL for parameter named xxxDYNSE where xxx = logical database. Debug the program that has that dynamic selection, and look at field xxxDYNSE. This should give you a hint on how to populate the parameter when you submit the program.

  • 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

Maybe you are looking for