Enhancements and Badi for va02

Hi Experts,
    My requirment is in VA02 , Delivery Block(LIFSK) and Billing Block(FAKSK) fields should be initialized.
When user change these values and saving the sales order it should check the authorization of the user from table SETLEAF.
If he is a valid user it will save else it will through a error message like "not authorized'.
can any body please tell me which exit or badi is suitable for this requrement.
Regards,
Praveena

Hi vinod..
Thanks for giving replies....
now i could activate the enhancement fine..
this code not triggering while saving the sales order VA02...can you plzz check this code..
FORM USEREXIT_SAVE_DOCUMENT_PREPARE.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1 ) Form USEREXIT_SAVE_DOCUMENT_PREPARE, Start                                                                                D
$$-Start: (1 )----
$$
ENHANCEMENT 315  ZSO_APPROVALCHECK.    "active version
DATA: WA_USR01 TYPE USR01,
      UNAME TYPE SY-UNAME.
CASE SY-UCOMM.
WHEN 'SICH'.
    if sy-tcode = 'VA02'.
   UNAME = SY-UNAME.
   SELECT SINGLE VALFROM FROM SETLEAF INTO WA_USR01 WHERE VALFROM = UNAME.
     IF SY-SUBRC NE 0.
       MESSAGE E000(ZMSG) WITH 'You are not authorized for approval'.
       endif.
       endif.
   ENDCASE.
