Restrict another transaction

hi,
If 2 transactions give the same result,then if both the transactions are executed simultaneously,then how to stop other transaction to be executed and issue a messag saying other had executed first.
Thanks in advance.

Hi assr
Using the lock mechanism, you can recursively check whether the second transaction released the lock or not and ask the use for the action.
e.g.
DATA lv_stop_transaction TYPE flag .
DATA lv_answer TYPE char1 .
DO .
*-- Call lock module
*--If lock is active ask whether to wait or exit
*--You can use the FM "POPUP_TO_CONFIRM_WITH_MESSAGE"
  IF lv_answer = 'N' . "e.g. If user wants to exit
    lv_stop_transaction = 'X' .
    EXIT .
*---else .
  ELSE .
    CONTINUE .
  ENDIF .
ENDDO .
IF NOT lv_stop_transation IS INITIAL .
  LEAVE TRANSACTION .
ENDIF .
You can also put a time-out limit for the DO-ENDDO logic.
By the way, please reward points for the posts you find helpful and close the thread if your problem is solved.
Regards
*--Serdar <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d">[ BC ]</a>

Similar Messages

  • Can we restict a transaction when another transaction is running

    Hi All,
    1. Is there any way to trace which particular transaction is running? say SE38, not user specific, globally? It has to be traced programmatically.
    2. Is it possible to restrict another transaction when one transaction is running. For eg. I want that when ST05 will run, SE38 should not run.
    3. Is there any transaction to create custom event that will run autometically to restrict other transaction from running when one particular transaction is running.
    Looking for your valuable suggestion/s.
    Thanks and regards,
    Atanu
    Message was edited by: Atanu Dey

    Hi!
    I appreciate the valuable effort you have given to analyze the problem. I will be more specific with my requirement. It says:
    When we run transaction EA10 to create mass bills or invoice, the transaction is running fine even for multiple users firing lot of data in the production system.
    But, but, when someone is trying to run transaction FPMA to do autometic clearing for some business partner/s the transaction EA10 is throwing error as Mass Block.
    Reason: One table in EA10 transaction is getting locked during updation, more logical. But second transaction is trying to fetch data from same table just hindering the process.
    Probable solution: Do not allow to run transaction FPMA when transaction EA10 is running. After total execution, allow to run the other transaction.
    Both of them are creating background job runtime and processing as well. Stop other job running when previous job is active. SAP program, no change/s allowed. (
    Any more suggestion please. (
    Best wishes,
    Atanu

  • How to Restrict Business Transaction Types in Cash Journal

    Dear All
    I need to Restrict Business Transaction Types in Cash Journal based on Exp/Revenue Types . Is there nay solution of this problem and one more thing i need to disable/hide Cash Hournal Tabs for specific User.
    Full point will be awarded.
    Thanks

    hi
    the follwoing links may helpful to you for cash journal configs.
    http://help.sap.com/bp_bblibrary/500/documentation/N70_BPP_04_EN_DE.doc
    http://help.sap.com/saphelp_erp2005/helpdata/en/a5/e9d13973da1f60e10000000a114084/content.htm
    http://www30.sap.com/japan/businessmaps/690A1366EABD4B029F9F9CB727553B61.htm
    nagesh

  • How to create a link to another transaction on a record in ALV report.

    Hi All,
    I have an ALV report output ,if i click on any record in the report i want it to show me the details of the record which is another transaction code in my case.So basically i want to execute that T-code on clicking on the record of the ALV report.
    How can i achieve this ,please provide me the insight with same helpful examples.
    Thanks in advance,
    Swati

    Hi,
    This solution is for the ALV by Function Module Appraoch.
    You need to use the Importing Parameter I_CALLBACK_USER_COMMAND, of the FM Reuse_ALV_GRID_DISPLAY(or LIST Display) for this.
    Slis_ev_user_command TYPE slis_formname VALUE 'USER_COMMAND'.
    As this is a frequently-used Callback event, the form routine can also be passed directly in the interface by passing the user command in the IMPORTING parameter I_CALLBACK_USER_COMMAND.
    This is an exit subroutine and takes care of the Interactive aspect of the ALV. When User performs any action in the displayed ALV, Control automatically goes to this Subroutine.
    The interface of the form routine specified must be defined as follows:
                 FORM user_command  USING r_ucomm LIKE sy-ucomm
                                          rs_selfield TYPE slis_selfield.
         Parameter R_UCOMM contains the function code triggered.
         Structure RS_SELFIELD contains the following information:
    o     tabname  :      Name of the internal output table
    o     tabindex :       Index of the internal output table
    o     fieldname:      Field name
    o     endsum   :     Cursor is located on the totals line
    o     sumindex :     If >0, the cursor is located on a subtotals line
    o     value    :        Value of the field on the list
    o     refresh  :       (Exporting) List should be set up again
    o     col_stable:   (Exporting) Keep column position when list is set up    again
    o     row_stable:   (Exporting) Keep row position when list is set up again
    o     exit      :        (Exporting) Exit list (and ALV)
    o              before_action: Call before standard action execution
    o              after_action : Call after standard action execution, before list    setup
    o              ignore_multi : Internal use
    o              sel_tab_field: Internal use
    The EXIT routine is called whenever a function unknown to the ALV is   triggered or if the routine call before/after the execution of a  standard function code has been defined by interface parameter.
    Ok code for double click is &IC1 for ALV report.
    Eg:
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
         EXPORTING
    Name of the program
        I_CALLBACK_PROGRAM                    = V_REPID
    title
        I_GRID_TITLE                          = 'Details of Storing'
    calls subroutine : PF_STATUS_SET
           i_callback_pf_status_set           = 'PF_STATUS_SET'
    Calls subroutine : user_command
            i_callback_user_command           = 'USER_COMMAND'
    Overall structure of the report
           IS_LAYOUT                          = STRUCT_LAYOUT
    Passes the field catg internal table
           IT_FIELDCAT                        = I_FIELDCAT
    Passws the sort sequence internal table
           IT_SORT                            = IT_SORT
           I_DEFAULT                          = 'X'
           I_SAVE                             = 'A'
    Passes the internal table for variants
           IS_VARIANT                         = i_variant1
    fetches different events into internal table i_events
           it_events                          = i_events[]
          TABLES
    Passes data table for ALV display
            T_OUTTAB                          = I_TAB
         EXCEPTIONS
           PROGRAM_ERROR                      = 1
           OTHERS                             = 2
    *&      Form  user_command
    Form used to handle USER_COMMAND events
    rf_ucomm: Function Code
    rs      : Internal Table containing the selection information.
    FORM user_command USING rf_ucomm LIKE sy-ucomm
                              rs TYPE slis_selfield.
    data : v_mblnr like mseg-mblnr.
    case rf_ucomm.
    A custom pushbutton for record deletion is set in the GUI status.
    When a record is selected , the field BOC for that record becomes 'X'.
    The records are traced and deleted and the fields are refreshed( rs
    of type slis_selfield is refreshed)
    when '&DEL'.                 "Print button clicked.
        delete i_tab where box = 'X'.
         rs-refresh = 'X'.
    When the user selects a row and presses the Select pushbutton ( user
    defined ) from the application toolbar, the details of the document
    will be shown in another ALV list
    when '&SEL'.
      PERFORM SUB_SELECT_DOCUMENT.
      set parameter id 'MBN'  field  i_tab-mblnr.
      call transaction 'MB03'.
    Ok code for double click is &IC1 for ALV report
    when '&IC1'.
      perform sub_hotspot.
    endcase.
    ENDFORM.
    *&      Form  SUB_HOTSPOT
          text
    -->  p1        text
    <--  p2        text
    form SUB_HOTSPOT.
    message i398(00) with 'Hello'.
    endform.                    " SUB_HOTSPOT

  • The pooled JMS session is enlisted in another transaction error

    I have an MDB with pool size 2 deployed in weblogic 9.2.3(linux). I see the following error in server logs.
    <May 27, 2009 7:32:26 AM CDT> <Error> <EJB> <BEA-010079> <An error occurred while attempting to receive a message from JMS for processing by a message-driven bean: javax.jms.JMSException: [J2EE:160054]The pooled JMS session is enlisted in another transaction and may not be used elsewhere
    The exception is : javax.jms.JMSException: [J2EE:160054]The pooled JMS session is enlisted in another transaction and may not be used elsewhere
         at weblogic.deployment.jms.JMSExceptions.getJMSException(JMSExceptions.java:22)
         at weblogic.deployment.jms.WrappedTransactionalSession.enlistInTransaction(WrappedTransactionalSession.java:196)
         at weblogic.deployment.jms.WrappedMessageConsumer.receive(WrappedMessageConsumer.java:198)
         at weblogic.ejb.container.internal.JMSMessagePoller.processOneMessage(JMSMessagePoller.java:297)
         at weblogic.ejb.container.internal.JMSMessagePoller.pollContinuously(JMSMessagePoller.java:394)
         at weblogic.ejb.container.internal.JMSMessagePoller.pollForParent(JMSMessagePoller.java:517)
         at weblogic.ejb.container.internal.JMSMessagePoller.run(JMSMessagePoller.java:533)
         at java.lang.Thread.run(Thread.java:595)
    >
    any idea why this error is coming??

    Looks it is like a bug, you can ask patch for from support.

  • The requested object is locked by another transaction

    Hi All,
    I got a problem while loading data from an ODS to another ODS, it shows 450 records but request is red, it says
    'The requested object is locked by another transaction'
    Message no. MC602
    Diagnosis
    A lock requested by calling an ENQUEUE function module cannot be provided because the object in question has already been locked by its own transaction.
    Technical Information: The C_ENQUEUE routine returns the following values:
    COLLISION_OBJECT = ERSMONFACT
    COLLISION_UNAME = SINGH
    System response
    The ENQUEUE function module triggers an appropriate exception. If this exception was not intercepted by the application program, it leads automatically to the active SAP transaction being cancelled.
    Procedure
    Once the ENQUEUE function module is called, the application program should intercept this exception and react to it appropriately.
    I tried SM12 but there is no lock entry, can u suggest some thing?
    Regards,

    Hello,
    here your dso seems to be lock as some read and write opertaion is happening at the time u r running the dtp.
    Here two things to look :
    1.Check the error that ur getting while running a dtp the process monitor etc try to find the request id which has locked the dso . Copy that request id go to t-code RSRQ see whats this request who is user,target etc..contact user for cancelling the job if it has been stuck for long long time. Copy the JOB ID from  RSRQ for that rquest go to SM37 give the date as there in RSRQ and kill the job
    2.GO to SM12 try to search the object there and remove the lock.
    Thanks,
    Deepak

  • Calling another transaction in Dialog Programming

    Hello ppl,
    How can I call another transaction(ZPROGRAM2) from my transaction(ZPROGRAM1) using the delivery and the check box options selected in Screen Programming. Should I use BDC.? Also in case of any errors in ZPROGRAM2, the control should return to ZPROGRAM1 with all the previous setting retained.
    Thanks a lot.
    Karthikeyan

    Hi ,
    You can try with BDC as you need to get the control back to the program1.
    If not you can try with the SUBMIT statement.
    ex:-
    SUBMIT zrslg0000  EXPORTING LIST TO MEMORY
                  AND RETURN.
    Regards,
    Satish

  • Can we call another transaction from the Userexit

    Hi all,
            Can we call another transaction from the Userexit?
    Thanks,
    Balaji

    Hi
    Because the statament CALL TRANSACTION triggers the end of the LUW so COMMIT WORK, so you should be sure not to insert that statament while some updating actions are been doing.
    So that exit shouldn't be triggered while updating
    Max

  • Restrict this transaction code only to create sets starting with 'ZMR'

    Hello,
    I need to create custom transaction code for 'GS01' and restrict this transaction code only to create sets starting with 'ZMR' No other sets should be allowed to be created.
    If anyone have done before with the same scenario. Please give me clear documentation on this .
    Reagdrs
    Kiran

    YOu cannot find the call to the badi's by searching the main program.
    The badi is called a t run time.
    To find a badi attached to a main program, goto se38,
    GIve the program name.
    Goto->Object Directory Entry. Find the package.
    Go to se18 transaction, Press f4.
    give the package name in the popup.
    you can get the badis associated with the main program.
    Regards,
    Ravi

  • Error -2038: Record locked by another transaction / Internal error occured

    Hi, sometimes when I'm trying to update a SO via DI API, I got this error -2038. The error message varies, either: "Internal error occured" or "Record locked by another transaction". Ffor 'record locked' error, the table/field names varies, eg.
    [RDR1.ItemCode][line: 7]
    [RDR12.TaxId8][line: 1]
    [WTR1.ItemCode][line: 1]
    [RDR1.ItemCode][line: 9]
    [RDR1.ItemCode][line: 3]
    [RDR12.TaxId2][line: 1]
    [RDR12.CityS][line: 1]
    Any idea what the problem might be? FYI I'm using PL41, and this DI calls are from a centralized 'handler' VB.NET program. I've also released the instantiated BO objects via System.Runtime.InteropServices.Marshal.ReleaseComObject() (http://support.microsoft.com/kb/317109)
    Thanks.

    David: what do you mean by 'S-User for the Marketplace'? I think I'm not an S-User, so I still can't login... How can I be an S-User?
    Anyway, I'll close this question, even though it's not really solved. I can't find any other user updating the same document, but that -2038 errors still pop up.
    Currently I'm using John's approach to retry whenever I got -2038. As long as it works and everybody's happy I guess...
    Thanks everybody.

  • How to restrict the transaction OB52 ?

    Hi guys.
    I need to restrict the transaction OB52 for Company Code. By default the transaction OB52 has no authority object to restrict it to the company code. Try it by adding the SU24 transaction object F_BKPF_BUK (check / maintain). When I create the security role by adding the transaction OB52, lifts my perfectly F_BKPF_BUK authorization object, added the company you will have the authorization, but does not work when I assign the Role to the user. The user will still leave change all companies and not the company you want to restrict.
    Thanks guys for the help.
    Desirée.

    Hi,
    Take the below into consideration for restricting table views for transaction like OB51, OB52 etc.... For your particular case I guess when user is running OB52 then it is providing data from table V_T001B
    First level authorization check will be S_TABU_DIS for access to table. Auth group will be FC31
    Now to drill down further restriction on line level for above table you need to use objects S_TABU_LIN. To use this object consider have look into the documentation for this object and 2nd step to read documentation in following path.
    SPRO --> Display IMG --> SAP Web Application Server --> System Administration --> Line-oriented Authorizations --> Define organizational criteria/Active organizational criteria
    Now in SPRO when you will create organization criteria then create it for field Posting Period Variant (BUKRS). This is one of the field for table V_T001B.
    Now activate it for table views V_T001B
    Now run OB52 again and it will ask for additional authorization for object S_TABU_LIN. In ORG_CRIT put the name of organization criteria you have created and in ORG_FIELD1 maintain value for relevent company code.
    This way will see only those lines where value for BUKRS will match with his/her user master for S_TABU_LIN
    This is quite big post. Will suggest you to go through documentation thoroughly rest are self explanatory.
    Arpan
    Edited by: Julius Bussche on Mar 28, 2010 10:22 AM
    Formatting fixed - please use "quote" tags and not "code" tags.

  • How to call a transaction property in another transaction?

    Hi,
    I am receiving a SAP UID value into a BLS-1 transaction property. The BLS-1 invokes some processing in the OPC Server which subsequently invokes another BLS-2 to send the data back to SAP. My question is how to access the SAP UID value sent to BLS-1 from BLS-2?
    Regards,
    Chanti.

    Chanti,
    what about using the built-in Simulator for storing a value or a csv string?
    More about using custom values in Simulators are described in [CurrentWrite with Simulator Tag does not save value|http://forums.sdn.sap.com/click.jspa?searchID=33627599&messageID=7136259].
    Michael

  • Report Painter- Restricting Business Transactions

    Hi,
    I'm creating a report using report painter & would like to prevent Actual Overhead Distribution data (business transaction RKIV) from being reflected in this report. I can add business transactions in the report through Edit -> General Selection data. How do I block a particular business transaction in this report ?
    Regards,
    Sangeeta

    Hi Sanjeeta,
    there's several ways to do this:
    (1) On the report characteristics window, enter range of values limited the values you want. To add more range, click on the more button, and keep restricting until you have what you want. Then select "no explode".
    (2) My recommended way to do it is to create a basic SET via GS01. Table = GLPCT, Field=ACTIV.
    On the set header, Select "Suppress". Enter the values that you want included, and leave out the excluded values. You can use range of course!
    Then back on the report characteristic screen, enter you SET name and check the flag for entering sets. Select "no explode". With this option, if you ever need to change your Business transaction values, just change the SET and the report will query the updated values.
    If you use a report variant to carry out the same solution, just note that everytime you need to change the values, you have to change the variant, transport, and regenerate the report (assuming that you do not change enterprise level variants directly in production)
    Hope this helps,
    Sam

  • Access to MD03 from another transaction

    Hi Gurus,
    We did a trace to all the users, and one of them used the MD03 transaction. The point is that he has no authorization to this transaction, so probably he is accessing to it from another.
    Could you help me searching any transaction where the user could jump to MD03 from menu, buttons, double click,...?
    Thank you in advance.

    Hi,
    Click on Enviornment>>Navigation profile>>Assign. In the General settings tab page you can assign the navigation profile. Just check whether the navigation profile assigned to the user has the T-code MD03. Check the seetings and t-codes in OM0K - Define navigation profile.
    But as suggested by Mr.Brahmankar kindly check whether it's possible to access the transaction from MD04 if the user doesn't have the authorization of other transaction which he/she is accessing. In your case MD03. I'm not sure about that.
    Regards,
    Lodhi.S

  • Error while posting XML from a scheduled transaction to another transaction

    When I try posting an XML from one transaction to another in a different project by calling it as a webservice, it doen't hit the other transaction.
    I see this in the Netweaver error logs:
    java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(ZipFile.java:111)
    at java.util.zip.ZipFile.<init>(ZipFile.java:127)  [see details]
    XML AssignXml Parse Error
    [EXCEPTION]
    org.xml.sax.SAXParseException: Premature end of file.... [see details]
    AND
    [Fatal Error] :-1:-1: Premature end of file.
    More interestingly it happens ONLY when I schedule the parent transaction, when I trigger it manual everything works fine.
    Any help appreciated.

    Hi Srinivas,
    I see that this post was marked as answered. Could you please elaborate on how this problem was fixed?
    I am experiencing a similar issue:
    I am trying to get the Active Portal application running in MII 12.1.7 (also 12.1.8) and all went well up to the point where the ActivePortalMonitor transaction is scheduled. In the logs I also receive the  org.xml.sax.SAXParseException.
    The culprit is the XMLQuery block in that txn. Just like with your situation, when ran from workbench it works; when scheduled it doesn't.
    I tried replacing the XMLQuery with other blocks that get the same result, i.e. XMLLoader or HTTPLoader + StringToXMLParser; and in all cases the XML fetching element bombs out.
    I also built a simple txn that does an XMLQuery on another txn and then dumps the output in a file. Same thing: when run from workbench it runs fine; from scheduler it gives "SAX" error
    I would post the specific error log, but it is always varying, here is one example:
    [ERROR] [Untitled_0]org.xml.sax.SAXParseException: Open quote is expected for attribute "DIR" associated with an element type "HTML".
    Any help/hints are much appreciated
    Kind Regards,
    Fanie

Maybe you are looking for

  • Wrong aspect ratio in browsermode, after import...

    Hello there, here's the dilemma: after I import raw images in aperture, the preview images (Browser mode) seem to be off (not proportioned correctly). Once I go to  Viewer mode, they "scale" to normal. It takes about half a second. It seems as if som

  • External computers are trying to connect to my pc, I've noticed a hole in my connection and manipulation of my firewall-how do I fix this?

    I am having hangs and when I went into my control panel my firewall settings were changed, an external link to my pc had been setup. My remote access connections are set to off, what can I do to prevent this? I'm using SSL Google connection to search

  • Delta in generic extractor.

    Hi Everyone, I have created one of the generic extractor on a table and the other one on a view. While selecting the GENERIC DELTA, I let the numeric pointer selection checked. Now, my question is will it allow me to do delta load in my cube using th

  • JPDK 1.3 - "Preview Mode" Bug?

    Hi, recently we upgraded to the production version of Oracle Portal for NT and the JPDK version 1.3. What we are seeing is that when a portlet's preview mode is entered via the "Display Portlet Repository" screen, the actual mode in the PortletRender

  • When will you come out with new emojis?

    a lot of people including myself, want WAYY more emojis and to be able to lock apps.. pleqse consider adding these two in the next update or so