Different _scope parameter of Enqueue_ lock object and Dequeue_ lock objec

Hi, all.
When we create lock object and generate enqueue_<lock object> and
dequeue_<lock object>, the default value of _scope is
enqueue : _scope = 2(update owner only)
dequeue : _scope = 3(for both dialog owner and update owner).
Does anyone tell me the reason of this different default values?
i read help.sap.com - lock related help but i couldn't get the idea
of these different default values between enqueue and dequeue.
Best Regards.
Sejoon

Hi,
When you use ENQUEUE, the owner is going to lock that record. So at that time, the only person who can modify the record in the one who has locked it using ENQUEUE. So only he needs to be informed.
Whereas when you use DEQUEUE, the owner who has locked the record and processed it + the 2nd user who wants to lock it needs to be informed. Hence it is to update the 1st User(who has done the update and planning to release the lock) + 2nd User(who wants to do the update and planning to lock the record ).
Best regards,
Prashant

Similar Messages

  • About lock object and how to create it

    Hi ABAP gurus,
    Can any one explain about the Lock Objects and How to create Lock object step by step.
    Rgds,

    Hi Rangamma,
    Check this info.
    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.
    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.
    Technically:
    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.
    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
    Hope this resolves your query.
    <b>Reward all the helpful answers.</b>
    Regards

  • Differeence between Lock object and enqueue_e_table

    Hi  ,
    what is diff between Lock object and enque_e_table.  Where to use enqueue_e_table and where to use lock object.
    I think with a lock object i can lock more than one table (passing tables  in secondary table). Please correct me.

    A lock object does not really "lock a table" though most of lock objects refer to a database table.
    I explain:
    The principle is that when 2 programs lock at the same time with the same lock object, only the first will succeed.
    If you have a program which does not use the lock, it may update the database table without any problem.
    All programs which update a table have to use the same lock object. Note that users are always able to update this table via SM30 as they don't know the lock object to be used.
    enqueue_xxxx is the name of the generated function module used to lock the xxxx lock object. E_TABLE lock is ONLY used by SM30 if I remember well, so that to prevent one table from being updated via SM30 by 2 persons at the same time. But it is not related at all with programs which would also update this table.
    Edited by: Sandra Rossi on Mar 14, 2010 9:53 PM

  • With regard to lock object and authority check

    hi all
    i would like to know about lock object and authority check specifically in reports. there is a coding in sap library with regard to authority check, but there is no coding to restrict user (i mean there is no user names that the object is restricting for a particular user or any user has got permission to change or display object). 
    further, the code mentions that you need an authorization in your user master record for the object, could any of u explain where is user master record.
    below is the code for authority check.
    *&      Module  USER_COMMAND_0100  INPUT
    MODULE USER_COMMAND_0100 INPUT.
      CASE OK_CODE.
        WHEN 'SHOW'.
       AUTHORITY-CHECK OBJECT 'S_CARRID'
    ID 'CARRID' FIELD '*'
    ID 'ACTVT'  FIELD '03'.
       IF SY-SUBRC NE 0. MESSAGE E009. ENDIF.
       MODE = CON_SHOW.
       SELECT SINGLE * FROM  SPFLI
        WHERE  CARRID      = SPFLI-CARRID
        AND    CONNID      = SPFLI-CONNID.
       IF SY-SUBRC NE 0.
    MESSAGE E005 WITH SPFLI-CARRID SPFLI-CONNID.
       ENDIF.
       CLEAR OK_CODE.
       SET SCREEN 200.
        WHEN 'CHNG'.
       AUTHORITY-CHECK OBJECT 'S_CARRID'
    ID 'CARRID' FIELD '*'
    ID 'ACTVT'  FIELD '02'.
       IF SY-SUBRC NE 0. MESSAGE E010. ENDIF.
       MODE = CON_CHANGE.
       SELECT SINGLE * FROM  SPFLI
        WHERE  CARRID      = SPFLI-CARRID
        AND    CONNID      = SPFLI-CONNID.
       IF SY-SUBRC NE 0.
         MESSAGE E005 WITH SPFLI-CARRID SPFLI-CONNID.
       ENDIF.
       OLD_SPFLI = SPFLI.
       CLEAR OK_CODE.
       SET SCREEN 200.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    i thank u all for the help in advance.

    hi
    this might help
    REPORT YUSRLOCK NO STANDARD PAGE HEADING.
    TABLES: TRDIR, USR02.
    DATA: MARK,CNTR TYPE I,
          ACCNT LIKE USR02-ACCNT, ERDAT LIKE USR02-ERDAT,
          ANAME LIKE USR02-ANAME, CLI(3) VALUE 'AAA', SZIN TYPE I,
          SYDATUM LIKE SY-DATUM, FLAG(3).
    TABLES: UINFO.
    DATA: OPCODE TYPE X VALUE 2.
    DATA: BEGIN OF USR_TABL OCCURS 10.
            INCLUDE STRUCTURE UINFO.
    DATA: END OF USR_TABL.
    START-OF-SELECTION.
      CALL 'ThUsrInfo' ID 'OPCODE' FIELD OPCODE
        ID 'TAB' FIELD USR_TABL-SYS.
      SELECT * FROM USR02 CLIENT SPECIFIED ORDER BY MANDT BNAME.
        IF USR02-MANDT <> CLI.
          SZIN = SZIN + 1. SZIN = SZIN MOD 2.
          CLI = USR02-MANDT.
        ENDIF.
        IF USR02-UFLAG = 0.
          MARK = ' '.
        ELSE.
          MARK = 'X'.
        ENDIF.
        CLEAR FLAG.
        LOOP AT USR_TABL.
          IF USR_TABL-BNAME = USR02-BNAME AND USR_TABL-MANDT = USR02-MANDT.
            FLAG = '!!!'.
          ENDIF.
        ENDLOOP.
        SYDATUM = SY-DATUM - 30.
        IF SYDATUM < USR02-TRDAT.
          IF SZIN = 0.
            WRITE:/ ' ', MARK AS CHECKBOX,' ', USR02-BNAME COLOR 2,
                  ' ',USR02-MANDT COLOR 2,
                  '   ',USR02-USTYP COLOR 2,
                  ' ',USR02-TRDAT COLOR 2, USR02-LTIME COLOR 2,
                  ' ',FLAG COLOR 6.
          ELSE.
            WRITE:/ ' ', MARK AS CHECKBOX,' ', USR02-BNAME COLOR 3,
                  ' ',USR02-MANDT COLOR 2,
                  '   ',USR02-USTYP COLOR 2,
                  ' ',USR02-TRDAT COLOR 2, USR02-LTIME COLOR 2,
                  ' ',FLAG COLOR 6.
          ENDIF.
        ELSE.
          IF SZIN = 0.
            WRITE:/ ' ', MARK AS CHECKBOX,' ', USR02-BNAME COLOR 2,
                  ' ',USR02-MANDT COLOR 2,
                  '   ',USR02-USTYP COLOR 2,
                  ' ',USR02-TRDAT COLOR 4, USR02-LTIME COLOR 4,
                  ' ',FLAG COLOR 6.
          ELSE.
            WRITE:/ ' ', MARK AS CHECKBOX,' ', USR02-BNAME COLOR 3,
                  ' ',USR02-MANDT COLOR 2,
                  '   ',USR02-USTYP COLOR 2,
                  ' ',USR02-TRDAT COLOR 4, USR02-LTIME COLOR 4,
                  ' ',FLAG COLOR 6.
          ENDIF.
        ENDIF.
        HIDE: USR02-BNAME, USR02-MANDT.
      ENDSELECT.
      CLEAR USR02.
    TOP-OF-PAGE.
    WRITE:/ 'LOCK   USER         CLIENT  TYPE     LAST lOGIN     ' COLOR 6.
      SKIP.
    AT USER-COMMAND.
      IF SY-UCOMM = 'SEL'.
        DO.
          CLEAR MARK.
          READ LINE SY-INDEX FIELD VALUE MARK.
          IF SY-SUBRC NE 0.  EXIT. ENDIF.
          IF USR02-BNAME IS INITIAL.CONTINUE.ENDIF.
          SELECT SINGLE * FROM USR02 CLIENT SPECIFIED WHERE
          MANDT = USR02-MANDT AND BNAME = USR02-BNAME.
          IF MARK = 'X' AND USR02-UFLAG = 0.
            USR02-UFLAG = 64.
            UPDATE USR02 CLIENT SPECIFIED SET: UFLAG = 64 WHERE
            MANDT = USR02-MANDT AND
            BNAME = USR02-BNAME.
            COMMIT WORK.
          ENDIF.
          IF MARK = ' ' AND USR02-UFLAG = 64.
            USR02-UFLAG = 0.
            UPDATE USR02 CLIENT SPECIFIED SET: UFLAG = 0 WHERE
            MANDT = USR02-MANDT AND
            BNAME = USR02-BNAME.
            COMMIT WORK.
          ENDIF.
        ENDDO.
        CLEAR USR02.
      ENDIF.
    regards
    Arun

  • Can we lock down the system for BW object and not bex objects

    Hello,
    I have a question about object changeability. We want to lock down the BW production system but leave it open for adhoc query. Can we lock down the BW system only for few objects like Cubes, ODS, Infoobjects, Infosets, Multiproviders, and keep the system open for Bex objects like Query, varaibles and also for Infopackges and DTP's.
    Which tcode can we use for this ?
    Thanks,
    Message was edited by:
            Kiran Mehendale

    hi, usaully production system will be non changeable for all objects.. but as far as SAP BW is concerned we can make certain objects changeable by setting as follows..
    in production go to RSA1 - Transport Connection, select Object changeability button from tool bar, here you will find a list of objects which can be made changeable in a closed system.. just click on required objects and set it to Everything Changeable..
    Reg,
    Pradhiba
    <REMOVED>

  • Colours different on object and inspector

    Hi,
    For most colours, there seems to be a subtle difference in the appearance of the fill colour of an object, and the colour for the object shown in the inspector/colour chooser. The object shown on the page has more saturation or brightness than in the floating palettes.
    This is immediately noticeable to me on the default green colour for a new object from the toolbar menu (eg. a new circle). In fact, if I click the magnifying glass on the colour palette and click my object, even though they're meant to be the same colour, both the inspector and object change colour slightly, proving that it's not just my eyes. I can repeat this again and again on the object of default green fill until the object is bright green (green starts on 183 of RGB and ends up on 255.)
    The problem is the same with text and lines in Pages, but this does not happen in TextEdit. Text copied directly from TextEdit into Pages has a slightly different color.
    Does anyone else experience this? Any fixes?
    Thanks

    This was brought up in the Keynote forum quite some time ago, compllete with a handy demonstration by Kyn.
    I would suggest sending feedback and seeing if it shows up in keynote too. If it doesn't then it was a missed fix in color handling that was not forwarded to the Pages team.

  • What is different between conflict object and lingering object in AD

    Hi
    I found lots of conflict object in my Forest on AD 2k8R2 with FFL & DFL 2k3 with dsquery filter "(name=*\0ACNF:*).
    But Only I can see 4 to 5 AD object in ADUC.
    How can I found others.
    Also these conflict object are replicated with AD replication? and due to these conflict object, can be any issue in AD replication like slow replication or delay replication?
    If I delete them then how can I delete and which command or tool like LDP?
    Also Is conflict AD Object and lingering objects means are same?
    Please suggest and guide..
    See below link of my conflict object ..
    http://sdrv.ms/19DUTbi

    IT means... If I don't find duplicate or conflict object in ADUC then I no need to worry about it as after AD tombstone lifetime period, these conflict object would be delete automatically ...?
    Conflict objects can be duplicate or lingering objects both & you need to worry. Consider an example, if you have a system named abc & you try to join another system with the same name from other site DC where connection b/w other DC's are down &
    ABC information is not present in that local DC, it will allow you to join system in the domain with the same name, then the object joined later vl have CNF added.
    Another case, two new systems are joined together from two different AD site with the same name, it will allow you to join & once replication occurs, you will find duplicate name with CNF.
    Same problem happens, when you connect old DC which has crossed TSL. WHat happens here is you have most recent DC with the deleted objects, when you connect old DC which has not received replication & crossed TSL, again during replication, you will see
    objects with CNF which will be lingering objects.
    So, CNF objects can be duplicate & lingering objects both & in both the case, i'll worry. Lingering objects are not visible directly, you can find out using repadmin tool. It is really complex to clean them if they exists in the ready only partition
    of the GC.
    http://technet.microsoft.com/en-us/library/cc738018%28v=ws.10%29.aspx
    Awinish Vishwakarma - MVP
    My Blog: awinish.wordpress.com
    Disclaimer This posting is provided AS-IS with no warranties/guarantees and confers no rights.

  • What is the use for lock object and how to use the lock objects

    Hi Guru's,
    I am new to ABAP .Can you please clarify the that what is the use of lock object and how to use the loct object .what is use of the Deque & Enque  function modules .

    hi ,
    below are some minfo about lock objects :
      Lock Objects
    These types of objects are used for locking the access to database records in table. This mechanism is used to enforce data integrity that is two users cannot update the same data at the same time. With lock objects you can lock table-field or whole table.
    In a system where many users can access the same data, it becomes necessary to control the access to the data. In R/3 system this access control is built-in on database tables. Developers can also lock objects over table records.
    To lock an object you need to call standard functions, which are automatically generated while defining the lock object in ABAP/4 dictionary. This locking system is independent of the locking mechanism used by the R/3 system. This mechanism also defines LUW i.e. Logical Unit of Work. Whenever an object is locked, either by in built locking mechanism or by function modules, it creates corresponding entry in global system table i.e. table is locked. The system automatically releases the lock at the end of transaction. The LUW starts when a lock entry is created in the system table and ends when the lock is released.
    Creating Lock Objects
    Lock object is an aggregated dictionary object and can be defined by using the following steps:
    o From initial data dictionary screen, enter the name for the object, Click Lock object radiobutton and then click on Create. The system displays a dialog box for Maintain Lock Objects screen
    o Enter short text as usual and the name for primary table.
    -Save
    -Select Tables option
    From this screen you can:
    Select secondary tables, if any, linked by foreign key relationship.
    Fields for the lock objects. This option allows you to select fields for objects (R/3 system allows locking up to record level). Lock object argument are not selected by user but are imposed by the system and includes all the primary keys for the table.
    1) Exclusive lock: The locked data can only be displayed or edited by a single user. A request for another exclusive lock or for a shared lock is rejected.
    2) Shared lock: More than one user can access the locked data at the same time in display mode. A request for another shared lock is accepted, even if it comes from another user. An exclusive lock is rejected.
    3) Exclusive but not cumulative: Exclusive locks can be requested several times from the same transaction and are processed successively. In contrast, exclusive but not cumulative locks can be called only once from the same transaction. All other lock requests are rejected.
    Also, last but not the least, locking the object is logical (locking with any enqueue ) .so, you have to use the lock object while trying to access from second program .
    reward if helpful ,
    Regards,
    Ranjita

  • CKPT locks the system objects and blocks other sessions

    CKPT locks the system objects and blocks other sessions
    Oracle Version 10.2.0.4
    OS : HP UX 11.31 Itanium
    SQL> select * from v$lock where block=1;
    ADDR KADDR SID TY ID1 ID2 LMODE
    REQUEST CTIME BLOCK
    C0000009FCC2B348 C0000009FCC2B368 1100 RO 65559 1 2
    0 3877 1
    SQL> select program from v$session where sid=1100;
    PROGRAM
    oracle@ctqanhr1 (CKPT)
    As a workaround we flush the buffer cache with the below command
    SQL> alter system flush buffer_cache;
    however the issue reoccurs after some times.
    Edited by: 965132 on Dec 2, 2012 9:59 PM

    other reference:
    CKPT Questions
    The temporary workaround is to set "_db_fast_obj_truncate"=FALSE in that particular case.
    Regards,
    sgc
    Edited by: Samuel G. Cristobal on 03-dic-2012 8:48

  • ArrayStoreException in WLS 8.1SP3: Object and inner type of array differs

    Has anyone seen this? We seem to get them from time to time, am running WLS 8.1 SP3 on JRockit 1.4.2.03. Stack trace follows.
              cheers
              dim
              <BEA-000802> <ExecuteRequest failed
              java.lang.ArrayStoreException: Object and inner type of array differs.
              java.lang.ArrayStoreException: Object and inner type of array differs
              at weblogic.rjvm.BasicOutboundRequest.sendReceive()Lweblogic.rmi.spi.InboundResponse;(BasicOutboundRequest.java:108)
              at weblogic.rmi.internal.BasicRemoteRef.invoke(Ljava.rmi.Remote;Lweblogic.rmi.extensions.server.RuntimeMethodDescriptor;[Ljava.lang.Object;Ljava.lang.reflect.Method;)Ljava.lang.Object;(BasicRemoteRef.java:137)
              at weblogic.cluster.replication.ReplicationManager_813_WLStub.update(Lweblogic.cluster.replication.ROID;ILjava.io.Serializable;)V(Unknown Source)
              at weblogic.cluster.replication.ReplicationManager.updateSecondary(Lweblogic.cluster.replication.ROID;Ljava.io.Serializable;Ljava.lang.String;)Ljava.lang.Object;(ReplicationManager.java:811)
              at weblogic.servlet.internal.session.ReplicatedSessionData.syncSession()V(ReplicatedSessionData.java:490)
              at weblogic.servlet.internal.session.ReplicatedSessionContext.sync(Ljavax.servlet.http.HttpSession;)V(ReplicatedSessionContext.java:184)
              at weblogic.servlet.internal.ServletRequestImpl.syncSession()V(ServletRequestImpl.java:2471)
              at weblogic.servlet.internal.WebAppServletContext.invokeServlet(Lweblogic.servlet.internal.ServletRequestImpl;Lweblogic.servlet.internal.ServletResponseImpl;)V(WebAppServletContext.java:3679)
              at weblogic.servlet.internal.ServletRequestImpl.execute(Lweblogic.kernel.ExecuteThread;)V(ServletRequestImpl.java:2630)
              at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest;)V(ExecuteThread.java:219)
              at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:178)
              at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread;)V(Unknown Source)
              Caused by: java.lang.ArrayStoreException: Object and inner type of array differs
              at java.io.ObjectInputStream.readObject(Unknown Source)
              at java.util.HashMap.readObject(Unknown Source)
              at java.io.ObjectInputStream.readSerialData(Unknown Source)
              at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
              at java.io.ObjectInputStream.readObject0(Unknown Source)
              at java.io.ObjectInputStream.readSerialData(Unknown Source)
              at java.io.ObjectInputStream.readObject(Unknown Source)
              at weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:120)
              at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:117)
              at weblogic.cluster.replication.ReplicationManager_WLSkel.invoke(Unknown Source)
              at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
              at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
              at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
              at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
              at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
              at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
              ... 3 more

    You have to be careful how you define your complex elements, define complex elements outside of the root element or in a seperate file and reference them.
              While the following is syntactically correct, in weblogic you will result in the error you had previously
              <element>
              <complex type>
              </complex type>
              </element>
              Instead do
              <element type="ir:ComEx">
              <complex type name="ComEx"></complex type>
              outside of the root element
              Had this exact same problem today, this is how I fixed it

  • Resizing objects and groups in CS4 - different from CS3

    Hi all,
    In CS3 I used to be able to resize objects or groups of objects by just using the solid select tool and just grabbing a corner or side of the object and resizing it.  That doesn't work in CS4.  Doing the same thing only moves the image around.  I have to actually use the scale pop-up.
    I can still do the same thing an anchor or path at a time with the outline select tool.
    I'm sure there's a way to do this in CS4 and there's probably a switch buried deep in some menu to allow this, but darned if I can figure it out.

    I'm still on CS3 so I don't know for sure, but I don't think so.  It's always been a pretty easy key shortcut to hit by accident though. 

  • Declare and initialize a varray of collection Object and pass it as OUT Par

    Hi ,
    How to declare and initialize a varray of collection Object and pass it as OUT Parameter to a procedure.
    Following is the Object and VARRAY Type 's I have created and trying to pass the EmployeeList varray type variable as an OUT parameter to my stored procedure, but it is not working. I tried different possibilities of declaring and initializing the varray type variable but it did not work. Any help would be appreciated.
    CREATE TYPE Employee IS Object
              employeeId     Number,
              employeeName VARCHAR2(31),
              employeeType     VARCHAR2(20),
    CREATE TYPE EmployeeList IS VARRAY(100) OF Employee;
    /* Procedure execution block */
    declare
    employees EmployeeList;
    begin
    EXECUTE displayEmployeeDetails(100, employees);
    end;
    Thanks in advance,
    Raghu.

    but it is not workingWhat's the definition of not working?
    Error messages are always helpful.
    SQL> CREATE OR REPLACE TYPE Employee IS Object
      2  (
      3  employeeId Number,
      4  employeeName VARCHAR2(31),
      5  employeeType VARCHAR2(30)
      6  );
      7  /
    Type created.
    SQL>
    SQL> CREATE OR REPLACE TYPE EmployeeList IS VARRAY(100) OF Employee;
      2  /
    Type created.
    SQL> CREATE OR REPLACE PROCEDURE getEmployeeDetails (
      2    o_employees OUT employeelist
      3  )
      4  AS
      5  BEGIN
      6   o_employees := employeelist();
      7   o_employees.EXTEND;
      8   o_employees(1) := employee(1,'Penry','Mild Mannered Janitor');
      9  END;
    10  /
    Procedure created.
    SQL> set serveroutput on
    SQL> declare
      2   employees employeelist;
      3  begin
      4   getemployeedetails(employees);
      5   for i in 1 .. employees.count
      6   loop
      7    dbms_output.put_line(employees(i).employeeid||' '||
      8                         employees(i).employeename||' '||
      9                         employees(i).employeetype);
    10   end loop;
    11  end;
    12  /
    1 Penry Mild Mannered Janitor
    PL/SQL procedure successfully completed.
    SQL>

  • Is it possible to copy a Cross-Tab object and Formulars to a new report.

    Afteroon all,
    I have created a Balance Sheet report using quite a few formulars and items. They are listed in a cross-tab object. Everything is working fine except something has happened to the report at some stage and it is causing problems when I deploy my web app (the rpt file will not delete when I undeploy my web app, it gets locked, untill I shutdown tomcat)
    So I want to try create a new rpt file and copy the cross-tab object and all its formulars across.
    So is there a way to copy formulars from one report to another and also is it possible to copy a cross-tab object across.
    Thanks
    Darren
    (PS Unless someone can tell me why my rpt file is being locked by tomcat)

    I am running windows and the rpt file "locks" and I have just noticed the \WEB-INF\lib\derby.jar file also locks. I dont use the derby.jar file at all. (as far as I am aware - I got an oracle connection).
    Maybe I am redeploying incorrectly or not clearing the report correctly.
    What I do is, I copy the WAR file to the webapps folder, Tomcat unpacks the app and I can run my reports no problem, fresh data is displayed if different parameters are used. I then close my browser window and make changes to my report design. I delete the WAR file in the webapps folder and export my project to a war file again - to the webapps, Tomcat then tries to clear the old project folder so that it can deploy the new WAR. it clears out everything except the rpt file and the derby.jar files. And then of course cannot redeploy the WAR file. So I have to stop tomcat and delete the project myself and start Tomcat again.
    Clearly this is not good as I dont want to have to stop and start my Tomcat server everytime I make changes.
    So how should I correctly undeploy a current version of my webapp and then deploy the new changes. Or am I not doing something when I am finished viewing the report.
    Sorry for going off Thread topic.
    I have tried using copies of the report but the same still happens.
    Thanks
    Darren
    Im busy reading the "CR not releasing the memory " thread, hopefully the answer is in there somewhere
    Edited by: Darren Jackson on Oct 7, 2008 5:21 PM

  • Match Code Objects and ID's

    Hi,
        Can you explain what is Match code objects and ID
    Regards,
    Bharath Mohan B

    Hi,
    For many entry fields, but not all, SAP provides a search function called a Matchcode. Matchcodes allow you to select a value from a list or search for a value by categories of data if there are many possibilities.
    Types of Matchcodes
    Matchcodes fall into three basic categories:
    1) Short list or hit list
    The values are listed on one screen. For longer lists, you may need to scroll down to see all the values.
    2) Restrict Value Range
    Many entries are available for the field. A number of tabbed screens with different categories display so that you can enter your search criteria.
    3) Calendar search
    A calendar-type dialog box is displayed so that you can select day, month, and year. This is used in date fields such as invoice posting date.
    Matchcodes were replaced with Search Helps starting with Release 4.0. Please use search helps to assign an input help to a field.
    Existing matchcodes were automatically converted to search helps. A matchcode object is hereby converted to a collective search help with the same name. Each matchcode ID of the matchcode object is converted into an elementary search help with the same name and assigned to the collective search help created from the matchcode object.
    A matchcode is a means of finding data records stored in the system. The matchcode is defined in the ABAP Dictionary in two steps:
    You first define the relevant tables and fields for the search in a matchcode object. A matchcode object describes the set of all possible search paths for a search string.
    You then create one or more matchcode IDs for a matchcode object. A matchcode ID describes a special search path for a search string. The matchcode ID defines the fields or field combinations to be used in the search.
    http://www.sapdevelopment.co.uk/dictionary/shelp/shelphome.htmhttp://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee2b446011d189700000e8322d00/content.htm
    This is also a good link
    What are Search Helps, How to create and whats the Use ?
    A search help can be created in ABAP Dictionary ( tcode se11 )
    Create a new search help (say myHelp) , choose Elementary search help (simple one), select Definitions tab, enter the table name(say myTable) in "Text Table" text box.
    Then enter the column to be used (say myField) for this help in search help parameter, choose Import/Export, give Lpos as 1, and activate. ( You can add more columns from the same table here).
    In report, code as
    parameter p1 like myTable-myField matchcode object myHelp.
    when you execute this report, p1 will have a f4 help enabled. The help list will have all values from myTable for field myField.
    Don't forget to reward if useful......

  • Sort list of objects and Comparator.

    Hi. I have a problem with list sorting. There is a class with fields like these id (Long), number (String), operator (String), server (String) port (Integer). I have to sort list of these objects in accordance with the conditions specified by the user.
    Conditions for sorting:
    1. In the first account of the full compliance of the server name and port value (Object Gateway) specifed by the user.
    2. When the server name is correct and the port is different from the standard, then the objects should be placed in ascending order of the port.
    3. If the server name does not match the model, the order of the objects must reflect the declining value of a parameter port. If the list contains objects of the same port and different name, the order does not matter.
    How should Comparator looks like?

    Ok, this is the solution ;]
    public class GatewayComparator implements Comparator<Gateway> {
        private String server;
        private Integer port;
        public GatewayComparator(String server, Integer port){
            this.server = server;
            this.port = port;
        public int compare(Gateway o1, Gateway o2) {
            int result = 0;
            if (o1.getServer().equals(this.server)) {
                result = -1;
            if (o2.getServer().equals(this.server)) {
                result = 1;
            if (o1.getServer().equals(this.server) && o2.getServer().equals(this.server)) {
                if (o1.getPort().equals(this.port)) {
                    result = -1;
                if (o2.getPort().equals(this.port)) {
                    result = 1;
                } else if (!o1.getPort().equals(this.port) && !o2.getPort().equals(this.port)) {
                    result = o1.getPort().compareTo(o2.getPort());
            } else if (!o1.getServer().equals(this.server) && !o2.getServer().equals(this.server)) {
                if (o1.getPort() > o2.getPort()) {
                    result = -1;
                } else if (o1.getPort() < o2.getPort()) {
                    result = 1;
                } else {
                    result = 0;
            return result;
    }

Maybe you are looking for