ENDENHANCEMENT.
$$-End:   (1 )----
$$
ENDFORM.

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

  • What is the main difference between Enhancements and BADI.?

    What is the main difference between Enhancements and BADI.?plzz tell
    Edited by: Alvaro Tejada Galindo on Feb 13, 2008 3:48 PM

    CMOD is the Project Management of SAP Enhancements (i.e., SMOD Enhancements). SMOD contains the actual enhancements and CMOD is the grouping of those SMOD enhancements.
    Difference Between BADI and User Exits
    BADI's can be used any number of times, where as USER-EXITS can be used only one time.
    Ex:- if your assigning a USER-EXIT to a project in (CMOD), then you can not assign the same to other project.
    BADI's are oops based.
    Business Add-Ins are a new SAP enhancement technique based on ABAP Objects. They can be inserted into the SAP System to accommodate user requirements too specific to be included in the standard delivery. Since specific industries often require special functions, SAP allows you to predefine these points in your software. 
    As with customer exits two different views are available:
    In the definition view, an application programmer predefines exit points in a source that allow specific industry sectors, partners, and customers to attach additional software to standard SAP source code without having to modify the original object. 
    In the implementation view, the users of Business Add-Ins can customize the logic they need or use a standard logic if one is available.
    In contrast to customer exits, Business Add-Ins no longer assume a two-level infrastructure (SAP and customer solutions), but instead allow for a multi-level system landscape (SAP, partner, and customer solutions, as well as country versions, industry solutions, and the like). Definitions and implementations of Business Add-Ins can be created at each level within such a system infrastructure.
    SAP guarantees the upward compatibility of all Business Add-In interfaces. Release upgrades do not affect enhancement calls from within the standard software nor do they affect the validity of call interfaces. You do not have to register Business Add-Ins in SSCR.
    The Business Add-In enhancement technique differentiates between enhancements that can only be implemented once and enhancements that can be used actively by any number of customers at the same time. In addition, Business Add-Ins can be defined according to filter values. This allows you to control add-in implementation and make it dependent on specific criteria (on a specific Country value, for example).
    All ABAP sources, screens, GUIs, and table interfaces created using this enhancement technique are defined in a manner that allows customers to include their own enhancements in the standard. A single Business Add-In contains all of the interfaces necessary to implement a specific task.
    The actual program code is enhanced using ABAP Objects. In order to better understand the programming techniques behind the Business Add-In enhancement concept, SAP recommends reading the section on ABAP Objects.

  • 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

  • Difference between user exit,enhancement and BAdi

    hello guys,
    what is the difference between user exit,enhancement and BAdi.
    Please do let me know..
    Thanks in advance.
    regards,
    praveen.

    Pls do search the forum before posting*

  • User Exit or Enhancement or BADI for CA03 & MM03

    Hi Experts,
    I had a scenario like validate the Material No for CA03 & MM03. When ever we give 'material no' in the MM03 or CA03 ans press
    enter I need to validate that material no. I don't see any proper user exit or badi for these tcodes to validate material no.
    I used this  enhancement  MGA00003 - EXIT_SAPLOMCV_001 - INCLUDE ZXMG0U08 my own logic which is
    calling a RFC function module here. It send values to this FM in turn this FM is sending the values to (third party - thru WSDL) Proxy . Here I am having the problem. When we give material no in MM03 or CA03 and press enter this enhancement got
    triggered and it is going into dump. in my custom RFC FM we have 3 methods in WSDL I.e. Connect,Query,Close. When ever
    it comes to the statement 'Connect' this dump is triggered. I am unable to find the exact problem because in the debugging mode
    it is not showing constantly in one place...if I run for first time it is showing at one point , for second time if I run it is showing
    at some other place. I can't predict correctly like where exactly we r getting dump.
    Can any one please let me know any other user exit or BADI or enhancement points... exist to vlaidate Material No.
    Can any one please let me know the procedure how to do if enhancement points exists?
    Error :  RPERF_ILLEGAL_STATEMENT
    Short text
        Statement "RFC-SYSTEM RFC_ID id RFC_VALUE value" is not allowed in this form.
    Error analysis
        There is probably an error in the program
        "SAPLSHTTP".
        The program was probably called in a conversion exit
        or in a field exit. These are implemented by
        function modules called CONVERSION_EXIT_xxxxx_INPUT/OUTPUT or
        USER_EXIT_xxxxx_INPUT.
        Conversion exits are triggered during screen field transports or
        WRITE statements, field exits during field transports from the
        screen to the ABAP/4 program.
        In this connection, the following ABAP/4 statements are not allowed:
        -  CALL SCREEN
        -  CALL DIALOG
        -  CALL TRANSACTION
        -  SUBMIT
        -  MESSAGE W... and MESSAGE I...
        -  COMMIT WORK, ROLLBACK WORK
    Thanks in Advance,
    Yamini.

    Hi,
    How did you resolve that issue?

  • Enhancement or BADI for E1IDB02 IDoc segment

    I need to change some field values on the E1IDB02 segment before the IDoc is generated.  Basically, I need to clear the last 90 bytes of the record and map an IBan number for the BA partner type.  This is the source bank and generally, SAP does not populate that via standard mapping.  I there either an Enhancement or BADI that would allow me to map values in this segment?

    Hi,
    Re: User exit to modify the segment E1IDB02 data
    Regards,
    PP

  • Project settlement to CO-PA and BAdI for automatic creation of rules

    Hello SAP experts!
    I have managed to implement settlement rule strategy to CO-PA for sales project WBS-elements, which automatically creates the settlement rules for WBS-elements with billing indicator. One or more sales order items are assigned to the WBS-elements. When the system derives settlement rules, it generates profitability segments that contain the characteristic values of the WBS elements and the sales orders assigned to them. The problem is, that only one single settlement receiver is determined for each WBS-element. And if more that one sales order item is assigned to the same WBS-element only those characteristics are copied to the settlement rule that are same in all sales order items.
    For example; it products are different in all sales order items, the automatically created settlement rule does not contain the characteristic value product or neighter other caracteristics derived from product.
    Do You have experience of using BAdI for influencing the generation of settlement rules? What it actually makes possible?
    Br, Nina

    Dear Waman,
    thank you for your reply !
    Yet - this still does not solve our problem. In that note (and also in the related note 201445) there is no valuable information included concerning transaction currency:
    Our WBS elements (and also other cost objects, e.g. sales order items) are being debited in all of the three currencies.....but the credit (during settlement) only takes place in two of them:  object and CO area currency.
    I really appreciate additional help on this. It would be hard to believe that we are the only SAP customer having this kind of problem.
    Best regards,
    Thomas

  • User exit or badi for VA02 on delivering

    Hi all,
    i need to know if exists a user exit or a badi which is activated when you click on the menu Sales Document -> Deliver in the transaction VA02.
    Thanks.
    Francesca

    Dear Francesca,
    goto se24, see the class cl_exithandler
    double click on method GET_INSTANCE
    put a session breakpoint on CALL METHOD CL_EXITHANDLER=>GET_CLASS_NAME_BY_INTERFACE (in this EXIT_NAME indicates the badi name)
    now when u execute ur program or tcode, if there is any badi for this then it goes in debugging mode.
    Regards
    Sajid

  • ABAP Classes and BADIs for HR

    Hi all,
    Can anyone give me a list of classes SAP has released for HR use by customers and all utility ABAP classes. Also any utility abap classes that would be useful for future. I am only interested in those relevant for ECC 5 and up.
    Could you supply the BADIs or Enhancement Spots for HR too.
    Thanks
    Wayne

    The BADI's I have found most useful are the BADI exits that duplicate the existing PA30 PAI / PBO User exits.  If you trace back to where the exits are called you will find the BADI call within a few lines of code - but the difference is that the BADI is called outside one layer of IF logic, so it gets called in some circumstances where the user exits do not - I think this was to do with certain change or copy data situations.
    Can't remember the name of the BADI, and do not have a system available to check at present, but it was not hard to find when I looked in the system.
    Others I have used are as exits in the HR to FI posting interface, and also some in the travel to vendor interface.  There is also an exit for customising the PERNR search help - cannot remember if this was a class or a FM.
    For moving data inside the user exits in a unicode compliant way there are classes for moving data from the flat PRELP character structure to individual infotype structures - CL_HR_PNNNN_TYPE_CAST=>PRELP_TO_PNNNN and CL_HR_PNNNN_TYPE_CAST=>PNNNN_TO_PRELP.
    For general unicode compliant constants such as a Tab character there is class CL_ABAP_CHAR_UTILITIES with attributes like CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.
    Also if you go to SE38, select the Blue "Online Help" button, and then go to the ABAP Overview, you will find under the ABAP by Theme branch an entry "ABAP System Classes and Interfaces" which documents 20+ general ABAP classes
    Hope this helps
    Andrew

  • Enhancement/Exit/BADI for Routing

    Dear All,
    I have the following scenario.
    In Routing,
    1. Work center should always be with 6 digits
    2. Final operation control  key should be with PP01
    3. If work center is XXXX, my cost element should be 5061007. if it is different work center, my cost element value may vary.
        (The link between work center and cost element, i will keep in one Z table)
    4. Labor time will always be equal to machine time
    These check should be done before saving the routing. Can I achieve these through any enhancement or exit or any.
    Please guide me.
    Vijay.

    Hi,
    BAPI's for routing
    BAPI_ROUTING_CREATE - Creation of a routing
    BAPI_ROUTING_EXISTENCE_CHECK - Check whether routing exists
    BADI
    ROUTING_EXIT   -                User Exits for Routings
    Exit
    IWO20001  PM order: User exit to pass routing to order

  • Needs User Exit or BADI for VA02 Delete button

    Hi Friends ,
    I have requirement like i need to do perform some operation when in VA02 menuSALES DOCUMENTDELETE button pressing...So i need to write that code in User Exit or Some BADI or Enhancement Spot...
    I tried for BADI ,no BADI is triggering there...So please suggest me how to proceed further.

    Hi,
    You can do this using form USEREXIT_DOCUMENT_DELETE in include MV45AFZZ. You need to get a access key for this include.
    See the below link for more details;
    http://help.sap.com/saphelp_46c/helpdata/en/1c/f62c7dd435d1118b3f0060b03ca329/frameset.htm
    Regards
    Karthik D

  • Differences between enhancements and BADI'S

    HI FRIENDS THIS IS URGENT.
                                       by kandama charyulu.

    Check these links..
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    New to enhancements
    creation of table in ecc6
    for Function module exits
    New to ABAP Enhancements
    For menu Exits and screen exit
    USER EXIT
    Search through www.enips.com.
    You can find lot of material there.
    BADI's
    http://help.sap.com/saphelp_erp2005/helpdata/en/73/7e7941601b1d09e10000000a155106/frameset.htm
    http://support.sas.com/rnd/papers/sugi30/SAP.ppt
    http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm
    http://members.aol.com/_ht_a/skarkada/sap/
    http://www.ct-software.com/reportpool_frame.htm
    http://www.saphelp.com/SAP_Technical.htm
    http://www.kabai.com/abaps/q.htm
    http://www.guidancetech.com/people/holland/sap/abap/
    http://www.planetsap.com/download_abap_programs.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/content.htm
    /people/thomas.weiss/blog/2006/04/03/how-to-define-a-new-badi-within-the-enhancement-framework--part-3-of-the-series
    /people/thomas.weiss/blog/2006/04/18/how-to-implement-a-badi-and-how-to-use-a-filter--part-4-of-the-series-on-the-new-enhancement-framework
    User Exits
    http://www.erpgenie.com/sap/abap/code/abap26.htm
    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
    Regards,
    Balaji Reddy G
    ***Rewards if answers are helpful

  • User Exit or BADI for VA02-Text editor Functionality

    Hi experts,
    Can anyone of you please provide me the User exit or BADI name for the tcode VA02 to call the Function Modules related to TEXT Editor?
    **********Issues********
    I have an Order eg.110022345...Under that Order,there are many line items...Say if i select one line item and change its Schedule line date,then that line item will get cancel and in turn an corresponding New line item will get ceated.
    However,the Content of the TEXT fields is not copied to the line item from the parent line item.
    I guess the STD SAP code functions in that way.So i thought of writting an Zcode to apply this functionality by using the Function modules "SAVE_TEXT" and "READ_TEXT_INLINE".
    In order to do this i need to know the User exit or BADI which is suitable for my requirment.
    Requesting you to help me in this case..
    Thanks in advans:)

    Hi
    Try USEREXIT_MOVE_FIELD_TO_VBAP in userexit MV45AFZZ.
    I'm not sure but may be you need to use FM 'CREATE_TEXT' instead of 'SAVE_TEXT'.
    First try with "SAVE_TEXT" if it won't work then use 'CREATE_TEXT'.
    Best Regards,
    Nikhil Patil

  • Badi for va02

    Hi
    I am working on a workflow for approval of Credit memo request (CMR)
    As per my requirement i have to prevent anyone from changing the PO ie use transaction VA02 unless one of the approver requests the creator to change the CMR (the request will go as a workitem in the creators workplace.)
    Is there any BADI wherein i can block VA02.
    Such a BADI exists for ME29N ME_PO_PROCESS_CUST.
    wherein i can block anyone from using transaction ME29N.
    Does such a BADI exist for transaction VA02.

    Hi Chetan,
    Use the Below BAdI:
    BADI_SD_SCH_GETWAGFZ
    BADI_SD_V46H0001
    Or you can user the user exit
    Go to program
    SAPMV45A
    Use the subroutine:
    PERFORM USEREXIT_SAVE_DOCUMENT.
    Thanks,
    Chidanand

