Stuctural field in user exit?

hi all,
i'm doing user exit enhancement for me21n ,, im using the EXIT -  EXIT_SAPMM06E_014..
i want to check the field which is entered at the time of creation.. i.e plant in me21n.
Moderator Message: Basic question. Wrong forum. Thread Locked.
Edited by: kishan P on Nov 13, 2010 2:40 PM

Hi Venky,
If you want to check the plant then use EXIT_SAPMM06E_016. it will get triggered at item level. Check plant in structure I_EKPO-WERKS.
Thanks & Regards,
Faheem.

Similar Messages

  • Filling custom VBAK field in user exit EXIT_SAPLVEDA_001

    Hai Experts,
    I created code and activated the user exit EXIT_SAPLVEDA_001.
    Via an iDoc i want to fill a custom field which is in VBAK.
    EXIT_SAPLVEDA_001 has an changing parameter type dxvbak, after user exit is triggered for the right segment, the custom field is not update in the database tabels!.
    Do i need to take further action?!
    Code below
    *&  Include           ZXVEDU03
    DATA: BEGIN OF lw_dxvbak.                  "Kopfdaten
            INCLUDE STRUCTURE vbak.
    DATA:  bstkd LIKE vbkd-bstkd.
    *DATA:  KURSK(8)   TYPE C.
    DATA:  kursk LIKE vbkd-kursk.          "Währungskurs
    DATA:  zterm LIKE vbkd-zterm.          "Zahlungsbedingungsschlüssel
    DATA:  inco1 LIKE vbkd-inco1.          "Incoterms Teil 1
    DATA:  inco2 LIKE vbkd-inco2.          "Incoterms Teil 2
    DATA:  prsdt LIKE vbkd-prsdt.          "Datum für Preisfindung
    DATA:  angbt LIKE vbak-vbeln.          "Angebotsnummer Lieferant (SAP)
    DATA:  contk LIKE vbak-vbeln.          "Kontraknummer Lieferant (SAP)
    DATA:  kzazu LIKE vbkd-kzazu.          "Kz. Auftragszusammenführung
    DATA:  fkdat LIKE vbkd-fkdat.          "Datum Faktura-/Rechnungsindex
    DATA:  fbuda LIKE vbkd-fbuda.          "Datum der Leistungserstellung
    DATA:  empst LIKE vbkd-empst.          "Empfangsstelle
    DATA:  valdt LIKE vbkd-valdt.          "Valuta-Fix Datum
    DATA:  kdkg1 LIKE vbkd-kdkg1.          "Kunden Konditionsgruppe 1
    DATA:  kdkg2 LIKE vbkd-kdkg2.          "Kunden Konditionsgruppe 2
    DATA:  kdkg3 LIKE vbkd-kdkg3.          "Kunden Konditionsgruppe 3
    DATA:  kdkg4 LIKE vbkd-kdkg4.          "Kunden Konditionsgruppe 4
    DATA:  kdkg5 LIKE vbkd-kdkg5.          "Kunden Konditionsgruppe 5
    DATA:  delco LIKE vbkd-delco.          "vereinbarte Lieferzeit
    DATA:  abtnr LIKE vbkd-abtnr.          "Abteilungsnummmer
    DATA:  dwerk LIKE rv45a-dwerk.         "disponierendes Werk
    DATA:  angbt_ref LIKE vbkd-bstkd.      "Angebotsnummer Kunde (SAP)
    DATA:  contk_ref LIKE vbkd-bstkd.      "Kontraknummer Kunde  (SAP)
    DATA:  currdec LIKE tcurx-currdec.     "Dezimalstellen Währung
    DATA:  bstkd_e LIKE vbkd-bstkd_e.      "Bestellnummer Warenempfänger
    DATA:  bstdk_e LIKE vbkd-bstdk_e.      "Bestelldatum Warenempfänger
    DATA: END OF lw_dxvbak.
    CASE segment-segnam.
      WHEN 'ZE1EDK18' . " Name of customer segment
        MOVE segment-sdata TO ze1edk18.
        lw_dxvbak-zkostl = ze1edk18-zkostl.
        MOVE lw_dxvbak TO dxvbak.
    ENDCASE.
    Edited by: Richard van Veen on Mar 9, 2011 1:43 PM

    Filled dxbdcdata with following values!
    DATA lw_dxbdcdata LIKE LINE OF dxbdcdata.
    CASE segment-segnam.
      WHEN 'ZE1EDK18' . " Name of customer segment
        MOVE segment-sdata TO ze1edk18. " Data receives structure
        lw_dxvbak-zkostl = ze1edk18-zkostl. " Copy to application table
        MOVE lw_dxvbak TO dxvbak.
        lw_dxbdcdata-program = 'SAPMV45A'.
        lw_dxbdcdata-dynpro = '0101'.
        lw_dxbdcdata-dynbegin = 'X'.
        lw_dxbdcdata-fnam = 'ZKOSTL'.
        lw_dxbdcdata-fval = ze1edk18-zkostl.
        append lw_dxbdcdata to dxbdcdata.
    ENDCASE.

  • Creating delivery, can I check the sales order's field using user-exit or ?

    Hi dear.
    When I create a delivery in VL01N or other transactions, I want automatically to check the sales order's some field and to decide whether create or not.
    Can I use user-exit for that?
    Or other solutions is there?
    Thanks regards

    Yes your requirement can be achieved thru a User Exit.
    There are many User Exits available in Delivery as listed in the link below:
    https://wiki.sdn.sap.com/wiki/display/ERPLO/SDUserexits
    The selection of necessary User Exit is based on your specific requirement.
    Also if you want to check some feild of Sales Order whether it is completed or not, then you can also use Incompletion Procedure in Sales Order, which will make sure that no Sales Order is saved until the end-user enter data in those feilds.
    Hope this helps...
    Thanks,
    Jignesh Mehta

  • How to retrieve the value of field in user exit EXIT_SAPMF(in the include)

    Hello All,
    I am using user exit EXIT_SAPMF02K_001 for limiting the user to input the PAN number upto 10 character and first 4 character should be alphanumeric.I have done the logice and its running fine. The problem i am facing is that i could not get the screen input in the include where i have written the code ie. i am not able to get the screen field when the user exit is executed .In short i m not getting the value of the field ie(J_1IMOVEND-J_1IPANNO) in the code which i have written in the include.
    Can you pls tell me how do i get the value of the field PAN in the code . I have debug the program and it doesnot show any value.
    Reply ASAP.
    Thanks in Adv.
    Pravesh Deshbhratar

    Hi ,
    The Transaction code used is FK02.
    Secondly when i am using the debugger the i m getting into the INCLUDE Of the User Exit EXIT_SAPMF02K_001.
    So i dont think i am using incorrect user exit.
    what is required is field value in the include of EXIT_SAPMFO2K_001.
    Thanks
    Pravesh

  • Populating field code - User Exit

    Hello friends
    I need your help. I am writng a User Exit and i have a requirement.This is my first time writing a User Exit so pelase help me out. First i went to the generic datasource i am trying to extend.I went to the structure in there and added 3 zfields i need.My requirement is that am using a View i created and a generic datasource on it. I need to get WEMNG,WADAT and SLFDT from EKET table where DELKZ= FE
    DELNR = EBELN.
    I need the exact code ill need in ZXRSAU01.How will i call teh datasource and lay down these conditions.Please assist me.

    hi,
       first have a commen field in the itab and e_tata.
    data:begin of itab occurs 0,
    commnon field.
    WEMNG like EKET -WEMNG ,
    WADAT  LIKE EKET-WADAT,
    SLFDT    LIKE  EKET-SLFDT  ,
    END IF ITAB.
    data:i_tab like standard table of e_t_data with header line.
    i_tab[] = e_t_data[].
    select wemng wadat sfldt from eket into table itab where DELKZ= FE
    DELNR = EBELN.
    loop at i_tab.
    read table itab with key fieldname condition.
    i_tab-WEMNG  = itab-wemng.
    i_tab-WADAT   = itab-wadat.
    i_tab-SLFDT    = itab-sfldt.
    modify i_tab index sy-tabix.
    endloop.
    e_t_data[] = i_tab[].
    pls assign points if helpful.

  • Set Value in a ME22N's field with user exit.

    Every time an PO is create in ME21N or ME22N I need that the user to input some valid Requisitioner in PO's item. These valid Requisitioners are in a Z table.
      Well, to solve this I've used the EXIT_SAPMM06E_017 exit. I call the function F4IF_INT_TABLE_VALUE_REQUEST but it is not bringing the requisitioner I've selected to the field in ME22N the field remains empty.
    data : i_usr   like zmmwfnfusr occurs 0 with header line,
           wa_usr  like DDSHRETVAL occurs 0 with header line.
    IF i_ekpo-afnam IS INITIAL. "The field resquisitioner
      MESSAGE s079(z1) WITH 'Requerente obrigatório para Workflow'
                             'Receb. de NFs.'
                      'Digite um Setor Recebedor cadastrado!'.
    v_repid = sy-repid.
    v_dynnr = sy-dynnr.
       select *                  "My table with requisitioners
       from zmmwfnfusr
       into table i_usr.
       CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
       EXPORTING
        retfield            = 'RECEBEDOR'     "Field name of zmmwfnfusr
        DYNPPROG            = v_repid
        DYNPNR              = v_dynnr
        DYNPROFIELD         = 'TEKPO-AFNAM'    "Tried to guess 
    the field name, tried all namens..
        VALUE_ORG            = 'S'
       TABLES   
         value_tab                 = i_usr
         return_tab                = wa_usr.

    Hi,
    try with this
    process on value-request.
      field AFANAM module onvalue_request_afanam.
    and check what is the field name in the screen which you want to populate the value like (materail) Material is the Dynpro field and MATNR is the retfield
    in the module
    call function 'F4IF_INT_TABLE_VALUE_REQUEST'
        exporting
          retfield        = 'LIFNR' <data element for afanam>
          dynpprog        = sy-repid
          dynpnr          = sy-dynnr
          dynprofield     = 'AFANAM'
          value_org       = 'S'
        tables
         value_tab       = itab
        return_tab = ret_tab
        FIELD_TAB  = FIELD_TAB
        exceptions
          parameter_error = 1
          no_values_found = 2
          others          = 3.
    this should work,
    Cheers,
    Sasi

  • User exit for field addition on standard SAP Screen

    Hi,
    I want to add one customer specific field on notification at header level. I have found one enhancement i.e. user exit QQMA0001, which says that this is to be used for adding the extra field on the notification header. Now my question is that
    1. If I have to add the field, how user exit can help (I am aware that user exist consists of the function module, screen exit, programme and includes. Now do I need to use the screen exit for this or something else?)
    2. Other question is that before going to screen exit in the above step, do in need to add the field in structure VIQMEL and the respective table QMEL or when the table QMEL is updated then the field in structure VIQMEL will get auto updated.
    3. If the step 2 is only sufficient, then why is the need of step 1, I mean what is the point in considering the user exit i.e. we can simply update the QMEL data table and then this field will get autoavailable on the structure and after going to SE51, if we view the field added, then we can place it wherever we want on the screen of notification.
    Request for the reply.

    Thanks Pete,
    I am not a developer and a functional person and right now i am in very initial phase with no developer around.
    I got most of the points you mentioned here
    Creation of data elemnt
    Append the data table
    Create the new subscreen for the main programme and then assign this subscreen to the notification type in SPRO.
    If i am rightly followed then my questions are
    1. What is the role of user exit here?
    2. Why functional module is required here?
    3. SE51 transaction you mentioned is the screen painter, Is it possible to create sub screen there. If no then where the new sub screen will be created i.e. T code in ABAP.
    And the fianl question is that -
    I f i succeed in attaching the subscreen to the notification type and my sub screen is only for one field then is it possible for me to set it up as a header data and place it anywhere below the notification user status field because i dont want to display it as subscreen bu header level information.
    Thanks

  • Creation of a User exits FI data posted from MIGO Good receiving

    Hi all!, Will appreciate very much if you can help me. I have a situation where we dont use the std inter-co posting to trace inter-co trx . Neither do we use the SAP Consol Module. We are trying to capture the inter-co trx in SAP to be interfaced with Hyperion. Therefore we would require that VBUND filled in BSEG to be filled up for accts that are inter-co controlled . This control is done using the validation rule in FI. But the problem comes from integration from MM and SD. As the SD and MM do not have fields for VBUND when these postings post to a inter-co controlled accts the trx are not able to be posted. So was thinking if there is any way that we could assign the VBUND field thru user exits based on a logic to dervie the last 4 char from Vendor no. As our org codes all inter-co profile by the Acct grp = Interco and the last 4 char linked to SAP co. code.

    Anderton,
    I would prefer moving them to VBAK and then using it. Why?
    1. Once you have queried KNVV and moved it to VBAK you do not have to perform the select again.
    2. During SO change, you already have the data in VBAK so you do not have to fetch again from KNVV.
    3. Lets say the Z field was changed on KNVV after creation of SO and if your requirement is to use the Z field content when the SO was created, you cannot go back to KNVV since the data is changed. But if the same was stored in VBAK, you do not have that problem.
    Thanks,
    Vikram.M

  • PO User Exit which pass PR Number

    Dear All
    Is there any PO user exit which can pass the PR number while creating a PO by adopting a PR number.
    Requirement is to check PR amount before saving the newly created PO. If possible also specify the PR field in user exit.
    Thanks

    Hi,
    Try  User Exit MM06E005,Implemente EXIT_SAPMM06E_012
    PR number is passed in field TEKPO-BANFN.
    Regards
    Pole

  • Information on user exits

    hi all ,
           i want to learn user exits , how to  use them and what are the uses of user exit ... can any one tell me the best link or documentation to learn user exits from the basics..
    it will be great favour and person will be rewarded with points
    Thanks and regards
    nikesh kumar

    check the foll link,
    http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
    also refer
    http://www.sap-img.com/abap/what-is-user-exits.htm
    Creating menu exits
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/19762743b111d1896f0000e8322d00/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/83/7a18cbde6e11d195460000e82de14a/frameset.htm
    For screen exits.
    http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
    chech these links for user exists its usefull
    http://www.allsaplinks.com/user_exit.html
    http://help.sap.com/saphelp_47x200/helpdata/en/dd/561602545a11d1a7020000e829fd11/frameset.htm
    http://www.sap-basis-abap.com/sapab013.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    refer
    just refer to the link below for step by step procedure with screen shots
    http://www.sapmaterial.com/?gclid=CN322K28t4sCFQ-WbgodSGbK2g
    Check this link:
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975e643b111d1896f0000e8322d00/frameset.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/52/670ba2439b11d1896f0000e8322d00/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb2d40358411d1829f0000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/10/e7dbde82ba11d295a40000e8353423/content.htm
    http://fuller.mit.edu/tech/dialog_programming.html
    http://sap.mis.cmich.edu/sap-abap/abap09/index.htm
    http://sap.mis.cmich.edu/sap-abap/abap09/sld011.htm
    Also, refer this:
    Overview
    R/3 provides three "customization spots" that allow you to enhance FI/CO features without modifying the standard code. Although often collectively referred to as "user exits," two of the three have different names. SAP Enhancements are used to expand the standard functionality within SAP. Enhancements use function modules and are called from the standard SAP code. Each module in the system has a set of delivered enhancements that help companies expand the standard functionality where they need it. Enhancements were new in release 3.0.
    The Open FI Interfaces or Business Transaction Events are also used to expand the standard functionality within SAP. These events are defined in the IMG. Business Transaction Events were new in release 4.0. They are not available for all modules and are not called on all integrated transactions into FI as of release 4.5B. This will change with each release and should be retested.
    The older User Exits in FI/CO are "Z" programs that are defined in table T80D for client-dependent user exits, and in table T80I for client-independent user exits. These are also used to expand the standard functionality within the FI/CO modules. These User Exits have been available since the early releases of SAP. All of these FI/CO User Exits are listed in this document in the Configuring User Exits (Older). The list is included because these User Exits are not a part of the Enhancements or Business Transaction Events and do not have an Info System for searching.
    Benefits• Standard SAP functionality can be enhanced without modification to the standard code.
    • Upgrades do not erase the functionality and it does not have to be re-transported or re-entered into the system. The enhancements should be thoroughly tested when upgrading to ensure the system will still work as implemented.
    Configuring SAP Enhancements
    Basic Steps in Configuring an Enhancement
    • Find the appropriate Enhancement.
    • Enter the ABAP code in the "Z" program within the function module.
    • Create a project.
    • Add the Enhancement to the project.
    • Activate the project.
    Example Business Scenario for Enhancements
    Company A has a requirement to validate all customer master records created with a U.S. address. The U.S. entity reports on the industry field on the customer master. This is only a U.S. requirement and should not be required for the other countries, so the field status would not work. To accomplish this requirement, Company A will need to set up an Enhancement for the customer master transaction. The necessary steps are detailed below with screenprints. This example was configured in a 4.6C system.
    Detailed Steps
    1. Tools ABAP Workbench Utilities Enhancements Definition Utilities List Enhancements
    2. Do not execute this without any parameters! There are too many Enhancements and it will probably time out. You’re searching for a customer master exit. Enter mast in the short text (see Figure 1). You’ll start there. Searching for an exit can be tricky, so make sure you try several things before giving up.
    3. Execute the search.
    Start Your Search for a Master Exit Here
    4. Look through the list until you find the Enhancement for User exits: Customer Master Data.
    5. Double-click on the enhancement SAPMF02D. This will take you to the details of the Enhancement and list the function modules included in the Enhancement.
    6. To continue, double-click on the function module EXIT_SAPMF02D_001
    7. This will take you to the source code for the function module. Click on the Import tab to review the tables/fields that are available for the Enhancement
    The Tables That Are Available for the Enhancement
    8. To view the tables/fields that can be changed in the function module, click on the Export and Changing tabs. For this function module, these tabs are empty because you can only validate data. You cannot change any fields in this enhancement.
    9. Return to the Source Code tab.
    10. Scroll down until you see the Include statement in the program. The "Z" program listed after the Include is where your code will be written
    Your Program Will Begin After the Include Statement
    11. Double-click on the Include. You will be prompted to create the include. Click on Yes to create.
    12. At this point you will be prompted to enter a development class and to create a transport request. If you do not know which development class to use, please contact your technical team.
    13. Enter the following ABAP code into the program
    User exit to ensure that all US customers have a group key
    entered on the customer master.
    if i_kna1-land1 = 'US' and
    i_kna1-brsch = ' '.
    message e001(F2).
    endif.
    The ABAP Code You Need to Enter
    14. Note that the table name matches the table name in the import tab tables.
    15. In this example you are using the standard message class F2 with message number 001. Normally, you will create your own message within your own message class. All customer message classes must begin with a "Z" and are created in transaction SE91.
    16. Save the program.
    17. The next step is to create the project. Go to transaction code CMOD or follow menu path: Tools ABAP Workbench Utilities Enhancements Project Management.
    18. Enter the project name; begin the name with a "Z."
    19. Click on the Create button.
    Click on Create After You Type in the Project Name
    20. Enter in a description for the project.
    21. Click on the Enhancement Assignments button.
    22. You will be prompted to save the enhancement. Click on Yes.
    23. At this point you will be asked for a development class and to create a transport for the project. You may use the same one created when adding the ABAP code to the function module.
    24. Enter the name of the enhancement SAPMF02D (see Figure 6).
    Enter the Name of the Enhancement Here
    25. Save the project.
    26. Back out of the enhancement assignment.
    27. Activate the project by hitting the Activate button.
    The SAP Enhancement is ready to be tested! Try creating a customer with U.S. as the country and a blank group key. Be sure to test one with a group key to make sure the message is not displayed in error as well.
    Configuring Business Transaction Events
    Basic Steps in Configuring an Event
    • Make sure the application is active for Business Transaction Events.
    • Copy the sample interface function module into a "Z" function module.
    • Enter the ABAP code into the source code section of the new "Z" function module. You may choose to create a "Z" program to enter the code into and then insert the "Z" program into your function module source code.
    • Activate the function module.
    • Assign the function module to the event, country and application.
    Example Business Scenario for Business Transaction Events
    Company A would like to copy the group key field from the vendor master into the allocation field on all the line items within a vendor invoice and payments, including the vendor lines. This requirement assumes only one vendor is posted to in a document.
    To accomplish this requirement, Company A will use the Business Transaction Event 1130, Post Document: SAP Internal Field Substitution.
    1. IMG Menu Path: Financial Accounting Financial Accounting Global Settings Use Business Transaction Events Environment Infosystem (Processes).
    2. Find the correct Business Event. You are updating a field, so you select the Processes Info System instead of the Publish and Subscribe Info System.
    3. Execute the search with the defaults.
    4. Find the correct interface for updating a document: Post Document: SAP- Internal Field Substitution
    Find the Correct Interface for the Business Event
    5. Put your cursor on the event and click on the Sample Function Module button.
    6. You are now in transaction SE37 – Function Builder. This is the function module (sample_process_00001130) you will need to copy into a "Z" name function module for your coding
    Figure 8. This Is the Function Module You Need to Copy Your "Z" Name Function Module
    7. Click on the Copy button.
    8. Enter the "Z" function module name in the To Function Module field
    9. Enter a Function Group. If you need to create a "Z" function group, go to transaction code SE37 and follow menu path: Go to Function Groups Create Group. A function group is a logical grouping of function modules, and the ABAP code is generated for function groups. You will be prompted for a development class and transport when creating the function group.
    Enter Your "Z" Function Module Name Here
    10. In Function Builder (transaction SE37), enter the new "Z" function module. Click on the Change button.
    11. The system will default into the source code screen where you may enter your ABAP code.
    12. Notice the tables available for the code. Additional tables may be declared if necessary.
    13. Enter the following source code
    tables: lfa1.
    data: z_groupkey like lfa1-konzs.
    z_groupkey = ' '.
    loop at t_bseg.
    check for vendor lines. If one is found, read the vendor master and
    retrieve the group key field.
    if t_bseg-koart eq 'K'.
    select single konzs from lfa1 into z_groupkey
    where lifnr = t_bseg-lifnr.
    endif.
    Move the group key field into all line items allocation field.
    loop at t_bsegsub.
    t_bsegsub-zuonr = z_groupkey.
    modify t_bsegsub index sy-tabix.
    endloop. "t_bsegsub
    endloop. "t_bseg
    The Screen Where You Enter Your Source Code
    14. Save the function module.
    15. Back out to the main Function Builder screen by clicking on the green arrow button.
    16. Activate the function module by clicking on the Activate button
    . Activate the Function Module from This Screen
    17. Assign the function module to the event in the IMG: Financial Accounting Financial Accounting Global Settings Business Transaction Events Settings Process Function Modules of an SAP Appl.
    18. Hit enter past the warning messages that this is SAP data.
    19. Click on the New Entries button.
    20. Enter the process for your interface. In your example it is 00001130.
    21. Enter the country the interface is valid for. If it is valid for all countries, leave this field blank.
    22. Enter the application the interface should be called for. If it should be called for all applications, leave this field blank. Please note that not all integrated transactions are programmed to go through these interfaces! You will need to test to find out!
    23. Enter the new "Z" function module
    Enter Your New "Z" Function Module Here
    24. Save the settings. At this point you will be prompted for a CTS number for the configuration change.
    25. The Business Transaction Event is complete! You are ready for testing.
    Configuring User Exits (Older)
    Basic Steps in Configuring an User Exit
    • Create a "Z" program for the User Exits and enter the necessary ABAP code.
    • Enter the new program name into table T80D.
    • Configure the application to call the User Exit.
    List of User Exits
    • Variable Field Movements
    • Substitutions in FI, CO, PCA
    • Validations in FI, CO, PCA
    • Rollups in SPL
    • Fixed Field Movements in SPL
    • Cost Center Summarization on Detail Screen
    • Sets Formula Variables
    Example Business Scenario for User Exits
    Company A would like to add a "Z" field in the Special Purpose Ledger to capture a Business Unit field for reporting. They have used all the standard SAP fields such as Business Area and Profit Center. The field will only be used for reporting and is only needed in the Special Purpose Ledger. You created a special ledger table (ZZSPL1) with field Z_BUNIT and need to populate this field based on a combination of G/L account, fund and functional area.
    To accomplish this requirement, Company A will use the Variable Field Movement User Exit. To make maintenance easier, table ZZBUSUNIT was created with the G/L account, fund and functional area fields as key fields, and the business unit field as a non-key field. You generated the table maintenance so the table could be updated using transaction SM30. SAP users update the business unit determination rules in table ZZBUSUNIT by entering the G/L account, fund and functional area, and then the business unit that combination should be posting to. The User Exit will read table ZZBUSUNIT using the G/L account, fund and functional area from the posting transaction and determine the business unit. The steps for using the user exit are detailed below. This example was created on a 4.6C system.
    1. Copy the delivered template User Exit program RGIVU000_TEMPLATE into a "Z" program. Follow menu path Tools ABAP Workbench Development ABAP Editor (transaction code SE38). In early releases, the delivered program was RGIVU000.
    2. You will be prompted for a development class and a transport. Please check with the technical team for the correct development class.
    3. At the initial ABAP Editor screen, enter your new "Z" program name, select the Source Code button and click on Change
    To Enter Your New Code, Select Source Code and Click on the Change Button
    4. Enter the following code in the User Exit (Figure 14):
    FORM E01_MVC USING FROM_FIELD TO_FIELD.
    to_field = 'CORP'. "Set a default business unit.
    read table zzbusunit to determine the business unit field.
    select single z_bunit from zzbusunit into to_field
    where hkont = accit_glx-hkont and
    geber = accit_glx-geber and
    fkber = accit_glx-fkber.
    ENDFORM.
    Figure 14. Enter Your New Code at This Screen.
    5. Activate the program by clicking on the Activate button.
    6. Change the configuration in the User Exit table to point to your new "Z" program.
    7. Follow the IMG menu path: Financial Accounting Special Purpose Ledger Basic Settings User Exits Maintain Client Specific User Exits.
    8. The entry to maintain is application area GIMV: Variable Field Movement. Enter your "Z" program
    Enter Your "Z" Program in the Application Area GIMV: Variable Field Movement
    9. Save the changes.
    10. The final configuration step is to assign the User Exit in the variable field movement for your special ledger table. In the IMG: Financial Accounting &#61664; Special Purpose Ledger &#61664; Basic Settings &#61664; Master Data &#61664; Maintain Field Movements. Field movements control how the fields in a special ledger table are populated. They can be populated straight from other fields in a posting or through User Exits.
    After You Assign the Business Unit Field and the G/L Account, the Exit Field Should Contain U01.
    11. Assign the business unit field as a receiver and the G/L account as the sender. The Exit field should contain U01 (see Figure 16).
    12. The User Exit number U01 calls User Exit E01_MVC form in the "Z" program.
    13. Save the field movement.
    14. You are ready to test your User Exit!
    Reward points if useful.

  • User exits & varients in SAP

    hi
      i want to know conceptually what are User Exits and  varients , what is the purpose of using these .
       iAftr learing that i want to a practical example on both topics then , if any one have some good material on these plz send me on [email protected]
    thanx

    Hi
    User Exits in FI/CO
    R/3 provides three "customization spots" that allow you to enhance FI/CO features without modifying the standard code. Although often collectively referred to as "user exits," two of the three have different names. SAP Enhancements are used to expand the standard functionality within SAP. Enhancements use function modules and are called from the standard SAP code. Each module in the system has a set of delivered enhancements that help companies expand the standard functionality where they need it. Enhancements were new in release 3.0.
    The Open FI Interfaces or Business Transaction Events are also used to expand the standard functionality within SAP. These events are defined in the IMG. Business Transaction Events were new in release 4.0. They are not available for all modules and are not called on all integrated transactions into FI as of release 4.5B. This will change with each release and should be retested.
    The older User Exits in FI/CO are "Z" programs that are defined in table T80D for client-dependent user exits, and in table T80I for client-independent user exits. These are also used to expand the standard functionality within the FI/CO modules. These User Exits have been available since the early releases of SAP. All of these FI/CO User Exits are listed in this document in the Configuring User Exits (Older). The list is included because these User Exits are not a part of the Enhancements or Business Transaction Events and do not have an Info System for searching.
    Benefits
    •     Standard SAP functionality can be enhanced without modification to the standard code.
    •     Upgrades do not erase the functionality and it does not have to be re-transported or re-entered into the system. The enhancements should be thoroughly tested when upgrading to ensure the system will still work as implemented.
    Configuring SAP Enhancements
    Basic Steps in Configuring an Enhancement
    •     Find the appropriate Enhancement.
    •     Enter the ABAP code in the "Z" program within the function module.
    •     Create a project.
    •     Add the Enhancement to the project.
    •     Activate the project.
    Example Business Scenario for Enhancements
    Company A has a requirement to validate all customer master records created with a U.S. address. The U.S. entity reports on the industry field on the customer master. This is only a U.S. requirement and should not be required for the other countries, so the field status would not work. To accomplish this requirement, Company A will need to set up an Enhancement for the customer master transaction. The necessary steps are detailed below with screenprints. This example was configured in a 4.6C system.
    Detailed Steps
    1.     Tools   ABAP Workbench   Utilities   Enhancements   Definition   Utilities   List Enhancements
    2.     Do not execute this without any parameters! There are too many Enhancements and it will probably time out. You’re searching for a customer master exit. Enter mast in the short text (see Figure 1). You’ll start there. Searching for an exit can be tricky, so make sure you try several things before giving up.
    3.     Execute the search.
    Figure 1. Start Your Search for a Master Exit Here
    4.     Look through the list until you find the Enhancement for User exits: Customer Master Data.
    5.     Double-click on the enhancement SAPMF02D. This will take you to the details of the Enhancement and list the function modules included in the Enhancement.
    6.     To continue, double-click on the function module EXIT_SAPMF02D_001
    7.     This will take you to the source code for the function module. Click on the Import tab to review the tables/fields that are available for the Enhancement (see Figure 2).
    Figure 2. The Tables That Are Available for the Enhancement
    8.     To view the tables/fields that can be changed in the function module, click on the Export and Changing tabs. For this function module, these tabs are empty because you can only validate data. You cannot change any fields in this enhancement.
    9.     Return to the Source Code tab.
    10.     Scroll down until you see the Include statement in the program. The "Z" program listed after the Include is where your code will be written (see Figure 3).
    Figure 3. Your Program Will Begin After the Include Statement
    11.      Double-click on the Include. You will be prompted to create the include. Click on Yes to create.
    12.      At this point you will be prompted to enter a development class and to create a transport request. If you do not know which development class to use, please contact your technical team.
    13.     Enter the following ABAP code into the program (Figure 4):
    User exit to ensure that all US customers have a group key
    entered on the customer master.
    if i_kna1-land1 = 'US' and
    i_kna1-brsch = ' '.
    message e001(F2).
    endif.
    Figure 4. The ABAP Code You Need to Enter
    14.      Note that the table name matches the table name in the import tab tables.
    15.      In this example you are using the standard message class F2 with message number 001. Normally, you will create your own message within your own message class. All customer message classes must begin with a "Z" and are created in transaction SE91.
    16.     Save the program.
    17.     The next step is to create the project. Go to transaction code CMOD or follow menu path: Tools   ABAP Workbench   Utilities   Enhancements   Project Management.
    18.     Enter the project name; begin the name with a "Z."
    19.     Click on the Create button.
    Figure 5. Click on Create After You Type in the Project Name
    20.      Enter in a description for the project.
    21.      Click on the Enhancement Assignments button.
    22.      You will be prompted to save the enhancement. Click on Yes.
    23.      At this point you will be asked for a development class and to create a transport for the project. You may use the same one created when adding the ABAP code to the function module.
    24.     Enter the name of the enhancement SAPMF02D (see Figure 6).
    Figure 6. Enter the Name of the Enhancement Here
    25.     Save the project.
    26.     Back out of the enhancement assignment.
    27.     Activate the project by hitting the Activate button.
    The SAP Enhancement is ready to be tested! Try creating a customer with U.S. as the country and a blank group key. Be sure to test one with a group key to make sure the message is not displayed in error as well.
    Configuring Business Transaction Events
    Basic Steps in Configuring an Event
    •     Make sure the application is active for Business Transaction Events.
    •     Copy the sample interface function module into a "Z" function module.
    •     Enter the ABAP code into the source code section of the new "Z" function module. You may choose to create a "Z" program to enter the code into and then insert the "Z" program into your function module source code.
    •     Activate the function module.
    •     Assign the function module to the event, country and application.
    Example Business Scenario for Business Transaction Events
    Company A would like to copy the group key field from the vendor master into the allocation field on all the line items within a vendor invoice and payments, including the vendor lines. This requirement assumes only one vendor is posted to in a document.
    To accomplish this requirement, Company A will use the Business Transaction Event 1130, Post Document: SAP Internal Field Substitution.
    1.     IMG Menu Path: Financial Accounting   Financial Accounting Global Settings   Use Business Transaction Events   Environment   Infosystem (Processes).
    2.     Find the correct Business Event. You are updating a field, so you select the Processes Info System instead of the Publish and Subscribe Info System.
    3.     Execute the search with the defaults.
    4.     Find the correct interface for updating a document: Post Document: SAP- Internal Field Substitution (see Figure 7).
    Figure 7. Find the Correct Interface for the Business Event
    5.     Put your cursor on the event and click on the Sample Function Module button.
    6.     You are now in transaction SE37 – Function Builder. This is the function module (sample_process_00001130) you will need to copy into a "Z" name function module for your coding (see Figure 8).
    Figure 8. This Is the Function Module You Need to Copy Your "Z" Name Function Module
    7.     Click on the Copy button.
    8.     Enter the "Z" function module name in the To Function Module field (see Figure 9).
    9.     Enter a Function Group. If you need to create a "Z" function group, go to transaction code SE37 and follow menu path: Go to   Function Groups   Create Group. A function group is a logical grouping of function modules, and the ABAP code is generated for function groups. You will be prompted for a development class and transport when creating the function group.
    Figure 9. Enter Your "Z" Function Module Name Here
    10.     In Function Builder (transaction SE37), enter the new "Z" function module. Click on the Change button.
    11.     The system will default into the source code screen where you may enter your ABAP code.
    12.     Notice the tables available for the code. Additional tables may be declared if necessary.
    13.     Enter the following source code (see Figure 10):
    tables: lfa1.
    data: z_groupkey like lfa1-konzs.
    z_groupkey = ' '.
    loop at t_bseg.
    check for vendor lines. If one is found, read the vendor master and
    retrieve the group key field.
    if t_bseg-koart eq 'K'.
      select single konzs from lfa1 into z_groupkey
        where lifnr = t_bseg-lifnr.
    endif.
    Move the group key field into all line items allocation field.
    loop at t_bsegsub.
      t_bsegsub-zuonr = z_groupkey.
      modify t_bsegsub index sy-tabix.
    endloop. "t_bsegsub
    endloop. "t_bseg
    Figure 10. The Screen Where You Enter Your Source Code
    14.     Save the function module.
    15.     Back out to the main Function Builder screen by clicking on the green arrow button.
    16.     Activate the function module by clicking on the Activate button (see Figure 11).
    Figure 11. Activate the Function Module from This Screen
    17.     Assign the function module to the event in the IMG: Financial Accounting   Financial Accounting Global Settings   Business Transaction Events   Settings   Process Function Modules   of an SAP Appl.
    18.     Hit enter past the warning messages that this is SAP data.
    19.     Click on the New Entries button.
    20.     Enter the process for your interface. In your example it is 00001130.
    21.     Enter the country the interface is valid for. If it is valid for all countries, leave this field blank.
    22.     Enter the application the interface should be called for. If it should be called for all applications, leave this field blank. Please note that not all integrated transactions are programmed to go through these interfaces! You will need to test to find out!
    23.     Enter the new "Z" function module (see Figure 12).
    Figure 12. Enter Your New "Z" Function Module Here
    24.     Save the settings. At this point you will be prompted for a CTS number for the configuration change.
    25.     The Business Transaction Event is complete! You are ready for testing.
    Configuring User Exits (Older)
    Basic Steps in Configuring an User Exit
    •     Create a "Z" program for the User Exits and enter the necessary ABAP code.
    •     Enter the new program name into table T80D.
    •     Configure the application to call the User Exit.
    List of User Exits
    •     Variable Field Movements
    •     Substitutions in FI, CO, PCA
    •     Validations in FI, CO, PCA
    •     Rollups in SPL
    •     Fixed Field Movements in SPL
    •     Cost Center Summarization on Detail Screen
    •     Sets Formula Variables
    Example Business Scenario for User Exits
    Company A would like to add a "Z" field in the Special Purpose Ledger to capture a Business Unit field for reporting. They have used all the standard SAP fields such as Business Area and Profit Center. The field will only be used for reporting and is only needed in the Special Purpose Ledger. You created a special ledger table (ZZSPL1) with field Z_BUNIT and need to populate this field based on a combination of G/L account, fund and functional area.
    To accomplish this requirement, Company A will use the Variable Field Movement User Exit. To make maintenance easier, table ZZBUSUNIT was created with the G/L account, fund and functional area fields as key fields, and the business unit field as a non-key field. You generated the table maintenance so the table could be updated using transaction SM30. SAP users update the business unit determination rules in table ZZBUSUNIT by entering the G/L account, fund and functional area, and then the business unit that combination should be posting to. The User Exit will read table ZZBUSUNIT using the G/L account, fund and functional area from the posting transaction and determine the business unit. The steps for using the user exit are detailed below. This example was created on a 4.6C system.
    1.     Copy the delivered template User Exit program RGIVU000_TEMPLATE into a "Z" program. Follow menu path Tools   ABAP Workbench   Development   ABAP Editor (transaction code SE38). In early releases, the delivered program was RGIVU000.
    2.     You will be prompted for a development class and a transport. Please check with the technical team for the correct development class.
    3.     At the initial ABAP Editor screen, enter your new "Z" program name, select the Source Code button and click on Change (see Figure 13).
    Figure 13. To Enter Your New Code, Select Source Code and Click on the Change Button
    4.     Enter the following code in the User Exit (Figure 14):
    FORM E01_MVC USING FROM_FIELD TO_FIELD.
    to_field = 'CORP'. "Set a default business unit.
    read table zzbusunit to determine the business unit field.
    select single z_bunit from zzbusunit into to_field
       where hkont = accit_glx-hkont and
        geber = accit_glx-geber and
        fkber = accit_glx-fkber.
    ENDFORM.
    Figure 14. Enter Your New Code at This Screen.
    5.     Activate the program by clicking on the Activate button.
    6.     Change the configuration in the User Exit table to point to your new "Z" program.
    7.     Follow the IMG menu path: Financial Accounting   Special Purpose Ledger   Basic Settings   User Exits   Maintain Client Specific User Exits.
    8.     The entry to maintain is application area GIMV: Variable Field Movement. Enter your "Z" program (see Figure 15).
    Figure 15. Enter Your "Z" Program in the Application Area GIMV: Variable Field Movement
    9.     Save the changes.
    10.     The final configuration step is to assign the User Exit in the variable field movement for your special ledger table. In the IMG: Financial Accounting &#61664; Special Purpose Ledger &#61664; Basic Settings &#61664; Master Data &#61664; Maintain Field Movements. Field movements control how the fields in a special ledger table are populated. They can be populated straight from other fields in a posting or through User Exits.
    Figure 16. After You Assign the Business Unit Field and the G/L Account, the Exit Field Should Contain U01.
    11.     Assign the business unit field as a receiver and the G/L account as the sender. The Exit field should contain U01 (see Figure 16).
    12.     The User Exit number U01 calls User Exit E01_MVC form in the "Z" program.
    13.     Save the field movement.
    14.     You are ready to test your User Exit!

  • User exit in MV45AFZB include

    Hi experts,
    I got a requirement like this .
    To develop user exit to check if the sales order item is within warranty or not,
    And then display a message for user action.
    Background information and requirement:
    When a lift is installed, the Warranty Period is stored in the material master characteristic. If there is a replacement, then the SAP Notification will trigger a Sales Order where the user will create the sale item. During this item creation, a user exit is required to check whether this new replacement should be covered by an existing sales order item warranty (i.e whether the same part has been replaced before and within the warranty period), and the search is by the sales code (ie. The sale order item eg.DEIN material), equipment number ( as represented by the Equipment number in the technical object section in the Sales order header) and subcode (as defined in the characteristic of the item) combination. If an existing item is found and the warranty is still valid (ie.Today -  Sales Order items’s Service Rendered Date(that is manually entered by user)< Warranty Period), Then the system should display a message indicating that the sales order item should be crated in service order instead. Otherwise, prompt a message indicating that the user can continue to create the sales order item.
    Basic Logic:
    User Exit 1:
    USEREXIT_MOVE_FIELD_TO _VBKD
    1. Develop this user exit to get the Equipment Number from the Notification. The Notification number is retrieved from the Sales Order document flow.
    2. Assign the Equipment number to the Sales Order Item’s Technical Information Equipment number field.
    User Exit 2: USEREXIT_CHECK_ABAP
    After user enters Sales Order Item, It triggers the user exit USEREXIT_CHECK_ABAP that the performs the following actions.
    1. Get the current characteristic, Subcode, value, possibly using USEREXIT_GET_FIELD_FROM _SDCOM.
    2. Using the same material number, retrieve the characteristic Warranty Period in the material master classification.
    3. Using current sales order item material number and Equipment Number, get all sales order tiem in VBAP and VERIS02 where VBAP-MATNR = material number (which will retrieve the historical sales with same sales code) and EQUINO = Equipment Number.
    4. Sort list found by Sales order item’s Service Rendered Date in descending order.
    5. Repeat through this list of items until same Sub code is found.
    · Get item characteristic Subcode.
    · If Subcode = current Subcode and Today <(Service Rendered Date + Warranty Period)
    o “part is within warranty. Sales order: NNNNNN. Please create this item in Service Order as non-chargeable.
    I got these USEREXITS in MV45AFZB and MV45AFZZ includes.
    Can any one tell me what is the purpose of USEREXIT_MOVE_FIELD_TO_VBKD in MV45AFZB include
    and USEREXIT_CHECK_VBAP in MV45AFZZ include? . 
    If i write code in above includes is it work out? OR is there any other way to achieve above requirement?
    Can any one tell me Step by step process to achieve this.
    Iam new to USEREXITs.
    Points guaranteed
    cheers
    kaki

    1. You have to get a key from SAP to modify the two includes in which the user exits are present.
    2. You have to enter statement 'INCLUDE z**. ' in both user exits in the MV45* includes. Then save and activate the MV45** includes.
    3. You have to figure out the code that carries out the functionality described in your specifications.
    3. Write the code in includes Z** .
    4. Now the code written by you will be executed when you run the relevant SD transaction
    Message was edited by: Sudhir Bhate

  • How to pass in GR qty in user exit (EXIT_SAPLEINR_003)

    Hi,
    How to pass in GR qty MIGO transaction (ERFMG field) into user exit EXIT_SAPLEINR_003?
    thanks..
    Lina

    Hi Mayank,
    Thanks for your response, but I don't think it corresponds to my problem.
    I my case, I use a user exit variable to filter some data. It seems BPS offers the possibility to the user to select several values amongts the pre-selected values presented by the user exit variable, but it doesn't work. We can use a popup in which we enters the required values, but in final, only the first value is taken into account.
    I don't know if it is due to a BPS bug or if it is not a good solution in regard to BPS philosophy. In this case, the concerned caracteristic isn't in the header but in lead columns.
    I must present a solution to my client next monday, so I have not enough time to open an OSS message.
    An alternate solution should be interesting too.
    My need is to present to a user a selection of values amongst all values from an infoobject (the user exit variable seemed to be a good solution) and the user must have the possibility to select some values amongst these as filter.
    Regards

  • Need user exit name

    need user exit name
    which allow me to process my logic
    when exactly the sales order is generated for VA01.
    I want to process my logic at that time only.
    points will be awarded for good answers.
    Thanks
    Raj

    hI,
         Check out this documentation.....
    http://help.sap.com/saphelp_46c/helpdata/en/64/72369adc56d11195100060b03c6b76/frameset.htm
    Under user exits>user exits in sales>user exits in sales document processing
    Have a look at the following exits
    For Header fields: Modify user exit in include MV45AFZZ(USEREXIT_MOVE_FIELD_TO_VBAK) to populate the new fields.
    For Item level fields: Modify user exit in include MV45AFZZ(USEREXIT_MOVE_FIELD_TO_VBAP) to populate the new fields.
    USEREXIT_SAVE_DOCUMENT_PREPARE
    <b>Reward points</b>
    Regards

  • User exit upon saving the customer

    Hi
    can any one tell me what user exit is triggered upon saving the customer in XD01,XD02,VD01 & VD02 Tcodes.
    Thanks
    Sonali

    Hi sonali
    Check these user exits which are used at partner determination level. May be this inputs  will help you
    EXIT_SAPLV09A_001
    You can use this user exit to control whether an address that was entered manually and has already been used in other documents (referenced), should be referenced again if it changes or whether a new address should be created (duplicated).
    EXIT_SAPLV09A_002
    Call up this user exit if a customer has not been maintained in the current sales area.
    EXIT_SAPLV09A_003
    Use this user exit to control the origin of partners in the partner determination procedure (origin X, Y or Z). If X, Y, or Z has been entered in the Origin field, this user exit is automatically called up during partner determination.
    EXIT_SAPLV09A_004
    Use this user exit to integrate your own check in a program that runs before the partner is saved in the document.
    For more detailed information, see the program documentation for each of the user exits
    Regards
    Srinath

Maybe you are looking for

  • BT Sport No Longer Available via Aerial...

    I'm guessing this is old news but I never saw any announcements. My parents have received a letter saying BT Sport is no longer available via the aerial and now has to come via Broadband. The letter says future BT Sport viewing needs to be either by

  • Procurement confirmation wizard?

    hi all,           i have an item which is in stock 50. and i have an sales order of 100. so when we run the procurement confirmation wizard then the qty of PO must get reduced to 50 instead of 100. because we have in stock 50. when i run the wizard t

  • [Redwood] Abap_run error : Please choose a valid variant name

    Hello all, We have a problem with running ABAP programs using some variants : we have 30 variants but the program can only run with 25 variants, with the other 5 left the program displays this error : Please choose a valid variant name We then decide

  • Options for converting '.vob' files for editing in PP Pro CS3...

    Hi, I'm using PP Pro CS3 (Windows) and I have a few projects here where the source material are '.vob' files only. Now because PP Pro doesn't support that file format, I'm looking for options to convert this footage to a format - suitable for editing

  • My iPad Air drains power so quickly and it's barely five months old

    MMy iPad Air drains power quickly yet its still new?