How to add user defined functions in Menu bar of a Selection Screen?

Hi,
Can anybody please suggest me that how can I add user defined functions in the menu bar of a Selection Screen?
Regards
s@k

Dear Amit,
I am referring to the standard SAP program: RIEQUI20.
On the initial screen, there are 3 tabs.
Code:
SELECTION-SCREEN BEGIN OF TABBED BLOCK tab FOR 25 LINES.
SELECTION-SCREEN TAB (20) tab1 USER-COMMAND ucomm1
                     DEFAULT SCREEN 001.
SELECTION-SCREEN TAB (20) tab2 USER-COMMAND ucomm2
                     DEFAULT SCREEN 002.
SELECTION-SCREEN TAB (20) tab3 USER-COMMAND ucomm2
                     DEFAULT SCREEN 003.
SELECTION-SCREEN END OF BLOCK tab.
AT SELECTION-SCREEN.
  CLEAR gv_okcode.
  gv_okcode = sy-ucomm.
  CLEAR sy-ucomm.
  CASE gv_okcode.
    WHEN 'IH08'.
      CALL TRANSACTION 'IH08'. "Equipment Selection
    WHEN 'IW29'.
      CALL TRANSACTION 'IW29'. "Notification Selection
    WHEN 'IW39'.
      CALL TRANSACTION 'IW39'. "Order List Selection
    WHEN OTHERS.
  ENDCASE.
*   Check date:                                         
  IF NOT datuv IS INITIAL                            
  AND NOT datub IS INITIAL.                         
    IF datub >= datuv.                              
    ELSE.                                           
      MESSAGE e884(ih) WITH datuv datub.            
    ENDIF.                                           
  ENDIF.                                             
  IF variant IS INITIAL AND
     dy_vari IS INITIAL.
    PERFORM get_default_variant_f14 USING variant.
  ENDIF.
  PERFORM variant_existence_f14 USING variant.
  IF datuv IS INITIAL.
    datuv = sy-datum.
  ENDIF.
  IF datub IS INITIAL.
    datub = sy-datum.
  ENDIF.
  IF sy-ucomm = 'ADDR'.
    PERFORM adress_sel_f01 USING 'EQUIR'.
  ENDIF.
  PERFORM check_parnr_f76.
*  AT SELECTION SCREEN OUTPUT
AT SELECTION-SCREEN OUTPUT.
  STATICS: l_slset TYPE sy-slset.
*--- Set initial variant
  PERFORM variant_init_f14 USING 'INST' 'INST' 'INST' 'RIEQUI20'.
  IF variant IS INITIAL AND
     dy_vari IS INITIAL AND
    gv_variant_flag IS INITIAL.
    PERFORM get_default_variant_f14 USING variant.
    gv_variant_flag = 'X'.
  ENDIF.
*--- Set Icon for adress-button
  PERFORM set_icon_f01 USING dy_adrfl ad_icon text-ad0 text-ad1.
*--- get classification data from select option
*--- (if new variant or if called via submit or F3)
  IF ( l_slset NE sy-slset ) OR
     ( s_comw[] IS NOT INITIAL AND gt_clsd_comw[] IS INITIAL ).
    l_slset = sy-slset.
    gv_class_old = dy_class.
    gv_klart_old = dy_klart.
    PERFORM copy_selopt_comw_f79 TABLES gt_clsd_comw s_comw.
    PERFORM class_search_init_f77 USING 'EQUI'.
  ENDIF.
*--- set Icon for classification
  LOOP AT gt_clsd_comw TRANSPORTING NO FIELDS          
                      WHERE atcod > '0'.               
    EXIT.                                              
  ENDLOOP.                                             
  IF sy-subrc IS INITIAL.
    gv_comw_flag = 'X'.
  ELSE.
    CLEAR gv_comw_flag.
  ENDIF.
  PERFORM set_icon_f01 USING gv_comw_flag cl_icon text-cl0 text-cl1.
  CALL METHOD cl_uid_cust=>selection_screen_output.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR variant.
  PERFORM variant_inputhelp_f14 USING variant 'RIEQUI20'.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR dy_parnr.
  PERFORM f4_for_parnr_f76.
