Hi Experts, a question about search help in selection screen?

Hi Experts,
I have a selection screen and two parameters, one is plant and another is material, what I want is as following:
the user select a plant and when he select the material the material should be in the plant he has filled in, how can I handle this? detail help, thank you in advance.
Kind regards
Dawson

Hi,
Check the below code.
tables: t001k.
For Identification Number
DATA: BEGIN OF it_bwkey OCCURS 0,
        bwkey LIKE t001k-bwkey,
      END OF it_bwkey.
data: v_bukrs(4).
For Run date
DATA: BEGIN OF it_bukrs OCCURS 0,
        bukrs LIKE t001k-bukrs,
      END OF it_bukrs.
DATA it_ret LIKE ddshretval OCCURS 0 WITH HEADER LINE.
SELECTION-SCREEN: BEGIN OF BLOCK main WITH FRAME TITLE text-001.
SELECTION-SCREEN SKIP.
PARAMETERS: p_bukrs(4) TYPE c.
SELECT-OPTIONS s_bwkey FOR t001k-bwkey NO INTERVALS.
SELECTION-SCREEN END OF BLOCK main.
INITIALIZATION.
SELECT DISTINCT bukrs FROM t001k INTO TABLE it_bukrs.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_bukrs.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING retfield = 'BUKRS'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'P_BUKRS'
value_org = 'S'
TABLES value_tab = it_bukrs
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.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_bwkey-low.
TABLES: t130r.
DATA: BEGIN OF dynpfields OCCURS 0.
INCLUDE STRUCTURE dynpread.
DATA: END OF dynpfields.
DATA : sy_repid LIKE sy-repid,
       sy_dynnr LIKE sy-dynnr.
CLEAR dynpfields.
REFRESH dynpfields.
dynpfields-fieldname = 'P_BUKRS'.
APPEND dynpfields.
sy_repid = sy-repid.
sy_dynnr = sy-dynnr.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = sy_repid
dynumb = sy_dynnr
TABLES
dynpfields = dynpfields
EXCEPTIONS
OTHERS = 01.
IF sy-subrc = 0.
READ TABLE dynpfields WITH KEY fieldname = 'P_BUKRS'.
IF sy-subrc = 0.
v_bukrs = dynpfields-fieldvalue.
ENDIF.
ENDIF.
SELECT bwkey FROM t001k INTO TABLE it_bwkey WHERE bukrs = v_bukrs.
DELETE ADJACENT DUPLICATES FROM it_bwkey.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'BWKEY'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'S_BWKEY'
value_org = 'S'
TABLES
value_tab = it_bwkey
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.
Regards,
Kumar Bandanadham

