Include or sub-routine in user-exit

Hi all,
i want to put  a sub-routine in my customer user-exit (CMOD).but i can not put the subroutine.
can i put a subroutine or include statement in a user exit?
correct answers will be rewarded.
Thanks
pabi

You can make subroutine calls inside a User exit, only if the exit is part of a function pool. All the subroutines can be placed in an include in the function pool & can be called with a Perform Statement from the User Exit.
~Suresh

Similar Messages

  • User include structure and routines/program/user exits

    Hello Gurus,
         following is the step for modify the field catalog in material determination .
    Modify the field catalog (OV26)
    1.     Add the new field to the user include structure:
    o     Header data KOMKDZ
    o     Item data KOMPDZ.
    2.     Add coding to the routines for assigning values to the new fields in order processing in program MV45AFZA. Use user exits:
    o     USEREXIT_MOVE_FIELD_TO_KOMKD (header fields)
    o     USEREXIT_MOVE_FIELD_TO_KOMPD (item fields)
    3.     Add the new field to the field catalog (Customizing activity Basic Functions  Material Determination  Maintain prerequisites for material determination  Maintain field catalog).
    Will you please tell me what the step 1 and step 2 mean ?  and what 's the user include structure and USEREXIT_MOVE_FIELD_TO_KOMKD/USEREXIT_MOVE_FIELD_TO_KOMPD and program MV45AFZA ?
    thanks very much!

    Hi,
    KOMKD is cummunication header and KOMPD is communication item which are actually contained in KOMGD structure. So automatically when you add a field to either of header or item it becomes a part of KOMGD. And moreover KOMGD contains all the fields of KOMKD and KOMPD which are required for materail determination.
    USEREXIT_MOVE_FIELD_TO_KOMKD
    Use this user exit to include or assign values to additional header fields in the communication structure KOMKD taken as a basis for the material determination. This is described in detail in the section "New fields for material determination" .
    USEREXIT_MOVE_FIELD_TO_KOMPD
    Use this user exit to include or assign values to additional item fields in the communication structure KOMPD taken as a basis for the material determination. This is described in detail in the section "New fields for material determination ".
    regards
    sadhu kishore

  • Form Routine in User Exit

    Hi
    I would like to include a form routine in user exit inlcude ZXTXWU01 but I guess that is not possible, so I created a new include ZXTXWZZZ in which I have developed the code for the form routines...
    But I still get the error in the main user exit ZXTXWU01 stating that the Form... End Form can be only after the End Function which obviously refers to the function module containing the main user exit..
    Please let me know how to over come this ....

    Hi,
    You cannot create another Form...EndForm if the first include ZXTXWU01 is already inside a Form..Endform.
    Meaning following structure is invalid:
                 Form first_form.
                       Include  zzzz
                 Endform.
    In  Include zzzz.
         Form  second_form.
         Endform.
    Instead of a Form..Endform subroutine...directly have the statements in the Include program and remove the Form..Endform.
    Regards,
    Subramanian

  • How to open include ZX... of User exit.?

    Hi experts,
    Please help me how to open an include zxvvfu01 of Function module "EXIT_SAPLV60B_001" of  User exit "SDVFX001"
    I want  to change some code in include Zxvvfu01 but I open  transaction SE37 and enter "EXIT_SAPLV60B_001" and then double click on Zxvvfu01 but the message is "Program names ZX... are reserved for includes of exit function groups"
    Thank you so much.
    abaper

    Hi,
    As suggested by expert is absolutly correct.
    Just try t.code cmod -.> project name -> component -> display -> double click on  function exit -> incude -> double click.
    It should work.
    Regards,
    Anand Mehrotra.

  • Include authority check in PM User exit

    Dear all,
    Is there any user exit for adding an authority check object in IW31 transaction program?
    Kindly advise.
    Thanks.

    Hi,
    There is a Function module AUTHORITY-CHECK to check the authrization, here you can give the trnasaction code as well as the user name .. look at the function module in SE37..
    In general different users will be given different authorizations based on their role in the orgn.
    We create ROLES and assign the Authorization and TCODES for that role, so only that user can have access to those T Codes.
    USe SUIM and SU21 T codes for this.
    Much of the data in an R/3 system has to be protected so that unauthorized users cannot access it. Therefore the appropriate authorization is required before a user can carry out certain actions in the system. When you log on to the R/3 system, the system checks in the user master record to see which transactions you are authorized to use. An authorization check is implemented for every sensitive transaction.
    If you wish to protect a transaction that you have programmed yourself, then you must implement an authorization check.
    This means you have to allocate an authorization object in the definition of the transaction.
    For example:
    program an AUTHORITY-CHECK.
    AUTHORITY-CHECK OBJECT <authorization object>
    ID <authority field 1> FIELD <field value 1>.
    ID <authority field 2> FIELD <field value 2>.
    ID <authority-field n> FIELD <field value n>.
    The OBJECT parameter specifies the authorization object.
    The ID parameter specifies an authorization field (in the authorization object).
    The FIELD parameter specifies a value for the authorization field.
    The authorization object and its fields have to be suitable for the transaction. In most cases you will be able to use the existing authorization objects to protect your data. But new developments may require that you define new authorization objects and fields.
    http://help.sap.com/saphelp_nw04s/helpdata/en/52/67167f439b11d1896f0000e8322d00/content.htm
    To ensure that a user has the appropriate authorizations when he or she performs an action, users are subject to authorization checks.
    Authorization : An authorization enables you to perform a particular activity in the SAP System, based on a set of authorization object field values.
    You program the authorization check using the ABAP statement AUTHORITY-CHECK.
    AUTHORITY-CHECK OBJECT 'S_TRVL_BKS'
    ID 'ACTVT' FIELD '02'
    ID 'CUSTTYPE' FIELD 'B'.
    IF SY-SUBRC <> 0.
    MESSAGE E...
    ENDIF.
    'S_TRVL_BKS' is a auth. object
    ID 'ACTVT' FIELD '02' in place 2 you can put 1,2, 3 for change create or display.
    The AUTHORITY-CHECK checks whether a user has the appropriate authorization to execute a particular activity.
    This Authorization concept is somewhat linked with BASIS people.
    As a developer you may not have access to access to SU21 Transaction where you have to define, authorizations, Objects and for nthat object you assign fields and values. Another Tcode is PFCG where you can assign these authrization objects and TCodes for a profile and that profile in turn attached to a particular user.
    Take the help of the basis Guy and create and use.
    <b>Reward points if useful</b>
    Regards
    Ashu

  • 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

  • Why SAP has provided the VOFM routines even though we do have User-Exits?

    Hi Experts,
    Pls. let me clarify about,
    1) What is the difference between VOFM routines and User-Exits?
    2) Why SAP has provided the VOFM routines, even though we are having User-Exits, BADIs?
    3) Is VOFM is meant for only SD module or we also use VOFM in other modules too, like MM, PP?
    thanq

    Do be careful about asking questions that sound like interview questions...
    > 1) What is the difference between VOFM routines and User-Exits?
    VOFM are type of user exit.
    >
    > 2) Why SAP has provided the VOFM routines, even though we are having User-Exits, BADIs?
    >
    Historical.  They were created before BADIs and CMOD user exits were invented.  The other "old" user exits in SD are the user exit forms.
    > 3) Is VOFM is meant for only SD module or we also use VOFM in other modules too, like MM, PP?
    >
    Only SD.
    > thanq
    You're welcome.

  • User-EXIT or Routine

    IN ME21N Pricing procedure ZPB0 is there  .
    i want to find out what value coded within ZPB0 ( zero)
    how to find ZBP0 is Routine or  User-Exits . ?

    Hi jim,
    ZPB0 is Routine  not a user-exits.
    for ME21N we have to Routine in Pricing Procedure whenever a change occurs .
    Routine may Change as per the Requirement of Business Process.
    Pls reward if helpfull.

  • Is there any User Exit or BADI- Where LTAP-WDATU is as change parameter ,So during or after Transfer order creation GR date would be as per given logic not as current date

    Dear All,
    There is a requirement in which when the material (Not batch managed) is getting return from Non WM managed storage location to WM managed storage location than at the time of creating transfer order or after creation of transfer order would like to change LTAP-WDATU (GR date) automatically , So here i am unable to find the right user exit or BADI in which i can write the logic for same. Below is full description of the requirement.
    Here we are following Removal strategy "FIFO" while picking the material (Not batch managed) from WM managed storage location (WMS1) & transferring to Non WM managed storage location (ODS) ( than from there it use to go to Production) , at certain times partial quantity use to come back from Non WM managed storage location (ODS) to WM managed storage location (WMS1) and while doing putaway of the same "GR date" use to change which was not the actual when the material 1st time comes to WM managed storage location (WMS1) (before getting transfer to Non WM managed storage location). So here i want the user exit or BADI in which i can write my logic so that GR date ( LTAP-WDATU) would automatically change while creating transfer order or after creation of transfer order as per the "GR date" of same material which last moved from WM managed Storage location (WMS1) to Non WM managed storage location(ODS) because as per FIFO material dated before that would not be exist in the warehouse.
    Below is the flow of the material while transferring to production & returning from production.
    WMS1 ( WM managed warehouse ) --> ODS ( Non WM managed warehouse) --> Production  At the time of issue to production
    Production --> ODS ( Non WM managed warehouse) --> WMS1 ( WM managed warehouse ) At the time of return from production
    I hope i m clear on my requirement.
    Thanks in advance.

    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

  • User exit sales realted

    I have a requirement related to user Exit. I have done the changes and moved to Quality. Now the Problem is whatever I wrote code earlier, now they change the requirement same code instered into new Include program with in the User Exit. they sent SAP Access Key for that. If I am using the Access Key and willl changes the code in development. how we can move that into quality.
    Can any one give suggestion.
    Edited by: Jaya Ramesh Gowri Sankar on Feb 27, 2009 7:51 AM

    Hi jaya,
    First of all comment your earlier code.
    then enter the Stndard program for sales (posibally MV45FZZ).
    I think you know in which form you have to write your code.
    Add a perform statement inside the form.
    And write the Code inside it.
    It will ask you to create a include inside the standard program.
    write the code and transport to Quality.
    Regards
    Sandipan

  • User Exits in RV45PFZA for TCODE VA41, VA42..

    Hi all,
    I need to write my own code in the 'USEREXIT_SET_STATUS_VBUK' in Include 'RV45PFZA'. I am not able to change the code as it is a Standard SAP code and it asks me the access key. Now The question is :
    1. Do I have to request for the Access Key to make this change?
    or
    2. Do I have to Create a Project in CMOD?? If I have to, then where will I find the Enhancement name or the Exit Name. I tried all the methods proposed in the earlier forums but have not been sucessful in finding the right exit.
    Have any of you worked on this or on something similar?? This is urgent. Your invaluable suggestions are greatly appreciated.
    Thanks in Advance,
    Raj.

    Ravi,
    Thank you for your suggestion. I got the Doubt cleared. I have one more question.
    In Include RV60AFZZ , I have added my code in
    FORM USEREXIT_PRICING_PREPARE_TKOMP to Deactivate Condition types for FPD process . I activated the code. Now  when I create a delivery doc (via Vf01), it gets created and saved if I do it in the fore ground, but it fails if I schedule it as Back ground job. Is this because the Include doesnt have the SAVE_DOC User exit.Please elaborate if you have any suggetsions as to why it is failing in the Background and what will be the other options to make it work in the Back ground.
    Again Thank you so much.
    Raj.

  • RPREX010 User Exit - Acces Key

    Hi experts,
    sorry, I am begginer in "user exits".
    I am trying to edit the include RPREX010, which is an "User Exit" for class CL_EX_TRIP_POST_FI, in program RPRFIN00_40.
    But it asks for Access Key.
    Is it normal?
    My user has developer role and everything. I've been programming normaly.
    Any hint is welcome.
    Cheers
    Fabio

    Hi Fabio,
    The include has the BAdi. You cannot edit the include directly. You need to impliment the BAdi "TRIP_POST_FI".
    Badi definitions can be viwed in SE18 & you can create multiple implementations for a BAdi definition & all the implementations gets called. In your system, already an existing implementation available. Now you can create your own implementation.
    Badi's can be implemented in transaction code SE19. You need to create your own class to implement the BAdi.
    Select Classical BAdi & give the Badi definition Name "TRIP_POST_FI" & Click on create implementation. 
    Give name for your implementation & Click OK.
    Give short text.
    On the interface tab, the system proposes default implementation class. You just double click on the  method which you want to implement & write your own code. Activate the class & Badi implementation.
    You can find lot of threads for imlementing BAdi's. If you still could find enough information to create a implementation on your own, I will help ou out.
    Regards,
    Mahesh Gattu

  • I want the user exits in sd,mm,fi modules

    i want the user exits in sd,mm,fi modules.
    i dont want navigation. i want user exit names and function modules name.
    include names. which include is related to particular user exit.
    i want the information of this.

    Hi
    User exits (Function module exits) are exits developed by SAP. The exit is implementerd as a call to a function module. The code for the function module is written 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>
    To find a Exit.
    Goto Transaction -- Find The Package
    SMOD >f4>Use the Package here to Find the Exits In the Package.
    Else if you Want to search by Application Area wise ,
    There is one more tab to find the Exits in the Respective Application Area.
    Implementing the Exit-- CMOD Create ProjectsAssgn your Component .
    Now Run ur Transaction to Check if it Triggers.
    Thats it..
    Suppose you need to find out all the user exits related to a tcode.
    1. Execute the Tcode.
    2. Open the SAP program.
    3. Get the Development Class.
    4. Execute Tcode SE84.
    5. Open the Node 'Envir. -> Exit Techniques -> 'Customer Exits -> Enhancements'
    6. Enter the Development class and execute.
    Check out this thread..
    The specified item was not found.
    1. Type the transaction : system->status-> <PROG. NAME>
    2 open SE37 , type EXIT<PROG NAME> and press F4 to get the list of function exits available.
    3. Open CMOD utilities->SAP enhancements
    EDIT->All selections
    4.type the function module name obtained in step 2, in fields 'component name' in 'additional selections' block. and execute.
    5. The displayed list contains the enhancements names for the transaction You were looking for.
    6. Create a project in CMOD and the code in default include->activate.
    http://www.erpgenie.com/sap/abap/code/abap26.htm
    which gives the list of exits for a tcode
    http://help.sap.com/saphelp_nw04/helpdata/en/bf/ec079f5db911d295ae0000e82de14a/frameset.htm
    For information on Exits, check these links
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sapgenie.com/abap/code/abap26.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
    http://www.easymarketplace.de/userexit.php
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sappoint.com/abap/userexit.pdfUser-Exit
    http://www.planetsap.com/userexit_main_page.htm
    User-Exits
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sap-img.com/ab038.htm
    http://www.planetsap.com/userexit_main_page.htm
    http://www.sap-basis-abap.com/sapab013.htm
    http://sap.ittoolbox.com/documents/popular-q-and-a/user-exits-for-the-transaction-code-migo-3283
    These links will help you to learn more on user exits.
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/frameset.htm
    http://www.planetsap.com/userexit_main_page.htm
    http://www.allsaplinks.com/user_exit.html
    www.sap-img.com/abap/what-is-user-exits.htm
    Also please check these threads for more details about user exits.
    Re: Screen exit
    user exit and customer exit
    user exit
    <b>
    1. Document on UserExits in FI/CO
    http://www.ficoexpertonline.com/downloads/User%20ExitsWPedit.doc
    2. Finding User Exits...
    http://sap.ionelburlacu.ro/abap/sap2/Other_Useful_Tips.html#Finding_User_Exits
    3. List of all User Exits...
    http://www.planetsap.com/userexit_main_page.htm</b>
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • How to see user exit code

    hi,
    i have one user exit name with me like EXIT_SAPLVxxxxx. how can i see it's code.
    thks

    Those user exits are build as function modules. Just goe to transaction SE37, put in the name and there you go. Double click on the include in the FM and you'll see the code. If the include doesn't exist this user exit has not yet been implemented.
    Regards,
    Michael

  • User exit to modify likp-vsbed  during the creation of the delivery

    Hi ,
    I need to find an exit to modify LIKP-VSBED while I am trying to create a delivery(VL01N) from a sales order . I did not find any exits . Also when I referred to the OSS notes , I found this note elevant 396378 .  From the note I guess it is not possible to modify the above said field .
    Can anyone help me out with this .
    Regards ,
    Varun .
    Message was edited by:
            varun sonu

    Hi,
    In the include MV50AFZ1 check the following user exit
          FORM USEREXIT_MOVE_FIELD_TO_LIKP                              *
          This userexit can be used to move some fields into the        *
          delivery header workaerea LIKP.                               *
          This form is called, when a header is created                 *
          This form is called at the end of form LIKP_FUELLEN.          *
    FORM USEREXIT_MOVE_FIELD_TO_LIKP.
    Thanks,
    Naren

Maybe you are looking for

  • How can I share the FCPX library so another user on the same iMac can access and edit it?

    I need to let another user access our Library file to add some subtitles to a video I'm editing. This is a breeze with iMovie now, as I moved the Library to the Users/Shared folder and changed permissions so the other user can read+write. I tried the

  • Standard Cost Analysis Report  (MCI3)

    Hi, On SAP standard Cost Analsys report, i have been unable to dig out the reason of not populating values in following few columns. - Int. wage costs - Int. Mat. Costs - Ext. Wage Costs - Extenal Mat Costs - Services Costs Can anybody guide me in po

  • F.17 customer balance confirmation letter

    hi I want to get balance confirmation letters print for 100 customers but system is showing only first customer.

  • Query of Query(cursor)

    Hi all, I want to implement something like "query of queries" in Oracle with the help of CURSORS. Is it possible to use a cursor in the from clause of a query? Please help me.... Thanking u all in advance... Regards, Aswathy.

  • Need help about Thread issue

    Given from scjp 1.public static void main(String[] args) { 2.        NameRunnable nr = new NameRunnable(); 3.        Thread t1 = new Thread(nr);               4.        t1.start(); 5.        t1.join();                    }There are some questions whi