What is a function Code?

Can anybody tell me What is a Function Code while creating Application tool bar  with SET PF-STATUS?
How many function codes are there?
What are they?
if I want to associate a new functionality with a new ICON....can I add custom fuction code or there are only SAP function codes available.....?

Hi
Function code is the CODE assigned to a particular through which the SAP recognises its action.
It is something like OK code or Sy-UCOMM.
see the doc of OK CODE
In your ABAP programs, you should work with the OK_CODE field instead of SY-UCOMM. There are two reasons for this: Firstly, the ABAP program has full control over fields declared within it, and secondly, you should never change the value of an ABAP system field. However, you should also always initialize the OK_CODE field in an ABAP program for the following reason:
In the same way that the OK_CODE field in the ABAP program and the system field SY-UCOMM receive the contents of the corresponding screen fields in the PAI event, their contents are also assigned to the OK_CODE screen field and system field SYST-UCOMM in the PBO event. Therefore, you must clear the OK_CODE field in the ABAP program to ensure that the function code of a screen is not already filled in the PBO event with an unwanted value. This is particularly important when the next PAI event can be triggered with an empty function code (for example, using ENTER). Empty function codes do not affect SY-UCOMM or the OK_CODE field, and consequently, the old field contents are transported.
In your application programs, the first step in PAI processing should be to save the function code in an auxiliary variable and then initialize the OK_CODE field. You can then read the function code from the auxiliary variable (for example, using a CASE structure), and control the program flow from there.
The OK_CODE field can have a different name on each screen. However, common practice is to use the same name for the field on each screen of an ABAP program. You then only need one field in the ABAP program, with the same name, into which the function code is placed, and from which you can read it.
Refer the link:
http://help.sap.com/saphelp_47x200/helpdata/en/d1/801e61454211d189710000e8322d00/frameset.htm
regards
Anji

