How to restrict simultaneous execution of two programs?

Hi Experts,
Need inputs for the situation described below:
We have two programs prog A and prog B. These are independent executable programs and have no dependency on each other. I want to restrict execution of prog B if prog A is running in any session by any user. Is there any system/basis table which stores runtime status of all the programs? There should be some table where all the currently executing programs get stored and once program is completed, entry is cleared from the table.
One way can be:
When prog A has started execution, add an entry in any Z table and at the time of finishing delete the particular entry. In prog B check that the table has any entry for prog A. If yes that means prog A is still running.
Issue with this approach is, if program A has some error or cancelled while execution, it will not delete its own entry and hence even if prog A is finished, prog B will find entry in Ztable. 
Any other way to achieve this functionality?
This is very urgent.Please help!
TIA
Abhishek

Hi,
Although I don't understand why you need to serialized two programs
that have no dependency on each other, maybe the following code can help provided the programs are executed using specific tcodes.
  DATA: BEGIN OF USR_TABL OCCURS 10.
          INCLUDE STRUCTURE UINFO.
  DATA: END OF USR_TABL.
CONSTANTS: OPCODE_LIST LIKE TH_OPCODE VALUE 2.
  refresh USR_TABL.
  CALL 'ThUsrInfo' ID 'OPCODE' field OPCODE_LIST
    ID 'TAB' FIELD USR_TABL-SYS.
  sort usr_tabl by mandt bname.
You can check wheter the other program(tcode) is being run from itab USR_TABL, good luck.
Jeffrey Satriadi

