F4 help FOR A SELECT OPTION FIELD

Hi,
Can anyone tell how to provide F4help for a select-option field?
Regards,
Hema

Hello,
If you created a search help in the DDIC...Then check the check box EXPORt parameter for one of the fields
If you used the function module Make sure you pass the correct values..Also the field name in CAPITAL letters..
Check this code..
TABLES: T005T.
DATA: BEGIN OF t_t005 OCCURS 0,
        land1 TYPE t005-land1,
      END OF t_t005.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(6) v_text FOR FIELD P_LAND1.
PARAMETERS: p_land1  TYPE t005-land1.
SELECTION-SCREEN COMMENT 13(35) v_text1.
SELECTION-SCREEN END OF LINE.
INITIALIZATION.
  v_text = 'Country'.
  v_text1 = ' '.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_land1.
  REFRESH: t_t005.
  SELECT land1
         INTO TABLE t_t005
         FROM t005.
  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
       EXPORTING
*            DDIC_STRUCTURE   = 'T005'
            PVALKEY          = ' '
            retfield         = 'LAND1'
            dynpprog         = sy-repid
            DYNPNR           = sy-dynnr
            dynprofield      = 'P_LAND1'
            callback_program = sy-repid
            value_org        = 'S'
       TABLES
            value_tab        = t_t005
       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.
Thanks
Deepu.K

