Retrieving all values from hashmap in order you put them in

Hi guys,
I want to retrieve all values from a HashMap in the order I put them in.
So I can't use the values() method that gives back a collection and iterate over that.
Do you guys know a good way to do that ?

You can just do something like this:
class OrderedMap
    private final Map  m_rep = new HashMap();
    private final List m_keys = new ArrayList();
    public Object get( final Object key )
        return m_rep.get( key );
    public Object put( final Object key, final Object value )
        final Object result = m_rep.put( key, value );
        if ( result != null )
            m_keys.add( key );
        return result;
    public Object remove( final Object key )
        final Object result = m_rep.remove( key );
        if ( result != null )
            m_keys.add( key );
        return result;
    public Iterator keyIterator()
        return m_rep.iterator();
}Then use it like this:
   for ( Iterator it = map.keyIterator(); it.hasNext(); )
       final Object value = map.get( it.next() );
   }This will be in the order you put them in. However, if you want to do this correctly, you should implement the Map interface and add all the methods. Another thing you can do is download the JDK 1.4 source, learn how they did and do it the same way for 1.2.
R.

Similar Messages

  • Re: [iPlanet-JATO] Re: Retrieving all Values from a Tiled View

    Todd,
    Let me try to explain you this time. I have a text field in a TiledViewBean.
    When I display the page, the text field
    html tag is created with the name="PageDetail.rDetail[0].tbFieldName" say
    five times/rows with same name.
    The html tags look like this.
    <input type=text name="PageDetail.rDetail[0].tbFieldName" value=""
    maxlength=9 size=13>
    <input type=text name="PageDetail.rDetail[0].tbFieldName" value=""
    maxlength=9 size=13>
    <input type=text name="PageDetail.rDetail[0].tbFieldName" value=""
    maxlength=9 size=13>
    When the form is submitted, I want to get the text field values using the
    method getTbFieldName().getValues() which
    returns an array object[]. This is in case where my TiledViewBean is not
    bound and it is working fine.
    Now in case when my TiledView is bound to a model, it creates the html tags
    as follows.
    <input type=text name="PageDetail.rDetail[0].tbFieldName" value=""
    maxlength=9 size=13>
    <input type=text name="PageDetail.rDetail[1].tbFieldName" value=""
    maxlength=9 size=13>
    <input type=text name="PageDetail.rDetail[2].tbFieldName" value=""
    maxlength=9 size=13>
    Now when I say getTbFieldName().getValues() it returns only the first
    element values in the object[] and the rest of the
    values are null.
    May be we need to create a utility method do get these values from
    requestContext.
    raju.
    ----- Original Message -----
    From: Todd Fast <toddwork@c...>
    Sent: Saturday, July 07, 2001 3:52 AM
    Subject: Re: [iPlanet-JATO] Re: Retrieving all Values from a Tiled View
    Raju.--
    I wanted to know how the getValues() method works the reason being,
    when the tiled view is NOT bound to a model, it populates all the
    fields with the same name as some thing likeI'm afraid I don't understand your point--can you please clarify? Do you
    mean "value" instead of "name"?
    What are you trying to do? What behavior are you expecting but notseeing?
    >
    Without further clarification, I can say that the setValues() methodsNEVER
    populates data on multiple rows of a (dataset) model, nor does it affect
    multiple fields on the same row. Perhaps what you are seeing is theeffect
    of default values. Model that derive from DefaulModel have the ability to
    carry forward the values set on the first row to other rows in lieu ofdata
    in those other rows. This behavior is for pure convenience and can be
    turned off, and it is turned off for the SQL-based models.
    Todd
    [email protected]

    Hi,
    I wanted to know how the getValues() method works the reason being,
    when the tiled view is NOT bound to a model, it populates all the
    fields with the same name as some thing like
    PageDetail.rDetail[0].tbFieldValue
    PageDetail.rDetail[0].tbFieldValue
    in which case, the getValues() method works fine.
    But in case where the tiled view is bound to a model, it populates
    with different field names such as,
    PageDetail.rDetail[0].tbFieldValue
    PageDetail.rDetail[1].tbFieldValue
    in this case, the getValues() doesn't work. Any soultion to this?
    We are using Moko 1.1.1.
    thanks in advance,
    raju.
    --- In iPlanet-JATO@y..., "Todd Fast" <toddwork@c...> wrote:
    Does anyone know of is there a single method to get all values of a
    display
    field in a tiled view without having to iterate through all the
    values ie
    resetTileIndex() / nextTile() approach.
    ie Something that returns an Object[] or Vector just like ND returned a
    CspVector. I tried using the getValues() methods but that allways returns
    a
    single element array containing the first element.
    (I think now, that method is used for multi selecteable ListBoxes)Actually, no. We can add this in the next patch, but for now, I'd recommend
    creating a simple utility method to do the iteration on an arbitrary model
    and build the list for you.
    Todd

  • Retrieving ALL values from a single restricted user property

    How can I retrieve ALL values of a single restricted user property from within
    a .jpf file?
    I want to display a dropdown list within a form in a JSP which should contain
    all the locations listed in the property 'locations'. I ever get just the default
    value when I access the property via
    ProfileWrapper pw = userprofile.getProfileForUser(user);
    Object prop = pw.getProperty("ClockSetup", "Locations");

    Well, the code you've got will retrieve the single value of the property
    for the current user. You're getting the default value because the
    current user doesn't have Locations property set, so the ProfileWrapper
    returns the default value from the property set.
    I assume you want to get the list of available values that you entered
    into the .usr file in Workshop. If so, I've attached a
    SetColorController.jpf, index.jsp, and GeneralInfo.usr (put in
    META-INF/data/userprofiles) I wrote for an example that does just this.
    It uses the PropertySetManagerControl to retrieve the restricted values
    for a property, and the jsp uses data-binding to create a list from that
    pageflow method.
    For a just-jsps solution, you can also use the
    <ps:getRestrictedPropertyValues/> tag. I've attached a setcolor-tags.jsp
    that does the same thing.
    Greg
    Dirk wrote:
    How can I retrieve ALL values of a single restricted user property from within
    a .jpf file?
    I want to display a dropdown list within a form in a JSP which should contain
    all the locations listed in the property 'locations'. I ever get just the default
    value when I access the property via
    ProfileWrapper pw = userprofile.getProfileForUser(user);
    Object prop = pw.getProperty("ClockSetup", "Locations");
    [att1.html]
    package users.setcolor;
    import com.bea.p13n.controls.exceptions.P13nControlException;
    import com.bea.p13n.property.PropertyDefinition;
    import com.bea.p13n.property.PropertySet;
    import com.bea.p13n.usermgmt.profile.ProfileWrapper;
    import com.bea.wlw.netui.pageflow.FormData;
    import com.bea.wlw.netui.pageflow.Forward;
    import com.bea.wlw.netui.pageflow.PageFlowController;
    import java.util.Collection;
    import java.util.Iterator;
    * @jpf:controller
    * @jpf:view-properties view-properties::
    * <!-- This data is auto-generated. Hand-editing this section is not recommended. -->
    * <view-properties>
    * <pageflow-object id="pageflow:/users/setcolor/SetColorController.jpf"/>
    * <pageflow-object id="action:begin.do">
    * <property value="80" name="x"/>
    * <property value="100" name="y"/>
    * </pageflow-object>
    * <pageflow-object id="action:setColor.do#users.setcolor.SetColorController.ColorFormBean">
    * <property value="240" name="x"/>
    * <property value="220" name="y"/>
    * </pageflow-object>
    * <pageflow-object id="action-call:@page:index.jsp@#@action:setColor.do#users.setcolor.SetColorController.ColorFormBean@">
    * <property value="240,240,240,240" name="elbowsX"/>
    * <property value="144,160,160,176" name="elbowsY"/>
    * <property value="South_1" name="fromPort"/>
    * <property value="North_1" name="toPort"/>
    * </pageflow-object>
    * <pageflow-object id="page:index.jsp">
    * <property value="240" name="x"/>
    * <property value="100" name="y"/>
    * </pageflow-object>
    * <pageflow-object id="forward:path#success#index.jsp#@action:begin.do@">
    * <property value="116,160,160,204" name="elbowsX"/>
    * <property value="92,92,92,92" name="elbowsY"/>
    * <property value="East_1" name="fromPort"/>
    * <property value="West_1" name="toPort"/>
    * <property value="success" name="label"/>
    * </pageflow-object>
    * <pageflow-object id="forward:path#success#begin.do#@action:setColor.do#users.setcolor.SetColorController.ColorFormBean@">
    * <property value="204,160,160,116" name="elbowsX"/>
    * <property value="201,201,103,103" name="elbowsY"/>
    * <property value="West_0" name="fromPort"/>
    * <property value="East_2" name="toPort"/>
    * <property value="success" name="label"/>
    * </pageflow-object>
    * <pageflow-object id="control:com.bea.p13n.controls.ejb.property.PropertySetManager#propSetMgr">
    * <property value="31" name="x"/>
    * <property value="34" name="y"/>
    * </pageflow-object>
    * <pageflow-object id="control:com.bea.p13n.controls.profile.UserProfileControl#profileControl">
    * <property value="37" name="x"/>
    * <property value="34" name="y"/>
    * </pageflow-object>
    * <pageflow-object id="formbeanprop:users.setcolor.SetColorController.ColorFormBean#color#java.lang.String"/>
    * <pageflow-object id="formbean:users.setcolor.SetColorController.ColorFormBean"/>
    * </view-properties>
    public class SetColorController extends PageFlowController
    * @common:control
    private com.bea.p13n.controls.ejb.property.PropertySetManager propSetMgr;
    * @common:control
    private com.bea.p13n.controls.profile.UserProfileControl profileControl;
    /** Cached possible colors from the User Profile Property Set definition.
    private String[] possibleColors = null;
    /** Get the possible colors, based upon the User Profile Property Set.
    public String[] getPossibleColors()
    if (possibleColors != null)
    return possibleColors;
    try
    PropertySet ps = propSetMgr.getPropertySet("USER", "GeneralInfo");
    PropertyDefinition pd = ps.getPropertyDefinition("FavoriteColor");
    Collection l = pd.getRestrictedValues();
    String[] s = new String[l.size()];
    Iterator it = l.iterator();
    for (int i = 0; it.hasNext(); i++)
    s[i] = it.next().toString();
    possibleColors = s;
    catch (P13nControlException ex)
    ex.printStackTrace();
    possibleColors = new String[0];
    return possibleColors;
    /** Get the user's favorite color from their profile.
    public String getUsersColor()
    try
    ProfileWrapper profile = profileControl.getProfileFromRequest(getRequest());
    return profileControl.getProperty(profile, "GeneralInfo", "FavoriteColor").toString();
    catch (P13nControlException ex)
    ex.printStackTrace();
    return null;
    // Uncomment this declaration to access Global.app.
    // protected global.Global globalApp;
    // For an example of page flow exception handling see the example "catch" and "exception-handler"
    // annotations in {project}/WEB-INF/src/global/Global.app
    * This method represents the point of entry into the pageflow
    * @jpf:action
    * @jpf:forward name="success" path="index.jsp"
    protected Forward begin()
    return new Forward("success");
    * @jpf:action
    * @jpf:forward name="success" path="begin.do"
    protected Forward setColor(ColorFormBean form)
    // set the color in the user's profile
    try
    ProfileWrapper profile = profileControl.getProfileFromRequest(getRequest());
    profileControl.setProperty(profile, "GeneralInfo", "FavoriteColor", form.getColor());
    catch (P13nControlException ex)
    ex.printStackTrace();
    return new Forward("success");
    * FormData get and set methods may be overwritten by the Form Bean editor.
    public static class ColorFormBean extends FormData
    private String color;
    public void setColor(String color)
    this.color = color;
    public String getColor()
    return this.color;
    [GeneralInfo.usr]
    [att1.html]

  • Retrieve all values from project type when project type combo box is null

    Hi,
    We are facing a tight situation here. We have a scenario where we have 2 filter options.
    1) Department ID
    2) Project type
    When department ID is selected all the department IDs should be populated in the combo box and the project type combo box should be empty.
    Similarly, when project type is selected all the project types should be populated in the combo box and the department ID combo box should be empty.
    Then, when more than one value is selected from department ID box and all the values from project type must be retrieved from query level (as per business logic).
    How do we do this? Kindly help us with this situation.

    Basically my situation slightly different.
    I am trying to do a bulk insert on SQL Server table using prepared statement, during that time i am getting the exception. I am using JDBC-ODBC driver. However, if i do individual record insertion, it is working.
    Any idea about this type of problem ?
    Regards
    Ramesh

  • Re: [iPlanet-JATO] Retrieving all Values from a Tiled View

    Does anyone know of is there a single method to get all values of adisplay
    field in a tiled view without having to iterate through all the values ie
    resetTileIndex() / nextTile() approach.
    ie Something that returns an Object[] or Vector just like ND returned a
    CspVector. I tried using the getValues() methods but that allways returnsa
    single element array containing the first element.
    (I think now, that method is used for multi selecteable ListBoxes)Actually, no. We can add this in the next patch, but for now, I'd recommend
    creating a simple utility method to do the iteration on an arbitrary model
    and build the list for you.
    Todd

    Hi,
    I wanted to know how the getValues() method works the reason being,
    when the tiled view is NOT bound to a model, it populates all the
    fields with the same name as some thing like
    PageDetail.rDetail[0].tbFieldValue
    PageDetail.rDetail[0].tbFieldValue
    in which case, the getValues() method works fine.
    But in case where the tiled view is bound to a model, it populates
    with different field names such as,
    PageDetail.rDetail[0].tbFieldValue
    PageDetail.rDetail[1].tbFieldValue
    in this case, the getValues() doesn't work. Any soultion to this?
    We are using Moko 1.1.1.
    thanks in advance,
    raju.
    --- In iPlanet-JATO@y..., "Todd Fast" <toddwork@c...> wrote:
    Does anyone know of is there a single method to get all values of a
    display
    field in a tiled view without having to iterate through all the
    values ie
    resetTileIndex() / nextTile() approach.
    ie Something that returns an Object[] or Vector just like ND returned a
    CspVector. I tried using the getValues() methods but that allways returns
    a
    single element array containing the first element.
    (I think now, that method is used for multi selecteable ListBoxes)Actually, no. We can add this in the next patch, but for now, I'd recommend
    creating a simple utility method to do the iteration on an arbitrary model
    and build the list for you.
    Todd

  • Using keys to search and retrieve values from HashMap

    I've been fiddling around with this problem for a while and can't seem to find any working solution. What I have is a method that I want to return all values from a HashMap, but instead of using the regular keys for a HashMap (0, 1, 2, 3), my keys are different numbers such as 51414, 62513, etc.
    public Car[] getAllCars() {
              Map<Integer, Car> myCars = system.getCars(); //getCars() returns HashMap of Car objects from another class
              Car[] c = new Car[myCars.size()];
              if(myCars.size()!=0) // ensure map is populated
                   for(int i=0; i<myCars.size(); i++)
                        myCars.get(i);
              return c;    
         }So what's happening at the moment is it loops through myCars and gets some values, but only those ones at the keys of 0-15 (the size of the Map). What I need is to get the Keys from myCars and use them to return all Car objects. The HashMap API has something called KeySet() which I think could help me, but I can't get that working.
    Any ideas?

    DiscoInferno wrote:
    Short of an SSCCE I think this might more accurately describe what I'm after.
    public Car[] getAllCars() {
              Map<Integer, Car> myCars = system.getCars();  //getCars() returns HashMap of Car objects from another class
              Car[] c = new Car[myCars.size()];
              Set<Integer> s = holds.keySet();
              Iterator keyIter = s.iterator();
              if(myCars.size()!=0)
                   while (keyIter.hasNext()) {
                        Object key = keyIter.next();
                        Car cc = myCars.get(key);
                        System.out.println(myCars.get(key));
              return null;
         }What that does is gets the Car object that matches the specified key. What I need is for it to be returnable as an array of Car objects. I don't want it to print, but the output that is printed is basically what I want to be returned to an array.First, I'm not sure how you managed to find keySet() and not find values().
    Second, okay, so you know how to get each value. Do you not know how to set a value in an array? Do you not know how to return a value from a method? Google can help you find tutorials for those. Otherwise, I have no idea what difficulty you're having.

  • How to retrieve 2 values from a table in a LOV

    Hi
    I'm pretty new to APEX. I try to retrieve two values from a table using a LOV. I have a table named DEBIT with then columns SITE, NAME and KEY
    I want to display NAME to the user in a list. When the user select an item from the list, I want to retrieve the data of the SITE and KEY column of this item in order to launch an SQL command based on this two values.
    How to retrieve thes two values whant the user chooses an item from the list ?
    I apologize for my english, being french.
    Regards.
    Christian

    Christian,
    From what I understood about your requirement, you want a 'select list with submit' which displays "NAME" and based on the value selected, you want to get the corresponding values for "SITE" and "KEY" from the table.
    <b>Step 1: Create a select list with submit, say P1_MYSELECT </b><br><br>
    Use something like this in the dynamic list of values for the select list: <br>
    SELECT NAME display_value, NAME return_value
    FROM DEBIT<br><br>
    <b>Step 2: Create a page process of type PL/SQL block. Also create 2 hidden items P1_KEY and P1_SITE. </b><br><br>
    In the PL/sQL, write something like:
    DECLARE
      v_key DEBIT.KEY%TYPE;
      v_site DEBIT.SITE%TYPE;
      CURSOR v_cur_myvals IS
              SELECT KEY, SITE
              FROM DEBIT
              WHERE NAME = :P1_MYSELECT;
    BEGIN
      OPEN v_cur_myvals;
      LOOP
              FETCH v_cur_myvals
              INTO  v_key,v_site;
              EXIT WHEN v_cur_myvals%NOTFOUND;
    :P1_KEY := v_key;   
    :P1_SITE := v_site; 
      END LOOP;
      CLOSE v_cur_myvals;
    END; <br><br>
    Then you can use these values for whatever purpose you need to.
    Hope this helps.

  • How to retrieve the values from PL/SQL table types.

    Hi Every one,
    I have the following procedure:
    DECLARE
    TYPE t1 IS TABLE OF emp%ROWTYPE
    INDEX BY BINARY_INTEGER;
    t t1;
    BEGIN
    SELECT *
    BULK COLLECT INTO t
    FROM emp;
    END;
    This procedure works perfectly fine to store the rows of employee in a table type. I am not able to retrieve the values from Pl/SQL table and display it using dbms_output.put_line command.
    Can anybody help me please!!!!!
    Thanks
    Ahmed.

    You mean, you can't add this
    for i in t.first..t.last loop
    dbms_output.put_line(t(i).empno||' '||t(i).ename||' '||t(i).job);
    end loop;or you can't add this
    set serveroutput onor maybe, you are working in third party application where dbms_output is not applicable at all?
    You see, not able like very similar it is not working - both are too vague...
    Best regards
    Maxim

  • How can i get the all values from the Property file to Hashtable?

    how can i get the all values from the Property file to Hashtable?
    ok,consider my property file name is pro.PROPERTIES
    and it contain
    8326=sun developer
    4306=sun java developer
    3943=java developer
    how can i get the all keys & values from the pro.PROPERTIES to hashtable
    plz help guys..............

    The Properties class is already a subclass of Hashtable. So if you have a Properties object, you already have a Hashtable. So all you need to do is the first part of that:Properties props = new Properties();
    InputStream is = new FileInputStream("tivoli.properties");
    props.load(is);

  • How to get all values from an interval using select statement

    Hi,
    Is it possible to write a select statement that returns all values from an interval? Interval boundaries are variable.
    something like this:
    select (for x in 1,1024 loop x end loop) from dual
    (this, of course, doesn't work)
    The result in this example should be 1024 rows of numbers from 1 to 1024. These numbers are parameters, so it is not possible to create a table with predefined values.
    Thanks in advance for your help,
    Mia.

    For your simple case, with a lower boundary of 1, you can use:
    SELECT rownum
    FROM all_objects
    WHERE rownum <= 1024For a set of number between say 50 - 100, you can use something like:
    SELECT rownum + (50 - 1)
    FROM all_objects
    WHERE rownum <= (100 - 50 + 1)Note, that all_objects was used only because it generally has a lot of rows. Any table with at least the number of rows in your range will work.
    TTFN
    John

  • How to check  if all values from a dataset  has come to  an internal table

    How to check  if all values from a dataset  has come to  an internal table ?

    Hi,
    After OPEN DATASET statement check if sy-subrc = 0 if its success then proceed with split statement and save the dataset values into a internal table and while debugging the internal table you will find that whether all values get into internal table.
    Checking sy-subrc after OPEN DATASET statement is must to fill up the values in the internal table.
    For e.g.
    OPEN DATASET p_inpfile FOR INPUT IN TEXT MODE ENCODING DEFAULT.
      IF sy-subrc NE 0.
        WRITE :/ 'No such input file' .
        EXIT.
      ELSE.
    READ DATASET p_inpfile INTO loc_string.
          IF sy-subrc NE 0.
            EXIT.
          ELSE.
            CLEAR loc2.
    *Spliting fields in the file-
            REPLACE ALL OCCURRENCES OF '#' IN wa_string WITH ' '.
           SPLIT wa_string AT const INTO loc2-pernr
                                           loc2-werks
                                           loc2-persk 
                                           loc2-vdsk1.
    Hope you get some idea.
    Thanks,
    Sakthi C

  • Store all values from updateable report on clientside for later use

    apex 4.2 , 11xe
    hello,
    it is possible to store all values from an updateable report to something like an cache BEFORE sent it to DB ?
    Background:
    i have an modified updateable report ,look the jpg
    http://www10.pic-upload.de/25.06.13/3zq5wr23awwg.jpg
    updateable report have ever 29 rows. as example i make time entrys for an employee. very often the next employee have the same timeentrys. now iam thinking about to make the entrys for the first employee, then click a button to store the values from ALL cells into somting like a javascript cache or jquery.data() . when i pull another employee from lov i have a fresh empty report( with 29 rows) and now  i want to call the data back from cache to the cells (with another button). the cache shouldnt  be destroyed when refresh the page,cause there is a page refresh when pull another employee from lov.
    is it possible to store all cell values(empty or not) from report all in one?
    what is the best and simplest way ?
    good would be an example for the code or method i should use.
    or is somthing inside apex i could use for that. i looked in apex.api  but didnt found something.
    my report based on a view with iof trigger and apex collection.
    greets/christian

    thx for answer jarola and sorry for my bad english.
    apex collection will not work.
    let me explain why not and i think something like javascript/jquery is better for that.
    there is a table MAZEIT and i have this updateable report. when i select an employee from lov, a collection will be created.  the collection look in MAZEIT ,perhaps there are real timeentrys, in this case the collection will be modified and give me 29 rows,some are filled. or there are no real entrys and the collection give me 29 empty rows.
    here my report sql:
    select
    "HID_SEQ_ID",
    "DATUM",
    "WOTAG",
    "WOTAGNR",
    "KNDABT_ID",
    "ZEIT",
    "BEGINN",
    "ENDE",
    "PAUSE",
    "ZUSCHLAG",
    "BEM",
    "MELDUNG"
    from "#OWNER#"."V_COLL_MAZEIT"
    here the v_coll_mazeit (view) sql
    CREATE OR REPLACE VIEW V_COLL_MAZEIT AS
    SELECT seq_id HID_SEQ_ID        -- APEX_COLLECTIONS.SEQ_ID
            ,C001   HID_MAZEIT_ID     -- MAZEIT.ID
            ,C002   DATUM             -- Datum DD.MM.YYYY
            ,C003   WOTAG             -- Wochentag Mo/Di/...
            ,C004   WOTAGNR           -- Wochentag 1/2/...
            ,C005   KNDABT_ID         -- Abteilung
            ,C006   ZEIT              -- Zeit in HH24:MI
            ,C007   BEGINN            -- Beginn in HH24:MI
            ,C008   ENDE              -- Ende in HH24:MI
            ,C009   PAUSE             -- Pause in HH24:MI
            ,C010   ZUSCHLAG
            ,C011   BEM
            ,C040   HID_MANDANT_ID
            ,C041   HID_KND_ID
            ,C042   HID_MA_ID
            ,C043   HID_KW
            ,C048   HID_HASH4CHECK    -- Hash für Check auf Änderungen MAZEIT
            ,C049   HID_SORTIER       -- für ORDER BY hier Arbeitsbeginn
            ,C050   MELDUNG           -- für FehlerMeldungen
        FROM APEX_COLLECTIONS
       WHERE COLLECTION_NAME='V_COLL_MAZEIT'
       ORDER BY HID_SORTIER;
    here the trigger (iof) from v_coll_mazeit
    CREATE OR REPLACE TRIGGER "V_COLL_MAZEIT_IOF_U_TRG"
      INSTEAD OF UPDATE ON V_COLL_MAZEIT
      FOR EACH ROW
    BEGIN
      --RAISE_APPLICATION_ERROR(-20004,'NIX DA');
      CM_MEAT.V_COLL_MAZEIT_IOF_U_TRG(
             :NEW.HID_SEQ_ID
            ,:NEW.HID_MAZEIT_ID
            ,:NEW.DATUM
            ,:NEW.WOTAG
            ,:NEW.WOTAGNR
            ,:NEW.KNDABT_ID
            ,:NEW.ZEIT
            ,:NEW.BEGINN
            ,:NEW.ENDE
            ,:NEW.PAUSE
            ,:NEW.ZUSCHLAG
            ,:NEW.BEM
            ,:NEW.HID_HASH4CHECK
            ,:NEW.HID_SORTIER
            ,:NEW.MELDUNG
    END V_COLL_MAZEIT_IOF_U_TRG;
    and here a package procedure when i select an employee:
      PROCEDURE V_COLL_MAZEIT_PROC(
                    iAction    IN PLS_INTEGER,
                    iDatum     IN DATE DEFAULT SYSDATE,
                    iMandantId IN MAZEIT.MANDANT_ID%TYPE,
                    iKndId     IN MAZEIT.KND_ID%TYPE,
                    iMaId      IN MAZEIT.MA_ID%TYPE,
                    oCollName OUT VARCHAR2)
      IS
        TK_FUNC_NAME  CONSTANT USER_OBJECTS.OBJECT_NAME%TYPE := 'V_COLL_MAZEIT_PROC';
        TK_COLL_NAME  CONSTANT APEX_COLLECTIONS.COLLECTION_NAME%TYPE := 'V_COLL_MAZEIT';
        TK_MD5        CONSTANT VARCHAR2(2) := 'NO';
        TYPE t_Tage_TAB IS TABLE OF DATE INDEX BY BINARY_INTEGER;
        TYPE t_TageVC_TAB IS TABLE OF VARCHAR2(8) INDEX BY BINARY_INTEGER;
        TYPE t_TageI_TAB IS TABLE OF PLS_INTEGER INDEX BY BINARY_INTEGER;
        tTage   t_Tage_TAB;
        tTageVC t_TageVC_TAB;
        tTageI  t_TageI_TAB;
        vDatum  DATE;
        vDatumCh  VARCHAR2(8);
        vKW4Db  MAZEIT.KW%TYPE;
        vI      PLS_INTEGER := 0;
        vAnz    PLS_INTEGER := 0;
      BEGIN
        FOR rec IN (SELECT * FROM NLS_SESSION_PARAMETERS)
        LOOP
          InsProto(rec.PARAMETER||'=['||rec.VALUE||']',
                    QK_PACK_NAME,TK_FUNC_NAME);
        END LOOP;
        CMT.InsProto('iAction='||iAction||', iDatum='||iDatum||', iMandantId='||iMandantId||', iKndId='||iKndId||', iMaId'||iMaId,
                  QK_PACK_NAME,TK_FUNC_NAME);
        oCollName := TK_COLL_NAME;
        IF iAction=0 THEN -- löschen
          IF APEX_COLLECTION.COLLECTION_EXISTS(p_collection_name=>TK_COLL_NAME) THEN
            APEX_COLLECTION.TRUNCATE_COLLECTION(TK_COLL_NAME);
            APEX_COLLECTION.DELETE_COLLECTION(TK_COLL_NAME);
          END IF;
        || Säubern und anlegen
        ELSIF iAction=1 THEN
          IF APEX_COLLECTION.COLLECTION_EXISTS(p_collection_name=>TK_COLL_NAME) THEN
            APEX_COLLECTION.TRUNCATE_COLLECTION(p_collection_name=>TK_COLL_NAME);
          ELSE
            APEX_COLLECTION.CREATE_COLLECTION(p_collection_name=>TK_COLL_NAME);
          END IF;
          vDatum := NVL(iDATUM,SYSDATE);
          vDatum := TO_DATE(TO_CHAR(vDatum,'YYYYMMDD')||'000000','YYYYMMDDHH24MISS');
          vKW4Db := GetKW4Db(vDatum);
          tTage(1) := CMT.GetMonday(vDATUM,0);
          SELECT tTage(1) + 1DAY,tTage(1) + 2DAY,tTage(1) + 3DAY,tTage(1) + 4DAY,tTage(1) + 5DAY,tTage(1) + 6DAY
            INTO tTage(2),tTage(3),tTage(4),tTage(5),tTage(6),tTage(7)
            FROM DUAL;
          FOR i IN 1..7 LOOP tTageI(i) := 0; tTageVC(i) := TO_CHAR(tTage(i),'YYYYMMDD'); END LOOP;
          -- erste Zeile enthält Default-Werte
          APEX_COLLECTION.add_member( p_COLLECTION_name=> TK_COLL_NAME,p_generate_md5=>TK_MD5
            ,P_C001 => 0                                                -- MAZEIT.ID
            ,P_C002 => '<b>Vorgabe</b>'                                           -- Datum DD.MM.YYYY
            ,P_C003 => ' '                                              -- Wochentag Mo/Di/...
            ,P_C004 => ' '                                              -- Wochentag 1/2/...
            ,P_C005 => 0                                                -- MAZEIT.KNDABT_ID
            ,P_C006 => NULL                                             -- Zeit in HH24:MI
            ,P_C007 => NULL                                             -- Beginn in HH24:MI
            ,P_C008 => NULL                                             -- Ende in HH24:MI
            ,P_C009 => NULL                                             -- Pause in HH24:MI
            ,P_C010 => NULL                                             -- Zuschlag
            ,P_C011 => NULL                                             -- Bem
            ,P_C040 => iMandantId
            ,P_C041 => iKndId
            ,P_C042 => iMaId
            ,P_C043 => vKW4Db
            ,P_C048 => '-1'                                             -- Hash für Check auf Änderungen MAZEIT
            ,P_C049 => ' '                                             -- für ORDER BY hier Arbeitsbeginn
            ,P_C050 => NULL
          FOR rec IN (SELECT z.*,
                             TO_CHAR(DBMS_UTILITY.get_hash_value(
                                        z.id||'|'||
                                        z.mandant_id||'|'||
                                        z.majob_id||'|'||
                                        z.ma_id||'|'||
                                        z.knd_id||'|'||
                                        z.kndabt_id||'|'||
                                        z.kw||'|'||
                                        z.arb_beg||'|'||
                                        z.arb_end||'|'||
                                        z.zeit||'|'||
                                        z.pause||'|'||
                                        z.zuschlag||'|'||
                                        z.stk_anz||'|'||
                                        z.stk_kg||'|'||
                                        z.stk_gemuur||'|'||
                                        z.stk_bezahlt||'|'||
                                        z.bem||'|'||
                                        z.ART4RECH
                                        ,1,POWER(2,30))) AS HID_HASH4CHECK
                        FROM MAZEIT z
                       WHERE z.MANDANT_ID=iMandantId AND
                             z.KND_ID=iKndId AND
                             z.MA_ID=iMaId AND
                             z.KW = GetKW4Db(tTage(1)) AND
                             z.ART4RECH  IN (CMT.GetTCVNum('MAZEIT_ART4RECH_STD'),CMT.GetTCVNum('MAZEIT_ART4RECH_STK'),CMT.GetTCVNum('MAZEIT_ART4RECH_KG'))
                       ORDER BY z.ARB_BEG)
          LOOP
            IF rec.ZUSCHLAG=0 THEN
              rec.ZUSCHLAG := NULL;
            END IF;
            vI := 0;
            vDatumCh := TO_CHAR(rec.ARB_BEG,'YYYYMMDD');
            FOR i IN 1..7 LOOP
              IF tTageVC(i)=vDatumCh THEN
                tTageI(i) := tTageI(i) + 1;
                vI := i;
                EXIT;
              END IF;
            END LOOP;
            -- Stücklohn kommt an den Anfang der Bemerkung gekennzeichnet mit QK_COLL_MAZEIT_STK_KZ ursprüngliche Bemekuung nach dem :
            rec.BEM := RTRIM(rec.BEM);
            IF rec.ART4RECH = CMT.GetTCVNum('MAZEIT_ART4RECH_STK') THEN
              DECLARE
                vBem  MAZEIT.BEM%TYPE := QK_COLL_MAZEIT_STK_KZ;
              BEGIN
                IF rec.STK_BEZAHLT > 0. THEN
                  vBem := QK_COLL_MAZEIT_STK_KZ||TO_CHAR(rec.stk_bezahlt,'FM9999D00');
                ELSIF rec.STK_ANZ > 0 THEN
                  vBem := QK_COLL_MAZEIT_STA_KZ||TO_CHAR(rec.stk_anz,'FM9999');
                END IF;
                IF rec.BEM IS NULL THEN
                  rec.BEM := vBem;
                ELSE
                  rec.BEM := SUBSTR(vBem||':'||rec.BEM,1,CMT.GetColLen('MAZEIT','BEM'));
                END IF;
              END;
            ELSIF rec.ART4RECH = CMT.GetTCVNum('MAZEIT_ART4RECH_KG') THEN
              DECLARE
                vBem  MAZEIT.BEM%TYPE := QK_COLL_MAZEIT_KG_KZ;
              BEGIN
                IF rec.STK_KG > 0. THEN
                  vBem := QK_COLL_MAZEIT_KG_KZ||TO_CHAR(rec.stk_kg,'FM999999D000');
                END IF;
                IF rec.BEM IS NULL THEN
                  rec.BEM := vBem;
                ELSE
                  rec.BEM := SUBSTR(vBem||':'||rec.BEM,1,CMT.GetColLen('MAZEIT','BEM'));
                END IF;
              END;
            END IF;
            IF vI>0 THEN
              IF tTageI(vI)=1 THEN
                APEX_COLLECTION.add_member( p_COLLECTION_name=> TK_COLL_NAME,p_generate_md5=>TK_MD5
                  ,P_C001 => rec.id                                           -- MAZEIT.ID
                  ,P_C002 => TO_CHAR(rec.ARB_BEG,'DD.MM.YYYY')                -- Datum DD.MM.YYYY
                  ,P_C003 => CMT.WoTag(rec.ARB_BEG)                           -- Wochentag Mo/Di/...
                  ,P_C004 => CMT.WoTagNr(rec.ARB_BEG)                         -- Wochentag 1/2/...
                  ,P_C005 => rec.KNDABT_ID                                    -- MAZEIT.KNDABT_ID
                  ,P_C006 => CMT.Minuten2InduZeit(rec.ZEIT)                   -- Zeit als InduZeit in HH24,MI
                  ,P_C007 => TO_CHAR(rec.ARB_BEG,'HH24:MI')                   -- Beginn in HH24:MI
                  ,P_C008 => TO_CHAR(rec.ARB_END,'HH24:MI')                   -- Ende in HH24:MI
                  ,P_C009 => CMT.Minuten2HHMI(rec.PAUSE,TRUE)                     -- Pause in HH24:MI
                  ,P_C010 => rec.ZUSCHLAG
                  ,P_C011 => rec.BEM
                  ,P_C040 => iMandantId
                  ,P_C041 => iKndId
                  ,P_C042 => iMaId
                  ,P_C043 => vKW4Db
                  ,P_C048 => rec.HID_HASH4CHECK                               -- Hash für Check auf Änderungen MAZEIT
                  ,P_C049 => TO_CHAR(rec.ARB_BEG,'YYYYMMDDHH24MI')            -- für ORDER BY hier Arbeitsbeginn
                  ,P_C050 => NULL                                             -- für FehlerMeldungen
              ELSE
                APEX_COLLECTION.add_member( p_COLLECTION_name=> TK_COLL_NAME,p_generate_md5=>TK_MD5
                  ,P_C001 => rec.id                                           -- MAZEIT.ID
                  ,P_C002 => NULL                                             -- Datum DD.MM.YYYY
                  ,P_C003 => NULL                                             -- Wochentag Mo/Di/...
                  ,P_C004 => NULL                                             -- Wochentag 1/2/...
                  ,P_C005 => rec.KNDABT_ID                                    -- MAZEIT.KNDABT_ID
                  ,P_C006 => CMT.Minuten2InduZeit(rec.ZEIT)                       -- Zeit als InduZeit in HH24,MI
                  ,P_C007 => TO_CHAR(rec.ARB_BEG,'HH24:MI')                   -- Beginn in HH24:MI
                  ,P_C008 => TO_CHAR(rec.ARB_END,'HH24:MI')                   -- Ende in HH24:MI
                  ,P_C009 => CMT.Minuten2HHMI(rec.PAUSE,TRUE)                     -- Pause in HH24:MI
                  ,P_C010 => rec.ZUSCHLAG
                  ,P_C011 => rec.BEM
                  ,P_C040 => iMandantId
                  ,P_C041 => iKndId
                  ,P_C042 => iMaId
                  ,P_C043 => vKW4Db
                  ,P_C048 => rec.HID_HASH4CHECK                               -- Hash für Check auf Änderungen MAZEIT
                  ,P_C049 => TO_CHAR(rec.ARB_BEG,'YYYYMMDDHH24MI')            -- für ORDER BY hier Arbeitsbeginn
                  ,P_C050 => NULL                                             -- für FehlerMeldungen
              END IF;
              vAnz := vAnz + 1;
            END IF;
          END LOOP;
          FOR i IN 1..7 LOOP
            IF tTageI(i)<4 THEN
              FOR j IN tTageI(i)+1..4 LOOP
                IF j=1 THEN
                  APEX_COLLECTION.add_member( p_COLLECTION_name=> TK_COLL_NAME,p_generate_md5=>TK_MD5
                    ,P_C001 => -1                                               -- MAZEIT.ID
                    ,P_C002 => TO_CHAR(tTage(i),'DD.MM.YYYY')                   -- Datum DD.MM.YYYY
                    ,P_C003 => CMT.WoTag(tTage(i))                              -- Wochentag Mo/Di/...
                    ,P_C004 => CMT.WoTagNr(tTage(i))                            -- Wochentag 1/2/...
                    ,P_C005 => 0                                                -- MAZEIT.KNDABT_ID
                    --,P_C006 => Minuten2InduZeit(0)                            -- Zeit als InduZeit in HH24,MI
                    ,P_C006 => NULL                                             -- Zeit als InduZeit in HH24,MI
                    --,P_C007 => '06:30'                                        -- Beginn in HH24:MI
                    ,P_C007 => NULL                                             -- Beginn in HH24:MI
                    ,P_C008 => NULL                                             -- Ende in HH24:MI
                    --,P_C009 => Minuten2HHMI(0)                                -- Pause in HH24:MI
                    ,P_C009 => NULL                                             -- Pause in HH24:MI
                    ,P_C010 => NULL                                             -- Zuschlag
                    ,P_C011 => NULL                                             -- Bem
                    ,P_C040 => iMandantId
                    ,P_C041 => iKndId
                    ,P_C042 => iMaId
                    ,P_C043 => vKW4Db
                     ,P_C048 => '-1'                                             -- Hash für Check auf Änderungen MAZEIT
                    ,P_C049 => TO_CHAR(tTage(i),'YYYYMMDD')||'99'||TO_CHAR(j,'FM09')  -- für ORDER BY hier Arbeitsbeginn
                    ,P_C050 => NULL
                ELSE -- auffüllen
                   APEX_COLLECTION.add_member( p_COLLECTION_name=> TK_COLL_NAME,p_generate_md5=>TK_MD5
                    ,P_C001 => -1                                               -- MAZEIT.ID
                    ,P_C002 => NULL                                             -- Datum DD.MM.YYYY
                    ,P_C003 => NULL                                             -- Wochentag Mo/Di/...
                    ,P_C004 => NULL                                             -- Wochentag 1/2/...
                    ,P_C005 => 0                                                -- MAZEIT.KNDABT_ID
                    --,P_C006 => Minuten2HHMI(0)                                -- Zeit in HH24:MI
                    ,P_C006 => NULL                                             -- Zeit in HH24:MI
                    --,P_C007 => '06:30'                                        -- Beginn in HH24:MI
                    ,P_C007 => NULL                                             -- Beginn in HH24:MI
                    ,P_C008 => NULL                                             -- Ende in HH24:MI
                    --,P_C009 => Minuten2InduZeit(0)                            -- Pause als InduZeit in HH24,MI
                    ,P_C009 => NULL                                             -- Pause als InduZeit in HH24,MI
                    ,P_C010 => NULL                                             -- Zuschlag
                    ,P_C011 => NULL                                             -- Bem
                    ,P_C040 => iMandantId
                    ,P_C041 => iKndId
                    ,P_C042 => iMaId
                    ,P_C043 => vKW4Db
                    ,P_C048 => '-1'                                             -- Hash für Check auf Änderungen MAZEIT
                    ,P_C049 => TO_CHAR(tTage(i),'YYYYMMDD')||'99'||TO_CHAR(j,'FM09')  -- für ORDER BY hier Arbeitsbeginn
                    ,P_C050 => NULL
                END IF;
              END LOOP;
            END IF;
          END LOOP;
          vI := 0;
          FOR rec IN (SELECT * FROM V_COLL_MAZEIT) LOOP
            vI := vI + 1;
            CMT.InsProto('i='||LPAD(TO_CHAR(vI),3,' ')||':'||
                    rec.hid_seq_id||'|'||
                    rec.hid_mazeit_id||'|'||
                    rec.datum||'|'||
                    rec.wotag||'|'||
                    rec.wotagnr||'|'||
                    rec.zeit||'|'||
                    rec.beginn||'|'||
                    rec.ende||'|'||
                    rec.pause||'|'||
                    rec.zuschlag||'|'||
                    rec.bem||'|'||
                    rec.hid_hash4check||'|'||
                    rec.hid_sortier||'|'||
                    rec.meldung
                  ,QK_PACK_NAME,TK_FUNC_NAME);
          END LOOP;
       ELSE
         raise_Application_ERROR(-20100,'kann ich doch nicht Action='||TO_CHAR(iAction));
        END IF;
      END V_COLL_MAZEIT_PROC;
    and here the procedure (look for real entrys in table)
    PROCEDURE V_COLL_MAZEIT_IOF_U_TRG(
             iHID_SEQ_ID      apex_collections.seq_id%TYPE
            ,iHID_MAZEIT_ID   apex_collections.C001%TYPE
            ,iDATUM           apex_collections.C002%TYPE
            ,iWOTAG           apex_collections.C003%TYPE
            ,iWOTAGNR         apex_collections.C004%TYPE
            ,iKNDABT_ID       apex_collections.C005%TYPE
            ,iZEIT            apex_collections.C006%TYPE
            ,iBEGINN          apex_collections.C007%TYPE
            ,iENDE            apex_collections.C008%TYPE
            ,iPAUSE           apex_collections.C009%TYPE
            ,iZUSCHLAG        apex_collections.C010%TYPE
            ,iBEM             apex_collections.C011%TYPE
            ,iHID_HASH4CHECK  apex_collections.C048%TYPE
            ,iHID_SORTIER     apex_collections.C049%TYPE
            ,iMELDUNG         apex_collections.C050%TYPE
      IS
      PRAGMA AUTONOMOUS_TRANSACTION;
        TK_FUNC_NAME  CONSTANT USER_OBJECTS.OBJECT_NAME%TYPE := 'V_COLL_MAZEIT_IOF_U_TRG';
        TK_COLL_NAME  CONSTANT APEX_COLLECTIONS.COLLECTION_NAME%TYPE := 'V_COLL_MAZEIT';
        vRcString VARCHAR2(2000) := NULL;
        rCollMaZeit0  V_COLL_MAZEIT%ROWTYPE;
        rCollMaZeit   V_COLL_MAZEIT%ROWTYPE;
        rMaZeit       MAZEIT%ROWTYPE;
        vHash4Check   PLS_INTEGER;
        vURow         ROWID;
      BEGIN
        CMT.InsProto(
                ihid_seq_id||'|'||
                ihid_mazeit_id||'|'||
                idatum||'|'||
                iwotag||'|'||
                iwotagnr||'|'||
                iKNDABT_ID||'|'||
                izeit||'|'||
                ibeginn||'|'||
                iende||'|'||
                ipause||'|'||
                izuschlag||'|'||
                ibem||'|'||
                ihid_hash4check||'|'||
                ihid_sortier||'|'||
                imeldung
              ,QK_PACK_NAME,TK_FUNC_NAME);
        -- VIEW-ZeitZeile lesen
        SELECT t.* INTO rCollMaZeit
          FROM V_COLL_MAZEIT t
         WHERE t.HID_SEQ_ID = iHID_SEQ_ID;
        IF iHID_MAZEIT_ID!=rCollMaZeit.HID_MAZEIT_ID OR
            iHID_HASH4CHECK!=rCollMaZeit.HID_HASH4CHECK THEN
          vRcString := 'Daten seit Anzeige verändert';
          GOTO MARK_TRANSEND;
        END IF;
        -- VIEW-ZeitDefaultZeile setzen
        IF rCollMaZeit.HID_MAZEIT_ID=0 THEN
            --,P_C005 => 0                                                -- MAZEIT.KNDABT_ID
            --,P_C006 => NULL                                             -- Zeit in HH24,MI
            --,P_C007 => NULL                                             -- Beginn in HH24:MI
            --,P_C008 => NULL                                             -- Ende in HH24:MI
            --,P_C009 => NULL                                             -- Pause in HH24,MI
            --,P_C010 => NULL                                             -- Zuschlag
            --,P_C011 => NULL                                             -- Bem
          APEX_COLLECTION.update_member_attribute( p_COLLECTION_name=> TK_COLL_NAME, p_seq=>rCollMaZeit.HID_SEQ_ID
                ,p_attr_number=>5, p_attr_value=>iKNDABT_ID);
          APEX_COLLECTION.update_member_attribute( p_COLLECTION_name=> TK_COLL_NAME, p_seq=>rCollMaZeit.HID_SEQ_ID
                ,p_attr_number=>6, p_attr_value=>iZEIT);
          APEX_COLLECTION.update_member_attribute( p_COLLECTION_name=> TK_COLL_NAME, p_seq=>rCollMaZeit.HID_SEQ_ID
                ,p_attr_number=>7, p_attr_value=>iBEGINN);
          APEX_COLLECTION.update_member_attribute( p_COLLECTION_name=> TK_COLL_NAME, p_seq=>rCollMaZeit.HID_SEQ_ID
                ,p_attr_number=>8, p_attr_value=>iENDE);
          APEX_COLLECTION.update_member_attribute( p_COLLECTION_name=> TK_COLL_NAME, p_seq=>rCollMaZeit.HID_SEQ_ID
                ,p_attr_number=>9, p_attr_value=>iPAUSE);
          APEX_COLLECTION.update_member_attribute( p_COLLECTION_name=> TK_COLL_NAME, p_seq=>rCollMaZeit.HID_SEQ_ID
                ,p_attr_number=>10, p_attr_value=>iZUSCHLAG);
          APEX_COLLECTION.update_member_attribute( p_COLLECTION_name=> TK_COLL_NAME, p_seq=>rCollMaZeit.HID_SEQ_ID
                ,p_attr_number=>11, p_attr_value=>iBEM);
          IF iBEM LIKE '#%' THEN  -- Verteilen
            -- VIEW-ZeitDefaultZeile lesen
            SELECT t.* INTO rCollMaZeit0
              FROM V_COLL_MAZEIT t
             WHERE t.HID_MAZEIT_ID = 0;
             rCollMaZeit0.BEM := SUBSTR(iBEM,2);
            DECLARE
              vAnz          PLS_INTEGER := 0;
              nVert         MAZEIT.ZEIT%TYPE;
              nZeitMinuten  MAZEIT.ZEIT%TYPE;
              nDiffMinuten  MAZEIT.ZEIT%TYPE;
            BEGIN
              SELECT NVL(COUNT(*),0) INTO vAnz
                FROM V_COLL_MAZEIT t
               WHERE t.HID_MAZEIT_ID = -1 AND
                     t.DATUM IS NOT NULL AND
                     t.WOTAGNR IN ('1','2','3','4','5'); -- nur Mo-Fr
              IF vAnz<=0 THEN
                vRcString := 'Verteilen nicht möglich keine freien Tage gefunden';
              ELSIF TRIM(iZEIT) IS NULL OR TRIM(iZEIT) IN ('00,00','0,00','0',',00',',0','0,','0,0') THEN
                vRcString := 'Verteilen von Null Minuten nicht möglich';
              ELSE
                nDiffMinuten := 0;
                nZeitMinuten := CMT.InduZeit2MinutenNum(TRIM(iZEIT));
                IF nZeitMinuten>(vAnz*1440) THEN
                  vRcString := 'Zu verteilende Zeit zu groß';
                ELSIF vAnz>1 THEN
                  nVert := FLOOR(nZeitMinuten/vAnz);
                  nDiffMinuten := nZeitMinuten - (nVert*vAnz);
                  nZeitMinuten := nVert;
                END IF;
                IF vRcString IS NULL THEN
                  FOR rec IN (SELECT t.* INTO rCollMaZeit
                                FROM V_COLL_MAZEIT t
                               WHERE t.HID_MAZEIT_ID = -1 AND
                                     t.DATUM IS NOT NULL AND
                                     t.WOTAGNR IN ('1','2','3','4','5')) -- nur Mo-Fr)
                  LOOP
                    rCollMaZeit := rec;
                    vRcString := qV_COLL_MAZEIT_Insert(iKNDABT_ID, iZEIT, nZeitMinuten+nDiffMinuten, iBEGINN, iENDE, iPAUSE, iZUSCHLAG, SUBSTR(iBEM,2),
                                                       rCollMaZeit0, rCollMaZeit, rMaZeit);
                    IF vRcString IS NOT NULL THEN
                      EXIT;
                    END IF;
                    nDiffMinuten := 0;
                  END LOOP;
                END IF;
              END IF;
            END;
          END IF;
        -- MAZEIT-Vorhandener Eintrag
        ELSIF rCollMaZeit.HID_MAZEIT_ID>0 THEN
          SELECT z.ROWID, TO_CHAR(DBMS_UTILITY.get_hash_value(
                                      z.id||'|'||
                                      z.mandant_id||'|'||
                                      z.majob_id||'|'||
                                      z.ma_id||'|'||
                                      z.knd_id||'|'||
                                      z.kndabt_id||'|'||
                                      z.kw||'|'||
                                      z.arb_beg||'|'||
                                      z.arb_end||'|'||
                                      z.zeit||'|'||
                                      z.pause||'|'||
                                      z.zuschlag||'|'||
                                      z.stk_anz||'|'||
                                      z.stk_kg||'|'||
                                      z.stk_gemuur||'|'||
                                      z.stk_bezahlt||'|'||
                                      z.bem||'|'||
                                      z.ART4RECH
                                      ,1,POWER(2,30))) AS HID_HASH4CHECK
            INTO vURow, vHash4Check
            FROM MAZEIT z
           WHERE z.ID=rCollMaZeit.HID_MAZEIT_ID
             FOR UPDATE NOWAIT;
          IF vHash4Check!=rCollMaZeit.HID_HASH4CHECK THEN
            vRcString := 'Daten seit Anzeige verändert';
            GOTO MARK_TRANSEND;
          END IF;
          SELECT z.* INTO rMaZeit
            FROM MAZEIT z
           WHERE ROWID=vURow;
          rMaZeit.KNDABT_ID := TO_NUMBER(TRIM(iKNDABT_ID));
          IF TRIM(iBEGINN) IS NULL THEN
             rMaZeit.ARB_BEG := NULL;
          ELSE
             rMaZeit.ARB_BEG := TO_DATE(TO_CHAR(rMaZeit.ARB_BEG,'YYYYMMDD')||TRIM(SUBSTR(iBEGINN,1,5)),'YYYYMMDDHH24:MI');
          END IF;
          IF TRIM(iENDE) IS NULL THEN
             rMaZeit.ARB_END := NULL;
          ELSE
             rMaZeit.ARB_END := TO_DATE(TO_CHAR(rMaZeit.ARB_BEG,'YYYYMMDD')||TRIM(SUBSTR(iENDE,1,5)),'YYYYMMDDHH24:MI');
          END IF;
          IF TRIM(iZEIT) IS NULL THEN
             rMaZeit.ZEIT := NULL;
          ELSE
             rMaZeit.ZEIT := CMT.InduZeit2MinutenNum(TRIM(iZEIT));
          END IF;
          IF TRIM(iPAUSE) IS NULL THEN
             rMaZeit.PAUSE := NULL;
          ELSE
             rMaZeit.PAUSE := CMT.HHMI2Minuten(TRIM(iPAUSE));
          END IF;
          IF iWOTAGNR IN (6,7) AND
             rMaZeit.PAUSE IS NOT NULL AND rMaZeit.PAUSE<>0 THEN
            vRcString := 'Eintrag Pause am Wochenende nicht erlaubt';
            GOTO MARK_TRANSEND;
          END IF;
          IF TRIM(iZUSCHLAG) IS NULL THEN
             rMaZeit.ZUSCHLAG := NULL;
          ELSE
             rMaZeit.ZUSCHLAG := TO_NUMBER(TRIM(iZUSCHLAG));
          END IF;
          IF RTRIM(iBEM) IS NULL THEN
             rMaZeit.BEM := NULL;
          ELSE
             rMaZeit.BEM := RTRIM(iBEM);
          END IF;
          IF (rMaZeit.KNDABT_ID IS NOT NULL AND rMaZeit.KNDABT_ID>0) OR
              rMaZeit.ARB_BEG IS NOT NULL OR rMaZeit.ARB_END IS NOT NULL OR
              (rMaZeit.ZEIT IS NOT NULL AND rMaZeit.ZEIT!=0) OR rMaZeit.PAUSE IS NOT NULL OR
              rMaZeit.ZUSCHLAG IS NOT NULL OR rMaZeit.BEM IS NOT NULL THEN
            DECLARE
              vBem  MAZEIT.BEM%TYPE := rMaZeit.BEM;
            BEGIN
              rMaZeit.ZUSCHLAG := NVL(rMaZeit.ZUSCHLAG,0.0);
              qV_COLL_MAZEIT_BEM_CHK(rMaZeit);  -- Bem prüfen wg. ART4RECH Verschlüsselung mittels QK_COLL_MAZEIT_STK_KZ
              UPDATE MAZEIT z
                 SET z.KNDABT_ID = rMaZeit.KNDABT_ID
                    ,z.ARB_BEG = rMaZeit.ARB_BEG
                    ,z.ARB_END = rMaZeit.ARB_END
                    ,z.ZEIT = rMaZeit.ZEIT
                    ,z.PAUSE = rMaZeit.PAUSE
                    ,z.ZUSCHLAG = rMaZeit.ZUSCHLAG
                    ,z.BEM = rMaZeit.BEM
                    ,z.STK_BEZAHLT = rMaZeit.STK_BEZAHLT
                    ,z.STK_ANZ = rMaZeit.STK_ANZ
                    ,z.STK_KG = rMaZeit.STK_KG
                    ,z.ART4RECH = rMaZeit.ART4RECH
               WHERE ROWID=vURow;
              IF SQL%ROWCOUNT=1 THEN
                NULL;
              ELSIF SQL%ROWCOUNT<1 THEN
                RAISE NO_DATA_FOUND;
              ELSE
                RAISE TOO_MANY_ROWS;
              END IF;
              rMaZeit.BEM := vBem;
            END;
          ELSE
            DELETE FROM MAZEIT z
             WHERE ROWID=vURow;
            IF SQL%ROWCOUNT=1 THEN
              NULL;
            ELSIF SQL%ROWCOUNT<1 THEN
              RAISE NO_DATA_FOUND;
            ELSE
              RAISE TOO_MANY_ROWS;
            END IF;
            APEX_COLLECTION.update_member_attribute( p_COLLECTION_name=> TK_COLL_NAME, p_seq=>rCollMaZeit.HID_SEQ_ID
                  ,p_attr_number=>1, p_attr_value=>-1);
            APEX_COLLECTION.update_member_attribute( p_COLLECTION_name=> TK_COLL_NAME, p_seq=>rCollMaZeit.HID_SEQ_ID
                  ,p_attr_number=>48, p_attr_value=>'-1');
          END IF;
          APEX_COLLECTION.update_member_attribute( p_COLLECTION_name=> TK_COLL_NAME, p_seq=>rCollMaZeit.HID_SEQ_ID
                ,p_attr_number=>5, p_attr_value=>rMaZeit.KNDABT_ID);
          APEX_COLLECTION.update_member_attribute( p_COLLECTION_name=> TK_COLL_NAME, p_seq=>rCollMaZeit.HID_SEQ_ID
                ,p_attr_number=>6, p_attr_value=>CMT.Minuten2InduZeit(rMaZeit.ZEIT));
          APEX_COLLECTION.update_member_attribute( p_COLLECTION_name=> TK_COLL_NAME, p_seq=>rCollMaZeit.HID_SEQ_ID
                ,p_attr_number=>7, p_attr_value=>TO_CHAR(rMaZeit.ARB_BEG,'HH24:MI'));
          APEX_COLLECTION.update_member_attribute( p_COLLECTION_name=> TK_COLL_NAME, p_seq=>rCollMaZeit.HID_SEQ_ID
                ,p_attr_number=>8, p_attr_value=>TO_CHAR(rMaZeit.ARB_END,'HH24:MI'));
          APEX_COLLECTION.update_member_attribute( p_COLLECTION_name=> TK_COLL_NAME, p_seq=>rCollMaZeit.HID_SEQ_ID
                ,p_attr_number=>9, p_attr_value=>CMT.Minuten2InduZeit(rMaZeit.PAUSE,TRUE) );
          APEX_COLLECTION.update_member_attribute( p_COLLECTION_name=> TK_COLL_NAME, p_seq=>rCollMaZeit.HID_SEQ_ID
                ,p_attr_number=>10, p_attr_value=>rMaZeit.ZUSCHLAG);
          APEX_COLLECTION.update_member_attribute( p_COLLECTION_name=> TK_COLL_NAME, p_seq=>rCollMaZeit.HID_SEQ_ID
                ,p_attr_number=>11, p_attr_value=>RTRIM(rMaZeit.BEM));
        -- MAZEIT neuer Eintrag
        ELSIF rCollMaZeit.HID_MAZEIT_ID=-1 THEN
          -- VIEW-ZeitDefaultZeile lesen
          SELECT t.* INTO rCollMaZeit0
            FROM V_COLL_MAZEIT t
           WHERE t.HID_MAZEIT_ID = 0;
          vRcString := qV_COLL_MAZEIT_Insert(iKNDABT_ID, iZEIT, NULL, iBEGINN, iENDE, iPAUSE, iZUSCHLAG, iBEM,
                                             rCollMaZeit0, rCollMaZeit, rMaZeit);
        ELSE
          vRcString := 'Ungültige HID_MAZEIT_ID '||TO_CHAR(rCollMaZeit.HID_MAZEIT_ID);
        END IF;
        <<MARK_TRANSEND>>
        IF vRcString IS NULL THEN
          COMMIT;
        ELSE
          ROLLBACK;
          RAISE_APPLICATION_ERROR(-20100,vRcString);
        END IF;
      END V_COLL_MAZEIT_IOF_U_TRG;
    and in end there are 3 other procedures, all for table MAZEIT, the collection and and the report.
    in princip its a good idea,to create another collection, but difficult to bind it to the report TOO,cause my "cell-fill- functionality" is to complicated.
    my idea is another: to look with javascript/jquery whatever on clientside the cell-values. and only the editable cells. not the hidden cells.there would be ca. 180 editable cells. i want store the values from this cells all in one in a cache (clientside! ).
    then select next employee (collection will be created with view  ect.) and give me this 29 rows. in this moment i have cells  with ID f02_0001 as example and can use the cache values with that. the ID's ever the same,cause i have ever 29 rows.
    greets/christian

  • How to retrieve the values from a table if they differ in Unit of Measure

    How to retrieve the values from a table if they differ in Unit of Measure?

    If no data is read
    - Insure that you use internal code in SELECT statement, check via SE16 desactivating conversion exit on table T006A. ([ref|http://help.sap.com/saphelp_nw70/helpdata/en/2a/fa0122493111d182b70000e829fbfe/frameset.htm])
    If no quanity in result internal table
    - There is no adqntp field in the internal table, so no quantity is copied in itab ([ref|http://help.sap.com /abapdocu_70/en/ABAPINTO_CLAUSE.htm#&ABAP_ALTERNATIVE_1@1@]).
    - - Remove the CORRESPONDING, so quantity will fill the first field adqntp1.  ([ref|http://help.sap.com/abapdocu_70/en/ABENOPEN_SQL_WA.htm])
    - - Then loop at the internal table and move the quantity when necessary to the 2 other fields.
    * Fill the internal table
    SELECT msehi adqntp
      INTO TABLE internal table
      FROM lipso2
      WHERE vbeln = wrk_doc1
        AND msehi IN ('KL','K15','MT').
    * If required move the read quantity in the appropriate column.
    LOOP AT internal_table ASSIGNING <fs>.
      CASE <fs>-msehi.
        WHEN 'K15'.
          <fs>-adqnt2 = <fs>-adqnt1.
          CLEAR <fs>-adqnt1.
        WHEN 'MT'.
          <fs>-adqnt3 = <fs>-adqnt1.
          CLEAR <fs>-adqnt1.
      ENDCASE.
    ENDLOOP.
    - You could also create another table with only fields msehi and adqntp and then collect ([ref|http://help.sap.com/abapdocu_70/en/ABAPCOLLECT.htm]) the data to another table.
    Regards,
    Raymond

  • How to retrieve all fields from Entiy Bean

    Is there a simpler way to retrieve all fields from the entity bean than calling each individual get method?
    I need to retrieve the entire record not the contents of the entire table.
    Though, I may eventually need to do that also.
    I have 56 fields on this table. It does not make sense to code a get statement for every field.
    If you can direct me to sample code that would be good.
    Also, are there any good examples out there of how to create an entity bean or session bean using a local interface?
    Thanks,
    Jim

    I think you are confusing an EJB with a DAO.
    If you want to access the database why not just use JDBC?

  • Has anyone retrieved a value from a system Matrix from selecting the row

    Hi everyone, I am trying to retrieve the value of a cell from the first column of a matrix depending on which row the user has highlighted.  I can access the value from specifying which row to retrieve the value from but not from the user selecting which row.   Im attempting do do this from the open items list system form which is accessed from the reports menu. 
    To retrieve the value from the first row my code is as follows:
    oMatrix = oForm.Items.Item("5").Specific
    DocNo = oMatrix.Columns.Item("1").Cells.Item(1).Specific.Value
    SBO_Application.MessageBox(DocNo)
    How do I change this code to access the value of the cell depending on which row is highlighted?
    Any help would be appreciated

    Hi Sally,
    you will get the selected row number on any event through "pVal.Row", you can get this value in a integer variable like:
    int i = pVal.Row
    and pass it in your code;
    DocNo = oMatrix.Columns.Item("1").Cells.item(i)
    or you can do same in this way also:
    you have to specify your particular cell as a edit text and get the value of that:
    oEditText=(SAPbouiCOM.EditText)oMatrix.Columns.Item("1").Cells.Item(i).Specific;
    string1 = oEditText.String;
    Hope it will help.

Maybe you are looking for

  • Multiple a/c assgt SRM PO - Error in process

    Hi all, SRM 5.0 SP 12 ecs When I create a purchase order with mutliple a/cassignment in SRM and order it,it gets replicated to ECC with the indicators "Confirmation-Related Invoice Verification" and "Confirm Performance of Service/Goods Receipt " che

  • Acrobat XI Pro Run Error Message

    Running OS X 10.9.3 and uninstalled Acrobat 8, repaired permissions, uninstall/reinstalled XI, but still get this message below. Any ideas? Crashed Thread:  0  Dispatch queue: com.apple.main-thread Exception Type:  EXC_BAD_ACCESS (SIGBUS) Exception C

  • MB1A User Exit at document save

    Hi everyone, I have a requirement related to MB1A for materials distribution to personnel defined in HR. This can happen at line <Enter> press or at 'Document Save' time (either one is good, but could not get any to work). The requirements are: - get

  • Please help: A/R reserve invoice and Retail chain stores

    hi, is there an option to work with A/R reserve invoice in Retail chain stores? i mean - to add  A/R reserve invoice to BP that is defined consolidating and in time to copy it to branches deliveries.. thank you

  • Data Bindings frustrations

    Well I have been working with Flex 2.0 for over six months and it has been one of the most frustrating experiences that I have ever dealt with. The bindings mechanism is so frustrating. I have code that binds properly in debug mode but does in normal