Select-options restrict possible entries

Hi
I use select options like in this example
select-options: so_matnr for mara-matnr.
In my report,when running, if pressing f4 for possible entries i only want to have material 123 and 234 for example,and not the whole list of materials.How can i restrict this possible entries to only my desired materials.
thanks

Hi Seba,
1. Demo program for F4 help on Selection-screen : <b>demo_selection_screen_f4.</b>
2. Sample program
   REPORT zvenkat_f4_for_selops MESSAGE-ID zmsg .
   TABLES :marc.
   TYPES:
      BEGIN OF t_t001w,
        werks       TYPE t001w-werks,
        name1       TYPE t001w-name1,
      END OF t_t001w,
      t_return_tab  TYPE ddshretval.
   DATA:
       w_t001w      TYPE t_t001w,
       w_return_tab TYPE t_return_tab.
   DATA:
       i_t001w      TYPE STANDARD TABLE OF t_t001w,
       i_return_tab TYPE STANDARD TABLE OF t_return_tab.
*&      SELECTION-SCREEN
   SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
   SELECT-OPTIONS : s_werks FOR marc-werks.
   SELECTION-SCREEN END OF BLOCK b1.
*&      AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_werks
   AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_werks-low.
     PERFORM f4_help_for_palant USING 'S_WERKS-LOW'.
   AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_werks-high.
     PERFORM f4_help_for_palant USING 'S_WERKS-HIGH'.
*&      Form  f4_help_for_palant
   FORM f4_help_for_palant USING l_dynprofield.
     SELECT werks name1
     FROM t001w
     INTO TABLE i_t001w.
     CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
       EXPORTING
         retfield        = 'WERKS'
         dynpprog        = sy-repid
         dynpnr          = sy-dynnr
         dynprofield     = l_dynprofield
         value_org       = 'S'
       TABLES
         value_tab       = i_t001w
         return_tab      = i_return_tab
       EXCEPTIONS
         parameter_error = 1
         no_values_found = 2
         OTHERS          = 3.
     IF sy-subrc <> 0.
       MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
               WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
     ENDIF.
   ENDFORM.                    " f4_help_for_palant
I hope that it solves your problem.
Thanks
Venkat.O

