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

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

  • 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 a transaction is running

    I need to know if there is a function I can use to check whether a transaction is being run by a specific user.

    hi,
    there is some stand teransaction called STAT(not sure abt the name ) which gives u the details abt the last reun transaction run pls chekc that out... or go to table TSTC and give STA* it will disply u some transaction just read the help info to find out the transaction..
    check also the transaction STAD..
    Thanks
    Ashu

  • How can we check whether a ResultSet is EMPTY or NOT ?

    i'm getting some data inside ResulSet (using JDBC inside Servlet).
    now i want to redirect response according to ResultSet...., if ResultSet is EMPTY then on diff page, else on different page...
    how can i check whether a ResultSet is empty or not...
    i've used next() , wasNull() methods ,,, but not solving the purpose...
    thanx in advance...

    What you could do is to ask the database fora
    record count and check that for zero.
    How?????You just do an SQL statement but instead of the list of fields after SELECT you put
    SELECT count(*) FROM ...... WHERE .....
    That returns a single integer value into the resultset giving the number of matching records currently in the database.
    The trouble is you can't be certain that when you subsequently access the records the number won't have changed, because databases are generally accessible to more than one process at a time and some other process might add or delete a record between counting and retrieving or, for that matter, during the process of retrieval.
    Also the count is likely to take more time than just doing rs.next() and seeing if you get a record.
    Since you seem to be in a servlet environment you should consider doing the database query and the first rs.next() at the top of the servlet/JSP that presents the results and, if there are no records, using getServletContext.getRequestDispatcher(...).forward(request, response) to swich to your error page if it returns false.
    So the stucture looks like:
    rs = stmt.executeQuery(......);
    if(!rs.next())
          getServletContext().getRequestDispatcher("/noresultspage.jsp").forward(request, response);
    else {
         do   {
             .... display result data
          } while(rs.next());
        }

  • To check whether a file is open or not.

    Hi,
    I am using proc_listpidspath() to check whether a file is open or not by some application.
    It works in Leopard but not in Tiger.
    Can anyone suggest some function or solution so that i can check whether a file is open or not in Tiger.
    thanks.

    PersianKamran wrote:
    if i create a file
    File f = new File("path");
    f.createNewFile();
    Now i have created this file.. but i havent wrote any thing to it.. how can i determine that whether this file is empty or not..[Read the fine manual|http://java.sun.com/javase/6/docs/api/java/io/File.html#createNewFile()]
    Atomically creates a new, empty file named by this abstract pathname if and only if a file with this name does not yet exist. The check for the existence of the file and the creation of the file if it does not exist are a single operation that is atomic with respect to all other filesystem activities that might affect the file.
    Returns:
    true if the named file does not exist and was successfully created; false if the named file already exists So if it returns true, then the file is created and empty.
    Secondly, once i write some thing to file.. how can erase all the data from file ?deleting it will get erase the file and return you to the state you started from.
    Iif you don't want to create a new file, don't use the createNewFile() method and use the new FileOutputStream/close approach rather than the createNewFile()/delete() pair as already described in this thread.

  • In which table to check whether Business Location exists in VKORG, VTWEG ?

    It is not OIFPBL - business location can exist, but no entry in this table.
    kind regards,
    KB.

    Dear Krzysztof
    Sorry I am not very sure about your requirement.  Would like to know in which table, the fields VKORG and VTWEG stored ??
    If so, VKORG is being stored in so many tables like A005, A006, A007, A020, A030 etc.  Similarly VTWEG is stored in KNVP, KNVT, KNVV, MVKE, MPOI etc.,
    If this is not your requirement, please enlighten more.
    thanks
    G. Lakshmipathi

  • 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

  • How to check whether User is alreadylogged in or not

    Hi..I want to check whether Particular User is already logged in or not ?? I had userid,password and status in my database.
    If anybody shows me how to implement it ??
    Reggards
    Chintan

    If you want to prevent multiple logins happening, use a profile on the database server that limits a login to a set number of simultaneous connections.
    If you just ant to check which users are logged in, the v$session table will have that information.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • How to check whether ESBAgentListener listener is started or not for ESBSys

    Hi,
    I am working on Oracle ESB 10g, I want to know how to check whether the ESBAgentListener listener is started or not for particular ESB system. I know we can verify the logs but I want to know is it possible from database or any other sources.
    Thanks in advance.
    Ramesh

    Hi Jogdand ,
    You can get the PO total value change form the PO business Object BUS2201 attribute  POTotalValueIncreased .
    Below code sample decribes how to get the BO attribute values
    1. INCLUDE <swfcntn01>.
    2. Create an instance of the BO by calling the macro and passing the three parameter.
        swf_create_object     <po bor object>     <BUS2201>     <po_guid>
    3. Get the PO attribute by calling macro
      swf_get_property   <po BOR object>   < 'POTotalValueIncreased' >    < lv_pototalvalueincreased>
    OR
    You can query the table BBP_PDHGP and get the original Value of the PO and call the FM BBP_PD_PO_GETDETAIL to get the new Value of the PO. Check the difference and if there is any difference then the PO value is changed.
    I hope this will be very useful.
    Regards,
    Surender

  • 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 a vriable is declared or not?

    Hi,
    Problem:
    A glogal variable named :GLOBAL.ENV is used in one of my form.
    But its value is coming from another form which is developed by another programmer.
    I need to check like this:
    IF :GLOBAL.ENV='SOMETHING' THEN
    END IF;
    But, if the other developer doesn't assign a value for the global variable, i am getting an error like this:
    FRM-40815: Variable GLOBAL.ENV does not exists
    So, i need to know whether the GLOBAL.ENV already exists before using it in my form.
    That is, i need to do like this:
    IF (code to check whether GLOBAL.ENV exists ) then
    use GLOBAL.ENV
    ELSE
    Assign a default value to GLOBAL.ENV
    END IF;
    Thanks for your time...

    Thank you very much...
    I used DEFAULT_VALUE('def val','GLOBAL.ENV');
    Now the problem is solved.

  • How to check whether a patch is applied or not when we apply a patch using patch.sh in oracle apps 11i

    Hi,
    If we apply patch using adpatch,we can know whether the patch is applied or not by checking ad_bugs,even with opatch we can check by using opatch lsinventory...
    But when we apply patch with patch.sh then how can we find out whether a patch is applied or not.
    I have to apply patch 14615390 and  16414360...but how can i know whether those patches are already applied or not. We have jre upgrade so we need to find out whether these patches or already applied or not.
    Thanks in advance,

    These are patches for Forms aren't they?
    I think this has been addressed before
    How to know if a patch has been applied to Forms?
    As the mighty Hussein points out in that post, refer to How to verify if a patch has been installed (Doc ID 105158.1)
    DA

  • How to check whether Output ES is working or not.

    I am able to see Output ES in the services list of the admin console of my server. Please let me know how to check whether this is working or not.
    Regards,
    Shabeer

    LiveCycle ES2 (and LiveCycle ES) ship with three undersold and unadvertised web applications that are VERY useful. Each is referred to as an Installation Verification Sample (or IVS) but they are great testing tools you can use during development and QA. There is
    1) Assembler IVS,
    2) Forms IVS, and
    3) Output IVS
    Output IVS looks like this...
    The pattern for deploying and using all three IVSs is very similar as what I am about to describe for Output IVS. The following directions apply to the JBoss turnkey on Windows.
    1) go to C:\Adobe\Adobe LiveCycle ES2\deploy and locate adobe-output-ivs-jboss.ear
    2) copy adobe-output-ivs-jboss.ear to C:\Adobe\Adobe LiveCycle ES2\jboss\server\lc_turnkey\deploy
    3) if necessary, start LiveCycle
    4) open a browser and go to http://localhost:8080/OutputIVS/
    5) click Check/Change your preferences
    6) add Admin Credentials
    7) click Save
    8) click Test your form designs
    9) Select an .xdp from Form designs
    10) Click Use EJB (or Use Web Service if you feel so inclined) to invoke LiveCycle Output ES2
    Steve

  • How can i check whether my phone is unlocked or not

    How can i check whether my phone is unlocked or not

    rozhan.m wrote:
    Im in srilanka, my sister brought me this phone from UK. i dont kwon how to call apple from here. pls help me
    Nothing we can do to help you.  If it was bought in the UK from an Apple store as unlocked, it is unlocked.  If it was bought anywhere else, it will be locked, and only the carrier it is locked to will be able to unlock it.
    If you've tried a local SIM and it has not worked, then you have your answer, it is locked.

Maybe you are looking for

  • I need help buying iPhoto photo album.

    I need help buying iPhoto  photo album. iPhoto was built in to my iMac. I am supposed to be able to make picture albums using my photos. It won't let me purchase the photo album i just made. I can't find any kind of help anywhere. Please help

  • Ipod disabled, changed my password but entered the wrong one too many times!

    ipod disabled, changed my password but entered the wrong one too many times! Didnt have a pc with ituens before either but now have one although dont quite know what to do.

  • RAW support for Olympus XZ 10

    Having recently purchased an Olympus XZ 10 I find that Aperture does not support the RAW format --- even though the web site claims that it does. Any ideas?

  • Af:fileDownloadActionListener - any way to force new browser session?

    Hi all I'm using af:fileDownloadActionListener to download a file. It works fine except for one thing: For some file types it does not open a new browser session but just replaces the existing page content. That's really ok by itself, but we have a p

  • WiFi w/Airport Problem

    I've tested the wifi on my iPhone walking down the street and connecting to a random signal, and the speed on the web is as fast as broadband. However, at home I can connect the iPhone to my own network, but when I check mail or use Safari, it hangs.