Similar Messages

  • What is the function code for execute

    Hi,
    What is the function code for execute.
    I am using set pf-status under initialization.
    Thanks.
    Sai.

    Hi,
    If your adding a execute in pf-status then we can give the function code for execute as 'EXEC' - F8.
    Nyways it automatically comes no need to explicitly add in pf-status. The standard function code is 'ONLI'
    just we need to check the sy-ucomm value and perform what you want.
    i.e if sy-ucomm = 'EXEC'.
    endif.
    hope this help you.
    plz reward if useful.
    thanks,
    dhanashri.
    Edited by: Dhanashri Pawar on Jun 26, 2008 11:43 AM

  • What is the function code of create new session?

    what is the function code of create new session?
    thanks...

    Hi
    Please put a "/n" (to open a new session after killing the current session)
    or "/o" (to open a new session without killing the current session)
    or "/i" (to end the current session) before the below T Codes as per your requirement...
    <u><b>For more Tcodes check the following</b></u>
    =>smartforms - Smartforms (SAP Form Builder to Create and Adjust Forms)
    =>cmod - Enhancements, User Exits (Project Tool to coordinate changes into projects for the purpose of activating all user exits for a particular project)
    =>sale - ALE Customizing
    =>bale - Distribution Administration (ALE)
    =>wedi - IDOC Type and EDI Basis
    =>shdb - BDC (Transaction Recorder)
    =>lsmw - LSMW
    =>bapi - BAPI
    =>spau - Display Modified DE Objects
    =>spdd - Display Modified DDIC Objects
    =>sara - central idoc archiving
    =>stms - Transport Management System
    =>wedi - IDOC Type and EDI Basis (IDOC Configuration)
    =>bd21 - Analyze change pointers - create IDOC from change pointer
    =>bd10 - Send Material Master
    =>bd12 - Send Customer Master
    =>bd14 - Send Vendor Master
    =>bd50 - Activate Change Pointer for Message Type
    =>bd55 - Conversion rule user exit (Link conversion rule user exit to the different system \ partner combinations)
    =>bd54 - Maintain Logical Systems
    =>bd71 - Distribute Customer Model
    =>bd87 - Process Inbound IDOCs
    =>bd88 - Process Outbound IDOCs
    =>bdm2 - Cross-system IDOC Reporting
    =>bdm7 - ALE Audit - statistical analyses
    =>bdm8 - ALE Audit - sending confirmations
    =>bd61 - Activate Change Pointer generally
    =>bmv0 - Direct Input Data Transfer Administration
    =>rz04 - Operation Mode
    =>rz12 - RFC Server Group Maintenance
    =>sar3 - Archiving object customizing
    =>s001 - SAPoffice Inbox
    =>s010 - Standards Texts (SAP Script)
    =>se01 - Transport Organizer (Extended View - Performing and managing the transport of development object across different systems)
    =>se09 - Transport (Workbench) Organizer (Controlling and keeping track of Development work and Development Objects)
    =>se24 - Class Builder (BAPI)
    =>se30 - Runtime Analysis
    =>se36 - LDB
    =>se37 - Function Builder
    =>se38 - ABAP Editor (to modify ABAP programs)
    =>se39 - Split-Screen-Editor
    =>se11 - ABAP Dictionary
    =>se16 - Data Browser (Table contents display)
    =>se41 - Menu Painter
    =>se51 - Screen Painter
    =>se71 - SAPScript Forms
    =>se73 - SAPScript Font Maintenance
    =>se75 - Graphic Objects and Graphic IDs Sapscript Settings
    =>se78 - Administration of Form Graphics (Import Graphics into SAP System)
    =>se80 - Object Navigator
    =>se84 - ABAP Repository Information (search for SAP objects)
    =>se91 - Message Maintenance
    =>se93 - Maintain T codes
    =>su01 - User Maintenance (Security)
    =>su02 - Maintain Authorization Profiles
    =>su03 - Maintain Authorizations
    =>slg1 - Evaluate Application Log
    =>sm12 - Lock Entries
    =>sm21 - System Logs
    =>sm36 - Background Job Scheduling
    =>sm37 - Background Job Monitoring (display batch jobs)
    =>sm31 - Table Maintenance
    =>sm30 - Calling View Maintenance
    =>sm35 - Batch Input Monitoring (Error Logs)
    =>sm50 - Process Overview
    =>sm58 - Transactional RFC Monitoring
    =>sm59 - Maintain RFC Destinations (Define RFC Configuration)
    =>snro - Number Range Objects (for IDOCs)
    =>scc4 - Client Overview (Create, Quick Delete, Modify)
    =>spro - Customizing, Execute Project
    =>sp01 - Spool Administration
    =>sq01 - Maintain SAP Queries
    =>st02 - Buffer Analysis (Status Overview)
    =>st03 - Workflow Analysis
    =>st05 - Performance SQL trace (Tracking the Database calls from the System Transaction and Programs)
    =>st22 - ABAP Dump Analysis, check logical runtime errors
    =>/h - ABAP Debugger
    =>we02 - Display IDOC
    =>we05 - IDOC lists
    =>we07 - IDOC statistics
    =>we12 - Inbound processing of outbound file - convert outbound to inbound file
    =>we14 - Process (dispatch) IDOCs through Port - RSEOUT00
    =>we15 - Outbound IDOC from NAST - message control
    =>we16 - Inbound File
    =>we18 - Generate status file
    =>we19 - Test tool
    =>we20 - Add new Message Type to Partner Profile
    =>we21 - Maintain Port Definition
    =>we30 - IDOC Type development
    =>we31 - IDOC Segment development
    =>we41 - Process Code Outbound
    =>we42 - Process Code Inbound
    =>we46 - IDoc Administration
    =>we47 - Status Code Maintenance
    =>we57 - Assign function module to logical message and IDoc type
    =>we63 - IDOC Type for Parser Output
    =>we82 - Assign IDOC to Message Type
    =>we60 - IDOC Documentation - IDOC Types
    =>we61 - IDOC Documentation - IDOC Record Types
    =>we81 - Create new IDOC Message Types
    =>we82 - Assign IDOC to Message Type
    =>pa20 - Display HR Master Data
    =>pa30 - Maintain HR Master Data
    =>bd59 - Create and assign Filter Object Type for Message Type
    =>bd64 - Maintenance of ALE or any other Distribution Model
    =>db02 - Storage Management and Database Performance
    =>db14 - Database monitor
    =>se18 - BADI definitions
    =>se19 - BADI implementations
    =>fd03 - Accounts Receivable Master Data (Display Customer in Accounting)
    =>me22 - Change Purchase Order
    =>me21 - Create Purchase Order
    =>me51 - Create Purchase Requisition
    <u><b>Official source of SAP T Codes -</b></u>Go to se11 or se16 and view table entries for
    TSTC and TSTCT. This will give you the Transaction List.
    Reward all helpfull answers
    Regards
    Pavan

  • What does these function codes refer to??

    xd01
    xk01
    me21
    mm01
    va01
    va02
    fk01
    xd02
    me23
    mb03
    object browser  whats the t code for this?
    vd01
    customer master creation  tcode??
    vendor master creation  tcode??

    http://www.easymarketplace.de/transactions-a-e.php
    check this link dude, every transaction from A to Z, dont forget to mark helpful answers
    XK01   SAPMF02K       Create vendor (centrally)
    XD01   SAPMF02D       Create Customer (Centrally)
    XD02   SAPMF02D       Change Customer (Centrally)
    XD03   SAPMF02D       Display Customer (Centrally)
    ME21   SAPMM06E       Create Purchase Order
    MM01   SAPMMG01       Create Material
    MB03   SAPMM07M       Display Material Document
    VA01   SAPMV45A       Create Sales Order
    VA02   SAPMV45A       Change Sales Order
    FK01   SAPMF02K       Create Vendor (Accounting)

  • What is the function of FS chart of account (T. Code: OC03)

    Hi all,
    What is the function of FS chart of account (T. Code: OC03)
    How to post entries in this FS Chart of account (provide T. Code)
    Where we use this FS Chart of accounts
    Thanks and Regards,
    Kumar

    Thanks for you’re reply
    What is mean by EC CS and how to test whether FS Chart of account working or not?
    Provide path or Transaction Code
    Thanks and Regards,
    Kumar

  • What is excatly the fastpath of function codes in pf-status

    Hi friends,
    I would like to know what is excatly the fastpath of function codes in pf-status. I thought
    at first that I can choose a letter and in my program press Alt+letter and the function code
    will be executed but it did not work for me.
    Please help me.
    Regards,
    Udi.

    Hi aRs,
    Thank you for answering me.
    Is the fastpath is also for buttons or only for menus?
    Regards,
    Udi.

  • Function Code +CUS1 in GUI AEND for IW37, what is it's purpose?

    Hi All,
    We have added our own button to the IW37 "List of Order Operations" screen (the ALV grid).  In going through our upgrade, I noticed a function code of +CUS1.  Should I use this instead of adding our core modification,  and if so, how?
    Regards,
    Greg

    Greg,
    Have a look at user-exit ICSV0001 (Display of geographic location data) via TCode SMOD.
    PeteA

  • Function Code can not be selected

    Dear expert,
    Please help me, there is a uploader For MIGO, USer is uploading data using this uploader, Sometimes when user try to upload data, he gets a message on status BAR:
    Function cannot be selected, When i Double Click on that Message i Get Following Information:
    Message NO: 00255
    Diagnosis
    You entered an Inactive function code
    You can trigger this by:
    inputting directly in the OK code field
    inputting the fastpath of an inactive menu function
    choosing an inactice function key, or even by
    choosing enter, if enter has an inactive function
    In batch input a function code is included in field BDC_OKCODE of the session, as long as this function Code is not assigned to Enter
    As well as activating function codes stastically in the menu painter(Transaction SE41), they can also be deactivated dynamically using the excluding addition with PF-STATUS.
    Now one more thing i want to tell you is when user just open MIGO directly and try to enter some data and get back before saving and then Execute uploader then user can upload data without any error,
    Kindly tell me what shoul i do to remove this error permanently
    Thanks in advance
    Regards
    Shelly Malik

    There is an error in this uploader, it should not call this command which is not available on that screen. What is this uploader? If it's a custom abap program, you must debug it.

  • How to find what planning sequences/functions update data in a cube?

    Hi, Experts:
    We have a real time cube being updated by planning sequences/functions. How can I find what planning sequences/functions are updating this cube?
    Thanks,
    Jenny

    Hi,
      You can go the transaction code: rsa1 and then select "Meta data Repository" option on the left side.
    You can use Meta data repository to view the dependent objects for a infocube or any other BW object.
    In your case, you can select "Infocube" option on the left side and then go on selecting your infocube.
    Now you will get all dependent objects created on this infocube, which will include your plannign functions also.
    Refer top the following link for more details on "Meta data Repository",
    http://help.sap.com/saphelp_nw04/helpdata/en/4e/ea683c25e9096de10000000a114084/frameset.htm
    Regards,
    Balajee

  • What is a process code in ale idoc

    what is a process code in ale idoc,what is the purpose of Process code.

    Hi,
         Let me tell some scenario then u would be able to understand what a process code is-------
    In ALE ie, the data requested system is receiver and the data already presented system is sender ie, from where we are having the data,
      here in sender side----
           we need a program to tranfer required data into idoc--( idoc is just a data container )    in sender side this program logic is in a function module it is configured in we41.
             ie this will transfer the data from database to idoc----in sender side it is a process code
    and in receiver side after receiving the data we have to post it in database again program needed it is also ie the required code is also in function module it is configured in we42
    it is about receiver side f.m or simply process code
    okkkkkkkkkkkk

  • Function code for dropdown on OO ALV Grid to trigger user_command

    Hi Experts,
    I know we can add a dropdown to a column of an OO ALV Grid, set values to the dropdown list and allow the user to select some these values.
    However , what I'm not sure is that if we can *assign a function code to the dropdown * which would then trigger the event user_command ( PAI ) of the ALV class so I can handle the changes to when a particular value is selected from a dropdown list, just like we do in normal dialogs.
    Now I know that I can register the 'Enter' event and handle the data changes in data_changed event, but that is something I want to avoid the user from doing as far as possible to make the report more user friendly.
    Awaiting your valuable inputs and would really appreciate your help.
    Thanks & regards,
    Advait

    Hi Advait,
    No problem. Yes, this functionality requires changing the focus to other cell.
    I think there is other solution. As the dropdown is kind of F4 activity try this way:
    data: it_f4 type lvc_t_f4,
            wa_f4 type lvc_s_f4.
            wa_f4-FIELDNAME = 'CONNID'.
            wa_f4-REGISTER = 'X'.
            wa_f4-GETBEFORE = 'X'.
            wa_f4-CHNGEAFTER = 'X'.
            append wa_f4 to it_f4.
    "register F4 event
      CALL METHOD g_alv_grid_ref->register_f4_for_fields
        EXPORTING
          it_f4  = it_f4.
    "Once you try to pick the value HANDLE_DATA_CHANGED event will be triggered
    "Definition
         methods:
         handle_data_changed FOR EVENT data_changed OF cl_gui_alv_grid
                                  IMPORTING er_data_changed e_onf4 e_onf4_before e_onf4_after,
    "Implementation
    METHOD handle_data_changed .
        DATA: ls_mod_cells TYPE lvc_s_modi.
        IF e_onf4_before = 'X'.
          MESSAGE 'Data changed before F4' TYPE 'I'.
        ENDIF.
        IF e_onf4 = 'X'.   "if event triggered by F4
          MESSAGE 'Data changed on F4' TYPE 'I'.
        ENDIF.
        IF e_onf4_after = 'X'.
          MESSAGE 'Data changed after F4' TYPE 'I'.
        ENDIF.
       "here you know which cell was modified
        LOOP AT er_data_changed->mt_mod_cells INTO ls_mod_cells.
         "just example test case, here you can implement your code for modified cells
          IF ls_mod_cells-value >=5.
            CALL METHOD er_data_changed->add_protocol_entry
              EXPORTING
                i_msgid     = 'SABAPDOCU'
                i_msgty     = 'E'
                i_msgno     = '888'
                i_msgv1     = 'Only numbers below 5 are possibe'
                i_msgv2     = 'Please correct'
                i_fieldname = ls_mod_cells-fieldname
                i_row_id    = ls_mod_cells-row_id.
            CALL METHOD er_data_changed->modify_cell
              EXPORTING
                i_fieldname = ls_mod_cells-fieldname
                i_row_id    = ls_mod_cells-row_id
                i_value     = space.
          ENDIF.
        ENDLOOP.
      ENDMETHOD.                    "handle_data_changed
    This approach works fine for picking value from input help. Never tried it for dropdown list. You have to try it out.
    Regards
    Marcin

  • How to maintain the function code added to a custom screen in IW31

    Hello gurus,
    Does anyone know how can I maintain the function code of the push button I have in my enhancement screen in IW31 (Service Order). 'Coz it says "Requested function 'my fcode' is not available". I tried it in VFBS but don't know the screen sequence or what's the right data to put. Please help me with this. Thanks.
    Regards,
    AyemSheera

    Hi, you need add Your Function Code into the Tables T185x (x like T, F...). Call Transaction SM30 (SM31), put the Table name T185 into Table name and select the Button 'Maintain' or Customizing. The Transaction will navigate you to right position in Customizing. Next, you need to find in the Table's T185x Line with the Program Name SAPLCOIH. Then add your code into the Table's. At next, You have to maintain Your function Code in the PAI module of your Custom screen in the TA IW31.
    Sincerely Yours,
    Lubomir.

  • What is the function module which uploads excel file data into tcodes

    Hi,
    i want to upload data in cs01 tcode.
    but data is excel sheet while i am trying to use gui_upload it is not being possible for me to upload data.
    can any one tell me what is the function module?
    can any send me the steps how to uplaod data if it is in excelsheet?
    thanks & regards
    naveen
    Moderator message: FAQ, please search for available information before asking.
    locked by: Thomas Zloch on Aug 18, 2010 1:46 PM

    Hi,
       Try the below sample code u ll get an idea of uploading using 'TEXT_CONVERT_XLS_TO_SAP'.
    REPORT  zupload_excel_to_itab.
    TYPE-POOLS: truxs.
    PARAMETERS: p_file TYPE  rlgrap-filename.
    TYPES: BEGIN OF t_datatab,
          col1(30)    TYPE c,
          col2(30)    TYPE c,
          col3(30)    TYPE c,
          END OF t_datatab.
    DATA: it_datatab type standard table of t_datatab,
          wa_datatab type t_datatab.
    DATA: it_raw TYPE truxs_t_text_data.
    At selection screen
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          field_name = 'P_FILE'
        IMPORTING
          file_name  = p_file.
    *START-OF-SELECTION.
    START-OF-SELECTION.
      CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
        EXPORTING
        I_FIELD_SEPERATOR        =
          i_line_header            =  'X'
          i_tab_raw_data           =  it_raw       " WORK TABLE
          i_filename               =  p_file
        TABLES
          i_tab_converted_data     = it_datatab[]    "ACTUAL DATA
       EXCEPTIONS
          conversion_failed        = 1
          OTHERS                   = 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.
    END-OF-SELECTION.
    END-OF-SELECTION.
      LOOP AT it_datatab INTO wa_datatab.
        WRITE:/ wa_datatab-col1,
                wa_datatab-col2,
                wa_datatab-col3.
      ENDLOOP.
    Thanks & Regrads,
    Neela.

  • Re : function codes that r available in ALV o/pu2019s.

    Hi
        How or where to find the function codes that r available in ALV o/pu2019s. for ex: for EXIT the fcode is %EX, for Spreadsheet its  &XXLu2026.  these things we give in menu painter.
                And what happens to the deleted sales order data, I mean in the database level ( if it s deleted its not in database table ).
    How to solve this.
    Thanks
    Anto

    Hi,
    Go to se80 ->Give standard alv program->Double Click gui status -> You can find the Lists of Fcodes.
    Please Find the Below Link
    [Help|Re: How to find function code for buttons on toolbar in oops alv]
    Hope this will be Helpful
    Thanks
    kalyan

  • Error ! No field defined for function Code in MENU EXIT

    Hello All,
    I've created a project in CMOD for the MENU EXIT for handling one menu item in the SAP Standard Menu Bar .
    i.e  under the HELP MENU Item I've included one more sub menu item.
    I've activated the project and I'm able to se the newly added Sub-Menu Item in the activated mode.
    But when I press the newly created Sub Menu Item I'm getting a Message in the Status Bar saying :
    No field defined for the function code
    The Help of it says :
    Message no. 00125
    Diagnosis
    The function code field (OK code field) has not been defined on this screen. If the user selects an application function (not a system function), the system usually provides it in the function code field (OK code field) as well as in SY-UCOMM. This is no longer possible.
    System Response
    The system is unable to inform the application of the current function code. The application should not use field SY_COMM. This field always contains the code of the last function chosen, which is not always identical to the application-relevant code.
    Procedure
    You should always define a field for the function code on every screen. The Screen Painter always proposes such a field (OK category), you only need to assign a name and include the definition in the ABAP program.
    Please let me know what shud be done ?
    Regards,
    Deepu.K

    Don't use this scanrio ! Instead got Access Key and chamged the Std. Program.

Maybe you are looking for

  • Upgraded to 9.3, imports don't work properly

    I recently upgraded to iPhoto 9.3. Ever since, when I import photos from my iPhone or camera, it creates an Event properly but it doesn't update the Last 12 months library. I know that's not a real library but it's the one I use the most. I tried fix

  • No answers to my questions ??

    I posted a message for help a few days ago. I see that it has been viewed several times but no replies. Doesn't anyone know anything about fixing these problem(s) ??

  • 3d Words?

    I've been trying to figure out how to create 3d words in Final Cut Express 3.5. I tried Boris 3d and Title Crawl but those don't seem to do 3d words, I am probably overlooking something though. I am trying to achieve the effect in this video where th

  • Function module to create business partner

    Hi,   I want to create the business partner and iam using the 'BAPI_BUPA_FS_CREATE_FROM_DATA2'  but it is not updating the record in but000.   its very urgent, popints will be rewarded.

  • How can i resize the "loops pane" on the side of garageband?

    When ever i open garageband and open the Loops thing, it comes up but is too big in comparison to the central pane. I just want to make it smaller. Just so i can see you middle pane better, idm if i shink the panes on left or right tho Thank