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

Similar Messages

  • How can i get all values from jtable with out selecting?

    i have one input table and two output tables (name it as output1, output2). Selected rows from input table are displayed in output1 table. The data in output1 table is temporary(means the dat wont store in database just for display purpose).
    Actually what i want is how can i get all values from output1 table to output2 table with out selecting the data in output1 table?
    thanks in advance.
    raja

    You could set the table's data model to be the same:
    output2.setModel( output1.getModel() );

  • F4IF_INT_TABLE_VALUE_REQUEST - how can I return all values from the line?

    Hi,
    I'm using FM F4IF_INT_TABLE_VALUE_REQUEST to show a pop-up with my internal table values.  The internal table has 3 fields, ATINN, ATZHL and a description field ATWTB.  ATINN and ATZHL are needed to complete the unique table key, however this FM will only return the value of one field in any line I select.
    How can I see all the values in the line I select in the return table?
    My code is as follows:
      DATA: tbl_cawnt LIKE cawnt OCCURS 0,
            wa_cawnt LIKE cawnt,
            BEGIN OF tbl_list OCCURS 0,
              atinn LIKE cawnt-atinn,
              atzhl LIKE cawnt-atzhl,
              atwtb LIKE cawnt-atwtb,
            END OF tbl_list,
            wa_list LIKE tbl_list,
            tbl_return LIKE ddshretval OCCURS 0,
            wa_return LIKE ddshretval,
            tbl_fields LIKE dfies OCCURS 0,
            tbl_dynp LIKE dselc OCCURS 0.
      REFRESH: tbl_list, tbl_cawnt.
      SELECT atinn atzhl atwtb
        FROM cawnt
        INTO CORRESPONDING FIELDS OF TABLE tbl_cawnt
        WHERE spras EQ sy-langu.
      LOOP AT tbl_cawnt INTO wa_cawnt.
        CLEAR wa_list.
        MOVE: wa_cawnt-atwtb TO wa_list-atwtb,
              wa_cawnt-atinn TO wa_list-atinn,
              wa_cawnt-atzhl TO wa_list-atzhl.
        APPEND wa_list TO tbl_list.
      ENDLOOP.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'ATWTB'
          dynpprog        = sy-repid
          dynpnr          = sy-dynnr
          value_org       = 'S'
        TABLES
          value_tab       = tbl_list
          return_tab      = tbl_return
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    Thanks!

    Hi,
      Use the structure DYNPFLD_MAPPING
    With this internal table you can easily define that you want to return
    other columns of the hit list in addition to field RETFIELD to the
    screen.
    In this IT you can MAP the screen fields to the serch help screen fields this has three fields
    FLDNAME this is the field anme from the search help
    FLDINH This has to be blank which would be field with the field value that you want to map
    DYFLDNAME THis is the screen field name.
    So here you can get the values for the other fields that you want which are on the search help just populate the name of the fields in FLDNAME.
    Regards,
    Himanshu

  • How to get all values in the range of select option into internal table?

    Hi,
    I need to capture all entries coming in the range of select option into one internal table.
    How to do get that?
    For E.g
    select-options: matnr for mara-matnr.(select option)
    IF I enter G0100013507892 as lower value of matnr and G0100014873947 as higher value
    and if there are 10,000 materials in the above range, then I want to capture all theses 10000 materails in one internal table. How to do that?
    Regards,
    Mrunal

    Hello Mrunal Mhaskar  ,
    What i understand you can do one thing  go in debug mode
    Try this code : -
    LOOP AT s_matnr_ex.
      IF s_matnr_ex-low IS NOT INITIAL.
        i_matnr-matnr = s_matnr_ex-low.
        i_matnr-option = s_matnr_ex-option.
        APPEND i_matnr.
        CLEAR : i_matnr.
      ENDIF.
    ENDLOOP.
    LOOP AT s_matnr_ex.
      IF s_matnr_ex-high IS NOT INITIAL.
        i_matnr-matnr = s_matnr_ex-high.
        i_matnr-option = s_matnr_ex-option.
        APPEND i_matnr.
        CLEAR : i_matnr.
      ENDIF.
    ENDLOOP.
    In the i_matnr table high and low values are there.
    Regards,
    Vandana.

  • SQL Loader-How to insert -ve & date values from flat text file into coloumn

    Question: How to insert -ve & date values from flat text file into coloumns in a table.
    Explanation: In the text file, the negative values are like -10201.30 or 15317.10- and the date values are as DDMMYYYY (like 10052001 for 10th May, 2002).
    How to load such values in columns of database using SQL Loader?
    Please guide.

    Question: How to insert -ve & date values from flat text file into coloumns in a table.
    Explanation: In the text file, the negative values are like -10201.30 or 15317.10- and the date values are as DDMMYYYY (like 10052001 for 10th May, 2002).
    How to load such values in columns of database using SQL Loader?
    Please guide. Try something like
    someDate    DATE 'DDMMYYYY'
    someNumber1      "TO_NUMBER ('s99999999.00')"
    someNumber2      "TO_NUMBER ('99999999.00s')"Good luck,
    Eric Kamradt

  • 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

  • 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]

  • From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?

    From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?

    Hi,
    Use NVL or COALESCE:
    NVL (col_a, col_b)
    Returns col_a if col_a is not NULL; otherwise, it returns col_b.
    Col_a and col_b must have similar (if not identical) datatypes; for example, if col_a is a DATE, then col_b can be another DATE or it can be a TIMESTAMP, but it can't be a VARCHAR2.
    For more about NVL and COALESCE, see the SQL Language manual: http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions119.htm#sthref1310
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

  • 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 do I return two values from a stored procedure into an "Execute SQL Task" within SQL Server 2008 R2

    Hi,
    How do I return two values from a
    stored procedure into an "Execute SQL Task" please? Each of these two values need to be populated into an SSIS variable for later processing, e.g. StartDate and EndDate.
    Thinking about stored procedure output parameters for example. Is there anything special I need to bear in mind to ensure that the SSIS variables are populated with the updated stored procedure output parameter values?
    Something like ?
    CREATE PROCEDURE [etl].[ConvertPeriodToStartAndEndDate]
    @intPeriod INT,
    @strPeriod_Length NVARCHAR(1),
    @dtStart NVARCHAR(8) OUTPUT,
    @dtEnd NVARCHAR(8) OUTPUT
    AS
    then within the SSIS component; -
    Kind Regards,
    Kieran. 
    Kieran Patrick Wood http://www.innovativebusinessintelligence.com http://uk.linkedin.com/in/kieranpatrickwood http://kieranwood.wordpress.com/

    Below execute statement should work along the parameter mapping which you have provided. Also try specifying the parameter size property as default.
    Exec [etl].[ConvertPeriodToStartAndEndDate] ?,?,? output, ? output
    Add a script task to check ssis variables values using,
    Msgbox(Dts.Variables("User::strExtractStartDate").Value)
    Do not forget to add the property "readOnlyVariables" as strExtractStartDate variable to check for only one variable.
    Regards, RSingh

  • How to get the return values from a web page

    Hi all :
       how to get the return values from a web page ?  I mean how pass values betwen webflow and web page ?
    thank you very much
    Edited by: jingying Sony on Apr 15, 2010 6:15 AM
    Edited by: jingying Sony on Apr 15, 2010 6:18 AM

    Hi,
    What kind of web page do you have? Do you have possibility to for example make RFCs? Then you could trigger events (with parameters that could "return" the values) and the workflow could react to those events. For example your task can have terminating events.
    Regards,
    Karri

  • 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.

  • How do I transfer all data from my old internal hard drive to a new internal hard drive

    How do I transfer all data from my old internal hard drive to a new internal hard drive? I have an iMac with a 320gb internal HD that is full and I am replacing it with a 2tb internal drive. I have several external drives; 1 tb, 2tb and 3 tb. The 2 tb is being used for Time Machine. Do I have to buy an enclosure? If so, where would I get an inexpensive one?
    I also want to partition the new internal drive for Windows, and I'm not sure how much space to use for that. I plan to use Windows to check my work in PowerPoint created on my Mac for clients on PCs.

    Do you already have Time Machine making backups onto the 2TB drive? If so, after you get the internal drive replaced, boot up into the recovery partition (hold down ⌘R) and restore the latest Time Machine backup that you have onto the new internal drive.
    I recommend always having two backups. I'd use SuperDuper to make a complete clone of your internal drive onto an external drive in addition to having the Time Machine backup.
    Boot Camp is what is used to make partitions for Windows. How much space to allocate depends on how much space you expect Windows to use up based on how you plan to use it.

