User Exit and BDC for ME22N

Hello All,
A code has been written in the User exit for Tcode ME22N, Which sets the indicator on PO line item. This has been done by modifying the standard itab POT by using field symbols, because the fields to be modified are shown in display mode in the tcode ME22N and cannot be done in BDC. See the below code in user exit ZXM06U43.
DATA char(50) VALUE '(SAPLMEPO)POT[]'.
CLEAR wa_ind.
    FIELD-SYMBOLS <f1> TYPE ANY.
Move memory of internal table POT to field symbol f1.
    ASSIGN (char) TO <f1>.
Move content of f1 to internal table i_ind
    i_ind[] = <f1> .
    LOOP AT i_ind INTO wa_ind.
      IF wa_ind-pstyp = '9'.            " Service PO - item category
IF PO Line item has History per Purchasing Document as 'D'
Set indicators on, for the line item.
        CLEAR v_cnt.
        SELECT COUNT( * ) INTO v_cnt FROM ent5100
                                     WHERE ebeln = wa_ind-ebeln
                                       AND ebelp = wa_ind-ebelp
                                       AND bewtp = 'D'.
        IF sy-subrc = 0.
          wa_ind-wepos = 'X'.            " Set Goods Receipt Indicator
          wa_ind-webre = 'X'.            " Set GR-based IV Indicator
          wa_ind-lebre = 'X'.            " Set Srv-based IV Indicator
        ELSE.
*End of addition SAP-20070910104025 - SL36 - D01K963369
          wa_ind-wepos = ' '.            " Clear Goods Receipt Indicator
          wa_ind-webre = ' '.            " Clear GR-based IV Indicator
          wa_ind-lebre = ' '.            " Clear Srv-based IV Indicator
          wa_ind-xersy = ' '.            " Clear ERS Indicator
        ENDIF.                                           
        MODIFY i_ind FROM wa_ind INDEX sy-tabix.
      ENDIF.
    ENDLOOP.
    <f1> = i_ind[].
  ENDIF.          
ENDIF.
This code is in production and has been working fine.
The requirnment is now to make this indicator work for all the Purchase order before this code has been written in the Exit. For this my functional suggests that to write a separate program using BDC for PO change and jus add a period/dot  in the short text and save it. The code has been written, the user exit and the above code is getting triggrred values are updated in internal table correctly.
However the flags was not set or cleared when seen in the tcode ME22N . This works fine if the tcode me22n is run directly and not working in BDC.
I have tried with ME22 without enjoy transaction in BDC changing the POT Program to SAPMM06E. It does not work.
Please help me as why it is not uodating in the table when using BDC.
Thanks in Advance.
Senthil Kumar

Hi All,
Any luck on this??
Thanks