Similar Messages

  • Select option restriction to particular rows

    Dear Gurus,
    I have searched the form for this but couldn't find the particular solution.
    my scenario is i need to enter only 5 plants in the select options it should not exceed  it, for this i have done  like
    select options :S_PLANT FOR  G_PLANT NO INTERVALS.
    CONSTANTS:   LC_OPT_LIST TYPE RSREST_OPL VALUE 'OPT_LIST',
                    LC_S        TYPE RSSCR_KIND VALUE 'S',
                    LC_MAT      TYPE BLOCKNAME  VALUE 'S_PLANT',
                    LC_INC      TYPE C          VALUE 'I'.
       DATA:  LW_OPT_LIST TYPE SSCR_OPT_LIST,
              LW_RESTRICT TYPE SSCR_RESTRICT,
              LW_***      TYPE SSCR_***.
       LW_OPT_LIST-NAME       = LC_OPT_LIST.
       LW_OPT_LIST-OPTIONS-BT = SPACE.
       LW_OPT_LIST-OPTIONS-EQ = 'X'.
       APPEND LW_OPT_LIST TO LW_RESTRICT-OPT_LIST_TAB.
       LW_***-KIND    = LC_S.
       LW_***-NAME    = LC_MAT.
       LW_***-SG_MAIN = LC_INC.
       LW_***-OP_MAIN = LC_OPT_LIST.
       APPEND LW_*** TO LW_RESTRICT-***_TAB.
       CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
         EXPORTING
           RESTRICTION            = LW_RESTRICT
         EXCEPTIONS
           TOO_LATE               = 1
           REPEATED               = 2
           SELOPT_WITHOUT_OPTIONS = 3
           SELOPT_WITHOUT_SIGNS   = 4
           INVALID_SIGN           = 5
           EMPTY_OPTION_LIST      = 6
           INVALID_KIND           = 7
           REPEATED_KIND_A        = 8
           OTHERS                 = 9.
    now when i click the extension button i will be getting the popup window with ' SELECT SINGLE VALUES' sub screen  now in this i need only 5 rows
    I don't know weather this is possible or not.
    If yes . can any one explain this ?
    Thanks in advance .
    Regards
    Rakesh S.

    I do not think it is possible without changing the SAP standard (program RSDBRUNT). That is not something you want to do.
    The only way I can think of is creating  a module pool program and define your own screen instead of the selection screen and place a tabcontrol where you can limit the amount of lines programmatically.

  • Select options restriction

    Hi experts,
    is it possible to restrict the select options so that the user can select only from a limited list based on previous selections?
    Example: user selects value "A" of attribute1 from drop-down list, then in the select options he/she would be allowed to select attr2 with attr1 = "A".
    Thanks a lot!
    Tomas

    Hi Tomas.
    I think it is not possible if you use the select options component for that.
    But if you do it using the controls directly (dropdown, inputfield) you can do it easily.
    So if the user selects something in dropdown A you can fill the node for dropdown B in the onselect method.
    Cheers,
    Sascha

  • Select options: Restricting Value Display in Search Help Parameters

    Hello friends,
    I have following requirement.
    I have declared one select option. On that select options I'am having different search help paremeters on which I can restrict the search help values display.
    Can I specify the restriction in search help at the time of programming so that it would display only the values that follows the given restriction?
    I can ofcourse do this by AT SELECTION-SCREEN ON VALUE REQUEST, however I am trying to avoid this.
    How can I proceed?
    Points will be rewarded generously.
    Best Regards,
    Navin

    hI
    SEE THIS CODE
    **************DATA TYPES DECLARATION **********************
    TABLES: HRP1001, HRP1026, HRP1000,PCHDY.
    TYPE-POOLS SLIS.
    TYPES :BEGIN OF ST_OUTPUT,
            COUNT TYPE STRING,
            OBJID TYPE HRP1001-OBJID,
            STEXT TYPE HRP1000-STEXT,
            BEGDA TYPE HRP1000-BEGDA,
            ENDDA TYPE HRP1000-ENDDA,
            CANCRT TYPE T77CRT-CANCRT,
            AEDTM TYPE HRP1026-AEDTM,
            UNAME TYPE HRP1026-UNAME,
            LSTEXT TYPE HRP1000-STEXT,
           RINVT TYPE T777V-RINVT,
           END OF ST_OUTPUT.
    TYPES: BEGIN OF ST_HRP1000,
            OBJID TYPE HRP1001-OBJID,
            STEXT TYPE HRP1000-STEXT,
           END OF ST_HRP1000.
    TYPES : BEGIN OF ST_HRP1001,
             OTYPE TYPE HRP1001-OTYPE,
             OBJID TYPE HRP1001-OBJID,
             RELAT type hrp1001-RELAT,
             BEGDA TYPE HRP1001-BEGDA,
             ENDDA TYPE HRP1001-ENDDA,
             SCLAS TYPE HRP1001-SCLAS,
             SOBID TYPE HRP1001-SOBID,
            END OF ST_HRP1001.
    TYPES : BEGIN OF ST_HRP1026,
             OTYPE TYPE HRP1026-OTYPE,
             OBJID TYPE HRP1001-OBJID,
             AEDTM TYPE HRP1026-AEDTM,
             UNAME TYPE HRP1026-UNAME,
             DELET TYPE HRP1026-DELET,
             CANCR TYPE HRP1026-CANCR,
            END OF ST_HRP1026.
    TYPES : BEGIN OF ST_REASON,
             CANCR TYPE HRP1026-CANCR,
             CANCRT TYPE T77CRT-CANCRT,
            END OF ST_REASON.
    TYPES : BEGIN OF ST_SOBID,
             OTYPE TYPE HRP1001-OTYPE,
             OBJID TYPE HRP1001-OBJID,
             RELAT type hrp1001-OBJID,
             BEGDA TYPE HRP1001-BEGDA,
             ENDDA TYPE HRP1001-ENDDA,
             SCLAS TYPE HRP1001-SCLAS,
             SOBID TYPE HRP1001-OBJID,
            END OF ST_SOBID.
    TYPES : BEGIN OF ST_OBJID,
             OBJID TYPE HRP1001-OBJID,
            END OF ST_OBJID.
    TYPES : BEGIN OF ST_LOCATION,
             OTYPE TYPE HRP1001-OTYPE,
             OBJID TYPE HRP1001-OBJID,
             RSIGN TYPE HRP1001-RSIGN,
             RELAT TYPE HRP1001-RELAT,
             SCLAS TYPE HRP1001-SCLAS,
             SOBID TYPE HRP1001-SOBID,
            END OF ST_LOCATION.
    TYPES : BEGIN OF ST_LOCATION1,
             OTYPE TYPE HRP1001-OTYPE,
             OBJID TYPE HRP1001-OBJID,
             RSIGN TYPE HRP1001-RSIGN,
             RELAT TYPE HRP1001-RELAT,
             SCLAS TYPE HRP1001-SCLAS,
             SOBID TYPE HRP1001-OBJID,
            END OF ST_LOCATION1.
    TYPES : BEGIN OF ST_LSTEXT,
             OTYPE TYPE HRP1000-OTYPE,
             OBJID TYPE HRP1000-OBJID,
             LSTEXT TYPE HRP1000-STEXT,
            END OF ST_LSTEXT.
    TYPES : BEGIN OF ST_OBJID_SH,
             OTYPE TYPE HRP1000-OTYPE,
             OBJID TYPE HRP1000-OBJID,
            END OF ST_OBJID_SH.
    DATA : IT_OBJID_SH TYPE STANDARD TABLE OF ST_OBJID_SH.
    DATA : WA_OBJID_SH TYPE ST_OBJID_SH.
    DATA : IT_LSTEXT TYPE STANDARD TABLE OF ST_LSTEXT.              "TOS STORE THE TEXT OF COURCE LOCATION
    DATA : WA_LSTEXT TYPE ST_LSTEXT.
    DATA : IT_LOCATION TYPE STANDARD TABLE OF ST_LOCATION.          " TO STORE THE LOCATION OF COURCE
    DATA : WA_LOCATION TYPE ST_LOCATION.
    DATA : IT_LOCATION1 TYPE STANDARD TABLE OF ST_LOCATION1.        " TO CONVERT SOBID INTO OBJID FOR COURCE LOCATION
    DATA : WA_LOCATION1 TYPE ST_LOCATION1.
    DATA : IT_SOBID TYPE STANDARD TABLE OF ST_SOBID.                " TO CHANGE THE SOBID OF HRP1001 TO OBJID OF HRP1026
    DATA : WA_SOBID TYPE ST_SOBID.                                   " BY USING FOR ALL ENTRIES
    DATA : IT_REASON TYPE STANDARD TABLE OF ST_REASON.              "TO STORE T HE REASON FOR CANCELL TEXT
    DATA : WA_REASON TYPE ST_REASON.
    DATA : IT_OUTPUT TYPE STANDARD TABLE OF ST_OUTPUT.               "OUTPUT FEILDS OF REPORT.
    DATA : WA_OUTPUT TYPE ST_OUTPUT.
    DATA : IT_OUTPUT_1 TYPE STANDARD TABLE OF ST_OUTPUT.               " TEMP OUTPUT FEILDS OF REPORT.
    DATA : WA_OUTPUT_1 TYPE ST_OUTPUT.
    DATA : IT_HRP1000 TYPE STANDARD TABLE OF ST_HRP1000.             "DATA FROM HRP1000 TABLE
    DATA : WA_HRP1000 TYPE ST_HRP1000.
    DATA : IT_HRP1001 TYPE STANDARD TABLE OF ST_HRP1001.             "DATA FROM HRP1001 TABLE
    DATA : WA_HRP1001 TYPE ST_HRP1001.
    DATA : IT_HRP1026 TYPE STANDARD TABLE OF ST_HRP1026.              "DATA FROM HRP1026 TABLE
    DATA : WA_HRP1026 TYPE ST_HRP1026.
    DATA : IT_OBJID TYPE STANDARD TABLE OF ST_OBJID.                  " TO STORE THE OBJID OF HRP1001
    DATA : WA_OBJID TYPE ST_OBJID.
    DATA: WS_FCAT    TYPE SLIS_FIELDCAT_ALV .                         " FEILDCATALOG FOR ALV REPORT
    DATA: IN_FCAT    TYPE SLIS_T_FIELDCAT_ALV.
    DATA: W_LAYOUT   TYPE SLIS_LAYOUT_ALV.
    DATA : LV_COUNT TYPE I.                                           "FEILD FOR SERIAL NUMBER
    ***************************END OF DATA DECLARATION******************************************
    ************SELECTION SCREEN DESIGN************************
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    *SELECT-OPTIONS : S_OTYPE FOR HRP1001-OTYPE NO INTERVALS .
    SELECT-OPTIONS : S_OBJID FOR HRP1001-OBJID NO INTERVALS .
    SELECT-OPTIONS : DATE FOR SY-DATUM NO-EXTENSION OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK B1.
    ***********END OF SELECTION SCREEN DESIGN******************
    *****INITIALIZATION VENT TO ASIGN DEFAULT VALUES TO OTYPE
    *INITIALIZATION.
    S_OTYPE-LOW = 'D'.*
    S_OTYPE-SIGN = 'I'.*
    S_OTYPE-OPTION = 'EQ'.*
    APPEND S_OTYPE.*
    CLEAR S_OTYPE.*
    **************END OF EVENT INITIALIZATION******************
    **********VALIDATION FOR SCREEN FIELDS*********************
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_OBJID-LOW.
    IF S_OBJID IS NOT INITIAL.*
        SELECT OTYPE OBJID FROM HRP1000
                     INTO TABLE IT_OBJID_SH
                     WHERE OTYPE = 'D'.
    IF SY-SUBRC EQ 0.
    SEARCH HELP FOR QUALIFICATION.*
        CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
          EXPORTING
                 DDIC_STRUCTURE         = ' '*
            RETFIELD               =  'OBJID'
                 PVALKEY                = ' '*
           DYNPPROG               = SY-REPID
           DYNPNR                 = SY-DYNNR
           DYNPROFIELD            = 'S_OBJID'
                 STEPL                  = 0*
                 WINDOW_TITLE           =*
                 VALUE                  = ' '*
           VALUE_ORG              = 'S'
                 MULTIPLE_CHOICE        = ' '*
                 DISPLAY                = ' '*
                 CALLBACK_PROGRAM       = ' '*
                 CALLBACK_FORM          = ' '*
                 MARK_TAB               =*
               IMPORTING*
                 USER_RESET             =*
          TABLES
            VALUE_TAB              =  IT_OBJID_SH
                 FIELD_TAB              =*
                 RETURN_TAB             = RETURN_TAB*
                 DYNPFLD_MAPPING        =*
               EXCEPTIONS*
                 PARAMETER_ERROR        = 1*
                 NO_VALUES_FOUND        = 2*
                 OTHERS                 = 3*
        IF SY-SUBRC <> 0.
              MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO*
                      WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.*
        ENDIF.
      ENDIF.

  • Selection option for variable entry in BEx in 2004s

    Hi All,
    Have any of you noticed that the selection option functionality for variable entry  while creating a variable does not allow wild card entry,Even though you create the variable with selection option as input.
    In 3.5 we had option the option "contains the pattern " but in 2004s its not available in the variable entry screen.

    Hello Guys,
    When I posted this thread we were upgrading to SP11, now I am in the middle of another upgrade (SP15) and I still notice that wild card option is yet to be made available for a variable of type selection option.
    Back then I had sent a message to SAP and was told that the functionality would be rolled out in new SP's. I am very curious as too how others are handling this problem, as they are bound to be reports for which such variables are a must.
    P.S - The option has been made available
    Edited by: Karthik on Jul 22, 2008 6:52 PM

  • Select Option with masked entry in GRR3 report

    Hi,
    I am trying to find out if it is possible in standard to call a grr3 report like s_alr_87013611 (cost center report) and be able to enter the cost element like 4* to get all values for cost elements starting with 4.
    When trying this I get an error message and the only select option that appears is "=".
    In a KE80 report like S_ALR_87013326 on profit centers I can select the account and here it works fine with 4*.
    What is responsible for this and where can I do the settings? Any help is greatly appreciated.
    Thomas

    Follow-up:
    I noted in another post, that you can set the default value in the entity object, and this can carry through to the List-based object and retain that as the "selected" option.
    How do you set the selected option programmatically/via properties or tag attributes, without doing something like this:
    <select name="Cardtype1">
    <c:forEach var="listEntry" items="${bindings.Cardtype1.displayData}">
    <c:choose>
    <c:when test="${listEntry.prompt=='VISA'}">
    <option value="<c:out value='${listEntry.index}'/>" selected="true">
    </c:when>
    <c:otherwise>
    <option value="<c:out value='${listEntry.index}'/>" >
    </c:otherwise>
    </c:choose>
    <c:out value="${listEntry.prompt}"/>
    </option>
    </c:forEach>
    </select>

  • Select options -restricting the operator value options.

    Hi,
    In selection screen for the  select options or parameter declarations  I need to restrict the operator options , like when they click for any select options it will give options to select = , #, <, <= , > , >=
    all these options right.
    I would like to restrict the user  to select only > and >=  while passing values.
    Can anyone give me idea how I can approach this?
    Thanks in advance.

    Hi,
    use this FM...
    SELECT_OPTIONS_RESTRICT can be use to supress options available with a SELECT-OPTIONS on a selection screen.
    jusy copy the code and execute it....It will give the exact output what u want.....
    TYPE-POOLS sscr.
    TABLES : marc.
    *Define the object to be passed to the RESTRICTION parameter
    DATA restrict TYPE sscr_restrict.
    *Auxiliary objects for filling RESTRICT
    DATA : optlist TYPE sscr_opt_list,
    *** TYPE sscr_***.
    *Defining the selection-screen
    SELECT-OPTIONS : s_matnr FOR marc-matnr,
    s_werks FOR marc-werks.
    INITIALIZATION.
    *Restricting the MATNR selection to only EQ and 'BT'.
    optlist-name = 'OBJECTKEY1'.
    optlist-options-eq = 'X'.
    optlist-options-bt = 'X'.
    APPEND optlist TO restrict-opt_list_tab.
    ***-kind = 'S'.
    ***-name = 'S_MATNR'.
    ***-sg_main = 'I'.
    ***-sg_addy = space.
    ***-op_main = 'OBJECTKEY1'.
    APPEND *** TO restrict-***_tab.
    *Restricting the WERKS selection to CP, GE, LT, NE.
    optlist-name = 'OBJECTKEY2'.
    optlist-options-cp = 'X'.
    optlist-options-ge = 'X'.
    optlist-options-lt = 'X'.
    optlist-options-ne = 'X'.
    APPEND optlist TO restrict-opt_list_tab.
    ***-kind = 'S'.
    ***-name = 'S_WERKS'.
    ***-sg_main = 'I'.
    ***-sg_addy = space.
    ***-op_main = 'OBJECTKEY2'.
    APPEND *** TO restrict-***_tab.
    CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
    EXPORTING
    restriction = restrict
    EXCEPTIONS
    too_late = 1
    repeated = 2
    selopt_without_options = 3
    selopt_without_signs = 4
    invalid_sign = 5
    empty_option_list = 6
    invalid_kind = 7
    repeated_kind_a = 8
    OTHERS = 9.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    Regards
    Kiran

  • Select options for multiple entries

    hi,
    in selection screen i have 2 select-options as below
    SELECT-OPTIONS: s_belnr  FOR bkpf-belnr ,
                                  s_bukrs  FOR bkpf-bukrs.
    the problem is if BELNR or BUKRS are not given the error message should be displayed as enter the required fields.
    if i keep the OBLIGATORY i will get the message but if i keep OBLIGATORY first they need to enter one belnr  or bukrs  in selection screen then it allows for multiple option but the bussiness want to directly goto multiple option and upload data.
    please help

    Note Replace P with % Sign in IF Condition it not allow me to Put % there
    TABLES: bkpf.
    SELECT-OPTIONS: s_belnr FOR bkpf-belnr,
                    s_bukrs FOR bkpf-bukrs.
    AT SELECTION-SCREEN.
      IF s_belnr[] IS INITIAL AND s_bukrs[] IS INITIAL AND sy-ucomm NE 'P000' AND sy-ucomm NE 'P001'.
        IF s_belnr[] IS INITIAL OR s_bukrs IS INITIAL.
          MESSAGE: 'Please Enter Value in Bothe Fields' TYPE 'E'.
        ENDIF.
      ENDIF.

  • Dynamical declaration of SELECT-OPTIONS / RANGE possible

    Hi fellow programmers,
    does anybody know whether there is a way to declare a
    SELECT-OPTION respectively a RANGE dynamically during
    runtime? I have both the name of the range to be created
    and the DDIC-referencefield stored in variables.
    Thanks in advance for your appreciated help.
    Andreas

    Hi Andreas,
    DYNAMIC PROGAM SHOWS SELECTION-SCREEN.
    1 Sap does not allow execution of dynamic programs from memory.
      (dynamic means, only in memory, not in database)
    2. However, it allows execution of dynamic FORM/ENDFORM.
    3. But your requirement is of selection-screen using parameters and select-options.
    4. Hence, we can use the concept of DYNAMIC PROGRAM
       (build the program code in an internal table)
       using command
       INSERT REPORT 'ZDYN01' FROM itab.
       THIS WILL SAVE / OVERWRITE THE PRGRAM IN DB.
       HENCE, BE CAUTIOUS.
    5. Just Copy/Paste this sample program
       It will generate a dynamic program called ZDYN01.
       it will also execute it and
       SHOW SELECTION-SCREEN
       of the DYNAMIC PROGRAM.
    6. You may build up yuour own logic
        of constructing selection-screen from   
         required data stored in tables.
    7.
    REPORT abc.
    Data
    DATA : BEGIN OF itab OCCURS 0,
           l(72) TYPE c,
           END OF itab.
    DATA : prog(8) TYPE c.
    Make Dynamic Program
    CLEAR itab.
    itab-l = 'REPORT ABC.'.
    APPEND itab.
    itab-l = 'PARAMETERS : MATNR LIKE MARA-MATNR.'.
    APPEND itab.
    itab-l = 'START-OF-SELECTION.'. APPEND itab.
    itab-l = 'WRITE :/  MATNR.'. APPEND itab.
    Generate Program
    INSERT REPORT 'ZDYN01' FROM itab.
    COMMIT WORK. "----- COMMIT NECESSARY FOR DB
    *------ Call Report
    SUBMIT zdyn01 VIA SELECTION-SCREEN.
    HOPE THE ABOVE HELPS.
    Regards,
    Amit M.

  • Select-options restrict

    dear all,
                 Ive searched forums and then posting .i have to restrict document type in a selection screen with only three values.
                VR,RD,DG.
                i have used 'SELECT_OPTIONS_RESTRICT". but unable to understand where should i pass my three values .
    please explain and correct me?
    regards,

    Hi Naren
    Try this
    first
    **F4 help to fetch Accounting Document Number
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_belnr-low.
      lv_string = 'S_BELNR-LOW'.
    **Fatch the Accounting No. List from database table
      PERFORM select_belnr USING lv_string
                           CHANGING i_bkpf.
    **Show F4 list
      PERFORM f4_belnr_list USING  lv_string
                            CHANGING s_belnr-low.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_belnr-high.
      lv_string = 'S_BELNR-HIGH'.
    **Fatch the Accounting No. List from database table
      PERFORM select_belnr USING lv_string
                           CHANGING i_bkpf.
    **Show F4 list
      PERFORM f4_belnr_list USING  lv_string
                         CHANGING s_belnr-high.
    FORM select_belnr  USING lv_string TYPE dfies-fieldname
                       CHANGING p_i_bkpf TYPE t_bkpf.
      RANGES: s_belnr1 FOR bkpf-belnr.
      CLEAR: p_i_bkpf.
      CLEAR s_belnr1[].
    **Fetch the values entered by user on selection screen
      PERFORM read_selection_screen USING lv_string.
    **Read the value
      READ TABLE dynfields WITH KEY fieldname = lv_string.
      IF sy-subrc = 0
      AND dynfields-fieldvalue IS NOT INITIAL.
        s_belnr1-low = dynfields-fieldvalue.
        s_belnr1-sign = 'I'.
        s_belnr1-option  ='CP'.
        APPEND s_belnr1.
      ENDIF.
    **Fetch the data from database table
      SELECT belnr
        FROM bkpf
    INTO TABLE p_i_bkpf
        WHERE bukrs GE space
          AND belnr IN s_belnr1
          AND gjahr GE space
          AND blart EQ 'AB'.
    **Remove Duplicate Records
      SORT p_i_bkpf BY belnr.
      DELETE ADJACENT DUPLICATES FROM p_i_bkpf.
    ENDFORM.                    " SELECT_BELNR
    FORM f4_belnr_list  USING    p_retfield
                        CHANGING p_belnr.
      CLEAR: ret_tab.
    **Call F4 Help Value-request
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = p_retfield
          value_org       = 'S'
        TABLES
          value_tab       = i_bkpf
          return_tab      = ret_tab
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
    **Read the Value selected by user
      READ TABLE ret_tab INTO w_ret_tab INDEX 1.
      IF sy-subrc = 0.
        p_belnr = w_ret_tab-fieldval.
      ENDIF.
      CLEAR: i_bkpf,
             ret_tab.
    ENDFORM.                    " F4_BELNR_LIST
    FORM read_selection_screen USING    p_dynfields TYPE dfies-fieldname.
      CLEAR: dynfields.
      REFRESH : dynfields.
    **Append field name
      dynfields-fieldname = p_dynfields.
      APPEND dynfields.
    **Fetch the field Values
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname     = sy-cprog
          dynumb     = sy-dynnr
        TABLES
          dynpfields = dynfields.
    ENDFORM.                    " READ_SELECTION_SCREEN
    DECLARATION PART
    TYPES: BEGIN OF ty_bkpf,
           belnr TYPE bkpf-belnr,
           END OF ty_bkpf.
    TYPES: t_bkpf  TYPE TABLE OF ty_bkpf.
    Data: i_bkpf      TYPE t_bkpf.
    DATA: dynfields TYPE TABLE OF dynpread WITH HEADER LINE.
    DATA: ret_tab TYPE STANDARD TABLE OF ddshretval,
          w_ret_tab TYPE ddshretval.
    Try the aboe code hope this will work for you.
    thanks
    lalit

  • MDM Syndication selection option restrictions

    Hi all,
    In the MDM Syndicator is it possible to only syndicate certain details of the header record for a header and detail hierarchy structure?
    For our Scenario, GL Account has the hierarchy as a Single Chart of Accounts assigned to multiple Company Code records.
    ·         GL Account Master Record
    ·         Chart of Account Details (SKA1 - Header)
              o        Company Code Details (SKB1 - Detail)
    In the repository we have SKA1 as the Main table and SKB1 as a sub table within SKA1. While the content is imported it comes in as 1 Record with multiple Company code level details. Is there anyway to restrict the selection for syndication for a given SKA1 - Header and get only the selected SKB1 - Details syndicated?
    For example if for Chart of Account has 5 company codes A, B, C, D and E. Can we restrict the syndication of the of the record with selected company code details only (Example B and D - without the details for A, B, C being syndicated).
    I appreciate the time.
    Thanks,
    -Raj.

    Hi Raj
    Here I do have some suggestions regarding your request, correct me if i am wrong, basically you are looking to syndicate the records by applying the filter row wise or column wise.
    <u><b>Row wise :</b></u> Required all the field but search criteria as one or two fields ( for example filtering based on COA and Company code).
    <u><b>Column wise :</b></u> Required only few fields to be syndicate, either row wise filter applied or not.
    Hope I understood your question.
    <u><b>Solution:</b></u>
    <u><b>Row wise :</b></u> Use search parameter tab, search for particular COA and Company code and save the search for future purpose [from MENu  SEARCH->SAVE SEARCH].
    <u><b>Column wise :</b></u> Create Destination items for the fields which u want to syndicate and try to map those fields wt Original source items and try to syndicate the same.
    Hope I have covered the point what you expected.
    thanks
    Alexander
    P.S. Kindly reward the points, i found helpful.

  • Restricting Select Options to Multiple Single Entries

    Hi All,
           I have a requirement where we have two select options. I need to restrict only One of the select options to only accept multiple single entries. I have tried using the  'SELECT_OPTIONS_RESTRICT'  Function module. But it provided little help to me.
    Please check the below code.
    gv_w_opt_list-name = 'A'.
      gv_w_opt_list-options-eq = 'X'.
      APPEND gv_w_opt_list TO gv_w_res-opt_list_tab.
      gv_w_***-kind = 'A'. 
      gv_w_***-name = 'YTRADE_DESC'.
      gv_w_***-sg_main = '*'.
      gv_w_***-sg_addy = 'N'.
      gv_w_***-op_main = 'A'. 
      APPEND gv_w_*** TO gv_w_res-***_tab.
    It allows to restrict intervals for select-options in selection screen
        CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
          EXPORTING
            program                = sy-repid
            restriction            = gv_w_res
          EXCEPTIONS
            too_late               = 1
            repeated               = 2
            selopt_without_options = 3
            selopt_without_signs   = 4
            invalid_sign           = 5
            empty_option_list      = 6
            invalid_kind           = 7
            repeated_kind_a        = 8
            OTHERS                 = 9.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
    Please help me if you have any information related to this requirement. Relevant anwers will be surely rewarded.
    Regards
    Nagaraj

    I have a code sample I use in a report. Result is only EQ and no intervals and no excludes
    LOAD-OF-PROGRAM.
        Subscreen: Select Options for delivery                                    *
      SELECTION-SCREEN BEGIN OF SCREEN 1100 AS SUBSCREEN
                                          NO INTERVALS.
      SELECT-OPTIONS:
      so_dlvno FOR /scwm/s_aspq_tu-docno
                                     MODIF ID dlv .
      SELECTION-SCREEN END OF SCREEN 1100.
        Subscreen: Select Options Restrictions                                  *
    Include type pool SSCR
      TYPE-POOLS sscr.
    Define the object to be passed to the RESTRICTION parameter
      DATA restrict TYPE sscr_restrict.
    Auxiliary objects for filling RESTRICT
      DATA t_opt_list TYPE sscr_opt_list.
      DATA ***      TYPE sscr_***.
      CLEAR ***.
      ***-kind    = 'S'.        "Apply only to the named SELECT-OPTION
      ***-name    = 'SO_DLVNO'.  "This is name of the SELECT-OPTION
      ***-sg_main = 'I'.        "I = ONLY Inclusions; * = Both
      ***-op_main = 'NOINTERVALS'. "This must match opt_list-name
      APPEND *** TO restrict-***_tab.
    Create t_opt_list entry to specify capabilities of S_BUKRS.
      CLEAR t_opt_list.
      t_opt_list-name       = 'NOINTERVALS'."This must match ***_tab-op_main
      t_opt_list-options-bt = space.     "Do not permit BETWEEN
      t_opt_list-options-cp = space.     "Do not permit MATCHES-PATTERN
      t_opt_list-options-eq = 'X'.       "       Permit EQUALS
      t_opt_list-options-ge = space.     "Do not permit GREATER-OR-EQUAL
      t_opt_list-options-gt = space.     "Do not permit GREATER-THAN
      t_opt_list-options-le = space.     "Do not permit LESS-OR-EQUAL
      t_opt_list-options-lt = space.     "Do not permit LESS-THAN
      t_opt_list-options-nb = space.     "Do not permit NOT-BETWEEN
      t_opt_list-options-ne = space.     "Do not permit NOT-EQUAL
      t_opt_list-options-np = space.     "Do not permit NO-PATTERN-MATCH
      APPEND t_opt_list TO restrict-opt_list_tab.
    Call function module
      CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
        EXPORTING
          restriction                = restrict
        EXCEPTIONS
          too_late                   = 1
          repeated                   = 2
          not_during_submit          = 3
          db_call_after_report_call  = 4
          selopt_without_options     = 5
          selopt_without_signs       = 6
          invalid_sign               = 7
          report_call_after_db_error = 8
          empty_option_list          = 9
          invalid_kind               = 10
          repeated_kind_a            = 11
          OTHERS                     = 12.
    Exception handling
      IF sy-subrc NE 0.
      ENDIF.
    Edited by: Suhel Awad on Feb 1, 2011 3:06 PM

  • Select-option _no input possible???

    Hi.. all
    How can i get my selct option as no input possible mode in selection screen....
    so here user can not change the default value which i set...
    for that how can i restrict......
    how can i get my select-option with defulat entries and with NO INPUT POSSIBLE MODE...
    Thnaks,
    Naveen.I

    hiiiii
    you can use code as follows for select option..
    AT SELECTION-SCREEN OUTPUT .
      IF p_rad2 IS INITIAL .
        LOOP AT SCREEN.
          IF screen-name CS 'p_docno'.
            screen-active = 0.
            MODIFY SCREEN.
          ENDIF.                           " IF screen-name CS 'p_docno'.
        ENDLOOP.                           " LOOP AT SCREEN.
      ELSE.
        LOOP AT SCREEN .
          IF screen-name CS 'p_docno'.
            screen-active = 1.
            screen-input = 0.
            MODIFY SCREEN.
          ENDIF.                           " IF screen-name CS 'p_docno'.
        ENDLOOP.                           " LOOP AT SCREEN .
      ENDIF.                               " IF p_rad2 IS INITIAL .
    use that screen-input = 0 or 1 whatever you want ...
    regards
    twinkal

  • Select - options in WDA

    Hai all,
    I am trying different types of WDA components. please help me out, I am stucked with  select-options. please help me with set by step procedure for select-options.
    if possible please send a mail to [email protected] also.
    bye
    regards
    Nishad

    Hi,
    It seems the URL has not been successfully migrated. The blog can be seen at: http://scn.sap.com/community/web-dynpro-abap/blog/2005/12/20/using-select-options-in-a-web-dynproabap-application
    Best regards,
    Guillaume

  • Selection OPTION: Date input problem in Module POOL through Subscreen

    Dear ALL,
    Being new to ABAP, I am struck in a Problem.
    Requirement:
    I want an option on the Screen( My Screen 9000) for Date Range. Through this Date-Range I want to filter and pull some data from
    Database.
    As Date Range Selection option is possible only through Sub-Screen integration. Hence I integrated a Sub-Screen 400 (as below) and named the Sub-Screen area as SEL on my screen.
    Problem: As soon as I enter the dates on the screen, then those dates are not taken up by the code.
    During debugging I saw the the S_datum-low and S_datum-high are empty (in fact 00000000)
    The code follows:
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_9000.
      Call SUBSCREEN SEL  INCLUDING sy-repid '400'.
    PROCESS AFTER INPUT.
      MODULE USER_COMMAND_9000.
    DATA:  gv_datum     Type   dats,
    SELECTION-SCREEN BEGIN OF SCREEN 400 AS SUBSCREEN.
        SELECT-OPTIONS: s_datum FOR gv_datum.
    SELECTION-SCREEN END OF SCREEN 400 .
    Plz help where I am missing something.
    Regards
    Chandan

    Call the subscreen during the AT SELECTION-SCREEN event.
    SELECTION-SCREEN BEGIN OF SCREEN 400 AS SUBSCREEN.
    SELECT-OPTIONS: s_datum FOR gv_datum.
    SELECTION-SCREEN END OF SCREEN 400 .
    AT SELECTION-SCREEN.
       CALL SCREEN 100.
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE status_0100 OUTPUT.
       SET PF-STATUS '0100'.
    *  SET TITLEBAR 'xxx'.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE user_command_0100 INPUT.
       CASE sy-ucomm.
         WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
           LEAVE TO SCREEN 0.
       ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT

Maybe you are looking for

  • How to use Airport Extreme as a wireless hub

    I just switched ISPs and decided to move the location of the modem.  Bought a new Airport Extreme and set it up next to the modem.  I get good WiFi through out the house (30-50Mbps).  However, I have a location (in the entertainment center on opposit

  • Copying Comments from Outgoing Payments form to its checks for payment

    Hi!, is there a way to pass the comments from the Outgoing Payments to the comments of the check for payment of the same outgoing payment? We want to see in the checks for payments comments field, the same comment from the outgoing payment which the

  • Worfkow 2.6.2 to 2.6.3 (10g) migration

    We are planning to migrate out existing workflow installation on RDBMS 9.2.0.5 (that is workflow 2.6.2) to workflow 2.6.3 running on dabs 10g. We are planning to migrate the existing 9i database where workflow is installed, to 10g. - Are there any mi

  • Mountain Lion Original OS X 10.8.3

    Hi I have recently purchased a 2010 Macbook Pro 13'3 with 10.8.3 Mountain Lion pre installed - I have always used windows but recently I decided to get a Macbook, If I ever need to get the original discs ( I do not have them ) my understanding is tha

  • How can I change print presets?

    Between the last time I used InDesign (CS3) and now, I upgraded my Mac system software to OS 10.9.5 AND replaced my old printer (which had died) with a new one.  Now when I open a doc in InDesign CS3, I can work with it just fine, but can't print it.