Maybe you are looking for

  • Problems whit java part 2

    ok i repeat my problem 'cause i 've not found a solution this is my class : * Shell.java * Created on 14 settembre 2006, 8.39 * To change this template, choose Tools | Template Manager * and open the template in the editor. * @author g.veltro import

  • Error using Component in another DC

    Hello Everybody, I have developed one DC in which I have created one RFC model and I have written all the methods related to it. Now, I am using this DC in another DC and calling methods to call those RFC models. This application was working perfectl

  • Linux VM shows continous CPU load

    Hello, I have a cluster of Windows 2012 R2 - Hyper-V enabled. I have installed a Centos 6.5 64bit VM on it. Now, the problem is whenever I enable dynamic memory for that VM the CPU load is showing 1.0 all the time, even when the VM is in idle state.

  • Cant start my database

    hi i've recently installed the oracle 10g (10.2.0.1) in my pc (OS: RHEL AS4) just to try. I've created the starter database also. Now database has created the spfile insted of pfile(init.ora). whenever i try to start the database it shows the error t

  • Export tops off at 720x540?

    I just completed my first iMovie 08 project and wanted to export to iDVD, but when I go under the Export options, the best quality is "large" at a resolution of 720x540. I burned this to a DVD and it looks very grainy. How do I export at a higher res