Need to Check whether the program is Active or not

Is there any statement where i can check  whether the report program is Active or not.
Using below statement i am  copying the entire Code in internal table it_source.Before copying in the source code in the  internal table  it_source.I need to check that program is Active or not if it is not active and i need to give a pop message and forceliy i need to Active it.
read report wa_trdir-name into it_source.

Hi Srini,
i just checked the table REPOSRC for a program which was not activated, i got two entries for the program one as active and one as inactive ,as soon as i activated the program there was a single entry.
so is it that we should check if we have any inactive entry in the table for the program?.
Regards,
gunjan

Similar Messages

  • We need to check whether the order is locked or not?

    I need to check whether the order is locked or not?
    I tried to use this RFC KAUF_ORDER_READ and passed Order no.
    I manually locked the order( using Tcode -IW32) but still Function module is not returning 'X' in FIELDS flg_locked and FLG_ENQUE of the structure E_KAUF.
    the FM should return 'X' in these fields.
    Please help.
    Coudl anybody suggest me how I can check using RFC/ Table fields etc that whether the order is locked or not?

    Hi Rohit,
    Try this code. Check the flag.
    Note : Order number should have left padding of Zero
    DATA : order_tab TYPE TABLE OF ord_pre,
           wa        TYPE ord_pre,
           flag      TYPE rc27x-flg_sel.
    wa-aufnr = '000004006789'. "Order number should have left padding of Zero
    APPEND wa TO order_tab.
    CALL FUNCTION 'CO_ZF_ORDER_READ'
    EXPORTING
       flg_dialog               = ' '
    *   FLG_ENQUEUE              = 'X'
    *   OBJECTS_IMP              = ' '
    *   EXPLODE_IMP              = ' '
    *   FLG_PROT_IMP             = ' '
    *   FLG_NO_EXTERNAL          = ' '
    *   FLG_NO_BANF              =
    *   FLG_CHECK_SIM            =
    *   IMPORT_MESSAGE_ID        =
    *   CHECK_STATUS_READ        = ' '
    *   FLG_NO_GOS               = ' '
    *   FLG_CALLED_TO_COPY       = ' '
    IMPORTING
       flg_enqueue_ok           = flag
    *   FLG_ESCAPE               =
      TABLES
    *   AUFNR_DEL_EXP            =
        aufnr_tab_imp            = order_tab
    EXCEPTIONS
       ORDER_NOT_FOUND          = 1
       RELEASE_NO_CHANGE        = 2
       OTHERS                   = 3
    IF sy-subrc = 0.
      WRITE flag. "If Flag is X order is not locked
    ENDIF.
    Regards
    Rajvansh
    Edited by: Rajvansh Ravi on Nov 27, 2008 12:33 PM

  • How to check whether the Resultset is empty or not ??

    I wanna check whether my Result set is empty or not ( I don't want the no of rows it contains..) i'm using this function...
    boolean result=myResultSet.isAfterLast() | myResultSet.isBeforeFirst() ;
    if (result == true)
    {//Result Set is populated
    else
    {//ResultSet Blank
    Is it ok to do like this ?? Or is there any other functanality to do this, since in big appl..i'm using it more than 10-15 times & it's working fine evrywhere except for one jsp where it is returing TRUE everytime ...
    Help Appreciated !!

    try,
    rs = pstmt.executeQuery();
    boolean b = false;
    if( b = rs.next() ) {
    while( b ) {
    //... rs.getXXX( YYY );
    b = rs.next();
    else {
    //...empty rs processing
    or,
    ResultSet rs = ps.executeQuery();
    if(rs.next()) {
    do {
    System.out.println(rs.getString(1));
    } while(rs.next());
    } else {
    System.out.println('empty result set');
    but I usually avoid using do...while although this may be an exception.

  • Searching FM for checking whether a job is active or not

    Hello,
    i am searching fo a FM which tells me if a job is already scheduled or is running.
    Does anybody know?

    Sorry.. i misread your question.. i thought of JOB in HR.
    Check this FM for BASIS JOBS.
    BP_IS_JOB_ACTIVE_IN_WP
    BP_JOB_CHECKSTATE
    BP_JOB_CHECKSTATE_SM37B
    BP_JOB_STATUS_GET
    BP_JOB_READ
    To explore more FMs look at FG BTCH
    Aman

  • Field to find program is active or not

    hi friends,
    i have a doubt. what is the field to find whether the program is active or not.please reply as soon as possible.

    Check with Database view : PROGDIR
    field names:
    NAME -> enter program name
    STATE -> A (Active) I ( Inactive)
    Thanks
    Seshu

  • How to check whether the vendor invoice was reversed (MR8M & FB08)

    hi,
    need to check whether the vendor invoice has been reversed. Posting of the vendor invoice as well as its reversal may happen in FI (e.g. FB60 - FB08) and MM (MIRO - MR8M).  have developed a custom function based on the values of the fields: stblg, stjah,... (for fb08) and rebzg, rebzj,rebzz (for mr8m) and trans type but not sure this is the right way.
    Is there a bapi (e.g. similar to BAPI_ACC_INVOICE_REV_CHECK) , sap function or at least a report to as a sample. Any help appreciated.
    Thank you,
    victor

    Viktor, We have always used the table fields values you have listed to determine if the invoice has been reversed or cancelled...

  • How to check Whether the File is in Progress or used by some other resource

    Hi All,
    I am retrieving a file from the FTP server using Apache commons FTP.
    I need to check whether the file is fully retrieved or in progress.
    for now i can able to use the file which is partially retrieved. it is not throwing any file sharing exception or i am unable to find whether it is in progress.
    How to check whether the file is in progress ? or The file is accessed by some other resource ?
    Pls Help me.
    Thanks,
    J.Kathir

    Hi Vamsi,
    Explicitly such kind of requirement has not been catered and i dont think you would face a problem because any application that is writing to a file will open the file in the read only mode to any other simultaneous applications so i think your concerns although valid are already taken care off .
    In the remote case you still face a problem then as a work around. Tell the FTP administrator to set the property to maximum connections that can be made to ftp as one. I wonder if you have heard of the concept of FTP handle , basically the above workaround is based on that concept itself. This way only one application will be able to write.
    The file adapter will wait for its turn and then write the files.
    Regards
    joel
    Edited by: joel trinidade on Jun 26, 2009 11:06 AM

  • How to check whether the Application Server directory exits or not

    Hi,
    I have a selection screen in which I give the Application server file name(UNIX file) as input. Here, I would like to check whether the Server directory exists or not.
    Let us say, the path I gave in the selection screen is /usr/sap/tmp/testfile.txt . Here, the file name is testfile.txt and the server directory is /usr/sap/tmp . I would like to check whether this directory /usr/sap/tmp exists in the server or not. I am not bothered about the file name as I am going to write data into the file. I am mainly concerned about whether the directory exists in the server or not. and one more thing... this is the Application Server path not the Local path.
    Can anyone help me on the same how to check whether the server directory exists or not.
    Thanks in advance.
    Best Regards,
    Pradeep.

    Also you can use the FM EPS_GET_DIRECTORY_LISTING for this purpose.
      Store the directory name
        l_dpath = p_file+0(l_no).
      Validate the directory of the application server
        CALL FUNCTION 'EPS_GET_DIRECTORY_LISTING'
          EXPORTING
            dir_name               = l_dpath
          TABLES
            dir_list               = l_i_dlist
          EXCEPTIONS
            invalid_eps_subdir     = 1
            sapgparam_failed       = 2
            build_directory_failed = 3
            no_authorization       = 4
            read_directory_failed  = 5
            too_many_read_errors   = 6
            empty_directory_list   = 7
            OTHERS                 = 8.
      If any problem occurs with the directory then display proper
      error message
        IF sy-subrc <> 0.
        Display error message
          MESSAGE e018 WITH 'Problem with directory entered'(008).
        ENDIF. " sy-subrc <> 0
    Regards,
    Joy.

  • How to check whether the system has eclipse environment: urgent

    Hi gurus
    can you please tell me how to check whether my crm system has eclipse envirionment.
    Thanks
    shashi

    There is no way to check whether a system is used productively or not, I believe what you mean is checking a client is productive or not in an ABAP-stack based system. Remember although a SAP ABAP system is identified by a SID but from a business perspective the system is recognized by a client, as it is a unique business identity.
    Thus, to check whether the client is productive or not in txn SCC4 check the role of the client, it will show you the correct status. The data of SCC4 is stored in table T000, you can also opt to check that.
    - Regards, Dibya

  • How to check in the program that whether it is running in background?

    Hi,
    Can i check in the program itself that whether it is executing in the foreground mode or background mode?

    Check the value of system variable sy-batch. if value of it is 'X' that means program is running in background and if value is ' '(blank) that means prog. is executing in foreground mode.
    Regards,
    Joy.

  • Why do we need to point at main program when activating include?

    Hi There Abapers,
    Just a quick question, because I faced such issue when implementing OSS notes.
    When activating objects I am asked to point out the main program for one of includes changed.
    This inclde is used in ~30 programs.
    As far as OSS note doesn't say a word about main program in fact I am not able to check it, I need to pick random program from a list up.
    The question is...
    Why do we need to point at main program when activating include as we are only changing the sub-object (include)?
    Will this 'random main program selection' bring some negative effects in the future?
    Will be thankful for some expert opinion
    Kind Regards,
    P.

    You should check all main programs when activating an include, to make sure that all main programs are still syntactically correct even with the changed include.
    Thomas

  • Is there any tool to check whether the proper data is inserting or not?

    Hi,
    We have different products A,B and C.
    whenever user crates an account under these products some X,Y,Z table gets updated.
    If user1 creates an account under A then X, Y, Z tables update with some data along with some ID
    If user2 creates an account under A then X, Y, Z tables update with SAME DATA along with some other ID
    Is there any tool to check whether the proper data is inserting (same data is inserting every time) or not?
    p.s : if this thread is not related to this forum .. where can I post?
    Thanks,
    Praveen

    Is there any tool to check whether the proper data is inserting (same data is inserting every time) or not?You need to check the code to see that. Is the update or insert on the table has from different places? In that case it would be better to have them moved to a centralized place may be a package.
    If you want to restrict the columns to specific values then you can use constraints.

  • How to check whether the particular schema(user) is having import privilege

    Hi,i need to check whether a particular schema(user) is having privilege to import the data to target database within the same database(10 g)

    Answer is in the documentation - which is pretty easy to look up -
    http://docs.oracle.com/cd/E11882_01/server.112/e22490/dp_import.htm#i1007024
    http://docs.oracle.com/cd/E11882_01/server.112/e25513/statviews_5406.htm#REFRN26230
    HTH
    Srini

  • Checking whether a URL is active in 4.6C

    Here's a different question for you.
    I've been asked to check whether a URL is active.  Basically they want to check whether the webpage is still viewable and if it isn't, then send an e-mail.  This will be a background job.
    Because 4.6C does not have ICM [Internet Communication Manager] this doesn't seem to be an easy process.
    The most I seem to be able to do is use CL_GUI_HTML_VIEWER to show the URL.  But that only happens when run online and not in background. And no exceptions are raised if a 404 page cannot be displayed happens. 
    Being the constriction of 4.6C anyone have any ideas?
    If you could show me how to PING from ABAP or know whether a website is active <REMOVED BY MODERATOR>
    Let's use www.ebay.com as an example.
    Thanks!
    Edited by: Alvaro Tejada Galindo on Feb 8, 2008 10:25 AM

    Hi,
    Go to tcode DC30 and there check for the 'Define workstation apllication in network'.
    If there is no entry for URL, create an entry as below :
    Appl =  URL
    Description = Textdateien
    Suffix = URL
    ArchID = *
    StartAuth = flag checked
    I think this setting should make the system to access the URL's.
    Regards,
    B Rangaraju

  • How to check whether the browser supports cookie using servlet

    Hi
    I have a servlet that uses session.I want to check whether the browser supports cookie.
    Please help me how can i detect this using servlet.
    could you please include a sample code
    thanks
    sabu

    You can check whether any cookies were sent in the request to your servlet:
    Cookie cookies[] = request.getCookies();
    if cookies is not null (cookies != null) then the browser sending you the request suppoerts cookies.
    If it is null then you would need to do a little extra work. Basically add a cookie to the response going back to the browser. Then send a redirect back to this same servlet. You then would have to add code to check to see whether the cookie was sent back.
    // Servlet named myServlet
    String test = request.getParameter("TEST");
    Cookie cookies[] = request.getCookies();
    if (test == null || !test.equals("TRUE")
    if (cookies == null)
    response.addCookie("testCookies","testCookies");
    response.sendRedirect("myServlet?TEST=TRUE");
    else
    // cookies were sent in the initial request, so
    // browser supports cookies
    else
    // This is the redirect. Check the for the presence of
    // our testCookie
    Hope this helps.

Maybe you are looking for