Updateable Report Question.

Updateable Report Question.
Currently I am developing an XE application, so I think that is apex 2.0.
Here is an example of what I wish to achieve.
Suppose I have an emp table with columns
dept, id, name and comment.
I create an SQL report as
SELECT * from emp;
I only wish to see the name and comment columns, so in the report attributes I un-tick show the columns dept and id.
I want the user to be able to update the comment column, So I edit the comment column and in “Tabular Form Element” I change the “Display As” from “Standard Report Column” to “Text Field”
This now lets me edit the data in the column in the report.
Now want to add in an on change event to call a javascript routine that will use ajax to do the actual update.
My problem is that I need to pass in the “hidden” dept and id column values as well as the modified text, thus
In “Tabular Form Element” – “Element Attributes” add in
onchange="updateRemarks(#DEPT#, #ID#, this.value)"
Unfortunately this does not work, apex does not expand the #DEPT# & #ID#, and just passes in the literal text.
So how can I achieve this?
Thanks,
GP>

The columns and rows have a set format for the Id, so if you know one Id you know the row and the ids of all the other columns.
As an example, this will show the value of column 6 when you click on any column with the function call in the Element Attributes:
Script:
<script type="text/javascript">
function showCol6(col){
  var col6 = document.getElementById("f06_" + col.id.substr(4,4));
  alert(col6.value);
</script>Element Attributes:
onclick=showCol6(this);You could also use a Named Column template, specific to this region, to include the column values directly in the function call, but I think it's best to stick with the ApEx defaults if possible.

Similar Messages

  • Updateable Report Question (or strange behaviour)

    Hey,
    I have a problem with an updateable report, my query is:
    SELECT
    "DOSSIER_ID",
    "DOSSIER_ID" DOSSIER_ID_DISPLAY,
    "REFNR",
    "NAME",
    "REMARK"
    FROM dossiers &P405_WHERE.
    ORDER BY refnr DESC
    I want to build my where clause with a process thats why I use the &P405_WHERE.
    When I try to save this query in my updateable report I get the next error message:
    ORA-20001: Updatable report parse error: ORA-00933: SQL command not properly ended
    Error processing region columns.
    I also tried with parse query at runtime but that didn't work either. When I leave out the &P405_WHERE. then there is no problem.
    Any idea what I'm doing wrong or is there a workaround for this?
    Kind regards,
    Oli

    Hi,Oli
    You cannot use your updatable report like this :
    You have to use SQL Query (PL/SQL function body returning SQL query)
    like this
    declare q varchar2(1000);
    begin
    q:='SELECT
    "DOSSIER_ID",
    "DOSSIER_ID" DOSSIER_ID_DISPLAY,
    "REFNR",
    "NAME",
    "REMARK"
    FROM dossiers '||:P405_WHERE||' ORDER BY refnr DESC';
    return q;
    end;
    And make your report updatable ...
    Mike

  • Updateable Report : re-display collection & Update Button question

    This a sequel to a previous Updateable Report question I had.
    Varad pointed me to this doc which has been incredibly helpful .
    http://www.oracle.com/technology/products/database/application_express/
    howtos/tabular_form.html#RESTRICTIONS
    I was\am having the following issue :
    Let's zoom to the part where we create a region to display the tabular form for the previously saved collection , and drill down to the part where we create an UPDATE EMP button for that displayed collection :
    I was not able to display the collection again when I failed the validation a 2nd time. ie, clicking on the UPDATE EMP button after it displays both the errors-post validation and after displaying the collection ( of course) would return me to the previous report pre-collection creation. When I turned debug on I found out that it was not even creating the collection and was hence deleting it before displaying the subsequent page.
    So what I did differently from what the documention instructs is as follows :
    I removed the page reference on the 'branch to page' of the UPDATE EMP button. In my case, the default 'Branch to ' Page after Processing is the same page I am using for this part of the application.
    So when I remove the reference to the page number. for that button, the page is then able to re-create the collection and hence re-display the collection so I can re-fix the 2nd error ( ... and 3rd) and finally update the report .
    Just wondering if anyone else has had the same experience ?
    Thanks !

    The columns and rows have a set format for the Id, so if you know one Id you know the row and the ids of all the other columns.
    As an example, this will show the value of column 6 when you click on any column with the function call in the Element Attributes:
    Script:
    <script type="text/javascript">
    function showCol6(col){
      var col6 = document.getElementById("f06_" + col.id.substr(4,4));
      alert(col6.value);
    </script>Element Attributes:
    onclick=showCol6(this);You could also use a Named Column template, specific to this region, to include the column values directly in the function call, but I think it's best to stick with the ApEx defaults if possible.

  • Update Field On Change For A SQL Query (updateable report)

    Hi,
    I'd like to request help from anyone with ideas on how to solve this.
    We are using APEX 4.2, 10GR2, RedHat5.
    I have a report that comes from SQL Query (updateable report).
    I'm using the apex_item.text and apex_item.hidden on fields.
    I'm using a button to submit and after submit process to add some logic that I need.
    There could be 1 - 10 records in the report.
    There is only 1 field that is needed to enter a value, but the value of this field determines the value of another field.
    I think that I can do this with a submit button and an after submit process where I loop through all the records. I think I have this handled.
    This is the question
    When the value of that field is changed then the value of another field in the same row changes immediately.
    Is this possible?
    All the examples I've seen so far are for a single record and that doesn't work for us.
    I guess this is a MRU process but I haven't seen an example where a dynamic action is possible on a Multi Row Update.
    Could anyone direct me to where I can see an example or help me get directions?
    I appreciate all your help an comments and I thank you in advance.

    Yes why not...what you looking for is a ajax call
    See {message:id=10390979}
    Please note:-you can also do this as a dynamic action as shown below
    Event: Change
    Selection type: jQuery Selector
    jQuery Selector: input[name="f01"]
    True action with Execute JavaScript Code and put all code inside the test funtion, you may need to amend the code to use this.triggeringElemnt in place of this

  • Where clause in sql query for updateable report

    Why is the following not working as source for an updateable report ?
    select customer_name from temp_customers
    where customer_type = :my_field;
    How can I make a filter for an updateable report that is based on a field on my page ?
    Greetings Bernd

    Howard,
    The htmldb_item API package allows you to display column values in a report as HTML form fields. You have a choice of different types of form fields. In your example for instance you get a select list by using the function select_list_from_lov. But by simply placing form fields in an HTML page, you don't specify that those fields are actually supposed to update data in a database. You need an after submit process that is actually performing the update.
    You can implement this type of process manually using your own PL/SQL code. Or you can have HTML DB do this for you. If for example you were using the tabular form wizard, you would get an updateable report, including the update process and even including checksum functionality to make sure that you don't overwrite another person's changes (lost update detection).
    If you use the wizard, the report form items use the build-in display types. This means you don't have to do your own calls to htmldb_item as part of your query. It is generally advisable to use the build-in types as they are easier to work with and are only rendered for the rows actually shown as opposed to be rendered for the entire result set.
    If you do choose to use htmldb_item, you'll have to code your own PL/SQL code to perform the updates and you should also include some logic for lost update detection. The HTML DB documentation provides information on how to manually process data from tabular forms.
    Hope this clarifies your question about updateable reports,
    Regards,
    Marc

  • Query based LOV in an updateable report

    Hi,
    I have an updateable report which has a select box where the user can select "Item"
    I have another select box in the same report that needs to "update" its values according to the selected item. Is this possible?
    My first thought was to let the second select box be an empty div tag, and then use javascript to build the select. The problem with that is that if I just print a div tag in my select for the report (select '<div></div> from...') then it will not show untill the line has been saved so that is out of the question.. Any suggestions is welcome :)
    Thanks
    Bjarke

    Hi Bjarke,
    Yes it is possible providing the two are linked in some way. I'll explain with the idea that your first LOV is :P1_ITEM and the second is :P1_DETAILS
    *:P1_ITEM query:*
    SELECT DISTINCT ITEM FROM TABLE*:P1_DETAILS query:*
    SELECT DISTINCT  DETAILS FROM TABLE WHERE ITEM = :P1_ITEMYou want an unconditional branch which returns to the current page. Make sure that the "reset pagination" option in this branch is not ticked (i.e. you do not want it to reset as the values will go back to default).
    Your report might then be something like:
    SELECT * FROM TABLE WHERE ITEM = :P1_ITEM AND DETAILS = :P1_DETAILSHope this helps.
    Mike

  • Sql Query(Updateable Report) with pagination

    Hi,
    We're on APEX 3.2 I have a question on Sql Query(Updateable Report) and pagination. I have an updateable report which we have set to show 20 rows. When the userwhi has more than 20 rows enters the data and clicks next the data disappears. I have been reviewing other posts, but haven't come to a clear conclusion on how to prevent this from happening. I have been trying to use javascript to show a save popup when clicking 'Next' Any help is appreciated.
    Thanks,
    Joe

    any ideas?

  • Disabling the dropdown LOV for existing records in SQL updateable report

    Hi All -
    I have a SQL updateable report which has 3 columns. One of the column is a named-LOV. This report also provides the functionality of inserting new rows.
    Is there a way to only show the named-LOV dropdown list for only the new records to be inserted i.e. when we click on "Add Row". For existing records, I donot want to show the dropdown.
    Please provide your thoughts.
    Thanks,
    -Seenu

    Thanks Robert -
    I guess I didn't put my question right in my earlier posting.
    Basically this report provides updates and inserts both (Its a SQL Updateable report)
    One of the column is a Named-LOV (select list dropdown). For the existing records shown in this report, this select list should be disabled. But for the new records while inserting a new row into this report, the select list dropdown should be shown to the user with an option to choose values from selectlist.
    Thanks,
    -Seenu

  • Validation of a Region defined as type SQL QUERY (Updateable Report)

    Hi,
    I am trying to perform some validation on a Region defined as type SQL QUERY (Updateable Report). The report has two columns.
    One of the columns is a Select List and I would like to insure that a user cannot select the same value twice
    in the report. For example, if the select list has 5 values, A, B, C, D, E, I don't want a user to be able to select
    B twice in the report. I am assuming that I will need to incorporate javascript
    into my validation logic in order to perform this task. If so, could someone provide some guidance? Or are there
    other alternatives.
    Thanks in advance,
    Michael

    Dan,
    Sorry, I didn't mean to post the question twice. I was trying to edit my original question. Thanks for the link to the website. I am new to APEX development so the website you gave me will be extremely useful to learn new development techniques.
    Thanks again,
    Michael

  • AJAX Select Lists on Updateable Reports

    All,
    I have followed the examples from Karl and Sergio's blog on how to use AJAX to contol dependent LOV lists in a form. My question is, can this be done in an updateable report? I'm having difficulty in determining how to reference the column names of the dependant lists.
    What I basically have is a time app. User selects his project from a picklist and then his associated tasks for that project will appear in the task list. I have used the updatable report option to build this rather then a form, because I liked the prebuilt add row and processing functionality.
    Anyway if anyone knows how to use AJAX dependant select lists in an updateable report it would be greatly appreciated.
    Thanks
    Rob

    See http://forums.oracle.com/forums/thread.jspa?messageID=1222153&#1222153

  • Bug? - Getting "ORA-20001: Unable to create updateable report"

    We have created hundreds of simple tabular reports, but have come across 3 tables that we cannot get past the following error for when finishing the last step of the create wizard:
    ORA-20001: Unable to create updateable report. ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    Error creating tabular form.
    Return to application.
    Here is the DDL for this table:
    CREATE TABLE ancfx_test
    (ANCFX_ID NUMBER(31,0) NOT NULL ENABLE,
    APP_DTL_LVL_CD VARCHAR2(160),
    NOTE_CALL_FR_TYP_CD VARCHAR2(15),
    ANCFX_VOID_IND CHAR(1) DEFAULT 'n' NOT NULL ENABLE,
    PCT_AUDT_USER_CREA VARCHAR2(30) DEFAULT 'PCT',
    PCT_AUDT_DTM TIMESTAMP (6) DEFAULT SYSDATE
    I have tried an alternate surrogate key, renaming the table, excluding the 160 character column etc., but not able to create this form.
    Based on this and the many hundreds of unique tabular forms we have created, seems we may have run across a bug?
    Any help would be greatly appreciated.
    Thanks!

    Hi Scott,
    Turns out we did reach some sort of limit in APEX regarding how many pages can be assigned to a tab as the current tab for assigned pages. We had around 750 or more pages listed under a given tab as the current tab for those pages, which apparently created a list of page numbers in a string presumably that exceeded the maximum size for a field somewhere in APEX apparently, thus the error about the character buffer being too small. Not only could we not create new pages, but we could not even view the tab page in the shared components area for this tab without getting the error, but could get into the tab page to view the page numbers assigned to the tab.
    To get around this we had to remove all the page numbers that were listed for the tab as the current tab for those pages. Once that was done, everything was back to normal, although the tab in question is no longer shown as the current tab for any of those pages, which is not really a problem for us.
    Anyway, seems Oracle may want to review any field limits that are related to page numbers assigned to a tab to be the current tab for those pages and consider doubling that limit. In our case, 785 pages were too many for this limit, and there were no messages that helped us deduce where this was coming from - just brute force trial and error to figure this one out. Since we have more pages to go, we might run into some limits elsewhere which I'll post here if so.
    Monte Malenke

  • Updateable Report with pagination(APEX 3.2)

    Hi,
    I am working on APEX 3.2 and I have a question on Sql Query(Updateable Report) and pagination. I have an updateable report which we have set to show 100 rows. When the user has more than 100 rows enters the data and clicks next the data disappears. How can i save first 100 records once i click next ?. Any suggestions will be appreciated.
    Thanks,
    Greenhorn

    Here is what I did to get it to work.
    1. Copy xmlparserv2.jar from my ORACLE_HOME/oc4j/lib directory to my glassfish domains/domain1/applications/fop/WEB-INF/lib directory.
    2. Added the following two lines to the glassfish domains/domain1/fop/apex_fop.jsp before the driver.run() line
    out.clear();
    out = pageContext.pushBody();The second part of solution I found on another forum page.

  • Possible APEX BUG - Export to CSV from SQL Query (updateable report)

    I'm getting a the following sql error - just by enabling the Export to a CSV file from a SQL Query (updateable report) and selecting the export link - anyone have an idea what I could as a workaround?
    ORA-06550: line 1, column 45: PLS-00103: Encountered the symbol "1" when expecting one of the following: begin case declare exit for goto if loop mod null pragma raise return select update while with <an identifier> <a double-quoted delimited-identifier> <a bind variable> << close current delete fetch lock insert open rollback savepoint set sql execute commit forall merge pipe
    Error ERR-1000 Unable to determine LOV from "declare function x return varchar2 is begin 1 Not Checked;1 Not Checked,2 Review Passed;2 Review Passed,3 Reviewed w/ Issues;3 Reviewed w/ Issues,4 Not Applicable;4 Not Applicable return null; end; begin wwv_flow_utilities.g_query := x; end;".
    OK
    report error:
    ORA-20001: Error fetching column value: ORA-20001: Query must begin with SELECT or WITH

    Frank,
    I received your email with this same question so I'll just respond here. Our internet-facing hosted site apex.oracle.com allows you to request a workspace and, after the request is approved and the workspace provisioned, to develop applications there. If you already have an application that you need some help with, you can import/install it into your workspace on apex.oracle.com. This makes it easy to demonstrate problems to others who might be able to help.
    Sometimes it will be necessary for you to create developer accounts in your workspace in order for others to use your Application Builder. You can post usernames/passwords here or you can convey those privately to those offering their services. In either case, you'd want to remove or disable those accounts as soon as the problem is resolved. For problems that I ask to see demonstrated on apex.oracle.com, it is not necessary for you to create an account for me. I can do that as our group runs the site. I just need to know your workspace name and application ID.
    Scott

  • Two Updateable Reports On One Page

    I have 2 updateable reports on one page and two update procedures (one for each report)
    Each procedure is linked to a different button and calls a different procedure in the database
    My question is how to tell the page procedure, which report it should look at ?
    Gus

    My twp page processes are
    Process 1
    DECLARE
       v_Row number;
    v_upd number;
      v_count_failed     number := 0;
      v_count_updated    number := 0;
      v_count_failed2    number := 0;
      v_count_updated2   number := 0;
      v_count_total      number := 0;
    BEGIN
       FOR i IN 1 .. apex_application.g_f02.COUNT
       LOOP
         p_vrpapx.pr_p_upd_correlation (
            apex_application.g_f04 (i), --p_geokey
            apex_application.g_f08 (i), --p_PRIMARYMATKEY
            apex_application.g_f03 (i), --p_DEPMATKEY
            apex_application.g_f16 (i), --p_PROMOKEY
            --to_date(apex_application.g_f11 (i),'DD.MM.YYYY'), --p_STATCALCDAY
            apex_application.g_f11 (i),
            apex_application.g_f06 (i), --p_DOBJECTID
            apex_application.g_f05 (i), --p_POBJECTID
            apex_application.g_f17 (i), --p_USERCORFACTOR
            apex_application.g_fcs (i), --checksum
            v_count_failed,
            v_count_updated
        v_count_total := v_count_total + 1;
        v_count_failed2 := v_count_failed2 + v_count_failed;
        v_count_updated2 := v_count_updated2 + v_count_updated;
        if not apex_application.g_f16 (i) ='ALL'
          then
          v_upd:=p_vrpapx.fn_3_p_update_conv
          apex_application.g_f16 (i), --p_PROMOKEY
          apex_application.g_f08 (i), --p_PRIMARYMATKEY
          apex_application.g_f03 (i), --p_DEPMATKEY :P3_OM,
          apex_application.g_f04 (i), --p_geokey :F140_GEOKEY,
          nvl(apex_application.g_f17 (i),to_number(apex_application.g_f12 (i))), --p_USERCORFACTOR --corfactor
          :F140_PLNO, --pi_plno
          apex_application.g_f15 (i) --primaryscale
        end if;
        --reset variables
        v_count_failed  := 0;
        v_count_updated   := 0;
      end loop;
      :P3_COUNT_FAILED := v_count_failed2;
      :P3_COUNT_UPDATED := v_count_updated2;
    END;Process 2
    DECLARE
      v_count_failed     number := 0;
      v_count_updated    number := 0;
      v_count_failed2    number := 0;
      v_count_updated2   number := 0;
      v_count_total      number := 0;
    BEGIN
       FOR i IN 1 .. apex_application.g_f02.COUNT
       LOOP
         p_vrpapx.pr_3_p_upd_forcast(
            apex_application.g_f04 (i), --p_clocid
            apex_application.g_f05 (i), --p_siid
            apex_application.g_f06 (i), --p_clocfcstversionid
            apex_application.g_f07 (i), --p_clocfcstcalid
            --to_number(apex_application.g_f12 (i)), --p_qtyuser
           -- nvl(apex_application.g_f12 (i), 0), --p_qtyuser
            apex_application.g_f12 (i), --p_qtyuser
           apex_application.g_fcs (i), --p_checksum
            v_count_failed,
            v_count_updated     
        v_count_total := v_count_total + 1;
        v_count_failed2 := v_count_failed2 + v_count_failed;
        v_count_updated2 := v_count_updated2 + v_count_updated;
        --reset variables
        v_count_failed  := 0;
        v_count_updated   := 0;
      end loop;
      :P3_COUNT_FAILED_FORECAST  := v_count_failed2;
      :P3_COUNT_UPDATED_FORECAST := v_count_updated2;
    END;What I mean is that if I update a column in my first report and click update (button linked to process 1).
    How to link the code from process 1 so it uses report 1.
    Gus

  • 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

Maybe you are looking for