Similar Messages

  • How to restrict decimal values upto two decimal places?

    Hi all,
    I want to restrict decimal figures upto two places. How to do that? Help will be appreciated.
    atanu
    [email protected]

    You can use NumberFormat class.
    There are lot of threads available in this forum. Just search for the keyword 'NumberFormat'.

  • How to achieve parallel execution of two or more Entity Framework queries?

    Hi Everyone,
    I'm creating some WCF service that use EF to query the database for the data that I need. The problem I have at the moment is that I have 2 or more EF LINQ queries which are declared and then executed to bring back my data... but this is in serial. One EF query is issued, and then the next one after that.
    Does anyone know of a simple way to issue the queries in parallel? Or am I looking at async /parallel tasks to get the correct behaviour.
    I know the DBContext is not thread safe, so I have no problem in declaring multiple contexts if required.
    The code so far is as below:
    +using (IMyContext ctx = MyFactory.GetInstance(request.UserId)) {+
    Response response = new Response();
    response.customer = ctx.GetCustomerByAccount(request.data.Account);
    response.custInfo = ctx.GetCustInfoByAccount(request.data.Account);
    response.address = ctx.GetDefaultAddressByAccount(request.data.Account);
    return response;
    +}+
    Thanks in advance,
    Nick

    Hi,
    Although I don't understand why you need to serialized two programs
    that have no dependency on each other, maybe the following code can help provided the programs are executed using specific tcodes.
      DATA: BEGIN OF USR_TABL OCCURS 10.
              INCLUDE STRUCTURE UINFO.
      DATA: END OF USR_TABL.
    CONSTANTS: OPCODE_LIST LIKE TH_OPCODE VALUE 2.
      refresh USR_TABL.
      CALL 'ThUsrInfo' ID 'OPCODE' field OPCODE_LIST
        ID 'TAB' FIELD USR_TABL-SYS.
      sort usr_tabl by mandt bname.
    You can check wheter the other program(tcode) is being run from itab USR_TABL, good luck.
    Jeffrey Satriadi

  • How to find memory diffrence between two programs

    Hi all,
    i want some clarification
    i have one which is occuping more memory
    then i copied that  program to antoher program
    now i want to check memory diffrence between these two program.
    ASAP
    Regards
    Venu

    Use SE30 Transaction ,run ur first program and then second program..
    For better results use ST05 (SQL Trace ) .
    goto ST05 and then trace on...
    use first transaction...
    then trace off and see list.
    use one more session and then use ST05 Again,
    Trace on ,use second transaction see the list.
    compare both list and you will have some idea now.
    Reward Points if it is helpful
    Thanks
    Seshu

  • How to restrict multiple executions of a report by same user

    During month end closing user execute multiple sessions of the same report. In order to improve system performance want to put restriction on such executions espcially for system exhaustive reports. So user can execute report second time once first job is over.
    In background this can be done but how to achive this for foreground jobs. Kindly resolve.
    thanks
    anya

    Hi Eileen,
    Please go through these threads
    Reporting authorization
    Authorisation Variable
    Creation of variable in BEx from user authorization
    Authorization variable
    Variable filled Authorizations
    Khaja

  • How to stop the execution of a program

    greets folks
    i want to know if its possible to stop or let in stand by the execution (run) of a program while HttpService responds the request??

    No. All remote requests in Flex are asynchronous.It's part of how Flash Player works and you can't change that. You need to react to the event when the call completes. What are you trying to achieve?

  • How to automate the execution of several programs and use their output

    Dear java members,
    I am trying to figure out how to get data from a file, database, or program and use that information in another program. Can you help please?
    I have looked through several texts and while the information is there somewhere I have not found the specific capabilities or examples that explain how to do this.
    I want to learn how to do this with objects.
    The specific applications I am working with are the GIS (Geographic Information System) suite of ESRI products such as ArcInfo and ArcView.
    I am working with simulators for hydrologeology (ground water) and other geophysical phenomenae. Programs for decisions and assessment of probability such as found in geostatistical analyses packages. Drawing programs and data manipulation programs such as spreadsheets in windows and scripting languages found in most Unix packages.
    I want to be proprietary platform free! I want to be accessing apps and or data wherever they are and in whichever form they are in or best used.
    Web techniques and protocols are where I think most of my effort will be focused.
    One of the mediums (media) that I expect to use a lot is XML.
    If I can find a simplified (generalized) explanation how this is done and how the parts fit together through and or with objects. If I can find references to texts and examples I will be very appreciative and very much less confused.
    I am interested in using the Java programming language.
    Thank you
    ctavares1

    Hello Tavares,
    What you seek can be done, but before that you must know from where you want to take the data. In what form you will get the data in and where you want to use it and how.
    Your problem is what we call an architectural issue. If possible please write to me at [email protected]
    With the above information - I shall be able to help you to some extent.
    Ironluca

  • How to restrict simultaneous log in of a user

    Hi Experts,
      I am facing one problem to implement the following scenario,
    The requirement is at a time one user can log in to the portal only once.Means after login if he tries to logging from another system it  will not allow him to do that and give one message that "you are already logged in".
    Please provide some solutions for that
    - Indranil

    Hi
    U can do it by using the property "login/disable_multi_gui_login "....
    Multiple Logon
    Parameter                                                                                Meaning
    login/disable_multi_gui_login                                                  Controls the deactivation of multiple dialog logons
                                                                                    Available as of SAP Basis 4.6
    login/multi_login_users                                                               List of excepted users (multiple logon)
                                                                                    Available as of SAP Basis 4.6
    related documents are.....
    1) http://help.sap.com/saphelp_nw70/helpdata/EN/a3/68c6385740b561e10000000a114084/frameset.htm
    2)http://help.sap.com/saphelp_nw70/helpdata/EN/22/41c43ac23cef2fe10000000a114084/frameset.htm
    regards'
    Pradeep

  • Runtime updation from two programs running simultaneously

    Hi Experts,
    Need inputs for the situation described below:
    We have two programs prog A and prog B. These are independent executable programs and have no dependency on each other. I want to restrict execution of prog B if prog A is running in any session by any user. Is there any system/basis table which stores runtime status of all the programs? There should be some table where all the currently executing programs get stored and once program is completed, entry is cleared from the table.
    One way can be:
    When prog A has started execution, add an entry in any Z table and at the time of finishing delete the particular entry. In prog B check that the table has any entry for prog A. If yes that means prog A is still running.
    Issue with this approach is, if program A has some error or cancelled while execution, it will not delete its own entry and hence even if prog A is finished, prog B will find entry in Ztable.
    Any other way to achieve this functionality?
    This is very urgent.Please help!
    TIA
    Abhishek

    Hi,
    Check in Table "TBTCO"
    status values.
    btc_running LIKE tbtco-status VALUE 'R',
    btc_ready LIKE tbtco-status VALUE 'Y',
    btc_scheduled LIKE tbtco-status VALUE 'P',
    btc_released LIKE tbtco-status VALUE 'S',
    btc_aborted LIKE tbtco-status VALUE 'A',
    btc_finished LIKE tbtco-status VALUE 'F',
    btc_put_active LIKE tbtco-status VALUE 'Z',
    From table "TBTCO" Write select statement and check the status above.

  • How to let two programs access the same BDB data

    I want to use two programs to access data in one BDB database, but get this error
    multiple databases specified but not supported by file
    db open failed:Invalid argument
    I do not know how to deal with it.....
    anyone can help?
    thank you first

    Hello,
    Can you clarify a bit more as to what you are doing?
    A message like:
    multiple databases specified but not supported by file
    open: Invalid argument
    is expected when you are incorrectly creating multiple databases
    within a single physical file.
    The details are at:
    http://www.oracle.com/technology/documentation/berkeley-db/db/ref/am/opensub.html
    http://www.oracle.com/technology/documentation/berkeley-db/db/api_c/db_open.html
    It is possible to contain multiple databases in a single physical file
    but the application has to follow some steps in order to do that.
    For example you can not attempt to open a second database in a file that
    was not initially created using a database name. Doing will generate
    the error you posted.
    Thanks,
    Sandra

  • How to open two program in one click??

    hi there Java lovers , can anyone help me on this ?
    I want to open two program ( 2 windows ) after I click on a button... how can I do this ??
    please help me & Thanks for the help ....

    hi there Java lovers , can anyone help me on this ?
    I want to open two program ( 2 windows ) after I click
    on a button... how can I do this ??
    please help me & Thanks for the help ....I suppose that you can open 2 windows,two Dialog windows.You cann't open 2 Frame windows at the same time.
    To do this ,you can use Dialog.show() to make the windows be visible.

  • How to restrict rights of executed program

    Greetings,
    I need to execute JAVA programs (student homework), where there is not guaranteed that one of the submission is some kind of trojan horse, which could potentially e.g. delete some important files on a machine, which executes the code.
    Is there any simple way how to restrict rights of executed program?
    Or how does e.g. tomcat hosting provider guarantee the security?
    Thanks in advance.
    Edited by: radone on Jun 29, 2008 10:59 PM

    Nice example describing using a policy management is here:
    [Managing Policy Files|http://exampledepot.com/egs/java.security/UsePolicy.html]
    Edited by: radone on Jun 30, 2008 1:50 AM

  • How to restrict a KF with 1st two characters of a row char.?

    We know how to restrict a KF (e.g. quantity) with a row char. by dragging these two to the Column section in Query Designer.  But now we want to restrict this KF with only 1st two char. of a row char., then what's the best way of doing this?
    Thanks in advance and we will give you reward points!

    Hi,
    I have never been able to restrict to anything else than a characteristic in Bex....
    So, Create a new Characteristic that is the 1st 2char of a row char....
    PY

  • How to see simultaneously two parts of one document

    Hello,
    In word I used to use the simultaneously views of two different parts of one document. How can I do this under Pages 5.0.1 ?
    Thank you for your response

    PeterBreis0807 wrote:
    Did a quick search:
    Bean [free]
    Scrivener
    Nisus Writer Pro has screen duplication ie side by side.
    NeatWorks
    MarinerWrite
    added
    OpenOffice 4.2
    MsWord
    Peter
    Need to correct this.
    Screen duplication has been removed in Nisus Writer Pro. You used to be able to split the screen in Nisus Writer Classic.
    Peter

  • How to compare two programs to check variation in codes

    Hi,
         I would like compare two programs to check the variation in codes.
    Do we have any tool in SAP to do that.
    Cheers
    S Kumar

    Hi,
        I did award the points to you when I close the thread. I award it again..
    Cheers
    S Kumar

Maybe you are looking for

  • My laptop keeps freezing when i start it up

    I posted this on my phone, by the way, since I couldn't even open up Google Chrome without my laptop freezing.

  • Music won't sync to new computer after failed hard drive

    My hard drive failed catastrophically. It was a managed computer with a school district. They gave me a new computer. I authorized the new computer for iTunes. I can't sync my music from the iphone. I can see it, but the titles are grey. I am a music

  • IBook not connecting to Airport

    Hi I have an iBook 13' I am very happy with it, but I have always been afflicted by a problem, every time my iBook goes to sleep, it loses the ability to connect to my Airport. When i wake or start it, it show a list of wifi connections, all my neigh

  • MacBook airport seems dead

    I have a MacBook core duo (no 2) that runs on a wifi network hosted by an airport extreme basestation(those prior to gigabit). I noticed that my macbook could not load pages anymore and connected a ethernet cable. Both my airport and ethernet claim t

  • How do i kick other devices off my time capsule?

    I'm using a Macbook Pro running 10.8.4 and i have a 2tb time capsule. Under Airport ultility under wireless clients i see someone else's laptop that i don't want connect. How can i just put a block on their computer?