Restriction of BAPI_TRANSACTION_COMMIT in User Exit

Dear Experts,
                      I am trying to create Sales Order upon saving Purchase Order through user exit EXIT_SAPMM06E_012  using BAPI_SALESORDER_CREATEFROMDAT2.But i got to know that ...we should not use BAPI TRANSACTION COMMIT in user exits as it leads to data inconsistency.....Can any one please let me know the other way other around..
Regards,
Kartheek.

Don't call BAPI_TRANSACTION_COMMIT or COMMIT WORK anywhere in your user exit coding that is all )
Really, SAP will save your sales order when the purchase order will be committed  and saved.
It doesn't matter where the COMMIT happens so far it happens within same LUW. Now if you are calling BAPI to create sales order within EXIT_SAPMM06E_012 and don't do a COMMIT in anyway then the purchase order save will automatically commit it.
I think EXIT_SAPMM06E_012 is an ideal place to call the sales order create BAPI as it is just called before the PO is saved. If for some reason PO doesn't save and ROLLBACK occurs then your sales order also won't get created.

Similar Messages

  • Restricting storage location through user exit.

    Dear Friends,
    My Scenario is " while doing goods movement in confirmation screen (cor6), the header material is assigned to 3 storage location , Now is there any USER EXIT so that it has to be restricted to 1 storage location ,we dont want authorization control"
    Regards
    tushar

    Dear,
    Please check User exit for storage location determination -EXIT_SAPLV02V_002 and Include ZXLOFU01
    or Program MV45AFZB
    USEREXIT_SOURCE_DETERMINATION
    Regards,
    R.Brahmankar

  • Can the user exit  EXIT_SAPMM07M_004 be called from an FM exit in my code?

    Hi ,
    When I create a Goods Receipt by tx MB1C , an MM adapter(FM user exit) is kicked off in my workspace creating documents wrt to that goods receipt.However if a batch does not exist during MB1C , it says that a batch would be created.But when i do a save , the user exit is kicked off before it returns to the SAP code to create a batch.As a result no MM documents are created in my workspace.Now I want that the batch be created while in my user exit and I want to implement the customer user exit EXIT_SAPMM07M_004(for copying the batch characteristics) .Is it possible to call this exit from my code?Kindly suggest.

    > When I create a Goods Receipt by tx MB1C , an MM adapter(FM user exit) is kicked off in my workspace creating documents wrt to that goods receipt.However if a batch does not exist during MB1C , it says that a batch would be created.But when i do a save , the user exit is kicked off before it returns to the SAP code to create a batch.As a result no MM documents are created in my workspace.Now I want that the batch be created while in my user exit and I want to implement the customer user exit EXIT_SAPMM07M_004(for copying the batch characteristics) .Is it possible to call this exit from my code?Kindly suggest.
    Can you call the user exit? - Yes ofcourse.... but why dont you just add the same code that is in your exit instead of calling the user exit?
    User exits are developed and called from appropriate places where sap can take the changes and apply to the transaction. there is no restriction on calling the user exit (atleast programmatically) but you need to think 100 times before you call the user exit.
    For example, you want to call user exit 'A' in your program because you want to use the code in this user exit in your program '1'. Why dont you just write the code in program '1' with what is in user exit 'A' ?
    Calling user exit in your program does not really helps. Better find out different ways. once again, user exits are embedded in sap business applications and remember they are not independent FM's as you think
    Good luck

  • User exit to restrict the Short description ( POS descpn) in Artcile master

    Hi
    Could you please help me out with the excat user exit for restricting short description (pos description0 in artcile master. It allows 40 characters, i need it to restrict it to 30
    Thanks
    Sreenath

    Hi
    I know for IS-R the BADI 'BADI_MATERIAL_OD'. It works for MM41/2/3 but I think that it doesn't work for this field.
    I hope this helps you
    Regards
    Eduardo

  • I need a user exit to restrict total qantity of yeild, scrap and rework on

    Hi friends
    I need a user exit to restrict total qantity of yeild, scrap and rework on CO14 (Confirmation of Production Order Detail) not more then total qantity field in CO03 (Production Order Display). Please also mention if what I am asking is theoratically right and if possible please explain a bit from the functional point of view.
    Regards,
    Anurag Jain

    I resolved it

  • Restricting vendors -any user exits please?

    Hi,
    I have a requriement where while creating Vendors they have configured in such a way that it has to be approved for all the create and change vendors. since there is some sensitive information like bank accounts and names .
    now we have changed the requriement where in we need to restrict the information only for certain conditions
    vendor employee account group B007 and company code 2001 and for rest they donot need any approval and can be directly created or changed.
    Is there any user exit or any other way where we can put this restriction.
    We cannot put the configuration for specific requirements either the configuration is on or off in total.
    Any help would be greatly appreciated.
    Thanks and Regards,
    Ravi Kumar L

    Hi Max,
    In XK02 if we change any of the Sensitive fields(like name bank account,bank key...). then it pops up a message that document is saved but needs to be confirmed.
    For confirmation we need to login to FK08 and then press the confirm buttom for that vendor.
    Now our requirement is we need that confirmation for some vendor employee account group B007 and company code 2001 and for rest they donot need any approval and can be directly created or changed.
    As Suggested by Himanshu and You I have been in touch with the Basis guys for the creation of a Z object and authorization so that i can call the Authorization object in the user exit.
    they too are not sure. so i need to confirm them so that they can go ahead with the creation of the z object. Since this involves business we need to tell them if this is possible or not fore hand and take their approval.
    Can you suggest if we are going in the right direction.
    Thanks,
    RK

  • User exit or badi to restrict PROO in Sales Order for certain sales organisation

    Hi SAP SD experts,
    I would like to know the User exit or badi to restrict PROO in Sales Order for certain sales organization. This can be done by making condition type as D but will affect all sales org and we to restrict for a certain sales org only.
    thanks,
    SG 

    Kindly  explained  how  you have  solved  others  may benefit..
    regards
    Arunkumar

  • Object Restriction / User exit in Plant Maintenance Module

    Dear experts,
    Can anyone guide me if i want to put certain restrictions like :
    1. other Department will not be able to create Order using other dptt. Maintenance work center, equipment etc.
    2. user should not be able to cancel TECO status of order, or not allowed to to put deletion flag on order or notification.
    3. Order Release retriction.
    4. Should not be able to release/operate other dptt order.
    How can i find Object where i can restrict or user exits related to all this.
    Thanks
    DM

    Hi,
    1--You can use field exit for checking and validate the workcenter and equipment, but abaper only can do that.
    This user exit also u can use "IWO10009 Maintenance order: Customer check for "Saving""
    2--please test below user exit can use "IWO10026 User check when setting status "Do not perform""
    3-- Use below user exit for validate before release order.
    IWO10002 Maintenance order: Customer check for order release
    Regards
    Sen.

  • Restricting user exit ZXEDFU02 to one customer in WE20

    I'm new to SAP. I've just written a code in user exit 002 (include zxedfu02) for the bill-to party invoice IDOC generation (FUNCTION IDOC_OUTPUT_INVOIC). My code is working perfectly. The only problem is I would like to restrict the use of this user exit to only one of my customers. From my understanding once I've programmed the user exit, every IDOC that is generated using IDOC_OUTPUT_INVOIC will perform my user exit, however I would like to be only executed for one partner. How do I do this?
    If possible, please post a step by step solution to my problem, I would really appreciate your help.
    Thanks in advance.
    Edited by: mrisad on Jul 29, 2010 4:21 PM

    Hello Mrisad,
    As per your input, your exit function module EXIT_SAPLVEDF_002 contains CONTROL_RECORD_OUT as the import parameter.
    Within your include please check the value of the following(which are the reciver related values) in the debugging mode.On top of your current code you can add this check, and include ur current code within this check.
    RCVPOR
    RCVPRT
    RCVPRN
    RCVSAD
    RCVSMN
    RCVSNA
    RCVSCA
    RCVSDF
    RCVSLF
    RCVLAD
    Hope this will help you..
    Regards,
    Antony Thomas

  • Regarding user exit  BAPI_TRANSACTION_COMMIT

    I'm trying to use BAPI_TRANSACTION_COMMIT in customer exit but its dumping. please let me know how to commit a transaction in user exit through CMOd

    hi anitha,
    Check these links
    Re: BAPI_TRANSACTION_COMMIT
    Re: Question with commit statement
    Re: Foolish problem with using "BAPI_SALESORDER_CHANGE" .
    Reward with points if it is helpful
    Cheers
    Alfred

  • User exit to restrict WBS creating Network / PR

    Hi All,
        I want to know user Exit for WBS to restrict from creating Network or PR . Basically I want to restrict 1st & 2nd level of WBS from creating PR & my client not ready to use any manual method to restrict the same so I want to know any User Exit for the same .
      Thanks

    Hi,
    Let me again take your queries point wise.
    1. Is  there any User exit available to restrict the network for only 1st & 2nd level WBS  because my user are not ready for  User status or  for any manual process  .
    Answer:- Try
    CNEX0009 (Material Components in Network)
    CNEX0026
    PPC00008 (Enhancement in adding and change in Components)
    2. Is it possible to give only display  authorization  for only 1st & 2nd level WBS   to some user ( only for those who creates Network in project structure)
    Answer:-  Yes, try executing SHD0 and create a transaction variant and later on do the changes like which field to make display only and which one to not.
    OR
    Ask Basis guys if they can help you out in this case.
    3. Any way if I creates Network but not possible creates Activity or not possible to assign Material to that Activity ( to restricts Creates PR  or Reservation through CJ20n )
    Answer:- Try OPSG settings as I mentioned in my earlier post.
    OR
    Try in OPUA, OPUB and OPUC and search if you hide activity based on INFLUENCING FIELD on LEVELS of 1 or 2 only.
    OR
    Change Procurement Parameter Indicator of Res/Pur. req to NEVER
    OR search in OPUK (Not sure if this can help you)
    OR Try using user staus and set it to level 1 and 2 only. You need to use all Object Types of Network. There would be 3 object types related to network and then use the business transaction as Material Purchase Requisition. Set this to Forbidden and then set this user status to WBS/Network.
    Have a look at the following screen shot.
    I hope this may help you..!!
    Regards,
    Amit

  • Is there a user exit to restrict BOM change and display using material type?

    Hi Gurus,
    There’s a need to limit access to BOMs on a per material type however the client does not want to use the functionality of "BOM Authorization Group" in BOM header details.
    Do we have a user exit that can satisfy the said requirement?
    Thanks,
    Mae

    Hi
    Restriction to Changes of BOM will have better control using authorization object .Go to PFCG with your basis guy and try to explore the objects
    You can use C_AENR_BGR object to restrict.
    Otherwise , try apply BADI BOM_UPDATE
    Regards
    JH

  • User Exit For VA01 To Restrict From Entering The Same Material twice

    Hello All,
    I have a requirement that in sales order creation(VA01) i want to restrict From entering the same material
    more than once in a sales order  i.e more than one same material not allowed in sales order i have tried alot of user exists but of no use
    can u tell me the exact user exit
    Regard's,
    Mahesh Dasari

    Hi Mahesh Dasari,
    1.This user exit is used to add additional datat to VBAP struture like custom fields. And this user exit is called for every single line item when processed.Say you have 10 items then this user exit will be triggered before each entry is populated in the XVBAP.
    2.When the user enters item 10 with material 1 we allow him, then for the next line item say 20 we check if the material entered or processed ( this will be available in VBAP structure ) is available in XVBAP and  the line item 10 is not deleted.
    3. If the above check  true then it means that the material entered is already existing else its not so it will proceed to next line item
    e.g. in your question , item 10- Mat1 , item-20- Mat12, item-90-Mat1,
    Then as per the code I have given , item 90 will be deleted or removed.
    4. Now you can either delete the line item by clearing VBAP as I have done or give a error message  that will be as per your requirement.
    Use the logic I have provided in my earlier post , and see the behaviour.
    Hope you find this answer helpful and set this questions answerd
    Regards
    Arun Thiyagarajan

  • Restricting Saler Order Target Quantity to be = 100 ( any user exit )

    Hi Friends,
    In transaction VA01, while creating a sale order, it asks for reference document number, after we copy the reference document number the No of quantities (item level ) will be copied to the new Sale order .
    My requirement is : the target (total - VBAP-ZMENG)quantity should not exceed the reference quantity (VBAP-ZMENG) ......
    Is there any user exit/BADI for this ?????
    Expecting your answers!!
    Thanks in Advance
    Cheers,
    R.Kripa.

    Hi Srikanth Pinnamaneni ,
    Thanks ... but what is "USEREXIT_CHECK_VBAP", in which transaction we should see that ??????
    Thanks  in advance
    Cheers,
    R.Kripa.
    Hey ya i got that ..... thanks ( SE38 - MV45AFZB )
    Message was edited by: Kripa Rangachari

  • Calling a Tcode IW51 and restrict user exit

    Hi ,
    A new validations are placed in IW51 tcode and it is woking fine.
    When i am calling the IW51 by using call transaction method the previous User is calling .
    If this TCODE IW51 is calling by using call trancaction method I should not exicute the user Exit.
    Regards,
    Esh

    If there is no event it is difficult to trigger an event. So in any case you have to create your own subtype of BUS2044 and define the event you want to create.
    If there are no user exits (I assume you have also looked for user-exits of type BTE and BAdI, even substitutions) you are perhaps out of luck? Being out of luck in this context means you will have to resort to a modification.

Maybe you are looking for

  • Swing locks up during event handling of a simple button... bug or feature?

    I have the following code: import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import java

  • Piechart in an infowindow

    Hi, i'm currently running mapviewer 11.1.1.7.2 and trying to get a (pie)chart in an infowindow or tabinfowindow. Is this possible and if so, how can it be done? Thanks.         

  • Unable to edit or display DSO

    Hi, When I edit or display DSO, Dump is generated with a runtime error- Description error as Syntax error in program "CL_RSAR_PSA===================CP ".  The current ABAP program "CL_RSD_ODSO_VERS==============CP" had to be terminated because it has

  • Help with CS3 Adobe Version Cue Server problem.

    Adobe Version Cue Server (CS3) doesn't display in the system prefs, niether will install a working copy off of Install disc after removed. There seems to be no way to fix this, In bridge it can't connect. All I get is a bunch of errors.

  • SP_SPACEUSED from MSSQL does not return two correct resultsets..

    When running this query in MSSQL: MSSQLStatement = this.Conexao.createStatement(); MSSQLStatement.execute("EXEC SP_SPACEUSED;") It's always returning false, but only for this certain procedure.... I tried another queries like "SELECT * FROM SYSDATABA