Similar Messages

  • Search help in selection screens for interactive report

    A search help can only be assigned to DB table.
    So my doubt is can it also be used for seletion screens created for an interactive report?
    If yes what is the procedure.. Please give me one example at least...
    waiting for your valuable suggestions.....
    Thanks,
    regards,
    Chinmay

    Hi Chinmay,
    I suppose your requirement is to give search help to selection screen elements.
    Here is the code.
    REPORT  ZSHAIL_F4HELP                           .
    parameters: name(10) type c .
    TYPES: BEGIN OF VALUES,
             CARRID TYPE SPFLI-CARRID,
             CONNID TYPE SPFLI-CONNID,
           END OF VALUES.
    dATA: PROGNAME LIKE SY-REPID,
          DYNNUM   LIKE SY-DYNNR,
          DYNPRO_VALUES TYPE TABLE OF DYNPREAD,
          FIELD_VALUE LIKE LINE OF DYNPRO_VALUES,
          VALUES_TAB TYPE TABLE OF VALUES.
    at selection-screen on value-request for name.
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
      EXPORTING
        tabname                   = 'DEMOF4HELP'
        fieldname                 = 'CARRIER1'
      SEARCHHELP                = ' '
      SHLPPARAM                 = ' '
       DYNPPROG                  = PROGNAME
       DYNPNR                    = DYNNUM
       DYNPROFIELD               = 'CARRIER'
      STEPL                     = 0
      VALUE                     = ' '
      MULTIPLE_CHOICE           = ' '
      DISPLAY                   = ' '
      SUPPRESS_RECORDLIST       = ' '
      CALLBACK_PROGRAM          = ' '
      CALLBACK_FORM             = ' '
      SELECTION_SCREEN          = ' '
    IMPORTING
      USER_RESET                =
    TABLES
      RETURN_TAB                =
    EXCEPTIONS
       FIELD_NOT_FOUND           = 1
       NO_HELP_FOR_FIELD         = 2
       INCONSISTENT_HELP         = 3
       NO_VALUES_FOUND           = 4
       OTHERS                    = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    AT SELECTION-SCREEN OUTPUT.
    PROGNAME = SY-REPID.
      DYNNUM   = SY-DYNNR.
      CLEAR: FIELD_VALUE, DYNPRO_VALUES.
      FIELD_VALUE-FIELDNAME = 'CARRIER'.
      APPEND FIELD_VALUE TO DYNPRO_VALUES.
    I hope your query is solved.
    If so,please award points.
    Regards,
    Sylendra.

  • A question about search help and input help,PLZ take a look at it.

    hi everyone,
    i want to know the difference between search hlep and inpu help
    can anyone tell me about that?
    thanks

    HI
    BOTH ARE SAME
    you can define F4 help in 2 ways
    in SE11 or in the report program
    IN SE11
    Attaching a search help to a table field
    Choose the field name, click on search help tab and
    provide the name of the search help.
    A search help is attached to a field of a table or structure in the maintenance transaction for this table/structure, analogously to attaching to a table. You must assign the interface parameters of the search help to any fields of the table/structure. The search field must be assigned to an EXPORT parameter of the search help at this time.
    Attach the search help to the table field
    The search help ZSTRAVELAG_NAME is therefore directly attached to the field AGENCYNUM of table ZSTRAVELAG.
    Attaching a search help to a data element
    Provide the search help name and the parameter name
    under the further characteristics tab of the data element.
    If the input help of a field is defined by its data element, no further screen fields can be used in the input help.
    Also note that the input F4 help would be available wherever the data element is used.
    Attaching a search help to a screen element
    A search help can be directly assigned to a screen field in two ways.
    The name of the search help must be entered in the Screen Painter in the Attributes for the field in the field Search help.
    The name of the search help can be defined for selection screens in ABAP reports in the PARAMETERS or SELECT-OPTIONS statement directly following the supplement MATCHCODE OBJECT.
    However, input help is only available for this particular screen.
    in REPORT PROGRAM
    in this way we declare in report program
    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.
    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.
    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.
    Check this out
    http://www.sap-img.com/abap/value-request-for-parameter.htm
    ******************************8
    sample program
    report zrich_0001 .
    data: begin of ihelp occurs 0,
    field type char10,
    ftext type char50,
    end of ihelp.
    data: a_field(20) type c.
    select-options s_field for a_field.
    initialization.
    ihelp-field = 'A'.
    ihelp-ftext = 'Description A'.
    append ihelp.
    ihelp-field = 'B'.
    ihelp-ftext = 'Description B'.
    append ihelp.
    ihelp-field = 'C'.
    ihelp-ftext = 'Description C'.
    append ihelp.
    at selection-screen on value-request for s_field-low.
    call function 'F4IF_INT_TABLE_VALUE_REQUEST'
    exporting
    retfield = 'FIELD'
    dynprofield = 'S_FIELD'
    dynpprog = sy-cprog
    dynpnr = sy-dynnr
    value_org = 'S'
    tables
    value_tab = ihelp.
    start-of-selection.
    one more program....
    REPORT ZHELP .
    TABLES : MARA.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETERS : P_MATNR(10) TYPE C.
    SELECTION-SCREEN END OF BLOCK B1.
    DATA : BEGIN OF ITAB OCCURS 0,
    MATNR TYPE MATNR,
    END OF ITAB.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_MATNR.
    SELECT MATNR
    FROM MARA
    INTO TABLE ITAB
    UP TO 10 ROWS.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    RETFIELD = 'MATERIAL NUMBER'
    DYNPPROG = SY-REPID
    DYNPNR = SY-DYNNR
    DYNPROFIELD = 'P_MATNR'
    VALUE_ORG = 'S'
    TABLES
    VALUE_TAB = ITAB
    EXCEPTIONS
    PARAMETER_ERROR = 1
    NO_VALUES_FOUND = 2
    OTHERS = 3.
    Create it from SE11.
    enter search help
    and create elementary
    enter description and below Table name
    and the fields
    see the doc
    1) Elementary search helps describe a search path. The elementary search help must define where the data of the hit list should be read from (selection method), how the exchange of values between the screen template and selection method is implemented (interface of the search help) and how the online input help should be defined (online behavior of the search help).
    2) Collective search helps combine several elementary search helps. A collective search help thus can offer several alternative search paths.
    3)An elementary search help defines the standard flow of an input help.
    4) A collective search help combines several elementary search helps. The user can thus choose one of several alternative search paths with a collective search help.
    5)A collective search help comprises several elementary search helps. It combines all the search paths that are meaningful for a field.
    6)Both elementary search helps and other search helps can be included in a collective search help. If other collective search helps are contained in a collective search help, they are expanded to the level of the elementary search helps when the input help is called.
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee38446011d189700000e8322d00/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee45446011d189700000e8322d00/content.htm
    pls go through this for search help creation
    http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm

  • Search help for selection screen

    Hi experts,
    I have a selection screen - and the user want that the asearch help will be :
    For example: Equi-eqtyp with search help: eqtyp_sh_wd or
                         equi-matnr with search help mat1.
    how can i do this?
    thanks,
    Michal.

    Hi, Michal
    Are you talking about some thing like bellow ?
    PARAMETERS: eqtyp TYPE equi-eqtyp MATCHCODE OBJECT eqtyp_sh_wd,
                matnr TYPE equi-matnr MATCHCODE OBJECT mat1.
    Please Reply if else.
    Faisal

  • Regarding Search help on selection-screen field

    Hi there,
    I am working on custom tables.
    I have a requirement to maintain search pattern on a selection-screen field.
    selection-screen parameter: p_name which is company name filed from Z table.
    By giving a string like Holl* and by  pressing F4 on the field p_name it has to popup a dialogbox having list of company names starting with Holl.
    Thanks in advance.
    -Tulasi

    Hi
    Go through the link given below :
    How to create a search help for my own fields in selection screen
    F4 search help on report selection screen
    also try :
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    DDIC_STRUCTURE = ' '
    RETFIELD = 'VKORG'
    PVALKEY = ' '
    DYNPPROG = SY-REPID
    DYNPNR = SY-DYNNR
    DYNPROFIELD = 'P_VKORG'
    STEPL = 0
    WINDOW_TITLE =
    VALUE = ' '
    VALUE_ORG = 'C'
    TABLES
    VALUE_TAB = T_TABLE1
    FIELD_TAB = field_tab
    RETURN_TAB = RET_TAB
    DYNPFLD_MAPPING = DYN_TAB
    EXCEPTIONS
    PARAMETER_ERROR = 1
    NO_VALUES_FOUND = 2
    OTHERS = 3
    With Regards
    Nikunj shah

  • Search help on selection screen.

    I have a selection screen with
    Report name
    Variant name
    Variant fields
    Variant fields is attached to a search help 'Z_Search_variant' and this search help fetches values based on "Report name" "Variant name" on the selection screen.
    I am using
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR Variant_field
    PERFORM f4_help_variant.
    FORM f4_help_variant.
    call function 'F4IF_FIELD_VALUE_REQUEST'
      exporting
       tabname                   = space
       fieldname                 = space
       SEARCHHELP                = 'Z_SEARCH_VARIANT'
      SHLPPARAM                 = 'REPORT'
      DYNPPROG                  = ' '
      DYNPNR                    = ' '
      DYNPROFIELD               = ' '
      STEPL                     = 0
      VALUE                     = Report
      MULTIPLE_CHOICE           = ' '
      DISPLAY                   = ' '
       SUPPRESS_RECORDLIST       = 'X'
       CALLBACK_PROGRAM          = SY-REPID
      CALLBACK_FORM             = ' '
      SELECTION_SCREEN          = ' '
    IMPORTING
      USER_RESET                =
    TABLES
        RETURN_TAB                = return_tab
    EXCEPTIONS
      FIELD_NOT_FOUND           = 1
      NO_HELP_FOR_FIELD         = 2
      INCONSISTENT_HELP         = 3
      NO_VALUES_FOUND           = 4
      OTHERS                    = 5
    How do I pass value to this search help? Currently I do not see this FM allowing this option? Any other options?

    Hi Vinita,
    wat i figured out from your problem is u need how to get values from FM so u can do it in this way..
    READ TABLE it_return INTO wa_return INDEX 1.
      IF sy-subrc = 0.
        wa_output-vkorg = wa_return-fieldval.  
      ENDIF.
      IF wa_output-vkorg IS NOT INITIAL.
        MODIFY it_output FROM wa_output INDEX row_id   * it_output is final ITAB
                  TRANSPORTING vkorg.
      ENDIF.
      CALL METHOD c_alv->refresh_table_display.
      CLEAR: wa_return,it_return[],wa_output.

  • Need help on search help on selection screen field

    Hi guyz,
    Please tell me how to pass the parameter or restrict the below search help.
    *s_bsart FOR ekko-bsart . " Doc. Type*
    For the above selection screen field i need to display the data only for cat = F if i click search help.
    Thanks,
    Mohamed Kaleel

    Hi,
    Use At selection-screen for value-request for s_bsart.
    SELECT_OTPIONS: s_bsart FOR ekko-bsart.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_bsart.
    CALL SCREEN 100 STARTING AT 10 5
    ENDING AT 50 10.
    MODULE value_list OUTPUT.
    SUPPRESS DIALOG.
    LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.
    SET PF-STATUS space.
    NEW-PAGE NO-TITLE.
    s_bsart-low = 'F' / 'CAT=F'.
    write :/ s_bsart-low.
    Hide: s_bsart-low
    clear s_bsart-low.
    ENDMODULE.
    AT LINE-SELECTION.
    LEAVE TO SCREEN 0.
    This will resolve the issue.
    Regards,
    Gurpreet

  • Dynamic Search-help in Selection Screen Parameter

    Hi,
    Please can you provide some solution for the below requirements.
    I have 2 fields ( Organization channel and Team ) in my selection screen. Under one organization channel there can be many teams.
    And I am trying a  dynamic search help on both the fields using event AT selection-screen on Value request and
    FM 'F4IF_INT_TABLE_VALUE_REQUEST'.
    But I am facing the below issue .
    First I am giving some values in field 'Organization channel' . Then I am clicking on F4 button on my  2nd field 'Team' .
    and in debugging mode under the event  'At selection-screen on value request', Select option SO_Team is blank.
    The value provided in the Organiozation channel is not being captured in SO_TEAM-Low
    Please have a look on the below codes.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR so_team-low .
    if not  so_orgchannel-low  is  initial.      "Here so_orgchannel-low  value is coming as Zeros.
    select  * from HRP1001 into table GT_HRP1001
              where objid = so_orgchannel-low.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
             EXPORTING
                  retfield        = 'ORGID'
                  value_org       = 'S'
                  dynpprog        = 'ZTEST'
                  dynpnr          = '1000'
             TABLES
                  value_tab       = gt_hrp1001
             EXCEPTIONS
                  parameter_error = 1
                  no_values_found = 2
                  OTHERS          = 3.

    Hi,
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR so_team-low .
    "Add This  Begin
      CLEAR t_dynpfields.
      REFRESH t_dynpfields.
      t_dynpfields-fieldname  = 'SO_ORGCHANNEL-LOW'.
      APPEND t_dynpfields.
      w_repid = sy-repid.
    * reading Screen variables and Values
      CALL FUNCTION 'DYNP_VALUES_READ'
           EXPORTING
                dyname     = w_repid
                dynumb     = sy-dynnr
           TABLES
                dynpfields = t_dynpfields
           EXCEPTIONS
                OTHERS.
      READ TABLE t_dynpfields INDEX 1.
      so_orgchannel-low = t_dynpfields-fieldvalue.
    "Add this End
    if not  so_orgchannel-low  is  initial.      "Your code is here
    select  * from HRP1001 into table GT_HRP1001
               where objid = so_orgchannel-low.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
              EXPORTING
                   retfield        = 'ORGID'
                   value_org       = 'S'
                   dynpprog        = 'ZTEST'
                   dynpnr          = '1000'
              TABLES
                   value_tab       = gt_hrp1001
              EXCEPTIONS
                   parameter_error = 1
                   no_values_found = 2
                   OTHERS          = 3.
    Regards,
    Prabhudas

  • Search help for selection screen field

    Hi ,
    steps for creating search help for a key field in selection screen..
    tables is a userdefined from which the field is taken..
    thxs,
    vind

    hi,
    c this.
    REPORT ZXYZ_0002 .
    data: dynfields type table of dynpread with header line.
    data: return type table of ddshretval with header line.
    selection-screen begin of block b1 with frame title text-001 .
    selection-screen begin of line.
    PARAMETERS: P_BUKRS type T001-BUKRS.
    selection-screen comment 30(20) BUTXT for field p_bukrs.
    selection-screen end of line.
    selection-screen end of block b1.
    at selection-screen output.
    if butxt is initial.
       select single butxt into butxt
             from t001
            where bukrs = p_bukrs.
    endif.
    at selection-screen on value-request for p_bukrs.
      call function 'F4IF_FIELD_VALUE_REQUEST'
           exporting
                tabname           = 'T001'
                fieldname         = 'BUKRS'
                dynpprog          = sy-cprog
                dynpnr            = sy-dynnr
                dynprofield       = 'P_BUKRS'
           tables
                return_tab        = return
           exceptions
                field_not_found   = 1
                no_help_for_field = 2
                inconsistent_help = 3
                no_values_found   = 4
                others            = 5.
      read table return with key fieldname = 'P_BUKRS'.
    Add it back to the dynpro.
      dynfields-fieldname = return-retfield.
      dynfields-fieldvalue =  return-fieldval.
      append dynfields.
    Get the company code from db and add to dynpro
      data: xt001 type t001.
      clear xt001.
      select single * into xt001
             from t001
            where bukrs = return-fieldval.
      dynfields-fieldname = 'BUTXT'.
      dynfields-fieldvalue = xt001-butxt.
      append dynfields.
    Update the dynpro values.
      call function 'DYNP_VALUES_UPDATE'
           exporting
                dyname     = sy-cprog
                dynumb     = sy-dynnr
           tables
                dynpfields = dynfields
           exceptions
                others     = 8.
    start-of-selection.
    rgsds
    anver
    if hlped mark points

  • Search Help for selection screen select-option

    Hi Friends,
              I want have search help for KSCHL with only the condition types starting with Z. I need your help to do that.
    Thanks in Advance.

    hi,
    chek a sample code, for restricting the serach help.
    REPORT Z_CONECT_A.
    Include type pool SSCR
    TYPE-POOLS sscr.
    TABLES : marc.
    defining the selection-screen
    select-options :
      s_matnr for marc-matnr,
      s_werks for marc-werks.
    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_***.
    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
    anver
    <b><i>if helped pls mark points</i></b>

  • I got a question about search help comes from check table

    But it dosen't work because it always have its value from the  first criteria.
    And I don't want no values be added into the criteria.
    How can I solve this problem.

    Seems like an interview question, if not tell us the purpose and scenario you are working on.
    Regards
    Karthik D

  • Search help on select optionbased on other select ooption entered

    hi,
    I need to know search help for selection screen based on value entered in another select options
    SELECT-OPTIONS : s_bukrs FOR bkpf-bukrs OBLIGATORY,
                     s_belnr FOR bkpf-belnr,
                     s_gjahr FOR bkpf-gjahr OBLIGATORY,
                     s_budat FOR bkpf-budat OBLIGATORY,
                     s_akont FOR lfb1-akont,
                     s_saknr FOR bseg-saknr.    """"""""""
    *PARAMETERS : p_akont type lfb1-akont.
    here i need to get the vaues of s_akont based on values entered in s_bukrs,
    In event at selection screeen for s_akont i am writing
        SELECT a~bukrs
              a~saknr
              a~mitkz
              b~txt50
                     FROM skb1 AS a
                     INNER JOIN skat AS b
                     ON asaknr = bsaknr
                      INTO CORRESPONDING FIELDS OF TABLE lt_skb1
                      WHERE bukrs IN s_bukrs
                        AND mitkz = 'K'
                        AND b~spras = 'EN'.
    but not getting value of s_bukrs at this point of execution. I requir the fiels in select statement in F4 of s_akont.
    what are the function modules to call and what is the way to do??
    thanks..

    Check the below solution for your issue - The FM "'RS_SELECTIONSCREEN_READ" is used to get the S_BUKRS values. Even though the FM returns single values of the Select options ( Low & High ) it fits the requirement.As the trick part is...If user enters multiple values or even enters sign for select options, S_BUKRS itself will have the value. That's why we have If else S_BUKRS[] is initial and R_BUKRS. Let me know if you have any issues with the solution provided.
    TABLES: bkpf, lfb1.
    DATA lt_fieldvalues TYPE STANDARD TABLE OF rsselread.
    DATA ls_fieldvalue TYPE rsselread.
    DATA r_bukrs TYPE RANGE OF bkpf-bukrs.
    DATA ls_bukrs LIKE LINE OF r_bukrs.
    SELECT-OPTIONS: s_bukrs FOR bkpf-bukrs,
                    s_akont FOR lfb1-akont.
    INITIALIZATION.
      ls_fieldvalue-name = 'S_BUKRS'.
      ls_fieldvalue-kind = 'S'.
      ls_fieldvalue-position = 'LOW'.
      APPEND ls_fieldvalue TO lt_fieldvalues.
      ls_fieldvalue-name = 'S_BUKRS'.
      ls_fieldvalue-kind = 'S'.
      ls_fieldvalue-position = 'HIGH'.
      APPEND ls_fieldvalue TO lt_fieldvalues.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_akont-low.
      refresh r_bukrs.
      clear ls_bukrs.
      IF s_bukrs[] IS INITIAL.
        CALL FUNCTION 'RS_SELECTIONSCREEN_READ'
          EXPORTING
            program     = sy-repid
            dynnr       = '1000'
          TABLES
            fieldvalues = lt_fieldvalues.
        IF NOT lt_fieldvalues[] IS INITIAL.
          ls_bukrs-sign = 'I'.
          READ TABLE lt_fieldvalues INTO ls_fieldvalue WITH KEY position = 'LOW'.
          IF sy-subrc EQ 0.
            ls_bukrs-low  = ls_fieldvalue-fieldvalue.
          ENDIF.
          READ TABLE lt_fieldvalues INTO ls_fieldvalue WITH KEY position = 'HIGH'.
          IF sy-subrc EQ 0.
            ls_bukrs-high = ls_fieldvalue-fieldvalue.
          ENDIF.
          IF ls_bukrs-high IS NOT INITIAL.
            ls_bukrs-option = 'BT'.
          ELSE.
            ls_bukrs-option = 'EQ'.
          ENDIF.
          if ls_bukrs-low is not initial or ls_bukrs-high is not initial.
            APPEND ls_bukrs TO r_bukrs.
          endif.
        ENDIF.
      ELSE.
        r_bukrs[] = s_bukrs[].
      ENDIF.
      SELECT a~bukrs a~saknr a~mitkz b~txt50 FROM skb1 AS a
             INNER JOIN skat AS b
             ON a~saknr = b~saknr
             INTO CORRESPONDING FIELDS OF TABLE lt_skb1
             WHERE bukrs IN r_bukrs         " Changed to r_burks
             AND mitkz = 'K'
             AND b~spras = 'EN'.

  • Attaching search help to a screen field

    Hi all,
    I've created a search help (zhlp) and want to attach it to the screen field in the selection screen of my report.
    SELECT-OPTIONS KSCHL FOR VAKE-KSCHL
    MEMORY ID VKS.
    I've attached zhlp to the screen by defining it on the element list of the screen 1000.
    And the original db table T685 already got a search help H_T685, when I run my report and press F4 in the field, it calls the default search help H_T685 but not mine.
    Could anyone help me? Thanks.

    here is the syntax for assiging search help to selection screen field.
    SELECT-OPTIONS KSCHL FOR VAKE-KSCHL MATCHCODE OBJECT ZHLP.
    Regards
    Raja

  • AutoSPInstaller - Question about Search Topology

    Hello,
    I would deploy a new sharepoint infrastructure with autospinstaller and i have some questions about search topology.
    This infrastructure will host at end 2 EDM (10-20TO) and probably some user sites.
    I will provision 2 WFE and 2 APPS.
    Search Topology (4 servers) =>
    - Crawl Component :
    SRVA & SRVB
    - Query Component :
    SRVC & SRVD
    - Search Query and Site Settings Service :
    SRVA & SRVB
    - Admin Component :
    SRVA & SRVB
    - Index Component :
    SRVC & SRVD
    - Content Processing Component :
    SRVA & SRVB
    - Analytics Porcessing Component :
    SRVA & SRVB
    I read many articles about this subject but all were different !
    Anyone can apply my choice or make me a proposition ?

    Hi,
    I just want confirme that the infrastructure is correct before deploy it. Do i really need to isolate admin component, for now i put it on only one app server.
    For "Distributed caching", i planned to install it on both WFE servers.
    Thank you for your help.
    Jeremy

  • About search helps

    Hi,
    Can anybody please explain to me about search helps in details;i.e,both elementary and collective;with an example each??
    Thanks in advance.
    sumita

    Hi Sumita,
    Check this info.
    Creating Elementary Search Helps
    Procedure
    In the initial screen of the ABAP Dictionary, select object class Search help, enter the name of the search help and choose Create.
    A dialog box appears in which you must select the type of search help.
    Select Elementary search help and choose .
    The maintenance screen for elementary search helps appears.
    Enter an explanatory text in the field Short text.
    You can for example find the search help at a later time using this short text.
    In the Definition tab page enter the selection method of the search help.
    You can enter the name of a table or a view (database view, projection view or help view) here. If you enter a table that has a text table, the name of the text table is automatically entered in the corresponding field.
    Using the input help (F4 help), select fields of the selection method as parameter in the Search help parameter area. Select the fields that should be used in the dialog box for value selection or in the hit list.
    If the selection method is a table that has a text table, both the fields of the table and the fields of the text table are offered in the input help.
    The data element of the parameter is automatically copied from the selection method. The data element defines the output attributes and the F1 help of the parameter in the hit list and in the dialog box for value selection.
    You can assign the parameter another data element. To do so, select the Mod flag. The Data element field is now ready for input. Then select a data element with the input help (F4 help). Only data elements whose data type, length and number of decimal places is the same as those of the previous data element can be assigned.
    This removes the link between the data element of the search help parameter and the data element of the selection method field having the same name. If you cancel the Mod flag, the data element of the assigned table field is used again.
    Define the attributes of the search help parameters.
    Select the IMP flag if it is an import parameter. Select the EXP flag if it is an export parameter.
    You can define the dialog for the input help with the fields LPos, SPos and SDis. Enter the parameter position in the hit list in LPos. If you enter nothing or the value 0 here, the parameter is not displayed in the hit list.
    Enter the parameter position in the dialog box for value selection in SPos. If you enter nothing or the value 0 here, the parameter is not displayed in the dialog box for value selection.
    Set the SDis flag if the parameter should be a pure display field in the dialog box for value selection. The user is thus informed that the contents of the parameter restrict the value, but he cannot change this restriction. This makes sense for example when the parameter is an import parameter or if it has a default value.
    You can assign the parameter a default value in the Default value field.
    Select the dialog type of the search help.
    The dialog type defines how the hit list is displayed in the input help.
    Save your entries.
    A dialog box appears in which you have to assign the search help a development class.
    Choose .
    Do not forget to link the search help to a screen field. The search help attachment is not part of the search help definition; it is part of the object definition to which the search help is attached.
    Result
    The search help is activated. You can find information about the activation flow in the activation log, which you can display with Utilities ® Activation log. If errors occurred during activation, the activation log is automatically displayed.
    Other Options
    Assign a hot key: If the search help is to be accessed with a hot key, you must enter a one-place ID in the Hot key field. All the elementary search helps contained in a collective search help should have different short cuts.
    Assign a search help exit: In exceptions, you might have to change the standard flow defined by the search help with a search help exit. In this case enter the name of the search help exit in the corresponding field.
    Test the search help: You can test the flow of an input help defined by the elementary search help with . A dialog box appears in which you can simulate the behavior of the search help under different conditions. You can obtain information about the options provided in this window with.
    Creating Collective Search Helps  
    Procedure
    In the initial screen of the ABAP Dictionary, select object class Search help, enter the name of the search help and choose Create.
    A dialog box appears in which you must select the type of search help.
    Select Collective search help and choose .
    The maintenance screen for collective search helps is displayed.
    Enter an explanatory text in the field Short text.
    You can for example find the search help at a later time using this short text.
    In the Definition tab page enter the parameters of the collective search help.
    Select the Imp flag if it is an import parameter. Select the Exp flag if it is an export parameter.
    Define the types for the parameters of a collective search help by assigning a data element. Enter the name of the data element that describes the contents of the search help parameter in the Data element field.
    You can assign the parameter a default value in the Default value field.
    In exceptions it could be necessary to change the standard process defined by the search help. You can implement the deviation from the standard using a search help exit.
    In this case enter the name of the search help exit in the corresponding field.
    On the Included search helps tab page, define the search helps that you want to include in the collective search help.
    You can include elementary search helps and collective search helps.
    Use the Hide flag to control whether an included search help should appear in the dialog box for selecting the elementary search help. If the flag is set, the search help is not offered.
    It makes sense to hide search help inclusions if one or more search paths in the standard system should not be used in a concrete R/3 System. Similarly, search help inclusions can also be already hidden in the standard system because they only can be used meaningfully in a few R/3 Systems. You have to cancel the flag in this case.
    Position the cursor one after the other on each allocated search help and choose Parameter assignment.
    In the next screen, enter the parameter names of the elementary search helps to which the corresponding parameters of the collective search help should be assigned in the field Reference parameter.
    You can select the parameters contained in the included search help using the input help. Create a proposal for the assignment with Proposal.
    Save your entries.
    A dialog box appears in which you have to assign a development class to the search help.
    Choose .
    Result
    The collective search help is activated. You can find information about the activation flow in the activation log, which you can display with Utilities ® Activation log. If errors occurred when the collective search help was activated, the activation log is automatically displayed.
    Do not forget to link the search help to a screen field. The search help attachment is not part of the search help definition; it is part of the object definition to which the search help is attached.
    Other Options
    You can test the flow of an input help defined by the collective search help with . A dialog box appears in which you can simulate the behavior of the search help under different conditions. You can obtain information about the options provided in this window with .
    First create ELEMENTARY SEARCHHELP YSEARCH32 in R/3 Data dictionary
    Create one more elementary search help YSEARCH33
    Now define collective search help for the above 2 elementary search helps. In definition part include the search help parameters which you want to display in the search help.
    Enter the included search helps i.e YSEARCH32,YSEARCH33.
    Press the Parameter Assignment for search help BUTTON.You have to assign one parameter with the parameters in the definition part
    Same case with the YSEARCH33.
    Activate the collective search help.
    Apply this search help in the program and if F4 button is pressed the collection of elementary search helps are displayed.
    Creating dynamic search help means the f4 help will come on the context bases.
    that will achieved with two function modules.
    1. F4IF_INT_TABLE_VALUE_REQUEST Display internal table as search help (documented in SAP)
    2.F4IF_*_VALUE_REQUEST
    u will provide the search help on the field dynamically depending on program context.
    REPORT  ZTEST_F4HELP                              .
    *---Report with selection screen and to display the list of
    possible entries for field 'B' as per the value in field 'A'.
    parameters: p_vbeln type vbak-vbeln,
                p_posnr type vbap-posnr.
    at selection-screen on value-request for p_posnr.
      data: begin of help_item occurs 0,
              posnr type vbap-posnr,
              matnr type vbap-matnr,
              arktx type vbap-arktx,
            end of help_item.
      data: dynfields type table of dynpread with header line.
      dynfields-fieldname = 'P_VBELN'.
      append dynfields.
      call function 'DYNP_VALUES_READ'
           exporting
                dyname               = sy-cprog
                dynumb               = sy-dynnr
                translate_to_upper   = 'X'
           tables
                dynpfields           = dynfields
           exceptions
                invalid_abapworkarea = 1
                invalid_dynprofield  = 2
                invalid_dynproname   = 3
                invalid_dynpronummer = 4
                invalid_request      = 5
                no_fielddescription  = 6
                invalid_parameter    = 7
                undefind_error       = 8
                double_conversion    = 9
                stepl_not_found      = 10
                others               = 11.
      read table dynfields with key fieldname = 'P_VBELN'.
      p_vbeln = dynfields-fieldvalue.
      call function 'CONVERSION_EXIT_ALPHA_INPUT'
           exporting
                input  = p_vbeln
           importing
                output = p_vbeln.
      select posnr matnr arktx into table help_item
                     from vbap
                          where vbeln = p_vbeln.
      call function 'F4IF_INT_TABLE_VALUE_REQUEST'
           exporting
                retfield    = 'POSNR'
                dynprofield = 'P_POSNR'
                dynpprog    = sy-cprog
                dynpnr      = sy-dynnr
                value_org   = 'S'
           tables
                value_tab   = help_item.
    Hope this resolves your query.
    Reward all the helpful answers.
    Regards

Maybe you are looking for

  • Unicode display rightly but different characters

    Hi, I've tried inserting some chinese characters into the form, convert it to utf-8 and store in the database (db2 udb v7.2) using entity (cmp) beans. Everything looks ok until when i retrieved the data from the database , it sure display chinese cha

  • Question about user creation.

    So I've created using the Wiki article https://wiki.archlinux.org/index.php/Users_and_groups here. I've created a user and gave it a password and added to the wheel, and it works fine. I can login and it starts X and everything, however there is no f

  • DSP output question

    I have a 3845 and output of "show voice dsp" looks normal but output of "show voice dsp detailed" shows some of the DSP channels as bad.  Are they really bad or is this just a cosmetic issue with the output?  Also, we are supposed to be using DSP ver

  • Detecting Change in Elements between Versions of XML Doc

    Hi There I have a structured XML Schema based table in XMLDB 9.2.0.4 and am trying to detect when a non-repeating element off the root element changes (audit). I have created a row level update trigger and each time one element is changed via UPDATEX

  • Many fonts don't render when Firefox opens local html file

    I'm using a 3rd-party program called Fontlist. It reads all fonts in the Windows fonts folder, and then uses a user-chosen line of text to generate an html file on the hard drive that shows the line of text displayed in each font. Since it's a 3rd-pa