AT SELECTION-SCREEN ON BLOCK clse.
  IF dy_class NE gv_class_old
    OR dy_klart NE gv_klart_old.
    gv_class_old = dy_class.
    gv_klart_old = dy_klart.
    CLEAR gv_comw_flag.
    REFRESH gt_clsd_comw.
    REFRESH s_comw.
  ENDIF.
  PERFORM class_exist_f77 USING dy_klart dy_class 'DY_CLASS'.
  IF sy-ucomm = 'COMW'.
    CALL FUNCTION 'IHCLSD_VALUATION_POPUP'
      EXPORTING
        i_klart               = dy_klart
        i_class               = dy_class
        i_language            = sy-langu
        i_key_date            = sy-datum
        i_also_subclasses     = dy_subcl
      TABLES
        ct_comw               = gt_clsd_comw
      EXCEPTIONS
        exc_no_class          = 1
        exc_klart_not_allowed = 2.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
*--- fill classification data in select option
    PERFORM copy_comw_selopt_f79 TABLES gt_clsd_comw s_comw.
  ENDIF.
  IF sy-ucomm = 'ONLI'.
    sscrfields-ucomm = sy-ucomm.
  ENDIF.
Regards
s@k
Edited by: siemens.a.k on Jan 15, 2010 10:10 AM

