How to create a lock object dynamically ?

Hi all,
I have a report with  a selection screen having one parameter in which the user can put a table name(Custom table) and some other paremeters.Based on these parameters I need to delete records from table put on the selection screen.Before deeting I need to lock the table. As beforehand I dont know the table name how can I create lock object dynamically lock my table ?
Please suggest some idea...

Hi,
check below link
lock objects
http://help.sap.com/erp2005_ehp_03/helpdata/EN/7b/f9813712f7434be10000009b38f8cf/frameset.htm
Regards,
Madhu

Similar Messages

  • How to create a lock object in se11

    hi all,
    Can anyone tell me the step by step procedure to lock as well as unlock a particular object in se11 trns code. with an real time example.
    thanxs in advance
    hari

    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.
    Creating Lock Objects
    Procedure
    1.Select object type Lock object in the initial screen of the ABAP Dictionary, enter an object name and choose Create. The name of a lock object should begin with an E (Enqueue).
    The maintenance screen for lock objects is displayed.
    2.Enter an explanatory short text in the field Short text.
    You can then use the short text to find the lock object at a later time, for example with the R/3 Repository Information System.
    3.Enter the name of the primary table of the lock object.
    All other tables in the lock object must be linked with the primary table using foreign keys. There are also some restrictions on the valid foreign key relationships.
    4.Select the lock mode of the primary table in the field below it.
    The lock mode is used as the default value for the corresponding parameters of the function modules generated from the lock object.
    5.Choose Add if you want to lock records in more than one table with the lock object.
    A list of all the tables linked with the primary table using valid foreign keys is displayed. Select the appropriate table. The lock mode of the primary table is copied as lock mode. You can change this setting as required, for example you can assign the lock mode separately for each table.
    6.Similarly, you can add a table linked with the secondary table just added with foreign keys. To do this, place the cursor on the name of the secondary table and choose Add.
    7.If no lock mode is assigned to a table, no lock is set for the entries in this table when the generated function modules are called. You should not assign a lock mode if a secondary table was only used to define a path between the primary table and another secondary table with foreign keys.
    8.Save your entries.
    A dialog box appears in which you have to assign the lock object a development class.
    9.You can (optionally) exclude lock parameters (see lock objects) from the function module generation on the Lock parameter tab page. This makes sense for example if you always want to lock a parameter generically.
    To do this, simply deselect the Weight flag for the parameter. The parameter is not taken into consideration in the generated function modules. This parameter is then always locked generically.
    9.The name of a lock parameter is usually the name of the corresponding table field. If two fields with the same name are used as lock parameters in the lock object from different tables, you must choose a new name for one of the fields in field Lock parameter.
    10.You can define whether the function modules generated from the lock object should be RFC-enabled on the Attributes tab page.
    If you set the Allow RFC flag, the generated function modules can be called from within another system with Remote Function Call.
    11.If you permit Remote Function Calls for an existing lock object, you must ensure that the generated function modules are called from within an ABAP program with parameters appropriate for the type. You should therefore check all programs that use the associated function modules before activating the lock object with the new option.
    12 .Choose Activate .
    Result
    When you activate the lock object, the two function modules ENQUEUE_<lockobjectname> and DEQUEUE_<lockobjectname> are generated from its definition to set and release locks.
    You can find information about the activation flow in the activation log, which you can display with Utilities Activation log. If errors occurred during activation, the activation log is displayed immediately.
    Pls reward points.
    Regards,
    Ameet
    Message was edited by:
            Ameet Jassani

  • How to create a Java Object dynamically

    I want to convert a "DataObject (SDO) " into "Pure java object".
    For this i want to create a java object with the fields in Dataobject, and this should be in generic way.

    I want to convert a "DataObject (SDO) "What is a "DataObject (SDO)"?
    into "Pure
    java object".What is a "Pure java object"?
    For this i want to create a java object with the
    fields in Dataobject, What is stopping you? Do you not know how do define a class? Do you think you can add fields to the Object class? If that's what you mean, you're out of luck.
    and this should be in generic
    way.What do you mean "in generic way"? "Generic" is a very generic term. There are lots of contexts in which it could apply and lots of different possible meanings for "generic way."
    You'll have to explain your queston more clearly.

  • How to create a Lock object ?

    Hi ,
    Iam very new to new to lockobjects . Can any one guide me to create lockobjects  , naming standrs  etc?

    Hi,
    Do the following steps..
    GO TO SE11
    Select the radio button "Lock object"..
    Give the name starts with EZ or EY..
    <b>Example: EYTEST</b>
    Press Create button..
    Give the short description..
    <b>Example: Lock object for table ZTABLE..</b>
    In the tables tab..Give the table name..
    <b>Example: ZTABLE</b>
    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 modules to lock and unlock the records..
    Thanks,
    Naren

  • How to create a xml object dynamically

    Hi all,
    In my current project the database is returning the query result in xml string format(using oracle's DBMS-XML package).
    Now I need to use this xml string and build a xml object and transform it into XSLT and then in a servlet and then pass it to the browser and display it using xsl stylesheets.
    Can some one help me in building an xml object using a string( the xml string is in the xml format i.e in <..> format) and then transform it into xslt in the servlet and send across to the browser.
    Any hands on code or references to the code will be most favourable.
    any help regarding this issue will be most appreciated. Pls do reply as early as possible as I do not have much time to implement this.
    Thanking in advance for your kind help.
    Srinivas.

    What's an "xml object"?
    If you want to transform it using XSLT (transforming it "into" XSLT doesn't make much sense), you can transform direct from the string. Like this:try {
      TransformerFactory xformFactory  = TransformerFactory.newInstance();
      Source xsl = new StreamSource("your.xsl");
      Transformer stylesheet = xformFactory.newTransformer(xsl);
      Source request  = new StreamSource(new StringReader(yourXMLString));
      Result response = new StreamResult(out);
      stylesheet.transform(request, response);
    catch (TransformerException e) {
      System.err.println(e);
    }By the way, if you haven't seen this code before then I suggest you go and read ERH's book about XML with Java:
    http://www.cafeconleche.org/books/xmljava/chapters/index.html

  • How to Create a Table Component Dynamically based on the Need

    Hello all,
    I have a problem i need to create dynamically tables based on the no of records in the database. How can i create the table object using java code.
    Please help.

    Winston's blog will probably be helpful:
    How to create a table component dynamically:
    http://blogs.sun.com/roller/page/winston?entry=creating_dynamic_table
    Adding components to a dynamically created table
    http://blogs.sun.com/roller/page/winston?entry=dynamic_button_table
    Lark
    Creator Team

  • How to create a view object and attach with extended AM

    Hi,
    I tried to create new vo and attach this vo with the extended AM. But it is throwing error like 'PC.NAME : invalid identifier' (Actually this PC.NAME is exiting one).
    Now i want to know how to create a view object similar like seeded one but with one additional condition in the where clause.
    It is possible though extension, but i want to create two view object similar like seeded one, one with some other condition in the where clause
    and another one with some other condition.
    So for my requirement, i'll extend one VO and i'll add my condition but how to do it for second condition.
    But i want same seeded VO with two different condition.
    Any suggestions please,
    SAN

    SAN,
    There is no need to attach the newly created VO with extended AM. You need to attach the same with the standard AM.
    Regards,
    Gyan

  • ADF Faces: RichTable - How to create a RichTable object

    Hi. How to create a RichTable object to put in a JSF page ? I need to make a method that receive a list of name of columns and a list of list of data. This code that I have writing don't work. What's my error?
            public RichTable getADFTable(
            List<String> lstCols, List< List<String> > lstLstData
            RichColumn adfCol = null;
            List<RichColumn> lstRichCols = new ArrayList<RichColumn>();
            int cont = 0;
            for( String col : lstCols ){
                adfCol = new RichColumn();
                adfCol.setDisplayIndex(cont++);
                adfCol.setHeaderText( col );
                adfCol.setMinimumWidth( "60" );
                lstRichCols.add( adfCol );
            int contCols = 0;
            RichOutputText text = null;
            RichTable AdfTab = new RichTable();
            for( List<String> lstData : lstLstData){
                for( String data : lstData ){
                    text = new RichOutputText();
                    text.setValue(data);
                    lstRichCols.get( contCols ).getChildren().add( text );
                    contCols++;
                contCols = 0;
            AdfTab.setRows(this.lstEntit.size());
            cont = 0;
            for( RichColumn col : lstRichCols ){
                AdfTab.getChildren().add( col );
            return AdfTab;
        }

    I was searching for an example and i found it but whit errors, finally i fixed and it works.
    You just have to generate the data from your webservices and "put" into this structure.
    The java file (Bean)
    package view;
    import java.util.ArrayList;
    import java.util.HashMap;
    import java.util.List;
    import java.util.Map;
    import org.apache.myfaces.trinidad.model.CollectionModel;
    import org.apache.myfaces.trinidad.model.SortableModel;
    public class DynamicTable {
        private SortableModel model;
        private List<String> columnNames;
        public DynamicTable() {
            columnNames = new ArrayList<String>();
            columnNames.add("Col-1");
            columnNames.add("Col-2");
            generateColumnModel();
        public void generateColumnModel() {
            this.model = new SortableModel(createRows(columnNames));
        private List<Map> createRows(List<String> columnNames) {
            int i = 0;
            List<Map> mapListforRows = new ArrayList<Map>();
            for (String name : columnNames) {
                Map newRow = new HashMap();
                mapListforRows.add(newRow);
                for (String col : columnNames) {
                    newRow.put(col, "data");
            return mapListforRows;
        // Get table model
        public CollectionModel getCollectionModel() {
            return model;
        public void setColumnNames(List<String> columnNames) {
            this.columnNames = columnNames;
        public List<String> getColumnNames() {
            return columnNames;
    }The jspx file (page)
               <af:table varStatus="rowStat" summary="table"
                            value="#{pageFlowScope.DynamicTable.collectionModel}"
                            rows="#{pageFlowScope.DynamicTable.collectionModel.rowCount}"
                            rowSelection="none" contentDelivery="immediate"
                            var="row" rendered="true" id="t1">
                    <af:forEach items="#{pageFlowScope.DynamicTable.columnNames}"
                                var="name">
                      <af:column sortable="true" sortProperty="#{name}"
                                 rowHeader="unstyled" headerText="#{name}"
                                 inlineStyle="width:100px;" id="c1">
                        <af:activeOutputText value="#{row[name]}" id="aot1"/>
                      </af:column>
                    </af:forEach>
                  </af:table>

  • How to create an UI element dynamically on action in drop down?

    Hi,
    How to create an UI element dynamically on action of selecting a value from the  drop down?
    help out with the steps i need to follow..

    Hi,
    <u><i><b>Dynamic UI Element creation</b></i></u>
    We can create it only in the WD Modify View.
    Get the instance for the Root UI Element Container.
    Create the UI element Ex: Input Field, Text View etc.
    Bind the UI Element to the Attribute Value.
    Now bind the UI Element to the Root UI Element Container.
              IWDTransparentContainer root =(IWDTransparentContainer)view.getRootElement();
              IWDDropdownByIndex DdbName = (IWDDropdownByIndex)view.createElement(IWDDropdownByIndex.class,"DdbName");
              IWDDropdownByIndex DdbAge = (IWDDropdownByIndex)view.createElement(IWDDropdownByIndex.class,"DdbAge");
              IWDDropdownByIndex DdbGender = (IWDDropdownByIndex)view.createElement(IWDDropdownByIndex.class,"DdbGender");
              IWDNode Mad =wdContext.getChildNode("Person",0);
              IWDAttributeInfo NameAtt = Mad.getNodeInfo().getAttribute("Name");
              IWDAttributeInfo AgeAtt = Mad.getNodeInfo().getAttribute("Age");
              IWDAttributeInfo GenderAtt = Mad.getNodeInfo().getAttribute("Gender");
              DdbName.bindValue(NameAtt);
              DdbAge.bindValue(AgeAtt);
              DdbGender.bindValue(GenderAtt);
              root.addChild(DdbName);     
              root.addChild(DdbAge);
              root.addChild(DdbGender);
    <u><i><b>Dynamic Action Creation</b></i></u>
    Create the Action in the Action tab.
    Create a Button.
    Get the reference for the created action (Through the Event Handler).
    Bind the Action to the Button.
    Bind the Button to the Root UI element Container.
    IWDButton ButGo = (IWDButton)view.createElement(IWDButton.class,"ButGo");
    IWDAction ActGo = wdThis.wdCreateAction(IPrivateStartView.WDActionEventHandler.GO,"Click");
    ButGo.setOnAction(ActGo);
    root.addChild(ButGo);
    Now write the required code for the Event Handler that is associated with the Action.
    //@@begin onActionGo(ServerEvent)
        IWDNode Mad = wdContext.getChildNode("Person",0);
         wdComponentAPI.getMessageManager().reportSuccess(Mad.getCurrentElement().getAttributeAsText("Name"));
         wdComponentAPI.getMessageManager().reportSuccess(Mad.getCurrentElement().getAttributeAsText("Age"));
         wdComponentAPI.getMessageManager().reportSuccess(Mad.getCurrentElement().getAttributeAsText("Gender"));
    //@@end
    Regards
    SURYA

  • How to create a georaster object?

    Hi,
    I type this codes to create a georaster object. but there is error msg.
    SDO_GEOR.createBlank(
    rasterType IN INTEGER,
    ultCoord IN SDO_NUMBER_ARRAY,
    dimSizes IN SDO_NUMBER_ARRAY,
    cellValue IN NUMBER,
    rasterDataTable IN VARCHAR2 DEFAULT NULL,
    rasterID IN NUMBER DEFAULT NULL
    ) RETURN SDO_GEORASTER;
    Error Message:
    Error starting at line 1 in command:
    SDO_GEOR.createBlank(
    Error report:
    Unknown Command
    Error starting at line 3 in command:
    rasterType IN INTEGER,
    Error report:
    Unknown Command
    Error starting at line 5 in command:
    ultCoord IN SDO_NUMBER_ARRAY,
    Error report:
    Unknown Command
    Error starting at line 7 in command:
    dimSizes IN SDO_NUMBER_ARRAY,
    Error report:
    Unknown Command
    Error starting at line 9 in command:
    cellValue IN NUMBER,
    Error report:
    Unknown Command
    Error starting at line 11 in command:
    rasterDataTable IN VARCHAR2 DEFAULT NULL,
    Error report:
    Unknown Command
    Error starting at line 13 in command:
    rasterID IN NUMBER DEFAULT NULL
    Error report:
    Unknown Command
    Error starting at line 15 in command:
    ) RETURN SDO_GEORASTER;
    Error report:
    Unknown Command
    Please advise me on how to create a georaster object as i am very new to the technology.
    Thanks and regards,
    Esther

    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14254/geor_intro.htm

  • How to create authority check object and assign to  ztcode which is of modu

    Dear ,
             how to create authority check object and assign to  ztcode which is of custom module pool program.its urgent kindly help points rewarded.

    Manoj,
    You can check with your Basis team to create authorisation object and assigining tcodes to the user profiles.
    K.Kiran.

  • How to create new authorisation object for Transactions?

    Hi,
    How to create new authorisaton object and how to assign that object on a transaction code?
    Case ->
    The transaction code VL01N have the object called V_LIKP_VST under Class "LE_V" that have two auth. fields. one is 'Activity' and other one is "Shipping Point/Receiving Point".
    Here I want to add "Storage location" also. I have created one object called "Z_LIKP_VST" under same calass "LE_V". and added "Activity", "Shipping Poing/Receiving Poing" and "Storage Location". After that I added that object ("Z_LIKP_VST") for particular transaction through "SU24". I maintained the "Display check indicator" for VL01N.
    I created one new role and assigend the particular transacation for a user. but still SAP taking  V_LIKP_VST insted of Z_LIKP_VST.
    How can I change my Z_LIKP_VST on profile.
    Please help
    Thanks in Advance
    Lal

    Hi Kariyath,
    I suppose its not about interest but a MUST.. sorry but.. unless u include the Logic in the program how can SAP pick these custom Z objects ?
    after u create them and assign to a Tcode in SU24 there is no logic to check these objects. Frankly i see no other chance.... unless SAP comes to us with a great easy way to input these Custom objects
    Keep looking and please Update me if u have any Inputs....on this front..
    All the Best
    Br,
    Sri
    Award points for helpful answers

  • Plz tell me how to create authority check objects and how to usein prg

    dear sir,
    plz tell me how to create authority check objects and how to usein prg

    http://help.sap.com/saphelp_46c/helpdata/en/5c/deaa74d3d411d3970a0000e82de14a/content.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/52/6716a6439b11d1896f0000e8322d00/content.ht
    Create custom authorization – Customer specific object
    If you have requirements that cannot be met using the P_ORGIN and P_ORGXX authorization objects (for example, because you want to build your authorization checks on additional fields of the Organizational Assignment infotype (0001) that are customer-specific), you can include an authorization object in the authorization checks yourself.
    Create the authorization object using transaction SU21. Make sure you keep to the customer name range (Z/Y). To be able to use the new authorization object you have created in the master data authorization check, the object must contain the INFTY, SUBTY, and AUTHC fields. You can use any of the fields of the Organizational Assignment infotype (0001) for the other fields. You can also use customer-specific additional fields provided they are CHAR or NUMC type fields.
    After you have created the object, you must start the RPUACG00 report. This report overwrites the MPPAUTZZ standard include with the code that is needed to evaluate the authorization object you created. Note: Technically speaking, this involves a modification. However, SAP fully supports this procedure. And you should not have more maintenance work as a result of this modification.
              Note: that if you use customer-specific authorization objects, you must maintain these objects in transaction SU24 (Maintain Assignment of Authorization Objects to Transactions) in the same way as you maintain the authorization objects P_ORGIN, P_ORGXX, and P_PERNR
    AUTHORITY CHECK OBJECT Object_name
                ID fieldname1 FIELD fieldvalue1
                ID fieldname2 FIELD fieldvalue2
                ID fieldname3 FIELD fieldvalue3.
                 If sy-subrc eq 0.   "Authorization exists
                 Endif.
    http://articles.techrepublic.com.com/5100-6329_11-5110893.html
    Edited by: JackandJay on Jan 16, 2008 10:21 AM

  • How to create Authority check object

    Hello Gurus,
    How to create Authority-check object 'ZABC'
                                                             ID 'TABLE' FIELD 'ZTABLE'.
    Please tell me detailed procedure.
    Thanks in advance.
    Best Regards,
    zubera

    Dear Zubera,
    Creating Authorization Fields
    In authorization objects, authorization fields represent the values to be tested during authorization checks.
    To create authorization fields, choose Tools --> ABAP Workbench --> Development --> Other tools --> Authorization objects ® Fields.
    To create a authorization field:
    1. Choose Create authorization field.
    2. On the next screen, enter the name of the field. Field names    must be unique and must begin with the letter Y or Z.
    3. Assign a data element from the ABAP Dictionary to the field.
    4. If desired, enter a check table for the possible entries. For    more information about check tables.
    For more information about AUTHORITY-CHECK, see the keyword documentation of the ABAP Editor.
    You can often use the fields defined by SAP in your own authorization objects. If you create a new authorization object, you do not need to define your own fields. For example, you can use the SAP field ACTVT in your own authorization objects to represent a wide variety of actions in the system.
    Assigning an Authorization Object to an Object Class
    Each authorization object must be assigned to an object class when it is created.
    Choose Tools --> ABAP Workbench --> Development --> Other tools --> Authorization objects --> Objects.
    You can also create authorization objects in the Object Navigator (SE80).
    Creating / Choosing Object Classes
    The system displays a list of existing object classes.
    Object classes are organized according to the components of the system.
    Before you can create a new object, you must define the object class for the component in which you are working. The objects are not overwritten when you install new releases.
    You can also define your own object classes. If you do so, select class names that begin with Y or Z to avoid conflicts with SAP names.
    Creating an Object
    Enter a unique object name and the fields that belong to the object. Object names must begin with the letter Y or Z in accordance with the naming convention for customer-specific objects.
    You can enter up to ten authorization fields in an object definition. You must also enter a description of the object and create documentation for it.
    Ensure that the object definition matches the AUTHORITY-CHECK calls that refer to the object.
    Do not change or delete authorization objects defined by SAP. This disables SAP programs that use the objects.
    You can regenerate the profile SAP_ALL after creating an authorization object.
    Best Regards,
    Rajesh
    Please reward points if found helpful.

  • How to create a Business Object

    Hi All,
    How to create a Business Object.
    If any material is avaliable Please mail me to [email protected]
    Thank you,
    Ramu N.

    Hi,
    Check this SAP help link,
    http://help.sap.com/saphelp_nw2004s/helpdata/en/4f/5668735cf211d194a30000e82dec10/frameset.htm
    Thanks and Regards,
    Bharat Kumar Reddy.V

Maybe you are looking for

  • Is it possible to run a Save for Web Batch?

    I am trying to run a batch on a bunch of ai files to save them as JPEG using Save For Web & Devices (so they can be saved with certain settings). I record a Save For Web action and then try to run a batch, but the batch just hangs at the Save For Web

  • No information on FS10n layouts

    Hi All! I need a report for few GL accounts which includes the following information as main data for several reasons. [Customer, Vendor, Material, Quantity, PO, sales order, reason code]. I need to see GL line item display(all the documents data) fo

  • Xpath help needed

    Hi all. I'm totally stuck on what should(?) be a simple problem. We are provided with an external XML file which references a local(their local) schema etc. What I'd like to do is remove or update all the attributes passed in - the file starts as <?x

  • Planned cost for processing the component

    Hi All, How to see the planned cost for processing any component or finished product in SAP.   I don't want actual cost for processing the component. Regards, Shailendra

  • Import application - wwv_flow_accept page not found and ora-904

    Hi ! I installed 10g 10.1.0.3 and htmldb from companion cd 10.1.0.3. Trying to import an application from a file. If I choose the file and klick on next in the import wizard i get a "page not found" for wwv_flow.accept. When I look in the apache log