Creating Lock object for a field in a sap table

Hi ,
       I need to lock a field in sap table
eg.  To lock a Standard price(stprs) field in Material Valuation (mbew) table.

Try with the following Code :
CALL FUNCTION 'ENQUEUE_EZMBEW'
EXPORTING
   MODE_MBEW      = 'S'
   MANDT                = SY-MANDT
   MATNR                = '000000000000000043'
   BWKEY                =  '0001'
    STPRS                =  '20,00'
EXCEPTIONS
  FOREIGN_LOCK         = 1
  SYSTEM_FAILURE       = 2
  OTHERS               = 3
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Thank you,
Sekhar.

Similar Messages

  • Find lock object for field

    Hi Friends,
    I have one qurey. I would like to know the lock object for field MATNR.
    Any suggestion how I can find it out the lock object for specific field.
    Regards,
    Poonam

    hi,
    GOTO se11.
    select Lock object Radio button.
    Press F4.
    A popup appears, in that popup, under Short Description, type
    *Material* and press enter. you will get a list of lock objects, select your required.
    Always give the first letter in CAPS. like *Material*.

  • How to create lock object  when the total length is more than 300bytes?

    Dears:
    I want to create lock object for a add-on table , and the total length of  table's fields is more than 300 bytes.
    When I acitve this object, it will show "Total length of lock argument for table ZTEST_XXX longer than 300" error message in log.
    Is there any way  which can create  lock object when total length > 300bytes? 
    Thanks in advance.
    Best regards
    Lily

    Hi, Sudhi Karkada Sandeep Kumar 
    Thank you very much for your help.
    When the total length of  keys is more than 150bytes, lock object can't be created.
    Best regards,
    Lily

  • Creating Activity object for a Service Request object...

    <b>[This thread was migrated from the On Demand Developer Forum in the old Siebel Community] </b>
    drangineni
    New Contributor
    Ho do we use Activity object of a Service Request object. I am trying to
    create an Activity object for a existing Service Request object.
    I am looking for some sample code.
    I greatly appreciate your help.
    Product: CRM OnDemand
    11-26-2006 12:40 PM
    Re: Creating Activity object for a Service Request object...
    BigSlick
    Valued Contributor
    drangineni, What programming language are you using?
    BS
    12-04-2006 10:56 AM
    Re: Creating Activity object for a Service Request object...
    drangineni
    New Contributor
    Hi, I am using C# .
    12-04-2006 07:40 PM
    Re: Creating Activity object for a Service Request object...
    BigSlick
    Valued Contributor
    drangineni, assuming you know the service requestid or externalId of the
    Sr you are dealin gwith you would first set that value.
    ServiceRequest1[] objSRList =new ServiceRequest1[1];
    objSRList[0] = new ServiceRequest1();
    objSRList[0].ServiceRequestId = <YourSRId>;
    Then you create an array of activities and initialize the first one:
    objSRList[0].ListOfActivity = new Activity[1];
    objSRList[0].ListOfActivity[0] = new Activity();
    Now set the data fields
    objSRList[0].ListOfActivity[0].Subject ="My Subject";
    objSRList[0].ListOfActivity[0].Description ="My Description";
    objSRList[0].ListOfActivity[0].Display = "Task"; //valid values are either
    "Task" or "Appointment"
    Then call the ServiceREquestInsertOrUpdate method on the ServiceRequest
    WebService and pass in the above variable.
    BS
    12-06-2006 12:36 PM
    Re: Creating Activity object for a Service Request object...
    drangineni
    New Contributor
    Thank you BigSlick.
    The following error is thrown when I use the
    ServiceRequestInsertOrUpdate(objInput)
    "No user key can be used for the Integration Component instance 'Service <br/>
    Request_Action'.(SBL-EAI-04397)"
    When I use the prxySrvcRequest.ServiceRequestInsert(objInput), no error is
    thrown and the Activity gets added, but a new Service Request object is
    created, but the Activity gets added to an existing Service Request
    object. I greatly appreciate your help.
    The following is the code:
    int ActivityLength = 0;
    WSOD_ServiceRequest.ServiceRequest1[] ServiceRequest = new
    WSOD_ServiceRequest.ServiceRequest1[1];
    ServiceRequest[0] = new WSOD_ServiceRequest.ServiceRequest1();
    ServiceRequest[0].ServiceRequestId = this.Request.QueryString["id"];
    ServiceRequest[0].ListOfActivity = new
    WebSelfService.WSOD_ServiceRequest.Activity[ActivityLength + 1];
    ServiceRequest[0].ListOfActivity[0] = new WSOD_ServiceRequest.Activity();
    ServiceRequest[0].ListOfActivity[ActivityLength].Description =
    this.txtDescription.Text;
    ServiceRequest[0].ListOfActivity[ActivityLength].Display = "Task";
    ServiceRequest[0].ListOfActivity[ActivityLength].Subject = "My Subject";
    WSOD_ServiceRequest.ServiceRequest prxySrvcRequest = new
    WebSelfService.WSOD_ServiceRequest.ServiceRequest();
    WSOD_ServiceRequest.ServiceRequestWS_ServiceRequestInsertOrUpdate_Input
    objInput = new
    WebSelfService.WSOD_ServiceRequest.ServiceRequestWS_ServiceRequestInsertOrUpdate_Input();
    WSOD_ServiceRequest.ServiceRequestWS_ServiceRequestInsertOrUpdate_Output
    objOutput = new
    WebSelfService.WSOD_ServiceRequest.ServiceRequestWS_ServiceRequestInsertOrUpdate_Output();
    objInput.ListOfServiceRequest = ServiceRequest;
    Session objSession;
    objSession = (Session) Application["Session"];
    prxySrvcRequest.Url = objSession.GetURL();
    try
    objOutput = prxySrvcRequest.ServiceRequestInsertOrUpdate(objInput);
    catch(Exception e)
    12-09-2006 09:53 AM
    Re: Creating Activity object for a Service Request object...
    drangineni
    New Contributor
    Thank you BigSlick.
    The following error is thrown when I use the
    ServiceRequestInsertOrUpdate(objInput)
    "No user key can be used for the Integration Component instance 'Service <br/>
    Request_Action'.(SBL-EAI-04397)"
    When I use the prxySrvcRequest.ServiceRequestInsert(objInput), no error is
    thrown and the Activity gets added, but a new Service Request object is
    created, but the Activity gets added to an existing Service Request
    object. I greatly appreciate your help.
    The following is the code:
    int ActivityLength = 0;
    WSOD_ServiceRequest.ServiceRequest1[] ServiceRequest = new
    WSOD_ServiceRequest.ServiceRequest1[1];
    ServiceRequest[0] = new WSOD_ServiceRequest.ServiceRequest1();
    ServiceRequest[0].ServiceRequestId = this.Request.QueryString["id"];
    ServiceRequest[0].ListOfActivity = new
    WebSelfService.WSOD_ServiceRequest.Activity[ActivityLength + 1];
    ServiceRequest[0].ListOfActivity[0] = new WSOD_ServiceRequest.Activity();
    ServiceRequest[0].ListOfActivity[ActivityLength].Description =
    this.txtDescription.Text;
    ServiceRequest[0].ListOfActivity[ActivityLength].Display = "Task";
    ServiceRequest[0].ListOfActivity[ActivityLength].Subject = "My Subject";
    WSOD_ServiceRequest.ServiceRequest prxySrvcRequest = new
    WebSelfService.WSOD_ServiceRequest.ServiceRequest();
    WSOD_ServiceRequest.ServiceRequestWS_ServiceRequestInsertOrUpdate_Input
    objInput = new
    WebSelfService.WSOD_ServiceRequest.ServiceRequestWS_ServiceRequestInsertOrUpdate_Input();
    WSOD_ServiceRequest.ServiceRequestWS_ServiceRequestInsertOrUpdate_Output
    objOutput = new
    WebSelfService.WSOD_ServiceRequest.ServiceRequestWS_ServiceRequestInsertOrUpdate_Output();
    objInput.ListOfServiceRequest = ServiceRequest;
    Session objSession;
    objSession = (Session) Application["Session"];
    prxySrvcRequest.Url = objSession.GetURL();
    try
    objOutput = prxySrvcRequest.ServiceRequestInsertOrUpdate(objInput);
    catch(Exception e)
    12-10-2006 08:49 AM
    Re: Creating Activity object for a Service Request object...
    BigSlick
    Valued Contributor
    Ah yes, I forgot you also need to specify a unquie Id for the activity.
    It's kinda strange.
    Try adding this:
    ServiceRequest[0].ListOfActivity[ActivityLength].ActivityId = "DummyId";
    //OD will overwrite this with a real Id
    Or if you have a unquie ID for your Activities you can use:
    ServiceRequest[0].ListOfActivity[ActivityLength].ExternalSystemId = <Your
    Unique Value>;
    Hope that helps,
    BS
    12-11-2006 10:52 AM
    Re: Creating Activity object for a Service Request object...
    surgientweb
    New Contributor
    Hi all,
    I have a similar problem, but mine is returning a message that field
    "Display" is required. Looking at this post and the documentation it is
    obvious that Display is a required field, but my WSDL did not include a
    field called "Display", so my proxy did not generate one.
    I tried adding a field called Display to the WSDL and the proxy class, but
    I get a different error... I figure I maybe cannot add it manually like
    that - but I think the bigger problem is it is not part of the WSDL that
    Siebel OD generates for me in my admin account.
    On top of that Display is not shown in the list of fields for Activity
    through the admin interface.. is it possible my account is bugged? Am I
    missing something simple here? BigSlick, I see you mention a .Display in
    your code sample so I thought you might understand what is wrong. Here is
    my code (I am trying to add a activity to a lead).
    Thanks for any insight into this!
    private void InsertLeadActivity(Session session, NameValueCollection data,
    string leadID)
    try
    if (blnDebug)
    Response.Write("Setting up Activity<br>";
    // instantiate the proxy service
    Activity_Service.Activity activityProxy = new Activity_Service.Activity();
    // set up the target URL
    activityProxy.Url = session.GetURL();
    activityProxy.CookieContainer = session.GetCookieContainer();
    // set up input argument
    ActivityNWS_Activity_Insert_Input input = new
    ActivityNWS_Activity_Insert_Input();
    input.ListOfActivity = new Activity1[1];
    input.ListOfActivity[0] = new Activity1();
    if (blnDebug)
    Response.Write("Getting Data<br>";
    // dg note: name value
    // input.ListOfActivity[0].MrMrs = data["MrMrs"];
    input.ListOfActivity[0].LeadId = leadID.ToString();
    input.ListOfActivity[0].Description = DataToString(data);
    input.ListOfActivity[0].Subject = "Website Submission Activity";
    input.ListOfActivity[0].Priority = "3-Low";
    //input.ListOfActivity[0].DueDate =
    DateTime.Now.AddDays(7).ToShortDateString();
    input.ListOfActivity[0].Owner = this.defaultLeadOwner;
    input.ListOfActivity[0].Type = "Call";
    //input.ListOfActivity[0].Display = "Task";
    input.ListOfActivity[0].ActivityId = "DummyId";
    input.ListOfActivity[0].ExternalSystemId = "web";
    activityProxy.Activity_Insert(input);
    catch (Exception exInsertActivity1)
    if (blnDebug)
    Response.Write("<br>Error inserting activity.<br><br>" +
    exInsertActivity1.ToString() + "<br>";
    01-06-2007 05:05 PM
    Re: Creating Activity object for a Service Request object...
    surgientweb
    New Contributor
    Figured it out.. the field "Display" is also known as "Activity"........
    Here are some notes for other people.. good luck and feel free to write me
    at raskawa-at-gmail-com if you want a code sample.
    Some unpublished nice to knows for Siebel On Demand Activities....
    In summary:
    - .Activity is also known as Display in documentation and on the error
    messages coming back from the WS. Also, it appears based on these boards
    some people actually have a .Display field. Maybe different accounts
    generate different WSDL's.... buggy.
    - If a error message is thrown saying "Description is required" it really
    means "Subject is required" (make sure .Subject has a value)
    - If a error message is thrown complaining that ActionType is not right..
    that is really .Type.. make sure it's lookup value is valid for the
    dropdown values in your CRM OD system.
    My code/values that worked..
    input.ListOfActivity[0].LeadId = leadID.ToString();
    input.ListOfActivity[0].Description = DataToString(data);
    input.ListOfActivity[0].Subject = "Website Submission Activity";
    input.ListOfActivity[0].Priority = "3-Low";
    //input.ListOfActivity[0].DueDate =
    DateTime.Now.AddDays(7).ToShortDateString();
    input.ListOfActivity[0].Owner = this.defaultLeadOwner;
    input.ListOfActivity[0].Type = "Call";
    input.ListOfActivity[0].ActivityId = "DummyId";
    input.ListOfActivity[0].ExternalSystemId = "web";
    //input.ListOfActivity[0].Display = "Task"; //doesn't work
    input.ListOfActivity[0].Activity = "Task"; //does work.
    01-06-2007 05:17 PM
    Re: Creating Activity object for a Service Request object...
    raskawa
    First Time Contributor
    Hi,
    This is surgientweb (under my own login now..)
    Anyway, I wanted to add that I figured out that there are two ways to add
    a Activity to a Lead. Via the Lead object (by getting a ListOfActivities)
    OR by creating a Activity directly and just adding your "LeadID" to it (or
    you can also add a "ContactID" to relate the activity to a Contact.)
    Feel free to email me for a code example (raskawa....at....gmail)
    -David
    01-09-2007 02:58 PM

    Hi Stephane,
    You can definitely read the categories using Tables in CRM. The logic is a bit complicated though.
    Use the following steps to retrieve Categories using Std. CRM Tables:
    1. Pass transaction GUID in field GUID of table CRMV_REPORT_SUBJ and get KATALOGART, CODEGRUPPE and CODE field values in lv_catalog, lv_codegrp and lv_code.
    2. Now you need to concatenate these 3 fields values carefully like this:
    CONCATENATE lv_catelog lv_codegrp '    ' lv_code into lv_category1.
    Remember there are 4 spaces between lv_codegrp and lv_code.
    3. Now pass this lv_category1 in field OBJEXT in table CRMC_ERMS_CAT_OK and get OBJGUID in field lv_objguid.
    4. Pass this lv_objguid in field OBJ_GUID and LNK_TYPE = 'IS_CODE' in table CRMC_ERMS_CAT_LN and get value of CAT_GUID in lv_cat_guid.
    5. Pass this lv_cat_guid in field CAT_GUID in table CRMC_ERMS_CAT_CA and get value of CAT_ID in field lv_cat_text.
    Remember this lv_cat_text is the text value of your last level of category of transaction.
    6. To get its upper cateogry level value, simply use table CRMC_ERMS_CAT_HI and get parent guid value and pass this as CAT_GUID again in table CRMC_ERMS_CAT_CA to get its text.
    Alternatively, you can also use class method cl_crm_ml_category_util=>get_parse_all to get all levels of categories.
    Hope this helps.
    Thanks
    Vishal

  • Lock object for table EKES

    Hi experts,
    I developed a function module to update the confirmations tab of a PO on ME22N screen. Now, I want to have a lock object in the FM so that a user cant make changes while this FM is in use. I do not know if there is any standard lock object for this purpose. I created a lock object in SE11 'EZEKES' since table EKES corresponds to vendor confirmations details. The Enqueue function was called into the program. The code is below:
    CALL FUNCTION 'ENQUEUE_EZPHLOCK'
    EXPORTING
       MODE_EKES            = 'E'
       MANDT                = SY-MANDT
       EBELN                = ponumber
    EXCEPTIONS
       FOREIGN_LOCK         = 1
       SYSTEM_FAILURE       = 2
       OTHERS               = 3
    The problem is, i'm not able to have a lock on the confirmations tab when the FM is in use. Is there any problem with the lock object i have created. The lock mode is Exclusive,Cumulative.
    Please help me with this.

    Code:
    ""Local Interface:
    *"  IMPORTING
    *"     REFERENCE(PONUMBER) TYPE  EKKO-EBELN
    *"  TABLES
    *"      ITAB STRUCTURE  UEKES
    TABLES: EKES, EKKO.
      DATA: BEGIN OF I_EKKO OCCURS 0,
            EBELN LIKE EKKO-EBELN,
            END OF I_EKKO.
      DATA: X LIKE EKES-ETENS.
      data: i_tab like itab occurs 0 with header line.
      move itab[] to i_tab[].
      DATA: i_ekes LIKE uekes OCCURS 0 WITH HEADER LINE.
      SELECT EBELN FROM EKKO INTO TABLE I_EKKO WHERE EBELN = PONUMBER.
      IF NOT I_EKKO[] IS INITIAL.
        SELECT  * FROM EKES INTO TABLE I_EKES
        FOR ALL ENTRIES IN I_EKKO
      WHERE EBELN = I_EKKO-EBELN.
      ENDIF.
      select single etens from ekes into x WHERE EBELN = PONUMBER.
      x = x + 1.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    DATA: VARKEY LIKE RSTABLE-VARKEY.
      CALL FUNCTION 'ENQUEUE_E_TABLE'
       EXPORTING
        MODE_RSTABLE         = 'E'
         TABNAME              = EKES
         VARKEY               = VARKEY
        X_TABNAME            = ' '
        X_VARKEY             = ' '
        _SCOPE               = '2'
        _WAIT                = ' '
        _COLLECT             = ' '
      EXCEPTIONS
        FOREIGN_LOCK         = 1
        SYSTEM_FAILURE       = 2
        OTHERS               = 3
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
        LOOP AT I_TAB. "WHERE EBELN = PONUMBER.
        READ TABLE I_TAB.
        LOOP AT i_ekes WHERE ebelp EQ ITAB-EBELP "itemnumber
                          AND ebtyp EQ 'LA'.
          i_ekes-menge = ITAB-MENGE. "quantity.
          i_ekes-kz   = 'U'.
          i_ekes-eindt = ITAB-EINDT. "deldate.
          I_EKES-XBLNR = ITAB-XBLNR.
          i_ekes-erdat = sy-datum.
          i_ekes-ezeit = sy-uzeit.
          MODIFY i_ekes.
        ENDLOOP.
      ENDLOOP.
      IF sy-subrc NE 0.
        LOOP AT I_TAB. "WHERE EBELN = PONUMBER.
          READ TABLE I_TAB.
          LOOP AT i_ekes WHERE ebelp EQ ITAB-EBELP "itemnumber
                         AND ebtyp EQ 'AB'.
            i_ekes-menge = ITAB-MENGE. "quantity.
            i_ekes-ebtyp = 'LA'.
            i_ekes-kz   = 'I'.
            i_ekes-etens   = x.
            i_ekes-eindt = ITAB-EINDT. "deldate.
            I_EKES-XBLNR = ITAB-XBLNR.
            i_ekes-erdat = sy-datum.
            i_ekes-ezeit = sy-uzeit.
            APPEND i_ekes.
          ENDLOOP.
        ENDLOOP.
      ENDIF.
    To update the confirmations tab
      CALL FUNCTION 'ME_CONFIRMATION_UPDATE'
        EXPORTING
          I_EBELN = PONUMBER
        TABLES
          XEKES   = i_ekes[].
            YEKES         = I_EKES[].
      IF SY-SUBRC = 0.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
      ENDIF.
    CALL FUNCTION 'DEQUEUE_E_TABLE'
    EXPORTING
      MODE_RSTABLE       = 'E'
       TABNAME            = EKES.
       VARKEY             = VARKEY
      X_TABNAME          = ' '
      X_VARKEY           = ' '
      _SCOPE             = '3'
      _SYNCHRON          = ' '
      _COLLECT           = ' '
    ENDFUNCTION.

  • Matchcode Object for ORGEH field in Selection-Screen

    Hi,
       I need to create a Matchcode Object for ORGEH field in my Selection-Screen. But, I want to have the selection Criteria as the Tcode: Po10 does. Please guide me how to do it. Is there any Standard Matchcode Object provided by SAP for this kind of functionality?. Please provide some kind of solution. I am in urgent need of this.
    Thanks in advance,
    Exertive.

    Hi,
    You can try the following are the search helps (matchcode objects) available for ORGEH (Org Unit).
    HRBAS00OBJID
    RESP_ORG_UNIT
    H_T527X                          Help View for Organizational Units                         
    H_T527X_1                        Seach help for T527X                                       
    Regards,
    Suresh Datti

  • How to create authorisation object for save button please help in abap

    how to create authorisation object for save button please help in abap

    Hi
    In general different users will be given different authorizations based on their role in the orgn.
    We create ROLES and assign the Authorization and TCODES for that role, so only that user can have access to those T Codes.
    USe SUIM and SU21 T codes for this.
    Much of the data in an R/3 system has to be protected so that unauthorized users cannot access it. Therefore the appropriate authorization is required before a user can carry out certain actions in the system. When you log on to the R/3 system, the system checks in the user master record to see which transactions you are authorized to use. An authorization check is implemented for every sensitive transaction.
    If you wish to protect a transaction that you have programmed yourself, then you must implement an authorization check.
    This means you have to allocate an authorization object in the definition of the transaction.
    For example:
    program an AUTHORITY-CHECK.
    AUTHORITY-CHECK OBJECT <authorization object>
    ID <authority field 1> FIELD <field value 1>.
    ID <authority field 2> FIELD <field value 2>.
    ID <authority-field n> FIELD <field value n>.
    The OBJECT parameter specifies the authorization object.
    The ID parameter specifies an authorization field (in the authorization object).
    The FIELD parameter specifies a value for the authorization field.
    The authorization object and its fields have to be suitable for the transaction. In most cases you will be able to use the existing authorization objects to protect your data. But new developments may require that you define new authorization objects and fields.
    http://help.sap.com/saphelp_nw04s/helpdata/en/52/67167f439b11d1896f0000e8322d00/content.htm
    To ensure that a user has the appropriate authorizations when he or she performs an action, users are subject to authorization checks.
    Authorization : An authorization enables you to perform a particular activity in the SAP System, based on a set of authorization object field values.
    You program the authorization check using the ABAP statement AUTHORITY-CHECK.
    AUTHORITY-CHECK OBJECT 'S_TRVL_BKS'
    ID 'ACTVT' FIELD '02'
    ID 'CUSTTYPE' FIELD 'B'.
    IF SY-SUBRC <> 0.
    MESSAGE E...
    ENDIF.
    'S_TRVL_BKS' is a auth. object
    ID 'ACTVT' FIELD '02' in place 2 you can put 1,2, 3 for change create or display.
    The AUTHORITY-CHECK checks whether a user has the appropriate authorization to execute a particular activity.
    This Authorization concept is somewhat linked with BASIS people.
    As a developer you may not have access to access to SU21 Transaction where you have to define, authorizations, Objects and for nthat object you assign fields and values. Another Tcode is PFCG where you can assign these authrization objects and TCodes for a  profile and that profile in turn attached to a particular user.
    Take the help of the basis Guy and create and use.
    Regards
    ANJI

  • Lock object for knvv

    Hi,
    is there any lock object for KNVV table for EIKTO field.
    If yes please help me.
    Thanks,
    Sandeep Garg

    Hi,
    According to my search i found lock objects only for KNA1 table. you may try it by,
    GOTO se11.
    select Lock object Radio button.
    Press F4.
    A popup appears, in that popup, under Short Description, type
    CustomerMaster* or what ever description you feel and press enter. you will get a list of lock objects, if they match your description.
    One tip is always give the first letter in CAPS. like CustomerMaster*.

  • Lock object for table KNVP and KNVK

    Hello Friends,
    Can you please tell me the standard lock object for the table KNVP and KNVK.
    Thank and regards,
    Kuldeep

    Hi
    see this and do accordingly
    Lock objects are use in SAP to avoid the inconsistancy at the time of data is being insert/change into database.
    SAP Provide three type of Lock objects.
    - Read Lock(Shared Locked)
    protects read access to an object. The read lock allows other transactions read access but not write access to
    the locked area of the table
    - Write Lock(exclusive lock)
    protects write access to an object. The write lock allows other transactions neither read nor write access to
    the locked area of the table.
    - Enhanced write lock (exclusive lock without cumulating)
    works like a write lock except that the enhanced write lock also protects from further accesses from the
    same transaction.
    You can create a lock on a object of SAP thorugh transaction SE11 and enter any meaningful name start with EZ Example EZTEST_LOCK.
    Use: you can see in almost all transaction when you are open an object in Change mode SAP could not allow to any other user to open the same object in change mode.
    Example: in HR when we are enter a personal number in master data maintainance screen SAP can't allow to any other user to use same personal number for changes.
    Technicaly:
    When you create a lock object System automatically creat two function module.
    1. ENQUEUE_<Lockobject name>. to insert the object in a queue.
    2. DEQUEUE_<Lockobject name>. To remove the object is being queued through above FM.
    You have to use these function module in your program.
    check this link for example.
    http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
    tables:vbak.
    call function 'ENQUEUE_EZLOCK3'
    exporting
    mode_vbak = 'E'
    mandt = sy-mandt
    vbeln = vbak-vbeln
    X_VBELN = ' '
    _SCOPE = '2'
    _WAIT = ' '
    _COLLECT = ' '
    EXCEPTIONS
    FOREIGN_LOCK = 1
    SYSTEM_FAILURE = 2
    OTHERS = 3
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    Normally ABAPers will create the Lock objects, because we know when to lock and how to lock and where to lock the Object then after completing our updations we unlock the Objects in the Tables
    http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
    purpose: If multiple user try to access a database object, inconsistency may occer. To avoid that inconsistency and to let multiple user give the accessibility of the database objects the locking mechanism is used.
    Steps: first we create a loc object in se11 . Suppose for a table mara. It will create two functional module.:
    1. enque_lockobject
    1. deque_lockobject
    before updating any table first we lock the table by calling enque_lockobject fm and then after updating we release the lock by deque_lockobject.
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
    GO TO SE11
    Select the radio button "Lock object"..
    Give the name starts with EZ or EY..
    Example: EYTEST
    Press Create button..
    Give the short description..
    Example: Lock object for table ZTABLE..
    In the tables tab..Give the table name..
    Example: ZTABLE
    Save and generate..
    Your lock object is now created..You can see the LOCK MODULES..
    In the menu ..GOTO -> LOCK MODULES..There you can see the ENQUEUE and DEQUEUE function
    Lock objects:
    http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
    Match Code Objects:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm
    http://searchsap.techtarget.com/tip/0,289483,sid21_gci553386,00.html
    See this link:
    http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm
    Check these links -
    lock objects
    Lock Objects
    Lock Objects
    Regards
    Anji

  • Existing Lock Objects for a table

    Is there a function module or program to get a list of existing lock objects for a given table?

    Hi,
    I am not sure of function module..
    But you can get the lock objects for the a table..
    Go to SE16..Give the table name DD25L
    In the ROOTTAB field give the table name.
    In the field AGGTYPE give 'E' which is for lock object.
    Thanks,
    Naren

  • How to create lock object?

    How to create lock object,- by going to se11 i have created but when i am going to sm12 to see wheather the table is locked or not then it is showing no entries found.
    Please help me how to create Lock object and see wheather thetable is lock is locked or not.
    Thnks in advance

    Hi venkateshwar,
    Lock objects are use in SAP to avoid the inconsistancy at the time of data is being insert/change into database.
    SAP Provide three type of Lock objects.
    •     Read Lock(Shared Locked)
    protects read access to an object. The read lock allows other transactions read access but not write access to
    the locked area of the table
    •     Write Lock(exclusive lock)
    protects write access to an object. The write lock allows other transactions neither read nor write access to
    the locked area of the table.
    •     Enhanced write lock (exclusive lock without cumulating)
    works like a write lock except that the enhanced write lock also protects from further accesses from the
    same transaction.
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
    https://forums.sdn.sap.com/click.jspa?searchID=115258&messageID=2656474
    Do the following steps..
    GO TO SE11
    Select the radio button "Lock object"..
    Give the name starts with EZ or EY..
    Example: EYTEST
    Press Create button..
    Give the short description..
    Example: Lock object for table ZTABLE..
    In the tables tab..Give the table name..
    Example: ZTABLE
    Save and generate..
    Your lock object is now created..You can see the LOCK MODULES..
    In the menu ..GOTO -> LOCK MODULES..There you can see the ENQUEUE and DEQUEUE function
    <b>Reward points if this helps.
    Manish</b>

  • Salmple at How to Create Dynamical Object for RTTC

    Hi all, I need a sample at How to Create Dynamical Object for RTTC.
      you can help me?.

    Hello Martinez,
    I have attached a sample for structure types. With the Where-Used-List on the Create() Method of the various RTTC classes one may find more samples. If you meant with object on OO Type then it is to mention that this is not possible yet.
    Regards
      Klaus
    PROGRAM sample.
    DATA: sdescr1 TYPE REF TO cl_abap_structdescr,
          sdescr2 TYPE REF TO cl_abap_structdescr,
          tdescr1 TYPE REF TO cl_abap_tabledescr,
          tdescr2 TYPE REF TO cl_abap_tabledescr,
          tref1   TYPE REF TO data,
          tref2   TYPE REF TO data,
          comp    TYPE abap_component_tab,
          wa      TYPE t100,
          xbuf    TYPE xstring.
    FIELD-SYMBOLS: <tab1> TYPE table,
                   <tab2> TYPE table.
    sdescr1 ?= cl_abap_typedescr=>describe_by_name( 'T100' ).
    comp     = sdescr1->get_components( ).
    sdescr2  = cl_abap_structdescr=>create( comp ).
    tdescr1  = cl_abap_tabledescr=>create( sdescr2 ).
    tdescr2  = cl_abap_tabledescr=>create( sdescr2 ).
    CREATE DATA: tref1 TYPE HANDLE tdescr1,
                 tref2 TYPE HANDLE tdescr2.
    ASSIGN: tref1->* TO <tab1>,
            tref2->* TO <tab2>.
    wa-sprsl = 'E'. wa-arbgb = 'SY'. wa-msgnr = '123'. wa-text = 'first text'.   INSERT wa INTO TABLE <tab1>.
    wa-sprsl = 'D'. wa-arbgb = 'SY'. wa-msgnr = '456'. wa-text = 'second text'.  INSERT wa INTO TABLE <tab1>.
    wa-sprsl = 'D'. wa-arbgb = 'XY'. wa-msgnr = '001'. wa-text = 'third text'.   INSERT wa INTO TABLE <tab1>.
    wa-sprsl = 'D'. wa-arbgb = 'ZZ'. wa-msgnr = '123'. wa-text = 'fourth text'.  INSERT wa INTO TABLE <tab1>.
    wa-sprsl = 'E'. wa-arbgb = 'SY'. wa-msgnr = '123'. wa-text = 'ABAP is a miracle'. INSERT wa INTO TABLE <tab1>.
    EXPORT tab = <tab1> TO DATA BUFFER xbuf.
    IMPORT tab = <tab2> FROM DATA BUFFER xbuf.
    LOOP AT <tab2> INTO wa.
      WRITE: / wa-sprsl, wa-arbgb, wa-msgnr, wa-text.
    ENDLOOP.

  • How  to create  authorisation object for  report

    hi
    experts..
    hw  can u  create authorisation object for  the  custom report.
    Thanks&  Regards
    Spandana

    Hi,
    In general different users will be given different authorizations based on their role in the orgn.
    We create ROLES and assign the Authorization and TCODES for that role, so only that user can have access to those T Codes.
    USe SUIM and SU21 T codes for this.
    Much of the data in an R/3 system has to be protected so that unauthorized users cannot access it. Therefore the appropriate authorization is required before a user can carry out certain actions in the system. When you log on to the R/3 system, the system checks in the user master record to see which transactions you are authorized to use. An authorization check is implemented for every sensitive transaction.
    If you wish to protect a transaction that you have programmed yourself, then you must implement an authorization check.
    This means you have to allocate an authorization object in the definition of the transaction.
    For example:
    program an AUTHORITY-CHECK.
    AUTHORITY-CHECK OBJECT <authorization object>
    ID <authority field 1> FIELD <field value 1>.
    ID <authority field 2> FIELD <field value 2>.
    ID <authority-field n> FIELD <field value n>.
    The OBJECT parameter specifies the authorization object.
    The ID parameter specifies an authorization field (in the authorization object).
    The FIELD parameter specifies a value for the authorization field.
    The authorization object and its fields have to be suitable for the transaction. In most cases you will be able to use the existing authorization objects to protect your data. But new developments may require that you define new authorization objects and fields.
    http://help.sap.com/saphelp_nw04s/helpdata/en/52/67167f439b11d1896f0000e8322d00/content.htm
    To ensure that a user has the appropriate authorizations when he or she performs an action, users are subject to authorization checks.
    Authorization : An authorization enables you to perform a particular activity in the SAP System, based on a set of authorization object field values.
    You program the authorization check using the ABAP statement AUTHORITY-CHECK.
    AUTHORITY-CHECK OBJECT 'S_TRVL_BKS'
    ID 'ACTVT' FIELD '02'
    ID 'CUSTTYPE' FIELD 'B'.
    IF SY-SUBRC <> 0.
    MESSAGE E...
    ENDIF.
    'S_TRVL_BKS' is a auth. object
    ID 'ACTVT' FIELD '02' in place 2 you can put 1,2, 3 for change create or display.
    The AUTHORITY-CHECK checks whether a user has the appropriate authorization to execute a particular activity.
    This Authorization concept is somewhat linked with BASIS people.
    As a developer you may not have access to access to SU21 Transaction where you have to define, authorizations, Objects and for nthat object you assign fields and values. Another Tcode is PFCG where you can assign these authrization objects and TCodes for a  profile and that profile in turn attached to a particular user.
    Take the help of the basis Guy and create and use.
    Sy-SUBRC values
    4              User has no authorization in the SAP System for
                   such an action. If necessary, change the user
                   master record.
    8              Too many parameters (fields, values). Maximum
                   allowed is 10.
    12             Specified object not maintained in the user
                   master record.
    16             No profile entered in the user master record.
    24             The field names of the check call do not match
                   those of an authorization. Either the
                   authorization or the call is incorrect.
    28             Incorrect structure for user master record.
    32             Incorrect structure for user master record.
    36             Incorrect structure for user master record.
    http://www.sap.ittoolbox.com/groups/technical-functional/sap-basis/please-how-to-create-an-authorization-object-386391 - 78k -
    http://www.sap-abaprogram.blogspot.com/2007/11/what-is-use-of-
    authorization-checks-to.html - 75k -
    www.sapworld.hpg.ig.com.br/download/ab4query.pdf
    with thanks,
    Abaper.

  • To get Lock object for Standard Table

    Hi all,
    i want to update table FKK_GPSHAD,so i need corresponding lock object for this table.can any one sughgest me the solution for this.
    Thanks in advance,...

    Hi,
    Lock objects are use in SAP to avoid the inconsistancy at the time of data is being insert/change into database.
    SAP Provide three type of Lock objects.
    Read Lock(Shared Locked)
    protects read access to an object. The read lock allows other transactions read access but not write access to
    the locked area of the table
    Write Lock(exclusive lock)
    protects write access to an object. The write lock allows other transactions neither read nor write access to
    the locked area of the table.
    Enhanced write lock (exclusive lock without cumulating)
    works like a write lock except that the enhanced write lock also protects from further accesses from the
    same transaction.
    You can create a lock on a object of SAP thorugh transaction SE11 and enter any meaningful name start with EZ Example EZTEST_LOCK.
    Use: you can see in almost all transaction when you are open an object in Change mode SAP could not allow to any other user to open the same object in change mode.
    Example: in HR when we are enter a personal number in master data maintainance screen SAP can't allow to any other user to use same personal number for changes.
    Technicaly:
    When you create a lock object System automatically creat two function module.
    1. ENQUEUE_<Lockobject name>. to insert the object in a queue.
    2. DEQUEUE_<Lockobject name>. To remove the object is being queued through above FM.
    You have to use these function module in your program.
    check this link for example.
    http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
    tables:vbak.
    call function 'ENQUEUE_EZLOCK3'
    exporting
    mode_vbak = 'E'
    mandt = sy-mandt
    vbeln = vbak-vbeln
    X_VBELN = ' '
    _SCOPE = '2'
    _WAIT = ' '
    _COLLECT = ' '
    EXCEPTIONS
    FOREIGN_LOCK = 1
    SYSTEM_FAILURE = 2
    OTHERS = 3
    if sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    Normally ABAPers will create the Lock objects, because we know when to lock and how to lock and where to lock the Object then after completing our updations we unlock the Objects in the Tables
    http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
    purpose: If multiple user try to access a database object, inconsistency may occer. To avoid that inconsistency and to let multiple user give the accessibility of the database objects the locking mechanism is used.
    Steps: first we create a loc object in se11 . Suppose for a table mara. It will create two functional module.:
    1. enque_lockobject
    1. deque_lockobject
    before updating any table first we lock the table by calling enque_lockobject fm and then after updating we release the lock by deque_lockobject.
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
    GO TO SE11
    Select the radio button "Lock object"..
    Give the name starts with EZ or EY..
    Example: EYTEST
    Press Create button..
    Give the short description..
    Example: Lock object for table ZTABLE..
    In the tables tab..Give the table name..
    Example: ZTABLE
    Save and generate..
    Your lock object is now created..You can see the LOCK MODULES..
    In the menu ..GOTO -> LOCK MODULES..There you can see the ENQUEUE and DEQUEUE function
    Lock objects:
    http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
    Match Code Objects:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm
    http://searchsap.techtarget.com/tip/0,289483,sid21_gci553386,00.html
    See this link:
    http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm
    Check these links -
    lock objects
    Lock Objects
    Lock Objects
    Please reward points if useful.
    Regards
    Rose

  • How can I create a object for a note?

    Hi experts,
        I need to apply the note 501905 but when I try in the SNOTE transacction I receive this error:
    Object REPS Z_MRM_DELETE_PP does not exist; create it
    Diagnosis
    The SAP Note that you want to implement contains changes to an object that does not yet exist in your system.
    SAP Notes contain only changes to objects that already exist. This means that the the system cannot automatically create new objects during the implementation of this SAP Note.
    Procedure
    1. Cancel the SAP Note implementationl.
    2. Create an empty object REPS Z_MRM_DELETE_PP with the corresponding object editor.
    3. Restart the SAP Note implementation.
    How can I create that Object??
    Thanks for the help!

    Hi Carlos,
    It says that you have to create a new program with a name Z_MRM_DELETE_PP.
    Once you create and activate the program you can execute the SAP Note.
    All this processure will be written in the SAP Note.
    Please Go through the Note using below:
    Step1: Use T.code SNOTE.
    Step2: Use menu GOTO --> NOTE BROWSER. Provide the Note no and EXECUTE.
    Step3: Double click on the displayed line.
    Here you will get the information to do before implementing the note.
    Go through all the documentation, and once you did all the development given in the note then you can implement the note.
    Regards,
    Sreekanth.

Maybe you are looking for

  • Frequency counter unreliable using rotary vane anemometer

    I have set up an anemometer to measure air flow speed, with the signal being acquired by a 9402 module in a cDAQ-9174 chassis (4 slot). I am using Signal Express 2011 to program the instrument. I have set up a frequency counter task, using a maximum

  • Replace pages in a PDF with acrobat

    Please help me find a solution for my problem, i believe there are many good Applescript gurus here, i´m not one of them!:) Basic needs: i have a pdf coming from a text and picture system and i want it to merge to a templet with buttons and functiona

  • Podcasting with iweb and itunes.

    Trying to get set up to podcast some of our programs and not having any luck. We have an iweb site and when we are prompted to type in the feed URL , would that be our iweb sites URL? it comes back with cant read and invalid. What are we doing wrong?

  • Photos on my IPAD to my PC and back to my PC

    I had transfered all my photos to my IPAD from my desktop as kind of a back-up.  If I were to lose my desktop hard drive, can I retrieve my photos from my IPAD back to my PC.  If so, what would I do?  thanks

  • Tecra S: Can I change the IRQ settings?

    Hi, Recently I got a new external soundcard (E-MU 1616m) which uses a PCMCIA card to connect to the computer. It's not functioning like it should because of the fact that the PCMCIA cardbus controller is sharing it's IRQ with a range of other stuff (