Similar Messages

  • How to add user defined tab in the Header level of T-Code O4NM?

    How to add user defined tab in the Header level of  T-Code O4NM?
    I tried with BADI but I cant able to find any BADI for it and also searched for screen exit too..

    Can you check the user exits,
    OIJNOM_N and OIJTKT_N
    Cheers,
    Balaji

  • How to create user defined functions in xi.

    how to create user defined functions in xi.
    can anyone give info with screen shots.

    Hi,
    Please follow the  steps mentioned in below link
    http://help.sap.com/saphelp_nw04/helpdata/en/f8/2857cbc374da48993c8eb7d3c8c87a/frameset.htm
    also refer below links to know more about UDF
    udf
    Thanks
    Swarup
    Edited by: Swarup Sawant on Mar 3, 2008 3:59 PM

  • How to Developed user defined functions to call function modules in SAP R/3

    •     how to Develope user defined functions to call function modules in SAP R/3 system

    Hello Raja,
    Go through this V.imp Link...
    http://download.oracle.com/docs/cd/B10464_05/integrate.904/b10408/rfc.htm
    Steps to crate FM..
    Follow these steps..
    Go to the T: code SE37
    First You Create Function Group
    On That u specify
    Function Group Name..............
    Short Text..............................
    save...
    Go to SE 37
    Specify the Function Module Name: Eg: Z_Bapi_Materialmaster
    Short Text.......
    Save...
    Next Go to Attributes..
    Select Radio button : Remote enabled model
    Go to Parameters..
    Click Import...
    Give Parameter Type Associate type S.t
    next Click Export...
    Give Parameter Type Associate type S.t
    Next Click Tables Button..
    Specify tables..
    Next click source code button..
    Write Source code here..
    Eg : Select statements Etc..
    Finally we should be select the Radio button Enable remorely
    https://www.sdn.sap.com/irj/sdn/wiki?path=/pages/viewpage.action?pageId=39728
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/bapi%2bstep%2bby%2bstep
    Re: User Defined Functions Tutorials
    Hope this information is useful to you..
    Thanks ,
    Satya Kumar..

  • How 2 Develope user defined functions to call function modules in R/3 syst

    How to Develope user defined functions to call function modules in SAP R/3 system....in xi

    HIi,
    If those function modules are RFC enabled then we can call those function module from user defined functions. Please see below link
    /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
    Reward points if helpful.
    Thanks,
    Vijay Kumar T,

  • How to add keyboard control key to menu bar as shown

    how to add keyboard control key to menu bar as shown bellow
    Please help

    why, nobody can give me any suggestion?!
    I want to know how to get the specific Control from the Line which does not has this kind of Control. Currently, I met this problem -- the line does not support EnumControl.Type.REVERB, however, I want to exert the reverb control to the line.
    please. thank you very much!

  • How to Add a parameter of currency exchange rate in the selection screen

    Dear Friends,
    How to Add a parameter of currency exchange rate in the selection screen with format (9999.99999). wich field i need to take.
    Thanks,
    Sridhar

    TCURR-UKURS.
    ~Suresh

  • How to migrate User Define Function to another mapping in other namespace

    Hi Everybody
    I have define many User Define Functions in mapping
    How can i use them in other mapping
    Thank you in advance

    Hi,
    I tried to explain the steps.
    1. Take the JAVA code of your User-Defined Functions
    2. Go to a JAVA editor (e.g NWDS, Eclipse, etc...)
    2.1. create a Java project
    2.2. create a Java class
    2.3. inside your Java class, put each JAVA code of your User-Defined Function inside a Method
    2.4. Export your Java class to a JAR file (e.g my_tools.jar)
    3. Go to IR
    3.1 create an Imported Archive (IA) and upload your JAR file.
    3.2 in this IA, you see your Java class which contains all your methods.
    4. inside your mapping,
    4.1 create a User-Defined Function <u>and import</u> your class
    4.2 use your method.
    So, you define in only one place your code (thanks to a IA) and you will be able to use it inside several mappings.
    I hope I don't forget steps...
    Advantage: if tomorrow, you want to create a new function, just add a new method to your Java class and re-import your JAR file
    Oh, I missed: your IA must be created inside a specific Software Component (SC__TOOLS) and this one must be linked with the others by a "Usage dependency", else your IA will be recognise only in one Software Component (and maybe only in one namespace)
    Mickael

  • How to call User defined functions in Mathscript Node ?

    Hi,
    I have created a user defined function and saved it to Search path of Labview as an M file. If I run my program in Math script window, the function is recognized and the program works properly. If I do the same with MathScript node , the user defined functions are not identified.
    Kindly help me with this problem. Thanks in advance
    Cheers
    Lenord Melvix

    This page may help:
    http://zone.ni.com/reference/en-XX/help/373123C-01/lvtextmathmain/caveats_recommendations_ms_search_...
    Kevin C.

  • How to add user defined F4 help for s LDB field?

    Hi,
         I am using PNPCE Logical Database for a program using the standard HR report category. But I want to have my own restricted F4 help for a particular field.Is it possible to override the standard LDB search help? I tried doing it , but I am getting a syntax error .
    Mahesh

    Hi Mahesh,
    I don't think so that you can attach a User defined F4 help in a standard LDB.
    What I would suggest is that you copy the standard LDB into Z LDB from SE80.
    Then go to the selection screen of the LDB and either try and attach a F4 help by writing the code in it OR
    Hide the field where you want to attach the F4 help with the keyword Exclude(you will have to check on the exact keyword).
    And add the same field in the selection screen of the report and define the F4 help.
    Do not forget to attach the Z LDB to your report by going to the Attributes.
    Please refer to the code below for attaching a generic F4 help to a select options:
    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.
    In case you have any further clarifications,do let me know.
    Regards,
    Puneet Jhari.

  • In XML Gateway Responsibility How to add User defined Trading Partner type.

    Hi,
    We have a requirements to add user defind Trading Partner Type apart from the default trading partner type.
    How to do this? If any one know , kinldy let me explain it
    Thanks

    I looked it up in the mean time ...
    The docs state that you only can use simple data type or java.util.list or AttributeList (which is a wrapper for any viewRow). So I guess you have to somehow flatten your complex data type or create a custom VO which holds it.
    http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/bcextservices.htm#CJAEHFJD
    Scroll down to 11.2.3
    Timo

  • How to add User defined return type in service interface of AppModule

    HI All,
    I am creating service interface using AppModule. Added custom method with Java primitives and working fine. Now i want to added custom method with return type is EMP object means user defined object. How can i do so?
    Thanks in advance.

    I looked it up in the mean time ...
    The docs state that you only can use simple data type or java.util.list or AttributeList (which is a wrapper for any viewRow). So I guess you have to somehow flatten your complex data type or create a custom VO which holds it.
    http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/bcextservices.htm#CJAEHFJD
    Scroll down to 11.2.3
    Timo

  • How to call User Define Function

    Hi,
    I need a help....
    In my Project I have Login.jspx page in which there is a textbox Username.
    I have second success.jspx page which has its success.java bean class in which i have define a method "display()".Now i want to cal display() in my success.jspx page.
    can anyone help me out what is the way to do this.
    Thanks in advance...
    Thanks,
    Nehal

    Hi Abhijit,
    Sure i can give you more details on the same:
    I have written a displayVal method in ForgotPassword.java bean class
    public String displayVal() {    
    String txtVal = AdfFacesContext.getCurrentInstance().getPageFlowScope().get("testValue").toString();
    nameID.setValue(txtVal);
    return txtVal;
    Now in ForgotPassword.jspx page i have one input text box named "nameID" in which i want to display some value from the user-define method called displayVal()
    now i am trying to call my user-define method in my ForgotPassword.jspx page:
    <af:inputText label="Name"
    binding="#{backingBeanScope.backing_FrgtPwd.nameID}"
    id="nameID"
    value="#{backingBeanScope.backing_FrgtPwd.displayVal}">
    </af:inputText>
    but is is showing an error that: backingBeanScope.backing_FrgtPwd.displayVal is not a property as this a method.
    So now my query is : Is there any way by which i can call my user-define method on the jspx page from the bean class of the same page.

  • How can I deactivate a function from menu bar in a transaction

    Hi Gurus
    How to deactivate a menu function "Do not execute" which is available in menu bar while creating an order. I want to remove that function from IW32 transaction. Please help.

    Hi,
    The Purpose of transaction variants is to hide fields, menu functions, screens, to supply individual fields with default values or to change the ready for input status of one or more fields.
    Using transaction variant, you can tailor screens to meet your required business process, and it can be used to accomplish security task, not directly supported by SAP’s security concepts.
    A Transaction variant consist of a number of screen variants, customized to meet your requirements, Transaction variant only alters the layout of the screen. The Business processes delivered by SAP retain their integrity.
    Check the below link for more details.
    [http://www.mortenhjorthnielsen.dk/Security/transactionvariants.htm|http://www.mortenhjorthnielsen.dk/Security/transactionvariants.htm]
    You can deactivate the menus for the wntire system by creating
    or changing records in the global settings table SSM_CUST in the
    View maintenance transaction SM30.
    - To globally deactivate the SAP menu, enter a record
    "SAP_MENU_OFF" "YES" in upper-case letters.
    - To globally deactivate all user menus enter a record
    "ALL_USER_MENUS_OFF" "YES" in upper-case letters.
    Please also check the below link.
    [http://help.sap.com/saphelp_nw04/helpdata/en/83/7a18cbde6e11d195460000e82de14a/content.htm|http://help.sap.com/saphelp_nw04/helpdata/en/83/7a18cbde6e11d195460000e82de14a/content.htm]
    Hope this helps. Reward points for all helpful answers.
    Thanks,
    Balaji
    Edited by: Balaji Ganapathiraman on Mar 14, 2008 11:19 AM

  • How to add default value to the Exclude single value in selection screen..

    Hi Experts,
    i have searched in sdn, but not able to get proper results,
    in my report i have a selection screen, in that there is a Select-option like status, for this status i need to exclude '02'
    for this i need to add the default value under exclude singale values option, not in lower and upper limit.
    can anyone help me...
    Regards,
    Sudha.
    Moderator message: please search for available information/documentation before asking, don't just claim you did.
    Edited by: Thomas Zloch on Oct 27, 2010 2:50 PM

    Hi,
    you can use the function module SELECT_OPTIONS_RESTRICT .
    This function module simplifies the handling of SELECT-OPTIONS on the selection screen by restricting possible selection options and signs.
    By calling this function module, you can restrict the number of selectio options available for the chosen selection field. You can also disable the function allowing users to enter values to be excluded from the selection (SIGN = 'E').
    Regards,
    S.Velsankar

Maybe you are looking for