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

Similar Messages

  • 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

  • FM or table to check whether a transaction is locked or not

    Hi all.
        I  need to create change a return order (VA02 Transaction ) & then need to create a delivery (VL01N Transaction) for this
       return order no. My issue is before creating delivery (VL01n) I need to check whether return order (VA02) is lockked or not in report program. Is there any FM or table for this.  Thanks in advance.
    Kind Regards,
    sami

    Hi,
    check the below function module to check the return order is locked or not..
          CALL FUNCTION 'ENQUEUE_EVVBAKE'
            EXPORTING
              mode_vbak      = 'E'
              mandt          = sy-mandt
              vbeln          = w_lvbeln  "pass return order
              x_vbeln        = ' '
              _scope         = '2'
              _wait          = ' '
              _collect       = ' '
            EXCEPTIONS
              foreign_lock   = 1
              system_failure = 2
              OTHERS         = 3.
          IF sy-subrc NE 0.
    " Sales Order is locked
          ENDIF.
    Prabhudas

  • Hi. Im currently living in New Zealand. Just bought an iphone 5s yesterday from a shop called Parallel Brand Imports in Auckland. When i came home i called apple to check whether my phone is locked or not and they said that its locked to US Verizon even t

    When i came home i called apple to check whether my phone is locked or not and they said that its locked to US Verizon even though when i checked on iphoneimei it said sim status unknown. I put my 2degrees (NZ carrier) in today and it worked fine. I got into the settings and turned off the automatically part of carrier and there were 3 options for me to choose 2degrees vodafone and telecom. Because of that, im quite confused abt whether my phone is locked or not since im from vietnam so i want to know if i can use vietnamese sim card when i go home. Thanks for your help@verizon

    Hi tranvietanh - I appreciate you contacting us all the way from New Zealand! I can confirm that the iPhone 5s and all of our other 4G LTE device are not SIM locked. As the carrier in New Zealand may not support the exact same frequencies and cellular bands that we use on our network, we are unable to support the device if using a 3rd party SIM.
    Thank you,
    YaleK_VZW
    Follow us on Twitter @VZWsupport

  • Check whether the order date is open in AR period - Urgent

    Hi All,
    I have a csv file which contains booked order information, that I need to upload into oe_order base tables. In the file there will be order date, order no and distributor no. I need to do a validation to check the order date is in an open AR period before loading into base tables.
    Any help with the query or which tables to look into is of great help to me.
    Thanks
    Sudheer
    Edited by: user2138419 on Nov 12, 2009 4:54 PM

    Hi;
    Please see below notes:
    RVTPT-098: ORA-01086: savepoint 'START_TRX' never established [ID 987686.1]
    APP-PO-14230 Or APP-PO-14376 : When Saving Receipts [ID 552244.1]
    Run Masscancel Error App-Po-14230: The GL Date Is Not In An Open Period. [ID 1131265.1]
    Mass Cancel Error APP-PO-14230 GL Date Not In an Open Period, But Can Manually Cancel The Same Purchase Orders [ID 882329.1]
    Hope it helps
    Regard
    Helios

  • 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.

  • 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

  • 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

  • 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.

  • Need to check whether first  two characters of a string is Alphabets or not

    Hi,
    Need to check whether first two characters of a string is alphabet or not.
    Lets say for Ex,
    String as 'DE123456' i need to check whether first  character is non-numeric and then second character as non numeric.
    kindly help me on this.
                    IF length(trim(p_parserec(31))) = 22 AND p_parserec(31) LIKE 'DE%'  THEN
                        AUFTRAGGEBERKONTONR := trim(p_parserec(31)) ;
                     ELSIF  (length(trim(p_parserec(31))) > 22 AND length(trim(p_parserec(31))) < 35)  AND p_parserec(31) NOT LIKE 'DE%'  THEN
                       AUFTRAGGEBERKONTONR := lpad(trim(p_parserec(31)), 34, 0) ;
                     ELSIF length(trim(p_parserec(31))) > 10 AND ascii(substr(p_parserec(31), 1, 2)) between 48 and 57 THEN
                       AUFTRAGGEBERKONTONR := lpad(trim(p_parserec(31)), 10, 0) ;
                     ELSE
                        p_errorcd   := sqlcode ;
                        p_errordata := sqlerrm ;
                   END IF ;
    Note : In the third else if condition the character should be greater than 10 and first 2 characters should not be alphabets.

    Siva.V wrote:
    Need to check whether first two characters of a string is alphabet or not.
    To this requirement only regexp_like will work too! No need of some other string function!
    Like:-
            -- in regexp_like last parameter shows to ignore case (optional).
    SQL> with t as
      2  (select 'AB123456' as key from dual union all
      3  select 'CD234567' from dual union all
      4  select 'A1234567' from dual union all
      5  select 'A52H4341' from dual union all
      6  select 'Dk274341' from dual union all
      7  select 'DE234556' from dual)
      8  select key
      9  from t
    10  where regexp_like(key,'^[A-Z]{2}','i') -- even '^[[:alpha:]]{2}' or '^\D{2}' pattern can be replaced for same result..
      11  /
    KEY
    AB123456
    CD234567
    Dk274341
    DE234556
    Thanks!

  • R12.1.1 staging complete! How to check whether the stage is Good

    Hi Gurusl,
    I have completed staging R12.1.1 for Hp unix B.11.31. I want to know how to check whether the stage is good for installation or whether it is corrupted. Is there any metalink note or script from where we can check it. Ur help will be highly appreciated. Thanks in advance
    regards,

    Hi,
    Please refer to (Note: 802195.1 - MD5 Checksums for R12.1.1 Rapid Install Media).
    Regards,
    Hussein

Maybe you are looking for

  • Mini displayport to VGA adapter to projector problems

    I have had zero problems with this combination prior to update to Mavericks.  I believe I had Snow Leopard. Since the update to Mavericks, when I connect my Macbook (white), the projector shows a blank home screen with the shortcut bar, but no icons,

  • How to transfer files from a faulty drive to a new mac?

    Hi, at the beginning of this year I experienced one of the worst things in my life: my 4 year old macbook air had a kernel panic attack, which resulted in me taking it in for repair at a local computer repair place (since it was out of warranty i too

  • Trying to charge my iphone but the apple logo goes ond and off

    I am trying to charge my phone, and when I plug it to the mains or my pc wont charge, the apple logo comes one for seconds and goes off, the phone just got a new battery, what can I do?

  • Iphoto 08 editing shadows quirk

    I have a set of portrait photos with shadows on the face that I am trying to reduce. Each time I click on one of the slides (any of them, it seems, whether, shadow, contrast, temperature), the shadows seem to magically disappear--beautiful! But the c

  • QT won't export to WMV

    I made a movie out of a powerpoint presentation, and it exported into .mov file just fine. But it won't export as a .wmv file. I've tried every one of the settings, but it only captures the first 25 seconds or so. PPC G4 Mac OS X (10.3.9) 1GHZ, 640 R