Similar Messages

  • User Exit and BADI for Sales Order

    Dear Experts,
                        please give me available user exits and BADI for sales order .i want to take the data from sales order at the time of sales order posting .

    Hi,
    In debugging you can find some Enhancement Spots where you can implement your code. This lets you ignore the need for access key, but its a time consuming process spotting out the exact enhancement point.
    Regards
    Karthik D

  • User exit or BADI for ME22N transaction  (please read my requirement)

    In me22n transaction when i change a PO Delivery date for any line item and click on save The field latest GR date MEPO1313-LEWED in DELIVERY tab below should display date as per my requirement i.e (delivery date + 90 days)
    What uerexit is to be used else if BADI is used pleasee provide me step by step guide as i have never used vadi
    IT is urgent. plz helopp.

    Hi
    Find the available exits with the following program:::
    *& Report  ZFINDUSEREXIT
    report  zfinduserexit.
    tables : tstc, tadir, modsapt, modact, trdir, tfdir, enlfdir.
    tables : tstct.
    data : jtab like tadir occurs 0 with header line.
    data : field1(30).
    data : v_devclass like tadir-devclass.
    parameters : p_tcode like tstc-tcode obligatory.
    select single * from tstc where tcode eq p_tcode.
    if sy-subrc eq 0.
    select single * from tadir where pgmid = 'R3TR'
    and object = 'PROG'
    and obj_name = tstc-pgmna.
    move : tadir-devclass to v_devclass.
    if sy-subrc ne 0.
    select single * from trdir where name = tstc-pgmna.
    if trdir-subc eq 'F'.
    select single * from tfdir where pname = tstc-pgmna.
    select single * from enlfdir where funcname =
    tfdir-funcname.
    select single * from tadir where pgmid = 'R3TR'
    and object = 'FUGR'
    and obj_name eq enlfdir-area.
    move : tadir-devclass to v_devclass.
    endif.
    endif.
    select * from tadir into table jtab
    where pgmid = 'R3TR'
    and object = 'SMOD'
    and devclass = v_devclass.
    select single * from tstct where sprsl eq sy-langu and
    tcode eq p_tcode.
    format color col_positive intensified off.
    write:/(19) 'Transaction Code - ',
    20(20) p_tcode,
    45(50) tstct-ttext.
    skip.
    if not jtab[] is initial.
    write:/(95) sy-uline.
    format color col_heading intensified on.
    write:/1 sy-vline,
    2 'Exit Name',
    21 sy-vline ,
    22 'Description',
    95 sy-vline.
    write:/(95) sy-uline.
    loop at jtab.
    select single * from modsapt
    where sprsl = sy-langu and
    name = jtab-obj_name.
    format color col_normal intensified off.
    write:/1 sy-vline,
    2 jtab-obj_name hotspot on,
    21 sy-vline ,
    22 modsapt-modtext,
    95 sy-vline.
    endloop.
    write:/(95) sy-uline.
    describe table jtab.
    skip.
    format color col_total intensified on.
    write:/ 'No of Exits:' , sy-tfill.
    else.
    format color col_negative intensified on.
    write:/(95) 'No User Exit exists'.
    endif.
    else.
    format color col_negative intensified on.
    write:/(95) 'Transaction Code Does Not Exist'.
    endif.
    at line-selection.
    get cursor field field1.
    check field1(4) eq 'JTAB'.
    set parameter id 'MON' field sy-lisel+1(10).
    Execute the report, give the transaction you want to find user exit, and query.
    <b>BADI</b>
    To search for a badi, go to se 24 display <b>class cl_exithandler.</b>
    double click on method get_instance, get a break point on case statement.
    execute and start the required transaction in new session.
    look for variable <b>exit_name.</b> It would show the available badi's.
    Please do reward if useful
    Regards
    Dinesh

  • User exit or BADI for ME22N

    Hi,
    I need a user exit or Badi for defaulting Plant at line item level.
    The scenario goes like this: when ever user tries to change an existing Purchase order and tries to add a new line item in it, I need to trigger USEREXIT or BADI , so that it reads the previous line Plant and updates the current line with the same plant.
    I tried with user exit MM06E005 but it didnt seem to work.
    Can any one please help me?
    I am new to BADI, so I am not sure how to find the BADI and use it. It would be great if anyone can help me i this.
    Thanks
    Ramya

    Hello
    The BAdI ME_PROCESS_PO_CUST is the right one. The method PROCESS_ITEM should be triggered whenever the user changes something in the purchase order at item level and executes any kind of function (e.g. ENTER, CHECK or SAVE).
    However, instead of overwriting the user input via the BAdI you should implement method CHECK ( Closing Check ) where you can validate the user input. If any of your validation fails you can send an error message and set CHANGING parameter CH_FAILED = 'X'. This approach is much more transparent for the user.
    NOTE: In order to "send" an error message you need to add the include mm_messages_mac to your implementing class. For an example see class CL_EXM_IM_ME_PROCESS_PO_CUST (should be available on ERP 6.0):
    METHOD if_ex_me_process_po_cust~process_item .
      DATA: ls_mepoitem TYPE mepoitem,
            ls_customer TYPE mepo_badi_exampl,
            ls_tbsg     TYPE tbsg.
      INCLUDE mm_messages_mac. "useful macros for message handling
    * here we check customers data
      ls_mepoitem = im_item->get_data( ).
      IF ls_mepoitem-loekz EQ 'D'.
    * check field badi_afnam
        IF ls_customer-badi_afnam IS INITIAL.
          mmpur_metafield mmmfd_cust_02.
          mmpur_message_forced 'W' 'ME' '083' text-003 '' '' ''.
        ENDIF.
      ENDIF.
    ENDMETHOD.                    "IF_EX_ME_PROCESS_PO_CUST~PROCESS_ITEM
    Regards
      Uwe

  • FBL3N/FBL5N/FAGLL03 user exits and badis for authorization

    Hi Gurus,
    I have tried userexit and badis for FBL3N , FBL5N and FAGLL03 for the purpose of  user want to display documents created by him and other users documents should not display . Please suggest me any user exit or badi and logic for the same.
    Moderator message: last warning, if you continue to disregard moderator messages and post the same question nevertheless, I will initiate deletion of your user ID.
    Edited by: Thomas Zloch on May 10, 2011 9:57 AM

    Hi,
    1. Execute report FBL3n and in the output goto menu SETTINGS -> SPECIAL FIELDS and add the entry BKPF-USNAM and save. Now the user who have created the entry will be available in your FBL*N report.
    2. Goto BTE event 00001650 - SAMPLE_INTERFACE_00001650, and copy the FM SAMPLE_INTERFACE_00001650 to custom FM. Inside this custom FM, first pass the value of I_POSTAB to E_POSTAB. i.e
    E_POSTAB[] = I_POSTAB[].
    Now loop E_POSTAB and check whether E_POSTAB-USNAM NE SY-UNAME, then delete that entry from the internal table E_POSTAB.
    3. Now create a custom product in FIBF transaction and check the activate checkbox. Attach the event 00001650 and custom FM to the P/S module customer part.
    Hope this will meet your requirement.
    Regards,
    Harish
    Moderator message: please be more selective when replying to questions (especially the "do my work" kind), better check the posters history before investing effort.
    Edited by: Thomas Zloch on May 10, 2011 9:59 AM

  • Need user exit or BADI for FB60

    Hi Guys!!,
    I am working on one object which   belongs to FB60 transaction. I have to give error message when user enter the ZTERM Value above 45 days for particular vendor group(MSMED).please help out.
    Richard.

    Hi,
    Foloowing are available user exits and BADIs for FB60.
    F050S001                                               FIDCMT, FIDCC1, FIDCC2: Edit user-defined IDoc segment
    F050S002                                               FIDCC1: Change IDoc/do not send
    F050S003                                               FIDCC2: Change IDoc/do not send
    F050S004                                               FIDCMT, FIDCC1, FIDCC2: Change outbound IDoc/do not send
    F050S005                                               FIDCMT, FIDCC1, FIDCC2 Inbound IDoc: Change FI document
    F050S006                                               FI Outgoing IDoc: Reset Clearing in FI Document
    F050S007                                               FIDCCH Outbound: Influence on IDoc for Document Change
    F180A001                                               Balance Sheet Adjustment
    FARC0002                                              Additional Checks for Archiving MM Vendor Master Data
    RFAVIS01                                               Customer Exit for Changing Payment Advice Segment Text
    RFEPOS00                                              Line item display: Checking of selection conditions
    RFKORIEX                                              Automatic correspondence
    SAPLF051                                              Workflow for FI (pre-capture, release for payment)
    Please find the one suitable to your need.
    Hope it will help you.
    Regards
    Natasha Garg

  • User exit or BADI for F110 transaction

    Hello, i need a user exit or badi for the F110 transaction with the objective to shoot workflow of approval of payment proposal.

    Hi Mathias,
    Welcome to SDN.
    Please check this link for sample code to find user exits and BADIs for a given transaction code.
    User Exit
    Hope this will help.
    Regards,
    Ferry Lianto

  • Help with BDC, user exits and BAPI

    Hello all:
    1) I posted a question before about BDC documentation and people sent me lot of helpful material. Thanks to all of them. I am very new to ABAP coming from VB background and wondering if someone can tell me how to practice one simple BDC program starting from scratch. What do I first need to do to get started? I have Mini WAS 6.20 test version and like to practice BDC programming.
    2) What are user exits and BADI and can anyone provide some documentation and sample code if possible.
    Thanks everyone in advance.
    --Mithun.

    Hai Mithun Dha
    Go through the following Documentation & Example Code
    Just check these links.
    Diff. between LSMW & BDC?
    BDC SESSION
    CALL TRANSACTION
    CALL DIALOG
    What is BDC or batch input
    The Batch Input is a SAP technic that allows automating the input in transactions. It lies on a BDC (Batch Data Commands) scenario.
    BDC functions:
    E BDC_OPEN_GROUP : Opens a session group
    E BDC_CLOSE_GROUP : Closes a session
    E BDC_INSERT : Insert a BDC scenario in the session
    E The ABAP statement "CALL TRANSACTION" is also called to run directly a transaction from its BDC table.
    It runs the program RSBDCSUB in order to launch automatically the session. The session management is done through the transaction code SM35.
    The object itself is maintanable through the transaction SE24.
    BDC methods:
    Method
    Description
    Parameters
    OPEN_SESSION
    Opens a session
    SUBRC (Return Code ? 0 OK)
    SESSIONNAME (Session to be created)
    CLOSE_SESSION
    Closes a session
    None
    RESET_BDCDATA
    Resets the BDC Internal Table...
    None. Normally, for internal purposec
    BDC_DYNPRO
    Handles a new screen
    PROGNAME (Name of the program)
    DYNPRONR (Screen Number)
    BDC_FIELD
    Puts a value on the screen
    FIELDNAME (Name of the field)
    FIELDVALUE (Value to be passed)
    CONSTRUCTOR
    Constructor - Initializes NO_DATA
    NODATA (No data character). The constructor is called automatically when the object is created.
    RUN_SESSION
    Launches a session with RSBDCBTC
    None
    CALL_TRANSACTION
    Calls a transaction with the current BDC Data
    MODE (Display Mode)
    UPDATE (Update Mode)
    TCODE (Transaction to be called)
    BDC_INSERT
    Inserts the BDC scenario in the session
    TCODE (Transaction to be called)
    BDC techniques used in programs:
    1) Building a BDC table and calling a transaction,
    2) Building a session and a set of BDC scenarios and keeping the session available in SM35,
    3) Building a session and lauching the transaction right after closing the session.
    BDC using Call Transaction
    BDC using Call transaction involves calling an SAP transaction in back ground from within the ABAP
    program. The process involves building an Internal BDC table containing the screen information needed to
    execute the required transaction and then passing this to the Call transaction command (See code example).
    The full procedure for creating a BDC program is as follows:
    What is the difference between batch input and call transaction in BDC?
    Session method.
    1) synchronous processing.
    2) can tranfer large amount of data.
    3) processing is slower.
    4) error log is created
    5) data is not updated until session is processed.
    Call transaction.
    1) asynchronous processing
    2) can transfer small amount of data
    3) processing is faster.
    4) errors need to be handled explicitly
    5) data is updated automatically
    BATINPUT/DIRECT INPUT
    A: Batch-inputs can not be used to fill the "delivery due list" screen because it is not a dynpro. This is a standard SAP report. A SAP report (check with "System -> Status") may be called using SUBMIT sentence with the appropriate options . It is preferred to call a report than create a Batch-input program.
    GO THROUGH THIS LINK
    http://www.guidancetech.com/people/holland/sap/abap/zzsni001.htm
    check with this code
    include bdcrecx1.
    tables : mara.
    data : begin of it_mara occurs 0,
    matnr like mara-matnr,
    mbrsh like mara-mbrsh,
    mtart like mara-mtart,
    maktx like makt-maktx,
    meins like mara-meins,
    end of it_mara.
    start-of-selection.
    perform upload_data.
    perform open_group.
    loop at it_mara.
    perform bdc_dynpro using 'SAPLMGMM' '0060'.
    perform bdc_field using 'BDC_CURSOR'
    'RMMG1-MATNR'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'RMMG1-MATNR'
    it_mara-matnr.
    perform bdc_field using 'RMMG1-MBRSH'
    it_mara-mbrsh.
    perform bdc_field using 'RMMG1-MTART'
    it_mara-mtart.
    perform bdc_dynpro using 'SAPLMGMM' '0070'.
    perform bdc_field using 'BDC_CURSOR'
    'MSICHTAUSW-DYTXT(02)'.
    perform bdc_field using 'BDC_OKCODE'
    '=ENTR'.
    perform bdc_field using 'MSICHTAUSW-KZSEL(01)'
    'X'.
    perform bdc_field using 'MSICHTAUSW-KZSEL(02)'
    'X'.
    perform bdc_dynpro using 'SAPLMGMM' '4004'.
    perform bdc_field using 'BDC_OKCODE'
    '=BU'.
    perform bdc_field using 'MAKT-MAKTX'
    it_mara-maktx.
    perform bdc_field using 'BDC_CURSOR'
    'MARA-MEINS'.
    perform bdc_field using 'MARA-MEINS'
    it_mara-meins.
    perform bdc_field using 'MARA-MTPOS_MARA'
    'NORM'.
    perform bdc_transaction using 'MM01'.
    endloop.
    perform close_group.
    *& Form upload_data
    text
    --> p1 text
    <-- p2 text
    FORM upload_data .
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    FILENAME = 'c:\mat_bdc.txt'
    FILETYPE = 'ASC'
    TABLES
    DATA_TAB = it_mara.
    IF SY-SUBRC = 0.
    SORT IT_MARA BY MATNR.
    ENDIF.
    ENDFORM. " upload_data
    flat file structure is
    PRANIT_011 CCOUP This is Testing material kg
    PRANIT_012 CCOUP This is Testing material kg
    PRANIT_013 CCOUP This is Testing material kg
    PRANIT_014 CCOUP This is Testing material kg
    PRANIT_015 CCOUP This is Testing material kg
    when your selecting views
    this particular material will belongs to Po/Sales or some other areas .
    when you select basic 1 --it gives description
    select basic 2 -- it gives tax ,amount, base unit of measurement
    BDC TO BAPI
    The steps to be followed are :
    1. Find out the relevant BAPI (BAPI_SALESORDER_CHANGE for VA02).
    [for VA01 use BAPI_SALESORDER_CREATEFROMDAT2]
    2. Create a Z program and call the BAPi (same as a Funtion module call).
    2. Now, if you see this BAPi, it has
    -> Importing structures.
    eg: SALESDOCUMENT: this will take the Sales order header data as input.
    -> Tables parameters:
    eg: ORDER_ITEM_IN: this will take the line item data as input.
    Note :
    Only specify fields that should be changed
    Select these fields by entering an X in the checkboxes
    Enter a U in the UPDATEFLAG field
    Always specify key fields when changing the data, including in the checkboxes
    The configuration is an exception here. If this needs to be changed, you need to complete it again fully.
    Maintain quantities and dates in the schedule line data
    Possible UPDATEFLAGS:
    U = change
    D = delete
    I = add
    Example
    1. Delete the whole order
    2. Delete order items
    3. Change the order
    4. Change the configuration
    Notes
    1. Minimum entry:
    You must enter the order number in the SALESDOCUMENT structure.
    You must always enter key fields for changes.
    You must always specify the update indicator in the ORDER_HEADER_INX.
    2. Commit control:
    The BAPI does not run a database Commit, which means that the application must trigger the Commit so that the changes are read to the database. To do this, use the BAPI_TRANSACTION_COMMIT BAPI.
    For further details... refer to the Function Module documentation for the BAPi.
    For User Exits
    User Exits
    Screen exits are exits that allow you to use a reserved part of the screen (A subscreen) to display or input data.
    It is determined be SAP where the sub screen will be displayed.
    The syntax is: CALL CUSTOMER-SUBSCREEN
    The screen exit is not processed untill the corresponding subscreen has been created in an enhancement project,
    and the project has been activated.
    Note:
    Function codes are only processed in the main screens flow logic
    You are not allowed to enter a name for the subscreens command field
    You are not allowed to define GUI stauses
    You are not allowed to enter a value for Next screen
    The global data of the program is not available for the subscreen. Data for the subscreen is provided by function modules.
    These function modules belongs to the same function group as the subscreen Subscreens are edited with transaction CMOD.
    When you activate a project containg subscreens, the calling screen is regenerated and the subscreen is displayed next
    time you display the calling screen
    The developer must create the subscreen and the corresponding PBO and PAI modules
    How to identify screen exits
    Look after CALL CUSTOMER-SUBSCREEN in the screenprogram of the screen you want to modify.
    Use transaction CMOD menu Utillities -> SAP enhancements to search for screen exits
    MENU EXITS
    Menu exits allow you to add your own functionallity to menus. Menu exits are implemented by SAP, and are reserved menu
    entries in the GUI interface. The developer can add his/her own text and logic for the menu.
    Function codes for menu exits all start with "+"
    Example
    We want to create a new menu item in the Office menu. The text for the menu should be "Run ZTEST", and the menu will
    run report ZTEST.
    Goto transaction SE43 Area Menu Maintenance
    In Area Menu Paramenter type 'S000' (S triple Zero)
    Select Change and ignore all the warning screens
    Expand the office menu. In the buttom of the office tree you will find a menu named "Customer function"
    Double click on the text. In the pop-up screen change the text to "Run ZTEST". Note that the trsnaction code is +C01
    Goto transaction SE93 and create transaction +C01 that calls report ZTEST.
    Now you will se the menu displayed in the office tree. If you delete transaction +C01 again, the new menu will dissapear.
    USER EXITS
    User exits (Function module exits) are exits developed by SAP. The exit is implementerd as a call to a functionmodule.
    The code for the function module is writeen by the developer. You are not writing the code directly in the function module,
    but in the include that is implemented in the function module.
    The naming standard of function modules for functionmodule exits is: EXIT_<program name><3 digit suffix>
    The call to a functionmodule exit is implemented as: CALL CUSTOMER.-FUNCTION <3 digit suffix>
    Example:
    The program for transaction VA01 Create salesorder is SAPMV45A
    If you search for CALL CUSTOMER-FUNCTION i program SAPMV45A you will find ( Among other user exits):
    CALL CUSTOMER-FUNCTION '003'
    exporting
    xvbak = vbak
    xvbuk = vbuk
    xkomk = tkomk
    importing
    lvf_subrc = lvf_subrc
    tables
    xvbfa = xvbfa
    xvbap = xvbap
    xvbup = xvbup.
    The exit calls function module EXIT_SAPMV45A_003
    2. How to find user exits
    Display the program where you are searching for and exit and search for CALL CUSTOMER-EXIT
    If you know the Exit name, go to transaction CMOD. Choose menu Utillities->SAP Enhancements.
    Enter the exit name and press enter.
    You will now come to a screen that shows the function module exits for the exit.
    3. Using Project management of SAP Enhancements
    We want to create a project to enahance trasnaction VA01
    Go to transaction CMOD
    Create a project called ZVA01
    Choose the Enhancement assign radio button and press the Change button
    In the first column enter V45A0002 Predefine sold-to party in sales document . Note that an enhancement can only
    be used i 1 project. If the enhancement is allready in use, and error message will be displayed
    Press Save
    Press Components. You can now see that enhancement uses user exit EXIT_SAPMV45A_002. Double click on the exit.
    Now the function module is displayed. Double click on include ZXVVAU04 in the function module
    Insert the following code into the include: E_KUNNR = '2155'.
    Activate the include program. Go back to CMOD and activate the project.
    Goto transaction VA01 and craete a salesorder. Note that Sold-to-party now automatically is "2155"
    Have look at this links
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCIOFFI/BCCIOFFI.pdf
    http://www.sapgenie.com/abap/ole.htm
    http://help.sap.com/saphelp_46c/helpdata/en/59/ae3f2e488f11d189490000e829fbbd/frameset.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCIOFFI/BCCIOFFI.pdf
    Creation of Field Exits
    Step by step procedure for creating Field Exits
    There are eight steps to creating a field exit:
    Step 1: Determine Data Element
    Step 2: Go To Field Exit Transaction
    Step 3: Create Field Exit
    Step 4: Create Function Module
    Step 5: Code Function Module
    Step 6: Activate Function Module
    Step 7: Assign Program/Screen
    Step 8: Activate Field Exit
    Step 1: Determine Data Element
    - Before you can begin adding the functionality for a field exit, you must know the corresponding data element.
    - An easy way to determine the data element associated to a particular screen field is to:
    Go the appropriate screen.
    Position the cursor in the appropriate field.
    Press eF1f for field-level help.
    Click on the eTechnical infof pushbutton (or press eF9f) on the help dialog box.
    On this Technical Information dialog box, the data element will be specified if the field is 'painted' from the ABAP/4 Dictionary.
    Step 2: Go To Field Exit Transaction
    - The transaction to create field exits is CMOD.
    - You can use the menu path Tools -> ABAP/4 Workbench -> Utilities -> Enhancements -> Project management.
    - From the initial screen of transaction CMOD, choose the Text enhancements -> Field exits menu path.
    - After choosing this menu path, you will be taken to the field exits screen. From here, you can create a field exit.
    NOTE : Even though you use transaction CMOD to maintain field exits, you do not need to create a project to activate field exits.
    Step 3: Create Field Exit
    - From the field exit screen of transaction CMOD, choose the Field exit -> Create menu path.
    - After choosing this menu path, a dialog box will prompt you for the appropriate data element .
    - Enter the data element name and click the eContinuef pushbutton.
    - Now, you will be able to create the function module associated to the data elementfs field exit.
    Step 4: Create Function Module
    - You will automatically be taken to the Function Library (SE37) after entering a data element name and clicking the eContinuef pushbutton.
    - In the eFunction modulef field, a function module name will be defaulted by the system based on the data element specified. This name will have the following convention:
    FIELD_EXIT_<data element>
    - You can add an identifier (an underscore followed by a single character ).
    - The first function module for a data elementfs field exit must be created without an identifier.
    - To create the function module, click on the eCreatef pushbutton, choose menu path Function module -> Create, or press eF5f.
    - After choosing to create the function module, you will get the warning: "Function module name is reserved for SAP". This message is just a warning so a developer does not accidentally create a function module in the field exit name range. By pressing eEnterf, you will be able to go ahead and create the function module.
    - Before coding the function module, you will have to specify the function modules attributes -- function group, application, and short text.
    Step 5: Code Function Module
    - From the function modulefs attributes screen, click on the eSource codef pushbutton or choose the Goto -> Function module menu path to the code of the function module.
    - Here you will add your desired functionality for the field exit.
    - Remember that field exitfs function module will have two parameters -- one importing parameter called "INPUT" and one exporting parameter called "OUTPUT". These parameters will be set up automatically by the system.
    - You must remember to assign a value to the OUTPUT field. Even if the value does not change, it must be moved from the INPUT field to the OUTPUT field.
    Step 6: Activate Function Module
    - After coding the function module, you must remember to activate it.
    - Use the Function module -> Activate menu path to activate the function module.
    - At this point, you can return to the field exit transaction.
    - You should be able to 'green arrow' back to this transaction.
    - When you return to the field exit transaction, you will see an entry for the newly created field exit.
    - At this point, the field exit is global. That is, it applies to all screens that use a particular data element. On any screen that uses the data element, the corresponding field exit function module will be triggered, once it is active.
    - Also, the field exit will not be triggered yet because it is inactive.
    Step 7: Assign Program/Screen
    - This step is only needed if you want to make a field exit local.
    - To make a field exit local, select the field exit and click on the eAssign prog./screenf pushbutton.
    - In the dialog box , indicate the appropriate program name and screen number.
    This information indicates that the field exit is local to the specified screen in the specified program.
    - In the dialog box, you determine which function module gets executed for the field exit by specifying the identifier in the eFld. Exitf field.
    - If this field is left blank, the function module triggered will be 'FIELD_EXIT_<data element>'.
    - If a single-character identifier is entered into the field, the function module triggered will be 'FIELD_EXIT_<data element>_<identifier>'.
    Step 8: Activate Field Exit
    - The field exit must be active for it to be triggered by the system.
    - Activate the field exit by choosing the Field exit -> Activate menu path.
    - After assigning the field exit to a change request, its status will change to eActivef and it will be triggered automatically on the appropriate screen(s).
    NOTE : In order to activate the field exit the profile parameter abap/fieldexit = YES must be set on all application servers
    Thanks & regards
    Sreenivasulu P

  • To find user exit and a screen exit for VD03

    hi ,
    can u please find if there is a user exit and a screen exit to add for adding a Z-field on for the customer master on the shipping tab. i.e VD03 transaction.
    actually i have found the user-exit i.e exit_SAPMF02d_001.
    but this exit is not triggering when i put a breakpoint.
    so can u please tell me the solution for this.
    regards,
    soham p

    Hi,
    try these...
    Enhancement/ Business Add-in            Description
    Enhancement
    SAPMF02D                                User exits: Customer master data
    Business Add-in
    CUSTOMER_ADDRSCR_CHG                    Change Address Screen in the Master Data Maintenance
    CUSTOMER_ADD_DATA                       Additional Data at Customers
    CUSTOMER_ADD_DATA_BI                    Additional Data at Customers (Batch Input and ALE)
    CUSTOMER_ADD_DATA_CS                    Additional Data at Customers (Subscreen Container 4000)
    No.of Exits:          1
    No.of BADis:          4
    Arunima

  • User Exit/Badi's for FF7A and FF7B

    Hi,
    I am looking for user exits and Badis available to get report output of FF7A and FF7B into custom table. Can anyone please help?

    Enhancement  
    GLX1028 -
    >User exit for BAPI_GLflex_GetDocItems (EXIT_SAPL1028_001)
    BAdIs
    F181_DET_DEFAULT--->SAPF181: Transfer of Specific Account Assignments
    FI_RCL_CLEARING_ACC --->KALC: Set a different business area clearing account

  • User exit or BADI for VL01N and VL02N

    Hi Experts,
    My requirment is while creating and changing delivery, change inco terms of delivery when some condition satisfy. can you any one tell me any user exit or badi , i will write the logic to change inco terms based some condition.
    Regards
    Jayasunder

    create the following program in $tmp.. execute it . you will get all the user exits and BADIs.
    *& Report  Z_FIND_EXIT_TRANS
    report  z_find_exit_trans.
    *& Enter the transaction code that you want to search through in order
    *& to find which Standard SAP User Exits exists.
    *& Tables
    tables : tstc, "SAP Transaction Codes
    tadir, "Directory of Repository Objects
    modsapt, "SAP Enhancements - Short Texts
    modact, "Modifications
    trdir, "System table TRDIR
    tfdir, "Function Module
    enlfdir, "Additional Attributes for Function Modules
    tstct. "Transaction Code Texts
    **& Variables
    data : jtab like tadir occurs 0 with header line.
    data : field1(30).
    data : v_devclass like tadir-devclass.
    **& Selection Screen Parameters
    selection-screen begin of block a01 with frame title text-001.
    selection-screen skip.
    parameters : p_tcode like tstc-tcode.
    selection-screen skip.
    selection-screen end of block a01.
    **& Start of main program
    start-of-selection.
    *Validate Transaction Code
    select single * from tstc
    where tcode eq p_tcode.
    *Find Repository Objects for transaction code
    if sy-subrc eq 0.
    select single * from tadir
    where pgmid = 'R3TR'
    and object = 'PROG'
    and obj_name = tstc-pgmna.
    move : tadir-devclass to v_devclass.
    if sy-subrc ne 0.
    select single * from trdir
    where name = tstc-pgmna.
    if trdir-subc eq 'F'.
    select single * from tfdir
    where pname = tstc-pgmna.
    select single * from enlfdir
    where funcname = tfdir-funcname.
    select single * from tadir
    where pgmid = 'R3TR'
    and object = 'FUGR'
    and obj_name = enlfdir-area.
    move : tadir-devclass to v_devclass.
    endif.
    endif.
    *Find SAP Modifactions
    select * from tadir
    into table jtab
    where pgmid = 'R3TR'
    and object = 'SMOD'
    and devclass = v_devclass.
    select single * from tstct
    where sprsl eq sy-langu
    and tcode eq p_tcode.
    format color col_positive intensified off.
    write:/(19) 'Transaction Code - ',
    20(20) p_tcode,
    45(50) tstct-ttext.
    skip.
    if not jtab[] is initial.
    write:/(95) sy-uline.
    format color col_heading intensified on.
    write:/1 sy-vline,
    2 'Exit Name',
    21 sy-vline ,
    22 'Description',
    95 sy-vline.
    write:/(95) sy-uline.
    loop at jtab.
    select single * from modsapt
    where sprsl = sy-langu and
    name = jtab-obj_name.
    format color col_normal intensified off.
    write:/1 sy-vline,
    2 jtab-obj_name hotspot on,
    21 sy-vline ,
    22 modsapt-modtext,
    95 sy-vline.
    endloop.
    write:/(95) sy-uline.
    describe table jtab.
    skip.
    format color col_total intensified on.
    write:/ 'No of Exits:' , sy-tfill.
    else.
    format color col_negative intensified on.
    write:/(95) 'No User Exit exists'.
    endif.
    else.
    format color col_negative intensified on.
    write:/(95) 'Transaction Code Does Not Exist'.
    endif.
    *Take the user to SMOD for the Exit that was selected.
    at line-selection.
    get cursor field field1.
    check field1(4) eq 'JTAB'.
    set parameter id 'MON' field sy-lisel+1(10).
    call transaction 'SMOD' and skip first screen.

  • What is difference between User Exits and BAPI

    hello sap gurus
    what is difference between User Exits and BAPIs

    http://www.sap-img.com/abap/what-is-user-exits.htm
    www.****************
    Where as this customer exits are again divided into:
    1. Menu Exits.
    2. Field Exits.
    3. Screen Exits.
    4. Function module exits.
    These all the things comes under Enhancements.
    User exits
    1.A user exit is a three character code that instructs the system to access a program during system processing.SXX: S is for standard exits that are delivered by SAP.
    XX represents the 2-digit exit number.UXX: U is for user exits that are defined by the user. XX represents the 2-digit exit number
    2.USER EXITS are FORMS and are called by SAP standard programs
    using PERFORM.
    3.Inside the form (user exit) you can read and change almost
    any global data from host program.
    4. User exits are more flexible because you have more information to use in your code but on the other hand , it is very easy to manipulate erroneously global data and lead the standard program to a dump or even to make database inconsistent.
    5.While changing User-exit,Access Key is required,
    BAPI is nothing function module but which is remote enabled, means you can access this fm through other SAP or non-SAP system by assingning to business object,which we can crea in SWO1 transaction.
    more details see WWW.****************
    reward if helpful

  • Difference between bex user exit and macros in functionality?

    Hi all,
    I need to create a report on material master data. I created an infoset on 0material and 0mat_plant. In the requirem
    ent, I have a report containing different material numbers followed by attributes in each row. the final column in each
    row should be calculated using logic. the logic involves comparing different row values and arrive at final conclusion.
    the logic comprises of large number of if conditions. so should i use bex user exit or excel macros?
    what is the difference between user exit and macros in funcitonalilty?
    is there an issue transporting the macro to Prod for end users to use?
    any performance criteria?
    Any how to documents ..will be of a lot of help
    plz send them to [email protected]
    Message was edited by:
            ravi a

    Hi,
    Macros offer a powerful and flexible way to extend the features of MS Excel. You can either create a macro using VB code or Record a macro. Use Alt+F11 for creating macro using VB code.
    You can refer to Microsoft help site or this link for more details:
    http://www.taltech.com/support/sw_tricks/exmacros.htm
    User-exits are empty subroutines that SAP Developers have provided for you.You can fill them with your own source code.Technically this is a modification.Customer exits are nothing but a include in customer name space will be provided in the function module which starts with CALL CUSTOMER.You can fill them with your own source code.Technically this is an enhancement.
    look into following links for procedure to find and use user-exits transaction for finding user-exits is 'SMOD'
    http://www.sapbrain.com/TUTORIALS/TECHNICAL/user_exits_tutorial.html
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm

  • How to find the user exits and BADIS from SPRO

    Hi all,
    please let us know how to find the User exits or BADIS for an application from SPRO.
    Regards,
    Madhavi

    Hi Varisetty,
    Finding user exits and BAdis from SPRO can be cumbsersome. In most instances you know the standard SAP program and want to check (find) an exit called in the flow of the transaction. You can do this as follows:
    For User Exit:
    Put "/h" in the command box (to start debugging)
    Execute your transaction
    When you enter debugging - put a breakpoint at statement
    CALL CUSTOMER-FUNCTION
    the control will stop at all calls to User Exits
    For BAdi (it's simpler)
    Go to class CL_EXITHANDLER in SE24
    Enter method GET_INSTANCE
    Put a breakpoint in this method
    Run your standard transaction - control will stop at all BAdis called within the flow since this method is used to check BAdi implementations before invoking them
    Also, if you want to find enhancements by package - go to SE80, enter the package and check function groups starting with X - those contain function exits (conventional user exits). For BAdis in a package, there is normally a separate tree node (under the package) for Enhancements hence clearly identifiable.
    Cheers,
    Adi

  • User exit or badi for me52n transaction.

    Hi all,
           i have a requirement to write a user exit or badi for me52n transaction. the requirement is in header section, only one plant should be accepted. that is in the first row one plant will be inserted. in the second row if we are inserting another plant other the first row plant, it should not accept it and it should raise an error.
    that is from the second row onwards, every plant should match with the first row plant.
    if any part of this issue is unclear, plz let me know so that i can explain it clearly
    this is urgent requirement.
    please let me know the solution as soon as possible.
    points will be awarded.
    thanking u in advance.
    A.srinivas.

    In this version exit EXIT_SAPLMEREQ_005 should exists (look at OSS <a href="https://service.sap.com/sap/support/notes/843446">Note 843446 - MEREQ001: Cannot call up external service data in user exit</a> this note refers to the exit and is applicable in  4.70. Look also at OSS <a href="https://service.sap.com/sap/support/notes/310154">Note 310154 - ME21N/ME51N: Customer-specific check, generating error log</a>
    Regards

Maybe you are looking for

  • AppleShare error message when connecting to network in Classic

    I have been using an old PowerPC Macintosh 7300/166 as a file server connected by ethernet cable to a 15" PowerBook G4 running OS X (10.3.9) in Classic without problems. However on updating to 10.4.8 I get the message "AppleShare system error" after

  • Not able to connect RAC database

    hi all i am using oracle 10.2 RAC on suse enterprse linux server 10.1 from node 1 i am able to connect database but from node 2 i m not able to connect.. when try to connect system/test.. its hang and didnt dispaly any error messg.. even yesterday i

  • PLD: B1 always uses the same layout in Sales Opportunity(2005A SP1 PL31&36)

    Hi all, I can change the print layout of Sales Opportunities and Payment Receipts (B1 will show the defined layout in bold), but when I preview it, or print it, the same layout is always used. I have noticed this in 4 systems, using SQL  Server 2000

  • T500 Bluetooth driver upgrade problem, risk of wiping the harddrive

    Hi, I tried to upgrade my bluetooth driver on my laptop. The upgrade failed. After that I get an error when the computer starts. "The program can't start because btwhidcs.dll is missing from your computer. Try reinstalling the program to fix this pro

  • Output of PDF to system disc drive

    Hi - We currently have a smartform that sends a email with a PDF attachment - anyone know how I can get sap to write the attachment to disc instead of send it in an email?  I set up a "printer" that prints to a file instead of a printer - the output