Maybe you are looking for

  • Why doesnt Adobe just UPDATE Flash Professional? Arent they reinventing the wheel?

    Congratulations on getting to open beta with Flash Catalyst! I know its late in the game to mention something like this but why didnt Abobe just update Flash Professional? It seems that the arguments for flash Catalyst center around the following: 1)

  • Limit on the number of partitions a table can have

    Hi, It's been quite some time I'm thinking of a simple and the best solution to a performance issue in my application. Benefiting out of partitioning the table seems a simplest approach; it involves very minimal changes to my application code and in

  • AIR-CAP1602i cannot join a WLC 5508 controller

    Hello, I'm managing a large number of access points on a Cisco wlc 5508 controller. We've recently purchased a bunch of new AIR-CAP1602I-E-K9. note that we already have AIR-CAP1602I-E-K9 and other models in production. These A.P are not able to join

  • Change item order in Muse CC Quick info widget

    Hi, haven´t figured out yet how to change the items order from the Muse CC "Quick Info" widget. When I have f.i. 5 items how do I insert one at position 2. When I click f.i. the "+" at position 2 the new item will regardless be at position #6 (at the

  • Crashing iPod App & Safari

    Hi, The iPod on my iPhone (1st Gen) has started regularly crashing. Is there a known issue with it? Safari still does the same even though I read somewhere that it was supposed to be fixed in 2.2 firmware which I have upgraded to. I have tried restor