Similar Messages

  • One search help for multiple select-options in webdynpro abap

    Hi,
    I need a way to use one search help for multiple select-options fields. My scenario is :
    I have a table for keeping different organizational units' values of different systems. I have pasted some sample data from this table at the end of this mail. On the screen I want to have 1 select-options filed for werks, and 1 select-options filed for vkorg. (In fact I will have more org. unit fields...) In the beginning of my application the user will select sid.
    If the user selects ADS as SID, when he opens search-help for the first org. unit (werks), he will see the records with SID: ADS, VARBL = $WERKS, LANGU = SY-LANGU.
    If the user selects AGT as SID, when he opens search-help for the second org. unit (vkorg), he will see the records with SID: AGT, VARBL = $VKORG, LANGU = SY-LANGU.
    I have created a search-help taking SIDD, VARBL and LANGU as import parameters; used field mapping and bound this search help to my table. I have created 2 context nodes : org1 and org2 having attributes SID, VARBL, VALUE, LANGU .
    I have assigned related SID, VARBL and Langu values to these attributes at runtime as I needed. That way, if I use input field and reference to the related context attributes org1-value and org2-value2 accordingly, search help works well as I want.
    However, when I use select-options field , I can not bind the field to the context data. I can give reference only to ddic structure. Is there any way to reference to a context attribute? I searched for this in SDN, but could find nothing.
    I think I won't be able to use this way. What do you say?
    As I read from forums maybe using OVS help will be suitable for me. But I have to use one search-help for all select-options fields. Do you know how I can determine the active select-options field and pass its name (for instance "werks" ) as parameter to this OVS search help. (Also I'll pass SID and LANGU.)
    MY TABLE (ZBYYT080) CONTENTS:
    SID     VARBL     VALUE     LANGU     VTEXT
    ADS     $WERKS     1     T     Werk 0001
    ADS     $WERKS     11     T     OZYAS  GIDA URETIM YERI
    ADS     $WERKS     5501     T     BOYA GEBZE FABRİKASI
    ADS     $WERKS     5502     T     BOYA CIGLI FABRİKASI
    AGT     $WERKS     2301     T     KAMLI DAMIZLIK
    AGT     $WERKS     9601     T     PANAR DENIZ URETIM YERI
    ADS     $VKORG     22     T     AA KİMYASALLAR
    ADS     $VKORG     8001     T     İINSAAT BOYALARI
    AGT     $VKORG     6500     T     DAMk St.Org
    AGT     $VKORG     5400     T     PANAR St.Org.
    I wish I'm clear enough..
    I will be gald if someone answers me as soon as possible...
    Thanks İn advance..
    MERAL

    Hi,
    Your ques is how to refer to a DDIC search help to refer to selection screen parameter ?
    Am I right ?
    If Yes, then in the interface IF_WD_SELECT_OPTIONS
    method ADD_SELECTION_FIELD, ADD_PARAMETER_FIELD etc
    have importing param like I_VALUE_HELP_TYPE and  I_VALUE_HELP_ID, I_VALUE_HELP_MODE, I_VALUE_HELP_STRUCTURE
    etc which may help you to link your create DDIC Search help to selection screen params.
    this is just a clue from my side. I haven't tried it myself.
    You can go to the where used list of this method and find some sample implementations which use these params.
    Hope this helps.
    Regards
    Manas Dua

  • Search help for a  select options

    Hi ,
    I need to place a search help for a select-options field on my report selection screen. It should work for a z-table field . I can create a search help for the Z-table field , but I do not know how to make it available for the select-options.
    Thank you .

    hi Krish,
    SELECT OPTIONS ... MATCHCODE OBJECT name_of_search_help.
    hope this helps
    ec

  • F4 Help for the selection screen field

    Hi Gurus,
    I have to display F4 help for a selection screen field. i am using following code:
        CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
             EXPORTING
                  retfield        = 'CODE'
                  dynpprog        = lw_repid
                  dynpnr          = sy-dynnr
                  VALUE_ORG       = 'S'
             TABLES
                  value_tab       = gi_text
                 field_tab       = li_fields_tab
                  return_tab      = pi_return_tab
             EXCEPTIONS
                  parameter_error = 1
                  no_values_found = 2
                  OTHERS          = 3.
    My internal table gi_emp has two fields CODE & TEXT. When i select 1 particular value, it returns the CODE value in the pi_return_tab table.
    But my requirement is i have to capture the corresponding TEXT value for the Returned CODE. Ex: following is the F4 help being displayed: -
    001    test
    001    test1
    but is i select code 001(First Value), i also need to capture it's corresponding Text value. In return table pi_return_tab i have only Code value.
    Please help me out.
    Note: Based on return code i can't search into the internal table gi_code, because as shown in the example, code has multiple text.

    Sachin,
    I think this is what you need. The following code will return the key and the text (OR any other columns), if both columns are in the selection screen the selected values (both columns) will also be passed to the corresponding parameters. If you only need the text to be in the return table and not passed to the selection screen then set the parameter for text with NO-DISPLAY option.
    REPORT zktest01 .
    DATA :
      BEGIN OF value_tab OCCURS 0,
        field  LIKE e070-trkorr,
        text   LIKE e07t-as4text,
      END OF value_tab.
    DATA: t_fldtab LIKE dfies OCCURS 0 WITH HEADER LINE,
          t_rettab LIKE ddshretval OCCURS 0 WITH HEADER LINE,
          t_dynmap LIKE dselc OCCURS 0 WITH HEADER LINE.
    PARAMETERS : p_field  LIKE value_tab-field,
                 p_text   LIKE value_tab-text. "NO-DISPLAY.
    INITIALIZATION.
      t_fldtab-tabname   = 'VALUE_TAB'.
      t_fldtab-fieldname = 'FIELD'.
      t_fldtab-langu     = 'E'.
      t_fldtab-position  = 1.
      t_fldtab-offset    = 0.
      t_fldtab-fieldtext = 'Key'.
      t_fldtab-reptext   = 'Key'.
      t_fldtab-leng      = 20.
      t_fldtab-intlen    = 20.
      t_fldtab-outputlen = 20.
      t_fldtab-datatype  = 'CHAR'.
      t_fldtab-inttype   = 'C'.
      t_fldtab-headlen   = 20.
      t_fldtab-keyflag   = 'X'.
      t_fldtab-lowercase = ' '.
      APPEND t_fldtab.
      t_fldtab-tabname   = 'VALUE_TAB'.
      t_fldtab-fieldname = 'TEXT'.
      t_fldtab-position  = 2.
      t_fldtab-offset    = 20.
      t_fldtab-fieldtext = 'Text'.
      t_fldtab-reptext   = 'Text'.
      t_fldtab-leng      = 60.
      t_fldtab-intlen    = 60.
      t_fldtab-outputlen = 60.
      t_fldtab-headlen   = 60.
      t_fldtab-keyflag   = ' '.
      t_fldtab-lowercase = ' '.
      APPEND t_fldtab.
      value_tab-field = '101'.
      value_tab-text = 'dddd'.
      APPEND value_tab.
      value_tab-field = '202'.
      value_tab-text = 'aaaa'.
      APPEND value_tab.
      t_dynmap-fldname = 'FIELD'.
      t_dynmap-dyfldname = 'P_FIELD'.
      APPEND t_dynmap.
      t_dynmap-fldname = 'TEXT'.
      t_dynmap-dyfldname = 'P_TEXT'.
      APPEND t_dynmap.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_field.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                retfield        = 'FIELD'
                dynpprog        = 'ZKTEST01'
                dynpnr          = '1000'
                dynprofield     = 'P_FIELD'
                value_org       = 'S'
           TABLES
                field_tab       = t_fldtab
                value_tab       = value_tab
                return_tab      = t_rettab
                dynpfld_mapping = t_dynmap
           EXCEPTIONS
                parameter_error = 1
                no_values_found = 2
                OTHERS          = 3.
      IF sy-subrc EQ 0.
      ENDIF.
    START-OF-SELECTION.
    Jeffrey Satriadi

  • Search help for PERNR select options in Webdynpro

    Hi,
    I am using the method: lv_r_helper_class->add_selection_field
    and passing the value:
    i_value_help_type            = if_wd_value_help_handler=>CO_PREFIX_SEARCHHELP
    to get search help for pernr select option in the webdynpro application.
    But can anyone please tell me what value i have to pass to
    i_value_help_id              =  ??

    hi,
    pass your search help name there so that your desired search help ll come there..
    use this,
    i_value_help_type            = if_wd_value_help_handler=>CO_PREFIX_SEARCHHELP
    i_value_help_id              =  'SEARCHHELPNAME'
    if you want standard SH means comment this stmt,
    if you dont want SH means,
    use tis,
    i_value_help_type            = if_wd_value_help_handler=>CO_PREFIX_NONE
    hope this helps,
    Mathan R.

  • Can we create serach help for a selection screen field

    Can we create serach help for a selection screen field with out creating searchhelp object.
    I mean is it possible to create serchelp in the program itself with some specific values i want to give.
    E.g say we can define any internal table and fill it with values and using that into selection screen fields
    Regards
    Mave

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR paymeth.
      PERFORM PAYMENT_HELP.
    FORM PAYMENT_HELP.
      DATA: begin of DESCR_TAB occurs 0,
            DESCR LIKE BKPF-BKTXT,
            END OF DESCR_TAB.
      DATA: gd_repid like sy-repid.
      gd_repid = sy-repid.
      DESCR_TAB-DESCR = 'aaaaa'.
      append DESCR_TAB.
      DESCR_TAB-DESCR = 'bbbbb'.
      append DESCR_TAB.
      DESCR_TAB-DESCR = 'ccccc'.
      append DESCR_TAB.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                retfield    = 'DESCR'
                DYNPPROG    = gd_repid
                DYNPNR      = '1000'
                DYNPROFIELD = 'paymeth'
                VALUE_ORG   = 'S'
                DISPLAY     = ' '
           TABLES
                value_tab   = DESCR_TAB.
    endform.
    Svetlin

  • F4  Help for a select-option

    Hi,
      I have a requirement where i have to insert a F4 help for setheader-rvalue(business sector).
      I have declared a select option for rvalue on the selection screen.
      I have written a code like
    *data declaration
    DATA: w_setnr  LIKE rgsbs-setnr.
    CONSTANTS: c_rvalue    LIKE rgsmh-field    VALUE 'RVALUE',
               c_table     LIKE rgsmh-table VALUE 'SETHEADER'.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_rvalue-low.
      PERFORM search_group_value USING s_rvalue-low c_rvalue.
    form search_group_value using group
                                     fieldname.
    DATA: w_searchfield LIKE RGSBS-searchfld.
    Display group possible entries.
      w_searchfield = group.
      CALL FUNCTION 'K_GROUP_SELECT'
           EXPORTING
                field_name    = fieldname
                searchfld     = w_searchfield
                table         = c_table
           IMPORTING
                set_name      = w_setnr
           EXCEPTIONS
                no_set_picked = 1
                OTHERS        = 2.
      group = w_setnr(24).
    endform.                    " search_group_value
    when i go to the selection screen when i press f4 on rvalue it displays as * instead of the value from setheader table.
      Kindly let me know how to use FM: 'K_GROUP_SELECT'.
    Regards
    Yamini.A

    Hi,
    See this code............
    at selection-screen on value-request for s_pernr-low.
    perform get_values changing s_pernr-low.
    at selection-screen on value-request for s_pernr-high.
    perform get_values changing s_pernr-high.
    *&      Form  get_values
          text
         -->P_S_PERNR_LOW  text
    FORM get_values CHANGING    P_S_PERNR.
      refresh t_itab.
      clear t_return.
      select pernr  from zfdmr_records into table t_itab.
      delete adjacent duplicates from t_itab.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
      DDIC_STRUCTURE         = ' '
          RETFIELD               = 'PERNR'
      PVALKEY                = ' '
         DYNPPROG               = sy-cprog
         DYNPNR                 = sy-dynnr
         DYNPROFIELD            = 'ZFDMR_RECORDS-PERNR'
      STEPL                  = 0
      WINDOW_TITLE           =
      VALUE                  = ' '
         VALUE_ORG              = 'S'
         MULTIPLE_CHOICE        = ' '
         DISPLAY                = 'F'
      CALLBACK_PROGRAM       = ' '
      CALLBACK_FORM          = ' '
        TABLES
          VALUE_TAB              = t_itab
      FIELD_TAB              =
         RETURN_TAB             = t_return
      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.
      READ TABLE t_return INDEX 1.
      p_s_pernr = t_return-fieldval.
    ENDFORM.                    " get_values
    I hope this will help you.
    If your is solved with this award points and close thread.
    Thanks.

  • Input help for a selection screen field

    I have a selection screen with field species and checkoff activity .
    For a given species('sc','sb' or 'ss') , the input values allowed for the
    check off activity must be 'SCCK' for species 'SC' ,'SBCK' for species 'SB' and so on.
    I need to provide input help for check off activity based on the value of the species.How do i do that?

    PARAMETER : p_val(10) TYPE c ,
                p_val2(10) TYPE c.
    AT SELECTION-SCREEN on p_val.
      IF p_val = 'SC'.
        p_val2 = 'SCCK'.
      ENDIF.

  • F4 help for the selection screen field designed in screen painter

    Hi all,
    I have designed selection screen in the screen painter. in that for one of the fields i have to give f4 help. for that i have writter the code in PAI event. in this event i have used the standard Function module for f4 help. but no f4 help is comming for that field. can any body suggest what i have to do.
    Thanks & Regards,
    Giri.

    Hi,
    You must use the correct event to meet ur requirement use  POV event instead of  PAI event.
    for more clarification and example program see  below the demo program
    DEMO_DYNPRO_F4_HELP_DYNPRO
    DEMO_DYNPRO_F4_HELP_MODULE
    Cheers
    fareed

  • Hi ,i want provide a input help for a Selection input field

    Hi Experts,
    I want to provide  a input help for field in selection-screen ,
    this field is non primary key Custom Table(Z) selection input field .
    how we can get ,f4 help for this field.
    how to get f4 help Suppose field Link s_mtart-low,s_mtart-high,
    What are the function moduled available for this >
    Thanks in Advance.
    Regards,
    Hitu.

    Hi,
    refer to below code.
    *AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_usnam-low.
    **//To provide F4 help to S_USNAM-LOW
    PERFORM f_f4help_usnam USING 'S_USNAM-LOW'.
    *AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_usnam-high.
    **//To provide F4 help to S_USNAM-HIGH
    PERFORM f_f4help_usnam USING 'S_USNAM-HIGH'.
    *AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_wbs-low.
    **//To provide F4 help to S_WBS-LOW
    PERFORM f_f4help_wbs USING 'S_WBS-LOW'.
    *AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_wbs-high.
    **//To provide F4 help to S_WBS-HIGH
    PERFORM f_f4help_wbs USING 'S_WBS-HIGH'.
    *&      Form  f_f4help_usnam
        To provide F4 help to username
         -->P_0019   text
    *FORM f_f4help_usnam  USING    value(p_0019) TYPE any.
    **// To retrieve username from mkpf.
    SELECT bname
            FROM usr01
            INTO TABLE it_usnam.
    SORT:  it_usnam  BY usnam.
    DELETE ADJACENT DUPLICATES FROM it_usnam COMPARING usnam.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
      DDIC_STRUCTURE         = ' '
          retfield            = c_retusnam
      PVALKEY                = ' '
        dynpprog              = c_dynpprog
        dynpnr                = c_dynpnr
         dynprofield          = p_0019
      STEPL                  = 0
      WINDOW_TITLE           =
      VALUE                  = ' '
         value_org            = c_s
      MULTIPLE_CHOICE        = ' '
      DISPLAY                = ' '
      CALLBACK_PROGRAM       = ' '
      CALLBACK_FORM          = ' '
      MARK_TAB               =
      IMPORTING
      USER_RESET             =
        TABLES
          value_tab           = it_usnam
        field_tab            = it_usnam.
      return_tab             = l_it_ret
      DYNPFLD_MAPPING        =
    EXCEPTIONS
      PARAMETER_ERROR        = 1
      NO_VALUES_FOUND        = 2
      OTHERS                 = 3
    *ENDFORM.                    " f_f4help_usnam
    *&      Form  f_f4help_wbs
        To create F4 help for wbs element
         -->P_0039   text
    *FORM f_f4help_wbs  USING    value(p_0039) TYPE any.
    **// To retrive wbs element from mseg
    SELECT pspel
            FROM pspl
            INTO TABLE it_wbs.
    SORT:it_wbs   BY  wbs.
    DELETE ADJACENT DUPLICATES FROM it_wbs COMPARING wbs.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
       EXPORTING
      DDIC_STRUCTURE         = ' '
         retfield               = c_retwbs
      PVALKEY                = ' '
       dynpprog               = c_dynpprog
       dynpnr                 = c_dynpnr
        dynprofield            = p_0039
      STEPL                  = 0
      WINDOW_TITLE           =
      VALUE                  = ' '
        value_org              = c_s
      MULTIPLE_CHOICE        = ' '
      DISPLAY                = ' '
      CALLBACK_PROGRAM       = ' '
      CALLBACK_FORM          = ' '
      MARK_TAB               =
    IMPORTING
      USER_RESET             =
       TABLES
         value_tab              = it_wbs
      FIELD_TAB              =
      return_tab             = l_it_ret1
      DYNPFLD_MAPPING        =
    EXCEPTIONS
      PARAMETER_ERROR        = 1
      NO_VALUES_FOUND        = 2
      OTHERS                 = 3
    *ENDFORM.                    " f_f4help_wbs

  • F4 HELP FOR ONLY SELECTED FIELD VALUES

    Hi,
    I have to display the F4 help for the selection screen field parameter. From the ICON table, I need to display the field ID values. In the ICON table, I have lot of field values for the field ID, but I need to display only 3 field values into F4 help.(like say @07@, @08@, @0A@ only at the F4 help).
    Thanks in advance.
    Regards
    Ramesh mavilla.

    Hi,
    See the follwoing code example
    REFRESH: I_DYNPREAD .
    CLEAR : I_DYNPREAD .
    I_DYNPREAD-FIELDNAME = 'P_KAPPL'.
    APPEND I_DYNPREAD.
    CLEAR I_DYNPREAD.
    L_REPID = SY-REPID .
    L_DYNNR = '1000' .
    CALL FUNCTION 'DYNP_VALUES_READ'
    EXPORTING
    DYNAME = L_REPID
    DYNUMB = L_DYNNR
    TABLES
    DYNPFIELDS = I_DYNPREAD.
    IF SY-SUBRC EQ 0.
    READ TABLE I_DYNPREAD INDEX 1.
    P_KAPPL = I_DYNPREAD-FIELDVALUE.
    ENDIF.
    REFRESH: I_DYNPREAD .
    CLEAR : I_DYNPREAD .
    REFRESH: I_KSCHL.
    TRANSLATE P_KAPPL TO UPPER CASE.
    TRANSLATE P_KVEWE TO UPPER CASE.
    SELECT KAPPL KVEWE KSCHL VTEXT FROM T685T
    INTO CORRESPONDING FIELDS OF TABLE I_KSCHL
    WHERE KAPPL = P_KAPPL
    AND KVEWE = P_KVEWE
    AND SPRAS = 'EN'.
    IF SY-SUBRC <> 0.
    MESSAGE E001(ZZ) WITH 'No Condition Type exist for Application'.
    *p_kappl ' and Usage' p_kvewe.
    ELSE.
    REFRESH: I_FIELDS.
    I_FIELDS-TABNAME = 'T685T'.
    I_FIELDS-FIELDNAME = 'KAPPL'.
    I_FIELDS-SELECTFLAG = ''.
    APPEND I_FIELDS.
    I_FIELDS-TABNAME = 'T685T'.
    I_FIELDS-FIELDNAME = 'KVEWE'.
    I_FIELDS-SELECTFLAG = ''.
    APPEND I_FIELDS.
    I_FIELDS-TABNAME = 'T685T'.
    I_FIELDS-FIELDNAME = 'KSCHL'.
    I_FIELDS-SELECTFLAG = 'X'.
    APPEND I_FIELDS.
    I_FIELDS-TABNAME = 'T685T'.
    I_FIELDS-FIELDNAME = 'VTEXT'.
    I_FIELDS-SELECTFLAG = ' '.
    APPEND I_FIELDS.
    CLEAR: V_SEL.
    CALL FUNCTION 'HELP_VALUES_GET_NO_DD_NAME'
    EXPORTING
    CUCOL = 0
    CUROW = 0
    DISPLAY = ' '
    SELECTFIELD = 'KSCHL'
    TITEL = 'Cond Type'
    IMPORTING
    IND =
    SELECT_VALUE = V_SEL
    TABLES
    FIELDS = I_FIELDS
    FULL_TABLE = I_KSCHL
    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. "SY-SUBRC.
    And also go throw the link which it clears more about F4
    Check the link below for creating collective search help
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee86446011d189700000e8322d00/content.htm
    Check the ink below for creating elementary search help
    http://help.sap.com/saphelp_erp2005/helpdata/en/cf/21ee5f446011d189700000e8322d00/content.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/3d/e53642e2a3ab04e10000000a1550b0/content.htm
    <b>Reward with points if helpful.</b>
    Regards,
    Vijay

  • Authorization check for select-options field - Company code.

    Hi experts,
    i have company code field on the report selection screen and i have to validate the authorization check for BUKRS.
    How to do authorization check for a select-options field?
    Any function modules used to write the authorization check for a SELECT-OPTIONS FIELD?
    Thanks.

    >
    RNB wrote:
    > Any function modules used to write the authorization check for a SELECT-OPTIONS FIELD?
    Does it hurt to type a few lines of code? Why do you need an FM for this my friend?
    Anyways can you please tell which SAP application area (viz. FI, SD etc.) do you want to run the report?
    Suhas

  • How To... Change the Data Type for a SELECT-OPTIONS at run time.

    Hello,
    I am trying to restrict the values available for entry into a SELECT-OPTIONS at run time depending on user input.
    The logic is as follows. The user has two input fields. A PARAMETER field which has the type RSDIOBJNM and allows them to choose an InfoObject. And the user has a SELECT-OPTIONS field to allow them to select the Characteristic values for that InfoObject.
    I would like the following example to be possible:
    The user enters 0MATERIAL into the PARAMETER. When the user clicks on the SELECT-OPTIONS control code will derive a list of possible options the user can enter in the SELECT-OPTIONS. In this case only values found in the master data or at least no values greater than 18 characters.
    I have looked at the following function module SELECT_OPTIONS_RESTRICT and this do not appear to be helpful as they only restrict on the signs allowed for the values (unless I misunderstand, it is a complex function module!).
    The code I have so far is (thus the user enters a InfoObject into p_char1 and the select options so_char1 should only accept active values of that InfoObject):
    declaration of variables for user interface
      DATA c_char(32) TYPE c.
    declaration of count variable
      DATA i_count TYPE i.
    declaration of user interface
      SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME TITLE text-001.
        PARAMETERS: p_ipack TYPE RSLOGDPID.
      SELECTION-SCREEN END OF BLOCK a1.
      SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-002.
        PARAMETERS: p_char1 TYPE RSDIOBJNM.
        SELECT-OPTIONS: so_char1  for c_char NO INTERVALS.
        PARAMETERS: p_char2 TYPE RSDIOBJNM.
        SELECT-OPTIONS: so_char2  for c_char NO INTERVALS.
        PARAMETERS: p_char3 TYPE RSDIOBJNM.
        SELECT-OPTIONS: so_char3  for c_char NO INTERVALS.
      SELECTION-SCREEN END OF BLOCK b1.
    Is what I am trying to do possible???
    Thanks for any help. Ross.

    You really want to restrict possible values of a select-option based on another field, not change the length of type of the select-option field, right?
    Here is what you do:  Code a custom F4 value help for the select-option at event AT SELECTION-SCREEN ON VALUE REQUEST FOR..  The first thing you do here is read the value of the parameter field (p_ipack in your example).  You can use function module DYNP_VALUES_READ.  Based on this value, you can propose values for the select-option fields.  Note that the use can still enter whatever s(he) wishes in to the select-option field without pressing F4. In this case, you will have to code some input validations taking into account the value in the p_ipack field.

  • Disable the Select-options field in the viewcontainer

    Hi,
    I  have two select option fields(Date,Number) in a viewcontainer .
    Now i need to disable one of the select-option field(Date) in the view container based on the condition.If I give Enability for the view container then both the select options will get diasbled.Is there any way to disable only Date select-option field in the view container.
    Thanks in Advance.
    Regards,
    bala.

    Hi,
    I just tested this solution and it is working for me....Following on Thomas's suggestion...I did the following....
    I just had one select-option on my scr...but it can be done with two too...
    step1: 
    created three attributes at component level under the attribute tab ( as suggested by Thomas )
    ENABLE_PRI_SELECTOPTION type  WDY_BOOLEAN 
    M_HANDLER type ref to     IF_WD_SELECT_OPTIONS
    M_WD_SELECT_OPTIONS  type ref to     IWCI_WDR_SELECT_OPTIONS
    Note: all are with public check box checked....so that all your views can see these attributes
    I created a method at componenet controller leverl:  create_select_option....in this method i have following code:
    DATA:
      lt_range_table TYPE REF TO data,
    *  rt_range_table TYPE REF TO data,
      read_only TYPE abap_bool,
      typename TYPE string.
      DATA:
      lr_componentcontroller TYPE REF TO ig_componentcontroller,
      l_ref_cmp_usage TYPE REF TO if_wd_component_usage.
    * create the used component
      l_ref_cmp_usage = wd_this->wd_cpuse_select_options( ).
      IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.
        l_ref_cmp_usage->create_component( ).
      ENDIF.
    * get a pointer to the interface controller of the select options
    *component
      wd_this->m_wd_select_options = wd_this->wd_cpifc_select_options( ).
    * init the select screen
      wd_this->m_handler = wd_this->m_wd_select_options->init_selection_screen( ).
    * create a range table that consists of this new data element
      lt_range_table = wd_this->m_handler->create_range_table(
      i_typename = 'PERSNO' ).
    * add a new field to the selection
      wd_this->m_handler->add_selection_field(
      i_id = 'PERSNO'
    I_VALUE_HELP_TYPE = if_wd_value_help_handler=>CO_PREFIX_SEARCHHELP
    I_VALUE_HELP_ID = 'ZHELP_WDA_PERNR'
    I_NO_INTERVALS = abap_true
      it_result = lt_range_table
      i_read_only = wd_this->ENABLE_PRI_SELECTOPTION ).   <-----pls see here how i am controlling the read only property
    I assume you know this much...already....but i am just putting everything down....
    step2:
    in my view where i want to display the select-options....i added this code under my wddoinit method
    DATA lo_componentcontroller TYPE REF TO ig_componentcontroller .
    lo_componentcontroller =   wd_this->get_componentcontroller_ctr( ).
    lo_componentcontroller->ENABLE_PRI_SELECTOPTION = abap_false.    <--pls see initially we want this field to be open
      lo_componentcontroller->create_select_option(
    step3: 
    i did not have much logic to control the select option field so i added a button which if user presses the field become disable...
    under that button action method i added the following code:
    DATA lo_componentcontroller TYPE REF TO ig_componentcontroller .
    lo_componentcontroller =   wd_this->get_componentcontroller_ctr( ).
    lo_componentcontroller->ENABLE_PRI_SELECTOPTION = abap_true.
       "<---pls see here how i am changing the global *attribute which Thomas has suggested for controlling the "read only" attibute for the select-option field....you can put this under *your "if" statement....
    "this step is very important if you do not remove the field you will get the dump...since it will try to add the same field again
    "which produces dump from system....
    lo_componentcontroller->m_handler->REMOVE_SELECTION_SCREEN_ITEM(
    i_id = 'PERSNO' ).
    "now call the same method which we created at component level to create the select_options...
    lo_componentcontroller->create_select_option(
    that is all....it works great for me.....let us know if still have any questions....
    Thanks...
    AS...

  • Freely Programed Help for select-option field

    Hi,
    how can i set freely programmed help for select option field, i mean while adding selection field what are the parameters that are important for freely programmed help.
    i have implemented iwd_value_help in one component comp1 and declared the usage of comp1 in comp2 where i actually defined the usage of select-option component.
    i used parameter   i_value_help_type = if_wd_value_help_handler=>co_prefix_appldev while adding selection field, however when i presss F4 icon, the following message is coming
    View WD_VALUE_HELP does not exist within the component WDR_SELECT_OPTIONS
    Please suggest where i am doing wrong??
    Edited by: kranthi kumar on Dec 29, 2010 6:19 PM

    >
    kranthi kumar wrote:
    > Hi,
    >
    > how can i set freely programmed help for select option field, i mean while adding selection field what are the parameters that are important for freely programmed help.
    >
    > i have implemented iwd_value_help in one component comp1 and declared the usage of comp1 in comp2 where i actually defined the usage of select-option component.
    >
    > i used parameter   i_value_help_type = if_wd_value_help_handler=>co_prefix_appldev while adding selection field, however when i presss F4 icon, the following message is coming
    >
    > View WD_VALUE_HELP does not exist within the component WDR_SELECT_OPTIONS
    >
    > Please suggest where i am doing wrong??
    >
    > Edited by: kranthi kumar on Dec 29, 2010 6:19 PM
    Hi Kranthi,
    Please help me to understand your design.
    Why would you like to create a Freely programmed value help for select-option?. why not use wdr_select_option directly ?

Maybe you are looking for