Check customer's locking

Hey, there.
I'm searching for a FM which checks if a customer is locked by another user or not.
I have a FM which makes a batch input of XD02 transaction and I want to know before the BI proccessing if sombodey is editing the customer data at the same time and build an error message appropiatally.
Thanks in advace,
R.R.

Hi,
try to do something like:
CALL FUNCTION 'ENQUEUE_EXKNA1'                                    
     EXPORTING                                                    
          KUNNR          = KNA1-KUNNR                             
     EXCEPTIONS                                                   
          FOREIGN_LOCK   = 1                                      
          SYSTEM_FAILURE = 2.                                     
CASE SY-SUBRC.                                                    
  WHEN 1.                                                         
    SPERR_USER = SY-MSGV1.                                        
    MESSAGE E042 WITH KNA1-KUNNR SPERR_USER.                      
                                   "von anderem Benutzer gesperrt 
  WHEN 2.                                                         
    MESSAGE E038.                  "Systemfehler                  
ENDCASE.
Best regards.

Similar Messages

  • Checking for kernel lock contention in OEL 5.5

    Is there a lockstat utility for Enterprise Linux 5? Or how could I check for kernel lock contention?
    I found a lockstat rpm for RHEL and Centos 4 at http://packages.sw.be/lockstat/, but I could not find it in the distribution of version 5?
    The rpm package installs, but the command "lockstat on" shows /proc/lockmeter: No such file or directory
    I found an interesting document named "Linux Kernel Lock Profiling with LockStat" at:
    http://dolavim.us/blog/2007/11/06/linux-kernel-lock-profiling-with-lockstat/
    The document outlines the use of /proc/lock_stat, which is a text file - not using a "lockstat" utility.
    From what I understand, I have to rebuild the kernel with "CONFIG_LOCK_STAT=y", or wait for kernel 2.6.24 to be released?
    Do I have to build a custom kernel to check for lock contention, or are there perhaps other options?
    Thanks!
    Edited by: Markus Waldorf on Aug 28, 2010 8:55 PM

    SQL> SELECT INDEX_NAME,INDEX_TYPE,UNIQUENESS FROM DBA_INDEXES WHERE TABLE_NAME='DATA_DATA';
    INDEX_NAME INDEX_TYPE UNIQUENES
    CIDX BITMAP NONUNIQUE
    VIDX BITMAP NONUNIQUEYou have bitmap indexes here on a table being inserted into. Bitmap Indexes are another source of lock(and deadlock) in OLTP application. You said that the SQLloader was the unique active program but may be you are also triggering another procedure after the load. Procedure in which you might be using also automomous transactions and so on...
    Check first if your table is subject to DML operation in a a multi-user concurrent accesss and in which case you have to get rid of those bitmap indexes
    http://hourim.wordpress.com/2011/03/14/deadlock-%e2%80%93-part-1-bitmap-index/
    Best regards
    Mohamed Houri
    www.hourim.wordpress.com

  • Error in VA01 - "Sales order cannot be processed. Check customer type."

    Hi,
    While creating a Sales Order in VA01, I receive this error message - "Sales order cannot be processed. Check customer type."
    Could you please tell me what could be the reason for this.
    Thank you,

    Hi,
    U Can Find the Customer Type in Extras> Account Group Information> Customer Types.
    There U can Make the Customer Type.
    Regards..
    Praveen Kumar.D

  • Check-In not locked for structure element in SOLMAN_DIRECTORY

    Hi,
    In  the solution manager, as a pre-requisite of the one of the upgrade project,
    all the BPS nodes should be checked in the solution directory.
    But we are not able to check in .
    Getting below  error message.
    " Check-In not locked for structure element PD-PPD of type  with object_no 0000847512 "
    Message no. MAINT_PR046
    Can anyone please suggest what could be the issue.

    Please ensure whether both projects have the same budget profile. Other than that you need to carefully investigate how the cost was posted onto both projects in the first place. Please note in case of procurements, budget is only checked at the commitments level (search the forum as this has been discussed before).
    In case this does not resolve your issue, revert back with the budget profile settings.
    Regards,
    Ammar

  • Help req for check customer table maintenance with XD02 if not throw error

    hello ABAP GURUS,
    check customer of the table maintenance with XD02 if not throw error i have given the codition for passing the values in the table but before that it has to check whether the customer i am passing in to the table is a customer from xd02.Here whatever no i am passing it is accepting it should not happen, but when i give the customer which is not a customer it should not accept but it has to throw the message as 'customer does not exist.Its urgent please help me
    TYPES: BEGIN OF TY_KNVI,
    KUNNR TYPE KUNNR,
    TATYP TYPE TATYP,
    TAXKD TYPE TAKLD,
    END OF TY_KNVI.
    DATA : VALIDFROM TYPE GUEBG,
    VALIDTO TYPE GUEEN.
    DATA : IT_KNVI TYPE STANDARD TABLE OF TY_KNVI,
    WA_KNVI TYPE TY_KNVI OCCURS 0 WITH HEADER LINE.
    DATA : V_NAME TYPE SYUNAME.
    SELECT KUNNR
    TATYP
    TAXKD
    FROM KNVI
    INTO TABLE WA_KNVI
    WHERE KUNNR = YYV_CFORM-KUNNR
    AND TATYP = 'ZCST'
    AND TAXKD = '1'.
    V_NAME = SY-UNAME.
    YYV_CFORM-ENTEREDBY = V_NAME.
    IF SY-SUBRC NE 0.
    MESSAGE E000(E4) WITH 'Please change the tax classification of ZCST as' '1' ', in Sales Area Data'.
    ENDIF.
    I have used the following code to enter the data into the table maintenance it is working fine and throwing the error when the tax type is not the one which i have given in the select statements but the problem is when i have given the customer no which is not there in the XD02 tcode, it is accepting and showing the error message as MESSAGE E000(E4) WITH 'Please change the tax classification of ZCST as' '1' ', in Sales Area Data'. now i have to check the customer no from XD02 and if it is existing in that tcode it should allow to save in the table maintenance otherwise throw a message as the 'Customer no does not exist, this I am unable to write so how can i check please help me .
    thankx in advance.
    Edited by: soni khadary on Apr 22, 2008 7:55 AM

    Hi Kelly,
    I guess <wa_tab>-handle_style is of type lvc_t_styl therefore you can do the following:
    ls_edit-style = cl_gui_alv_grid=>mc_style_enabled.
    "I assume you know your non-key fields' names so you can use subrotuine to perform update on each of them
    ls_edit-fieldname =  'First field name' .
    PERFORM update ls_edit.
    ls_edit-fieldname =  'Second field name'.
    PERFORM update ls_edit.
    ls_edit-fieldname = 'Third field name'.
    PERFORM update ls_edit
    FORM update USING fs_edit type lvc_s_styl.
    field-symbols: <style_tab> type lvc_t_styl,
                         <style_wa> type lvc_s_styl.
    LOOP AT <tab> ASSIGNING <wa_tab>.
       if e_row = sy-tabix .
         "get you style table
         assign component 'HANDLE_STYLE' of structure <wa_tab> to <style_tab>.
         "as <style_tab> is typed fully you can read the row you are interested in
         read table <style_tab> assigning <style_wa> with key fieldname = fs_edit-fieldname
         if sy-subrc = 0.
           "update this entry
            <style_wa> = fs_edit.
    *        modify table <style_tab> from <style_wa>. 
         endif.
       endif.
    endloop.
    endform.
    Note!
    Though, this should work, the use of RTTI as Uwe suggested would be best practise approach as far as dynamic programming is concerned. Anyhow it is still up to you which one you pick.
    Regards
    Marcin
    I noticed now that this line is not necessary
    modify table <style_tab> from <style_wa>. 
    as we simply are working with field symbols, so changes made to <style_wa> are already visible in that table <style_tab>.
    Edited by: Marcin Pciak on Mar 15, 2009 12:44 PM

  • CHECK CUSTOMER BALANCE

    HI
    FRIENDS,
                 HOW TO CHECK CUSTOMER BALANCE i.e. FOR A CUSTOMER HOW MANY INVOICE ALREADY EXSISTING & THEIR VALUES.
                 I MAY BE TECHNICALLY WRONG ACTUAL ISSUE IS I WANT TO CHECK CUTOMER WISE INVOICE VALUE, SO IS THERE ANY TRANSACTION CODE AVAILABLE BY WHICH I CAN GET THIS INFORMATION . THIS IS MAINLY  FOR FI PURPOSE
    P
    REGARDS
    AMBARISH

    Dear ambarish
    Go to FBL5N, select just Company Code and below that you can see three options to choose.
    -  Open items
    -  Cleared items
    -  All items
    If you want to see only invoice wise what is outstanding, choose the first one and execute.
    If you want to see invoice wise payment received details, select the second one.
    If you want to see both outstanding and payment received details, choose the third one.
    Also please note that once you execute with any of the above options, on the left corner, you can see red / green buttons which indicates;  outstanding for red, cleared for green.
    Similarly, if you want to see vendor details, go to T.Code FBL1N where also, you have the above three options.
    thanks
    G. Lakshmipathi

  • Custom Form - Locking Issue

    Hi All,
    I have developed a New Custom form from scratch using TEMPLATE.fmb . I have generated it and it allows me to save OK. I have based the Block on a view(with Row_id as a column) . Also, the primary Key for my Table is vend_cat_id.
    But, when I Query it and press the down arrow key to navigate to records (Its a single record block) or even try to change some field in the block , I get the error "FRM-40657 : record changed or deleted by another user".
    My ON-lock trigger calls my custom package : and my code in my Custom pkg is as below, as per the Forms Dev Guide :
    Any ideas what I may be doing wrong or can check ?
    Many Thanks
    Shankar
    PROCEDURE Lock_Row IS
    counter NUMBER;
    cursor c1 IS
    select *
    from XX1
    where rowid = :blk.row_id
    for update nowait;
    recinfo c1%rowtype;
    begin
    counter := 0;
    loop
    begin
    counter := counter + 1;
    open c1;
    fetch c1 into recinfo;
    if (c1%notfound) then
    close c1;
    fnd_message.Set_Name('FND','FORM_RECORD_DELETED');
    fnd_message.Error;
    Raise form_trigger_failure;
    end if;
    close c1;
    if ( (Recinfo.vend_cat_id = :blk.vend_cat_id)
    AND ( (Recinfo.vendor_id = :blk.vendor_id)
    OR( (Recinfo.vendor_id IS NULL) AND (:blk.vendor_id IS NULL))
    AND ( (Recinfo.vendor_site_id = :blk.vendor_site_id)
    OR( (Recinfo.vendor_site_id IS NULL) AND (:blk.vendor_site_id IS NULL))
    AND ( (Recinfo.start_date_active = :blk.start_date_active)
    OR( (Recinfo.start_date_active IS NULL) AND (:blk.start_date_active IS NULL))
    ) -- end if
    then
    return;
    else
    fnd_message.Set_Name('FND','FORM_RECORD_CHANGED');
    fnd_message.Error;
    raise form_trigger_failure;
    end if;
    exception
    when APP_EXCEPTIONS.RECORD_LOCK_EXCEPTION then
    if (c1%isopen) then
    close c1;
    end if;
    APP_EXCEPTION.Record_Lock_Error(Counter);
    end;
    end loop;
    end lock_row;

    You can create a Forms Runtime Diagnostics (FRD) trace to see if you can try and pinpoint the cause. Pl follow instructions in MOS Doc 150168.1 (Obtaining Forms Runtime Diagnostics (FRD) In Oracle Applications 11i)
    HTH
    Srini

  • No red focus confirmation light on my 3 month old 60D. Checked customs functions, HELP

    Hi guys. Title pretty much says it all. Picked my 60D up today and noticed that it will focus (I get the beep), but no focus confirmation (the red square) through the viewfinder. I have tripled checked all settings, cleared custom functions, made sure my CfN III was set to 0 or ON. I'm in one shot mode, using autofocus. PLEASE HELP! Is there a such thing as AF-OFF? I saw this mentioned elsewhere but not on my 60D menus. The photos seem sharp and in focus, just no confirmation for me on the viewfinder. Any advice??

    It sounds like you've hit all the major things to check:
    In AI Servo mode the AF point will never flash to confirm a focus lock like it will in One Shot mode -- AI Servo mode is continuously focusing.
    C Fn. III -3 (Superimposed Display) needs to be set to '0' (on) which is the default.
    The beep and the red-light are normally tied together (unless you disable the beeping).  If you get a beep, the selected AF point will normally flash at the same time.  e.g. if you were in "AI Servo" mode (instead of "One Shot" mode) then you would not get an audible beep or the red AF point flash to indicate which point is focused.  The fact that you get the beep indicates you are in the right mode and it's confirming... but you should ALSO get the red flash unless you disabled it via C Fn. III -3 set to 1.  
    You could try clearing all custom functions and resetting the camera back to factory default state, but if that doesn't work, I suspect it needs service.
    Tim Campbell
    5D II, 5D III, 60Da

  • Customer Inspection Lock for final Confirma

    Dear Sir
    We have requirement in our business,we use inspection type 04 for all inprocess and finished goods material and we use control key QM01 for inspection plan.Inprocess stage has 3 operation with control key pp01,pp01 and pp03 and after confirmation of pp03 we receive a lot in quality (QA32) with inspection lot origin 04,we require as soon as second operation is confirmed we received a lot in quaity and it has lock or approval then only last operation to be confirmed.I know that 03 will help but it does not block to confirm for last operation.
    please guide
    Regards
    kunal Joshi

    Hello Kunal,
    What I have understood is,
    You need to fire a lot at confirmation of Operation : 02 then put the control key PP03 at operation :02 it will perform auto GR at confirmation of this operation and post quantity at QI and give you Inspection lot.
    And the operation three have to confirmed same as the operation 01 is done with control key pp01. As more than one auto GR are not permitted.
    Then you need to introduce the user exit to put the required control about the UD of 04 lot and confirmation of operation 03.
    The user exits will be needing are,
    For Process Order Scenario:-
    CONFPI03 to carry out your own inspections (after choosing the phase to be confirmed)
    CONFPI05 to update your own data after saving the confirmation
    CONFPI06 to transfer customer-specific data to automatically generated confirmations
    For Production Order Scenario
    CONFPP05 PP order confirmation.: Customer enhancements during saving
    CONFPP04 PP order confirmation: Customer-specific input checks 2
    CONFPP03 PP order confirmation: Customer-specific checks after operation selection
    Regards,
    Shyamal

  • How to  check customer reference no. not  being use more than once

    I have the following situation and appreciate if  some one could show me a simple solution.
    “On the Sales order window, when user enter a value for Customer Ref. No”, check if the entered value has already  been used on any existing Sales Order, and give message eg. “this Ref. No already been used in SO. 257”
    What is the easiest way of implementing the validation?
    Using Formatted Search?
    Triggers or Stored Procedure?
    Or one must go about doing this simple task using SDK, DIAPI?
    sample code illustrating solution would be much appreciated.
    I tried to create a query and used it with Formatted search on the Field, but failed on an error.
    the code using temporary hard coded value instead of $[$x.0.0] looks like this
    if (SELECT    COUNT(*)
    FROM         dbo.ORDR
    WHERE     (NumAtCard = 'AAA' and CardCode ='1234')
    ) =0     
         Begin
                       select 'AAA' --redisplay value
         end
    else
                  begin
    SELECT     TOP 1 'already used in SO '+ Convert(Char(3),DocEntry)
    FROM        dbo.ORDR
    WHERE     (NumAtCard = 'AAA')    
             end
    where 'AAA' is the reference no. to check for customer '1234', this code works when I run it in SQL query analyser, but failed when I run it as query in Business one. the idea was to redisplay the entered No. 'AAA' if it is not found in any existing SO for cust ='1234'
    can anyone point out what the error is or show  alternative code for the query.
    thanks

    Hi Andy,
    I believe the best way to do this is probably to use the SDK as (to my knowledge) this is the only way you can get a message to be displayed and to stop the actual processing of the document.
    If you want to go the formatted search route I would suggest you change your query a bit. I have played with your query and the following is an example as I got it working in SBO. I think SBO gets confused if there is more than one select statement that returns a result and I have started using variables to save the results of the select statements in.
    [code]Declare @Val varchar(100)
    declare @Count integer
    set @Val = $[$14.0.0]
    if (SELECT COUNT(*) FROM dbo.ORDR WHERE (NumAtCard = @Val and CardCode = $[$4.0.0])) > 0
    begin
    SELECT TOP 1 @Val = 'already used in SO '+ Convert(Char(3),DocEntry) FROM dbo.ORDR WHERE (NumAtCard = @Val)
    end
    select @Val[/code]
    I hope it helps a bit,
    Adele

  • User-Exit for Checking Customer and Sale order type in Sales Order Creation

    Hi Experts,
      While creating the Sales Order once i enter sold-to-party and enter line item, i have to check the customer against the sales order type.
    Please suggest me if any user-exit or enhancement or BADI available for it.
    Thanks & Regards,
    -VM

    Hi
    Follow the below steps to find out what all BADI's are called when you press any button in any transaction.
    1) Goto se24 (Display class cl_exithandler)
    2) Double click on the method GET_INSTANCE.
    3) Put a break point at Line no.25 (CASE sy-subrc).
    Now
    4) Execute SAP standard transaction
    5) Press the required button for which you need to write an exit logic, the execution will stop at the break point.
    6) Check the values of variable 'exit_name', it will give you the BADI name called at that time.
    7) This way you will find all the BADIs called on click of any button in any transaction.
    mark if helpful
    Regs,
    Tushar Mundlik

  • AUTHORITY-CHECK & customized program

    Hi,
    I've applied an authority-check to my customized program. What I did was, I've created an authorization object name 'ZFI_PGRM' in SU21 and tie it with authorization fields BUKRS, ACTVT. This authority-check will validate on the company code (BUKRS) entered from the selection screen. Below are my lines in the customized program :
    DATA: text      TYPE string,
              m_text  TYPE string.
    text = 'You are not authorised for Company Code'.
    DATA: t_t001 LIKE t001 OCCURS 0 WITH HEADER LINE..
    SELECT * FROM t001
           INTO TABLE t_t001
                 WHERE bukrs IN s_bukrs.
    LOOP AT t_t001.
      AUTHORITY-CHECK OBJECT 'ZFI_PGRM'
          ID 'BUKRS' FIELD t_t001-bukrs
          ID 'ACTVT' FIELD '03'.
      IF sy-subrc <> 0.
        CONCATENATE text t_t001-bukrs INTO m_text SEPARATED BY space.
      ENDIF.
    ENDLOOP.
    At the same time BASIS tie the autorization object 'ZFI_PGRM' to the user role in order to access the program using PFCG. The problem now is the result that I'm getting always SY-SUBRC = 12 eventhough the user is allowed to access the company's report. Please help...
    Haryati

    Run transaction SU53 after the auth check fails and maybe it will give you a clue as to what is going on.

  • How to check the status - Locked or Unlocked?

    I was using a iphone 5 unlocked version, and recently i got replaced with a new phone. But now when i check online for the status (http://iphoneimei.info/) if its locked or unlocked it shows me it is locked. Im currently not using any sim card

    If Apple replaced the iPhone and the donor was unlocked lawfully then the replacement should alo be unlocked
    Only Applecare in you couuntry can legitimately tell you of the iphones Carrier status

  • [Help] How to check the object locks held by a specific thread?

    As the title I want to check locks held by a specific thread. How can I do this? In Java lock is acquired and release automatically by stating synchronized keyword. I have no idea on how to check the lock status and who owns whick lock.
    Regards,
    Skeeter

    Look for the method:
        public static native boolean holdsLock(java.lang.Object);Its in the java.lang.Thread class. It will check the lock status for an object for the calling thread.

  • Authorization check - customer exit EXIT_SAPLRRS0_001

    Hi gurus,
    a question on customer exit about EXIT_SAPLRRS0_001 related to i_step = 0 (Authorization check).
    I have two InfoObjects: 0WS_CAT and 0WSCATQ. The last one has a compounding that is 0WS_CAT.
    In the exit: I need to check the 0WS_OBSFLAG (a simple flag attribute) to determine if the entries in 0WSCATQ Master data are valid or no.
    If I found that the entry is valid I add the value to the e_t_range export table in this way:
    if ( i_step = 0 ).
        l_s_range-sign = 'I'.
        l_s_range-opt = 'EQ'.
        l_s_range-low = '00000001'.
        append l_s_range to e_t_range.
    endif.
    The problem is the compound, how can specify the value key for the export table?
    For example ... in the table I have three entries:
    0001 00000001 #
    0002 00000001 X
    0003 00000001 #
    The valid entries are:
    0001 00000001 #
    0003 00000001 #
    How can specify '0001' or '0003'? Because if I assign only the value  '00000001' to l_s_range-low then the entries valid in the authorization for 0WS_CATQ are three and not two.
    It's important for me to find a solution.
    Regards, Roberto

    Hi Roberto,
    you have to build your logic into a variable for the other infoobject 0WS_CAT and find your values 0001 and 0003 the way you described.
    You might have to restrict the selection for 0WSCATQ to a single value, in case you have a record like this in addition to the 3 you have listed.
    0002 00000005 #
    Best,
    Ralf

Maybe you are looking for