How to use collective confirmation CO12

can any body explain me how to use collective confirmation CO12 with screen dump.
Plz help

Hi Viswa,
Prerequisites:
You can predefine values to identify confirmations and to determine default values in Conf. parameters for collective confirmation/fast entry (Customizing for Shop Floor Control by choosing Operations ® Confirmation ® Confirmation Parameters Collective Entry/Fast Entry):
    Identifying the confirmation
You can identify an individual confirmation either by the confirmation number or the order number/operation number.
    Suggest actual data
You can define whether and when (after entry, during saving) quantities (see Determining a Default for Yield) or activities are suggested. The default setting is that no quantities are suggested and activities are determined during saving. Personnel data and dates are always suggested.
Procedure:
    Choose Logistics ® Production ® Shop floor control ® Confirmation ® Enter ® For operation ® Collective entry.
    The screen for collective entry of confirmations appears.
    In this screen you can enter confirmations in a table (table control). You enter a new confirmation in each line. You can control the appearance of the table yourself.
You can change the type of confirmation identification during input. To do so choose Other view.
Enter all the data needed for the confirmations. Each line corresponds to a new confirmation. In this line you have all the fields that are available in single entry of a time ticket confirmation.
On the top line of the screen you can enter default values (for example unit of measure, personnel number) that are copied to all confirmations. Enter the values and choose This graphic is explained in the accompanying text. You can save these default values for a specific user, so that they are preset the next time the user logs on. You can also delete these defaults.
With this function, you can let the system suggest actual data (quantities, activities, dates, personnel data). To do so, select the confirmations, choose This graphic is explained in the accompanying text Propose actual data, set the indicator for the relevant actual data and choose This graphic is explained in the accompanying text. This data overwrites data that you may have already entered.
    Save your confirmations.
Note
To reach the Actual data screen for the selected confirmations choose This graphic is explained in the accompanying text. Here you have the complete functionality of time ticket confirmation. From this screen you can go to the detail screens and to the goods movement overview. If several confirmation have been selected, you can switch between the individual confirmations.
Note
You can switch to the goods movement overview from the collective entry screen (choose This graphic is explained in the accompanying text Goods movements). In this screen the goods movements for the selected confirmations are displayed.
You can check and, if necessary, change the goods movements. When you go back to the collective entry screen, the GM indicator is set for the selected confirmations (goods movements for confirmations already determined). As soon as you save a confirmation, the goods movements are also posted.
For more information choose the GOODS MOVEMENT OVER VIEW.
Regards,
Madhu.G
Edited by: madhu333mac on Jan 11, 2012 11:34 PM

Similar Messages

  • How to use collect statement for below

    data : begin of itab,
             n(3) type c,
          n1 type n,
          k(5) type c,
          end of itab.
    select n n1 from into itab table /zteest.
    *internal table has
    n      n1    k
    gar    100  uji
    hae    90   iou
    gar    90   uji
    hae    87   iou
    I want
    gar 190
    hae 177
    How to use collect statement as n1 is n ..?
    let me know..
    Thanks

    try this..
    DATA : BEGIN OF itab OCCURS 0,
    n(3) TYPE c,
    n1(3) TYPE p DECIMALS 2,
    k(5) TYPE c,
    END OF itab.
    itab-n = 'gar'.
    itab-n1 = 100.
    itab-k = 'uji'.
    COLLECT itab .CLEAR itab.
    itab-n = 'hae'.
    itab-n1 = 90.
    itab-k = 'iou'.
    COLLECT itab .CLEAR itab.
    itab-n = 'gar'.
    itab-n1 = 90.
    itab-k = 'uji'.
    COLLECT itab .CLEAR itab.
    itab-n = 'hae'.
    itab-n1 = 87.
    itab-k = 'iou'.
    COLLECT itab .CLEAR itab.

  • How to use collect statement

    hi everybody,
    how to use collect statement to get the total amount paid to different vendor payments 
    data : begin of wa occurs 0,
            bukrs type bsak-bukrs,
            lifnr type bsak-lifnr,
            land1 type lfa1-land1,
            name1 like lfa1-name1,
            dmbtr like bsak-dmbtr,
            count type i value 0,
            tot_vend  type i,
            vend type i.
    data :end of wa.
    data : itab like table of wa.
      select distinct bukrs lifnr waers from bsak into
    corresponding fields of wa
              where bukrs in s_bukrs
              and   lifnr in s_lifnr
              and   bschl in s_bschl.
    i want the total amount paid according to vendor i am  using this way but i am not getting
      loop at itab into wa.
    wa-dmbtr = bsak-dmbtr.
    collect wa-dmbtr into itab.
    modify itab from wa transporting dmbtr.
    i am unalbe to get it
    can anybody help me regarding this if possible with example.
    thanks in advance,
    regards,
    venu.

    Hi Venu,
    types: BEGIN OF ty,
            NAME(20),
            SALES TYPE I,
          END   OF ty.
    data : itab type standard table of ty,
    itab1 type standard table of ty,
    wa type ty,
    wa1 type ty.
    wa-NAME = 'Duck'.  wa-SALES = 10.
    append wa to itab.
    wa-NAME = 'Tiger'. wa-SALES = 20.
    append wa to itab.
    wa-NAME = 'Duck'.  wa-SALES = 30.
    append wa to itab.
    loop at itab into wa.
    wa1 = wa.
    collect wa1 into itab1.
    endloop.
    loop at itab1 into wa1.
    write : / wa1-name , wa1-sales.
    endloop.
    COLLECT is used to create unique or compressed datsets. The key fields are the default key fields of the internal table itab .
    If you use only COLLECT to fill an internal table, COLLECT makes sure that the internal table does not contain two entries with the same default key fields.
    <b>If, besides its default key fields, the internal table contains number fields (see also ABAP/4 number types ), the contents of these number fields are added together if the internal table already contains an entry with the same key fields.</b>
    If the default key of an internal table processed with COLLECT is blank, all the values are added up in the first table line.
    In the program you mentioned yesterday,I am not able to get the logic since many lines are commented.

  • How to use collect statement properly

    In PBID table , i will get 4 rows for a material . I will get the corresponding values of bdzei from the same table . Now i will pass this bdzei into pbhi table. then i will get some 200 rows of data. I have to sum up the field plnmg , by grouping the laeda field of pbhi. In short, i need to know the sum of pbhi-plnmg for a particular pbhi-laeda . I know a way to do it. But i want to know how to use the COLLECT statement for this purpose. My output should contain oly 1 line for 1 material ..
    PBID table                      
    Matnr   BDZEI
    p4471   457
            1002
            2309
            2493
    PBHI table
    BDZEI     LAEDA         PLNMG
    1002     06.08.2004     0.000          
    1002     06.08.2004     83.000
    457      07.08.2004     12.000          
    457     07.08.2004     24.000
    Reqd O/p
    MATNR   LAEDA        PLNMG
    p4471  06.08.2004    83
    p4471  07.08.2004    36
    Hope u understood my situation .please help me out ...
    Thanking you in advance ..
    Shankar

    REPORT zppr_zpipr NO STANDARD PAGE HEADING LINE-SIZE 150 LINE-COUNT 63.
    TABLES: pbid,
            pbhi,
            makt,
            mseg,
            mkpf.
    DATA: BEGIN OF it_pbid OCCURS 0,
          matnr LIKE pbid-matnr,        " Material
          status TYPE c LENGTH 4,       " For distinguishing materials from pbid and pbim .. will contain space for PBID and 'PBIM' for PBIM
          bdzei LIKE pbid-bdzei,
          laeda LIKE pbhi-laeda,
    end of it_pbid.
    DATA: BEGIN OF it_pbim OCCURS 0,
          matnr LIKE pbid-matnr,        " Material
          status TYPE c LENGTH 4,       " For distinguishing materials from pbid and pbim .. will contain space for PBID and 'PBIM' for PBIM
          bdzei LIKE pbim-bdzei,
          laeda LIKE pbhi-laeda,
    end of it_pbim.
    DATA: BEGIN OF it_pbid_pbim OCCURS 0,
          matnr LIKE pbid-matnr,        " Material
          laeda LIKE pbhi-laeda,        " Reduction Date
          dbmng LIKE pbhi-dbmng,        " Planned quantity in the data base
          plnmg LIKE pbhi-plnmg,        " Planned quantity
          status TYPE c LENGTH 4,       " For distinguishing materials from pbid and pbim .. will contain space for PBID and 'PBIM' for PBIM
          mblnr LIKE mseg-mblnr,        " Material Doc Number
          pbfnr LIKE pbid-pbdnr,        " Plan Number
          maktx LIKE makt-maktx,         " Matl Desc
          aenam LIKE pbhi-aenam,        " User Changed
          erfmg LIKE mseg-erfmg,        " Qty Invoiced
          budat LIKE mkpf-budat,        " Invoice date
          bdzei LIKE pbid-bdzei,        " Independent requirements pointer
          werks LIKE pbid-werks,        " plant
          pirrednqty TYPE i,            " PIR Reduction Quantity        = pbih-plnmg - pbih-dbmng
          diff TYPE i,                  " Difference
          slno TYPE i,                  " Sl No
    END OF it_pbid_pbim.
    DATA: BEGIN OF it_allrows OCCURS 0.
            INCLUDE STRUCTURE it_pbid_pbim.
    DATA: END OF it_allrows.
    *DATA: BEGIN OF it_final OCCURS 0.
           INCLUDE STRUCTURE it_pbid_pbim.
    *DATA: END OF it_final.
    DATA: BEGIN OF line,
          matnr LIKE pbid-matnr,        " Material
          laeda LIKE pbhi-laeda,        " Reduction Date
          plnmg LIKE pbhi-plnmg,        " Planned quantity
          maktx LIKE makt-maktx,        " Matl Desc
          dbmng LIKE pbhi-dbmng,        " Planned quantity in the data base
          mblnr LIKE mseg-mblnr,        " Material Doc Number
          pbfnr LIKE pbid-pbdnr,        " Plan Number
          aenam LIKE pbhi-aenam,        " User Changed
          erfmg LIKE mseg-erfmg,        " Qty Invoiced
          budat LIKE mkpf-budat,        " Invoice date
          bdzei LIKE pbid-bdzei,        " Independent requirements pointer
          werks LIKE pbid-werks,        " plant
          pirrednqty TYPE i,            " PIR Reduction Quantity        = pbih-plnmg - pbih-dbmng
          diff TYPE i,                  " Difference
          slno TYPE i,                  " Sl No
          status TYPE c LENGTH 4,       " For distinguishing materials from pbid and pbim .. will contain space for PBID and 'PBIM' for PBIM
    END OF line.
    DATA Itfinal1 LIKE STANDARD TABLE
                OF LINE
              WITH DEFAULT KEY.
    DATA ITfinal LIKE ITfinal1.
    DATA: BEGIN OF it_dates OCCURS 0,
          date TYPE sy-datum,
    END OF it_dates.
    DATA: l_slno TYPE i.
    DATA: l_zebra TYPE c.
    SELECT-OPTIONS:
          s_werks FOR pbid-werks obligatory.
    SELECT-OPTIONS:
          s_matnr FOR pbid-matnr.
    SELECT-OPTIONS:
          s_pbdnr FOR pbid-pbdnr.
    SELECT-OPTIONS:
          s_laeda FOR pbhi-laeda obligatory.
    parameter:
          c_print type checkbox.
    SELECT matnr bdzei FROM pbid INTO (it_pbid-matnr, it_pbid-bdzei) WHERE werks IN s_werks AND matnr IN s_matnr AND pbdnr IN s_pbdnr.
      it_pbid-status = 'PBID'.
      APPEND it_pbid.
    move-corresponding it_pbid to it_pbid_pbim.
    Append it_pbid_pbim.
    ENDSELECT.
    SELECT matnr bdzei FROM pbim INTO  (it_pbim-matnr,it_pbim-bdzei) WHERE werks IN s_werks AND matnr IN s_matnr AND pbdnr IN s_pbdnr.
      APPEND it_pbim.
    Append it_pbid_pbim.
    ENDSELECT.
    *break-point.
    START-OF-SELECTION.
      LOOP AT s_laeda.
        it_dates-date = s_laeda-low.
        APPEND it_dates.
      ENDLOOP.
      DATA: l_startdate LIKE sy-datum.
      IF s_laeda-high EQ space.
      ELSE.
        l_startdate = s_laeda-low + 1.
        DO.
          IF l_startdate <= s_laeda-high.
            it_dates-date = l_startdate.
            APPEND it_dates.
          ELSE.
            it_dates-date = sy-datum.
            EXIT.
          ENDIF.
          l_startdate = l_startdate + 1.
        ENDDO.
      ENDIF.
    *break-point.
      LOOP AT it_pbim.
        LOOP AT it_dates.
          it_pbim-laeda = it_dates-date.
          it_pbim-status = 'PBIM'.
          MODIFY it_pbim TRANSPORTING laeda status.
          MOVE-CORRESPONDING it_pbim TO it_pbid_pbim.
          APPEND it_pbid_pbim.
        ENDLOOP.
      ENDLOOP.
    break-point.
      l_zebra = 'X'.
      DATA: l_toterfmg LIKE mseg-erfmg.
      DATA: l_erfmg LIKE mseg-erfmg.
      data: l_totpir type i.
    **************************************PBID*************************************
      LOOP AT it_pbid.
        move-corresponding it_pbid to it_pbid_pbim.
           append it_pbid_pbim.
        SELECT SINGLE maktx FROM makt INTO (it_pbid_pbim-maktx) WHERE matnr = it_pbid-matnr.
        MODIFY table it_pbid_pbim TRANSPORTING maktx.
        SELECT aenam laeda FROM pbhi INTO (it_pbid_pbim-aenam,it_pbid_pbim-laeda) WHERE bdzei = it_pbid-bdzei AND aenam = 'Abbau-'.
           MODIFY TABLE it_pbid_pbim TRANSPORTING aenam laeda. " debug here
        select single sum( dbmng )  sum( plnmg ) FROM pbhi INTO (it_pbid_pbim-dbmng,it_pbid_pbim-plnmg) WHERE bdzei = it_pbid-bdzei AND aenam = 'Abbau-' and laeda = it_pbid_pbim-laeda..
           MODIFY TABLE it_pbid_pbim TRANSPORTING dbmng plnmg. " debug here
       endselect.
        it_pbid_pbim-pirrednqty = it_pbid_pbim-dbmng - it_pbid_pbim-plnmg.
           MODIFY table it_pbid_pbim TRANSPORTING pirrednqty.
        IF ( it_pbid_pbim-laeda IN s_laeda AND it_pbid_pbim-aenam EQ 'Abbau-' ).
          MOVE-CORRESPONDING it_pbid_pbim TO it_allrows.
          append it_allrows.
        ELSEIF NOT it_pbid_pbim-laeda IN s_laeda.
              delete it_pbid_pbim index sy-tabix.           " debug here
        ENDIF.
        ENDSELECT.
      ENDLOOP.
    **************************************PBIM*************************************
      LOOP AT it_pbim.
        move-corresponding it_pbim to it_pbid_pbim.
           append it_pbid_pbim.
        SELECT SINGLE maktx FROM makt INTO (it_pbid_pbim-maktx) WHERE matnr = it_pbim-matnr.
           MODIFY table it_pbid_pbim TRANSPORTING maktx.
        SELECT aenam laeda FROM pbhi INTO (it_pbid_pbim-aenam,it_pbid_pbim-laeda) WHERE bdzei = it_pbim-bdzei AND aenam = 'Abbau-'.
           MODIFY TABLE it_pbid_pbim TRANSPORTING aenam laeda. " debug here
        select single sum( dbmng )  sum( plnmg ) FROM pbhi INTO (it_pbid_pbim-dbmng,it_pbid_pbim-plnmg) WHERE bdzei = it_pbim-bdzei AND aenam = 'Abbau-' and laeda = it_pbid_pbim-laeda..
           MODIFY TABLE it_pbid_pbim TRANSPORTING dbmng plnmg. " debug here
        it_pbid_pbim-pirrednqty = it_pbid_pbim-dbmng - it_pbid_pbim-plnmg.
           MODIFY table it_pbid_pbim TRANSPORTING pirrednqty.
        IF ( it_pbid_pbim-laeda IN s_laeda AND it_pbid_pbim-aenam EQ 'Abbau-' ).
          MOVE-CORRESPONDING it_pbid_pbim TO it_allrows.
          append it_allrows.
        ELSEIF NOT it_pbid_pbim-laeda IN s_laeda.
              delete it_pbid_pbim index sy-tabix.           " debug here
        ENDIF.
        ENDSELECT.
      ENDLOOP.
    sort it_allrows by matnr laeda status.
    **********************************ALL ROWS************************
    loop at it_allrows.
      line-matnr = it_allrows-matnr.
      line-laeda = it_allrows-laeda.
      line-plnmg = it_allrows-plnmg.
      line-dbmng = it_allrows-dbmng.
    line-mblnr = it_allrows-mblnr.
    line-pbfnr = it_allrows-pbfnr.
      line-maktx = it_allrows-maktx.
    line-aenam = it_allrows-aenam.
    line-erfmg = it_allrows-erfmg.
    line-budat = it_allrows-budat.
      line-bdzei = it_allrows-bdzei.
    line-werks = it_allrows-werks.
      line-pirrednqty = it_allrows-pirrednqty.
      line-diff = it_allrows-diff.
      line-slno = it_allrows-slno.
      line-status = it_allrows-status.
      collect line into itfinal1.
    endloop.
    loop at itfinal1 into line.
      collect line into itfinal.
        write: / line-matnr, line-plnmg, line-dbmng,line-laeda,line-status..
    endloop.
    skip 4.
    loop at itfinal into line.
      write: / line-matnr, line-plnmg, line-dbmng,line-laeda,line-status..
    endloop.
    break-point.

  • Collective confirmations CO12

    Hi Guys,
    plz light on  below  two scenariou2019s...
    1) I would like make wage group field in CO12 screen mandatory, for that in t code CO86 field AFRUDu2014LOGRP I have selected as a required field in both ie initial and details screen, but still it is not working,    
    2) in case of collective entry confirmation (CO12) screen system displays activity 1, 2, and 3,
    i would like  to change these displayed  activity text as production time, setup etc,
    to do this plz suggest the settings,
    thanks in advance,
    Mohan M

    Hi Sree Gowda,
    i have  three options in wage group, when i am confirmation of production orders collectively by CO12 , selecting  the appropriate wage group, hence i want make this feild mandatory,
    thanks in advance,
    Mohan M

  • How to use collect?

    hi all ,
    i want to add net value of all the line items which are in the same group
    am using collect but am unable to do that.
    plz suggest me what to do?
    DATA: BEGIN OF del_grp_data occurs 0,
            vbeln like vbap-vbeln,  " Sales document
            grkor like vbap-grkor,  " Delivery group
            netwr like vbap-netwr, "net value
            posnr like vbap-posnr,  " Sales document item
             End OF del_grp_data.
    SELECT vbeln grkor pstyv netwr
        posnr
       FROM   vbap
        INTO corresponding fields of  TABLE del_grp_data
        FOR ALL ENTRIES IN orders_vbeln
        WHERE vbeln eq orders_vbeln-vbeln.
    loop at del_grp_data.
    collect ord_grp_data .
    endloop.
    Regards,
    Amit.

    Basic form
    COLLECT [wa INTO] itab.
    Addition:
    ... SORTED BY f
    Cannot Use Short Forms in Line Operations.
    Effect
    COLLECT allows you to create unique or summarized datasets. The system first tries to find a table entry corresponding to the table key. (See also Defining Keys for Internal Tables). The key values are taken either from the header line of the internal table itab, or from the explicitly-specified work area wa. The line type of itab must be flat - that is, it cannot itself contain any internal tables. All the components that do not belong to the key must be numeric types ( ABAP Numeric Types).
    If the system finds an entry, the numeric fields that are not part of the table key (see ABAPNumeric Types) are added to the sum total of the existing entries. If it does not find an entry, the system creates a new entry instead.
    The way in which the system finds the entries depends on the type of the internal table:
    STANDARD TABLE:
    The system creates a temporary hash administration for the table to find the entries. This means that the runtime required to find them does not depend on the number of table entries. The administration is temporary, since it is invalidated by operations like DELETE, INSERT, MODIFY, SORT, ...). A subsequent COLLECT is then no longer independent of the table size, because the system has to use a linear search to find entries. For this reason, you should only use COLLECT to fill standard tables. U
    SORTED TABLE:
    The system uses a binary search to find the entries. There is a logarithmic relationship between the number of table entries and the search time.
    HASHED TABLE:
    The system uses the internal hash administration of the table to find records. Since (unlike standard tables), this remains intact even after table modification operations, the search time is always dependent on the number of table entries.
    For standard tables and SORTED TABLEs, the system field SY-TABIX contains the number of the existing or newly-added table entry after the APPEND. With HASHED TABLEs, SY-TABIX is set to 0.
    Notes
    COLLECT allows you to create a unique or summarized dataset, and you should only use it when this is necessary. If neither of these characteristics are required, or where the nature of the table in the application means that it is impossible for duplicate entries to occur, you should use INSERT [wa INTO] TABLE itab instead of COLLECT. If you do need the table to be unique or summarized, COLLECT is the most efficient way to achieve it.
    If you use COLLECT with a work area, the work area must be compatible with the line type of the internal table.
    If you edit a standard table using COLLECT, you should only use the COLLECT or MODIFY ... TRANSPORTING f1 f2 ... statements (where none of f1, f2, ... may be in the key) enthalten sein). Only then can you be sure that:
    -The internal table actually is unique or summarized
    -COLLECT runs efficiently. The check whether the dataset
    already contains an entry with the same key has a constant
    search time (hash procedure).
    If you use any other table modification statements, the check for entries in the dataset with the same key can only run using a linear search (and will accordingly take longer). You can use the function module ABL_TABLE_HASH_STATE to test whether the COLLECT has a constant or linear search time for a given standard table.
    Example
    Summarized sales figures by company:
    TYPES: BEGIN OF COMPANY,
            NAME(20) TYPE C,
            SALES    TYPE I,
          END OF COMPANY.
    DATA: COMP    TYPE COMPANY,
          COMPTAB TYPE HASHED TABLE OF COMPANY
                                    WITH UNIQUE KEY NAME.
    COMP-NAME = 'Duck'.  COMP-SALES = 10. COLLECT COMP INTO COMPTAB.
    COMP-NAME = 'Tiger'. COMP-SALES = 20. COLLECT COMP INTO COMPTAB.
    COMP-NAME = 'Duck'.  COMP-SALES = 30. COLLECT COMP INTO COMPTAB.
    Table COMPTAB now has the following contents:
               NAME    | SALES
              Duck    |   40
              Tiger   |   20
    Addition
    ... SORTED BY f
    Effect
    COLLECT ... SORTED BY f is obsolete, and should no longer be used. It only applies to standard tables, and has the same function as APPEND ... SORTED BY f, which you should use instead. (See also Obsolete Language Elements).
    Note
    Performance:
    Avoid unnecessary assignments to the header line when using internal tables with a header line. Whenever possible, use statements that have an explicit work area.
    For example, " APPEND wa TO itab." is approximately twice as fast as " itab = wa. APPEND itab.". The same applies to COLLECT and INSERT.
    The runtime of a COLLECT increases with the width of the table key and the number of numeric fields whose contents are summated.
    Note
    Non-Catchable Exceptions:
    COLLECT_OVERFLOW: Overflow in an integer field during addition
    COLLECT_OVERFLOW_TYPE_P: Overflow in a type P field during addition.
    TABLE_COLLECT_CHAR_IN_FUNCTION: COLLECT on a non-numeric field.
    Related
    APPEND, WRITE ... TO, MODIFY, INSERT
    Additional help
    Inserting SummarizedTable Lines

  • How to use collections

    Hi
    i'm still quite the novice on APEX so bare with me.
    my problem is as follows:
    I have to develop a page for mass registration of sales, in APEX, and the client would like a tabular form with 20 empty rows in which the client can insert sales data.
    i'm developing on apex version 3.0.0.00.20 on a 10g Enterprise Edition Release 10.1.0.5.0 database.
    i've tried using collections for the job, but my problem is that i can't get the code to save any changes to the collection??
    i've created a on load before header process
    that creates a collection named SALGSBUFREG using apex_collection.create_collection_from_query where no rows are returned.
    the table i query is the table that the sales data eventually is inserted into.
    /** on-load before header process start */
    declare
    c_coll_name constant varchar2(100) := 'SALGSBUFREG';
    c_number_of_rows constant number := 20;
    begin
    if apex_collection.collection_exists(p_collection_name=>c_coll_name) then
    apex_collection.delete_collection(p_collection_name=>c_coll_name);
    end if;
    apex_collection.create_collection_from_query(
    p_collection_name=>c_coll_name,
    p_query=>'SELECT varenummer,
    antal,
    aip_omsaetning,
    apotekskode ,
    salgsdato,
    salgsperiode,
    dlibruger_id,
    salgsbatch_id,
    sygehuskode,
    afvist,
    indsat,
    updateret,
    registreringsdato
    FROM salgsbuffere
    WHERE 1 = 2');
    /** create c_number_of_rows empty rows*/
    for i in 1 .. c_number_of_rows
    loop
    apex_collection.add_member (p_collection_name => c_coll_name,
    p_c001 => ' ',
    p_c002 => ' ',
    p_c003 => ' ',
    p_c004 => ' ',
    p_c005 => null,
    p_c006 => ' ',
    p_c007 => ' ',
    p_c008 => ' ',
    p_c009 => ' ',
    p_c010 => ' ',
    p_c011 => ' ',
    p_c012 => ' ',
    p_c013 => null
    end loop;
    end;
    /** on-load before header process stop */
    i've created a report region called salgs_buf based on the following query:
    select c001, c002, c003, c004, c005, c006, c007, c008,c009,c010,c011, c012,c013
    from apex_collections
    where collection_name = 'SALGSBUFREG'
    i've made the report attributes c001 - c005 editable.
    finally i've made a on submit - after computations and validations process with the following content:
    declare
    c pls_integer := 0;
    c_coll_name constant varchar2(100) := 'SALGSREGBUF';
    begin
    for c1 in (
    select seq_id from apex_collections
    where collection_name = c_coll_name
    order by seq_id) loop
    c := c+1;
    apex_collection.update_member_attribute (p_collection_name=> c_coll_name,
    p_seq=> c1.seq_id,p_attr_number =>4,p_attr_value=>wwv_flow.g_f01(c));
    apex_collection.update_member_attribute (p_collection_name=> c_coll_name,
    p_seq=> c1.seq_id,p_attr_number =>5,p_attr_value=>wwv_flow.g_f02(c));
    apex_collection.update_member_attribute (p_collection_name=> c_coll_name,
    p_seq=> c1.seq_id,p_attr_number =>6,p_attr_value=>wwv_flow.g_f03(c));
    apex_collection.update_member_attribute (p_collection_name=> c_coll_name,
    p_seq=> c1.seq_id,p_attr_number =>7,p_attr_value=>wwv_flow.g_f04(c));
    end loop;
    end;
    For some reason the collection dosen't get updated????
    any idears why, or am I using the wrong apporach.

    first off thanks for your help.
    I seem to have cracked the nut so to speak, i'm just posting my solution
    I've changed the process so that exisisting collections aren't deleted.
    /** before header process start**/
    DECLARE
    c_coll_name CONSTANT VARCHAR2 (100) := 'SALGSBUFREG';
    c_number_of_rows CONSTANT NUMBER := 20;
    v_row_count_diff NUMBER;
    v_row_count NUMBER;
    BEGIN
    IF NOT apex_collection.collection_exists (c_coll_name)
    THEN
    apex_collection.create_collection_from_query
    (p_collection_name => c_coll_name,
    p_query => 'SELECT varenummer,
    antal,
    aip_omsaetning,
    apotekskode,
    salgsdato,
    salgsperiode,
    dlibruger_id,
    salgsbatch_id,
    sygehuskode,
    afvist,
    indsat,
    updateret,
    registreringsdato
    FROM salgsbuffere
    WHERE 1 = 2'
    -- create c_number_of_rows empty rows
    FOR i IN 1 .. c_number_of_rows
    LOOP
    apex_collection.add_member (p_collection_name => c_coll_name,
    p_c001 => ' ',
    /** vare nr*/
    p_c002 => ' ',
    /** antal */
    p_c003 => ' ',
    /** aip_omsaetning*/
    p_c004 => ' ',
    /** apotekskode */
    p_c005 => NULL,
    /** salgsdato*/
    p_c006 => ' ',
    /** salgsperiode */
    p_c007 => ' ',
    /** dlibruger_id*/
    p_c008 => ' ',
    /** salgsbatch_id*/
    p_c009 => ' ',
    /** sygehuskode*/
    p_c010 => ' ',
    /** afvist*/
    p_c011 => ' ',
    /** indsat*/
    p_c012 => ' ',
    /** updateret*/
    p_c013 => NULL
    /** registrerings dato*/
    END LOOP;
    -- the empty collection is set to unchanged
    apex_collection.reset_collection_changed (c_coll_name);
    END IF;
    END;
    /** before header process stop**/
    i've made a on submit and before computation process that populates the collection with the values that i input in the updatable rport region on my page, and it works just fine:
    /** on submit and before computation start**/
    /* Formatted on 2008/06/11 09:37 (Formatter Plus v4.8.8) */
    DECLARE
    c_coll_name CONSTANT VARCHAR2 (100) := 'SALGSBUFREG';
    c_row_count CONSTANT NUMBER := 20;
    v_member_count NUMBER;
    BEGIN
    IF apex_collection.collection_exists (c_coll_name)
    THEN
    FOR i IN 1 .. apex_collection.collection_member_count (c_coll_name)
    LOOP
    apex_collection.update_member_attribute
    (p_collection_name => c_coll_name,
    p_seq => i,
    p_attr_number => 1,
    p_attr_value => apex_application.g_f01
    (i)
    apex_collection.update_member_attribute
    (p_collection_name => c_coll_name,
    p_seq => i,
    p_attr_number => 2,
    p_attr_value => apex_application.g_f02
    (i)
    apex_collection.update_member_attribute
    (p_collection_name => c_coll_name,
    p_seq => i,
    p_attr_number => 3,
    p_attr_value => apex_application.g_f03
    (i)
    apex_collection.update_member_attribute
    (p_collection_name => c_coll_name,
    p_seq => i,
    p_attr_number => 4,
    p_attr_value => apex_application.g_f04
    (i)
    apex_collection.update_member_attribute
    (p_collection_name => c_coll_name,
    p_seq => i,
    p_attr_number => 5,
    p_attr_value => apex_application.g_f05
    (i)
    END LOOP;
    END IF;
    END;
    /** on submit and before computation start**/

  • How to use window.confirm in a JavaScript with unknown variables

    On my delete category page the user can pick the category it wishes to delete from a dropdown list (which is generated by rows in my database).
    When the user hits the "Delete" button ths OnClick runs a JavaScript that sends the delete request to a .jsp page that handles all my insert, update and delete queries.
    <input name="delete" type="button" id="delete" onClick="post('delete');return false;" value="Delete">
    function post(actValue)
         document.MyForm.action.value = actValue ;
         document.MyForm.submit() ;
    }So far, so good. But:
    Before the site goes to this last jsp page I want a pop-up window that ask's for a confirmation of the delete-request.
    So I changed the OnClick and I made another JavaScript::
    <input name="delete" type="button" id="delete" onClick="delete('categoryName');return false;" value="Delete">
    function deleteConfirm(categoryName)
         if( window.confirm("Are you sure you want to delete: " + categorieNaam + "?") == true)
              post('delete');
              return false;
    }The problem is, when the page is loaded, we don't know yet what category the user wants to have deleted. So categoryName is unknown.
    How can I make this work?

    You have the category in a dropdown list?
    <select name="catToDelete">
    <option value="cat1">cat1</option>
    <option value="cat2">cat2</option>
    <option value="cat3">cat3</option>
    </select>
    You can use javascript attributes such as
    var toDelete = document.all.catToDelete;
    // the value it will submit
    var selectedValue = toDelete.value;
    // the selected index
    var selectedIndex = toDelete.selectedIndex;
    // the option that is selected
    var selectedOption = toDelete.options[selectedIndex];
    // the text of that option
    var theText = selectedOption.textYou should be able to extract the info you need from that I hope.
    Cheers,
    evnafets

  • No confirmation through Collective Confirmation CO12

    Hi
    We are having setup 0010 and 0020 operation, at 0010 PRT is attached with usage value calculation.
    While confirming through CO12 transaction. and putting all operation together There is no confirmation is executed. We get the message "No confirmation Executed" and the message no is RU514.
    We are working ECC 6.0
    Can any one help

    Pl check whether order is released or not ? Or if there is an costing error in confirmation , it will not post the confirmation. Pl send me the details of the error message.
    Thanks

  • How to use collection in my code

    PROCEDURE irp_status_check_list(P_YEAR IN VARCHAR2,P_SEASON IN VARCHAR2)  AS
    g_count NUMBER;
    BEGIN
           FOR CUR_GID IN (SELECT GENERATION_ID
                           FROM VRESS_GEN_DDLB_VW
                           WHERE SEASON_YEAR=P_YEAR AND SEASON_CODE=P_SEASON)
               LOOP
                   SELECT COUNT(1)
                   INTO g_count
                   FROM dual
                   WHERE EXISTS
                         (SELECT p.generation_id
                          FROM pvress_plan_irp_list p,pvress_tran_irp_list t
                          WHERE  p.generation_id=t.generation_id
                          AND   p.generation_id = cur_gid.generation_id);
                     IF G_COUNT=0
                     THEN
                         dbms_output.put_line(CUR_GID.generation_id||' NOT ARRANGEMENT FIX  ');
                     ELSE
                          SELECT COUNT(1)
                          INTO g_count
                          FROM dual
                          WHERE  EXISTS
                                  (SELECT p.generation_id
                                   FROM pvress_plan_irp_list p,pvress_tran_irp_list t,
                                        pvress_vaboss_judgement j
                                   WHERE  p.generation_id=t.generation_id
                                   AND  t.generation_id=j.generation_id
                                   AND   p.generation_id = cur_gid.generation_id);
                      IF G_COUNT=0
                      THEN
                          dbms_output.put_line(CUR_GID.generation_id ||'  NOT VABOSS FIX  ');
                      ELSE
                          SELECT COUNT(1)
                          INTO g_count
                          FROM dual
                          WHERE EXISTS
                                 (SELECT p.generation_id
                                  FROM pvress_plan_irp_list p,pvress_tran_irp_list t
                                  WHERE  p.generation_id=t.generation_id
                                  AND p.release_no=t.release_no
                                  AND p.generation_id=cur_gid.generation_id);
                      IF G_COUNT=0
                      THEN
                          dbms_output.put_line( CUR_GID.generation_id ||'  NOT RELEASE NOTE  ');
                        END IF;
                     END IF;
                 END IF;
             END LOOP;
         END irp_status_check_list;
    END vress_irp_check_list_pkg;Edited by: newbie on Nov 4, 2011 12:34 AM

    Once you have done the BULK COLLECT you can CLOSE the cursor right now.
    After that if there is any data in the collection, then you can LOOP through it
    Something like this :
    PROCEDURE irp_status_check_list(
              P_YEAR   IN VARCHAR2,
              P_SEASON IN VARCHAR2)
    AS
         g_count NUMBER;
         CURSOR cur_sme_tbl
         IS
              SELECT
                   GENERATION_ID
              FROM
                   VRESS_GEN_DDLB_VW
              WHERE
                   SEASON_YEAR   =P_YEAR
              AND SEASON_CODE=P_SEASON;
    TYPE t_sme_col
    IS
         TABLE OF cur_sme_tbl%ROWTYPE INDEX BY BINARY_INTEGER;
         l_sme_col t_sme_col;
    BEGIN
         OPEN cur_sme_tbl;
         FETCH cur_sme_tbl BULK COLLECT INTO l_sme_col;
         CLOSE cur_sme_tbl;
         IF l_sme_col.COUNT >0 THEN
              FOR i            IN 1..l_sme_col.COUNT
              LOOP
                   SELECT
                        COUNT(1)
                   INTO
                        g_count
                   FROM
                        pvress_plan_irp_list p,
                        pvress_tran_irp_list t
                   WHERE
                        p.generation_id   =t.generation_id
                   AND p.release_no   =t.release_no
                   AND p.generation_id=l_sme_col(i).generation_id;
                   IF G_COUNT         =0 THEN
                        dbms_output.put_line(l_sme_col(i).generation_id||' NOT ARRANGEMENT FIX  ');
                   ELSE
                        SELECT
                             COUNT(1)
                        INTO
                             g_count
                        FROM
                             pvress_plan_irp_list p,
                             pvress_tran_irp_list t,
                             pvress_vaboss_judgement j
                        WHERE
                             p.generation_id    =t.generation_id
                        AND t.generation_id =j.generation_id
                        AND p.generation_id = l_sme_col(i).generation_id);
                        IF G_COUNT          =0 THEN
                             dbms_output.put_line(l_sme_col(i).generation_id ||'  NOT VABOSS FIX  ');
                        ELSE
                             SELECT
                                  COUNT(1)
                             INTO
                                  g_count
                             FROM
                                  pvress_plan_irp_list p,
                                  pvress_tran_irp_list t
                             WHERE
                                  p.generation_id   =t.generation_id
                             AND p.release_no   =t.release_no
                             AND p.generation_id=l_sme_col(i).generation_id);
                             IF G_COUNT         =0 THEN
                                  dbms_output.put_line( l_sme_col(i).generation_id ||'  NOT RELEASE NOTE  ');
                             END IF;
                        END IF;
                   END IF;
              END LOOP;
         END IF;
    END;

  • Using collections to insert

    Hi ,
    To improve the performance of the insert statement i was adviced to use the collections.
    I'm not getting any idea on how to use collection concept in my code.
    Could you please give me a skelton approach to do that.
    The following is the sample code (the logic is same in prod code,instead of for 1 -100000 we have cursor in prod) without using collections
    create table pop_tab (     col1 number ,col2 number ,col3 number ,col4 number ) 
    create or replace package test_collect
    is
      procedure proc_lvl_ld ;
      procedure proc_pop_tab (v_var1 number ,v_var2 number ,v_var3 number ,v_var4 number) ;
    end test_collect;
    create or replace package body test_collect
    is
       procedure proc_lvl_ld
        is
          v_cnt number := 1 ;
          v_var1 NUMBER ;
          v_var2 NUMBER ;
          v_var3 NUMBER ;
          v_var4 NUMBER;
         begin
          for i in 1 .. 100000 loop
            v_var1 := v_cnt + 1;
            v_var2 := v_cnt + 2;
            v_var3 := v_cnt + 3;
            v_var4 := v_cnt + 4;
            v_cnt  := v_cnt + 1;
          proc_pop_tab (v_var1 ,v_var2,v_var3,v_var4);
         end loop;
          commit;
          exception when others then
           DBMS_OUTPUT.PUT_LINE ( 'proc_lvl_load'||sqlcode||','||sqlerrm );
        end proc_lvl_ld;
         procedure proc_pop_tab (v_var1 number ,v_var2 number ,v_var3 number ,v_var4 number)
          is
           begin
             insert into pop_tab (col1,col2,col3,col4)
                     values (v_var1,v_var2,v_var3,v_var4) ;
           exception when others then
           DBMS_OUTPUT.PUT_LINE ( 'proc_pop_tab'||sqlcode||','||sqlerrm );             
           end proc_pop_tab;
    end test_collect;Now i tried a bit using colliection to improve the insert performance and stuck how to use the collections
    create or replace package body test_collect
    is
       procedure proc_lvl_ld
        is
           TYPE numtab1 IS TABLE OF NUMBER (4) INDEX BY BINARY_INTEGER;
           data1    numtab1;
           TYPE numtab2 IS TABLE OF NUMBER (4) INDEX BY BINARY_INTEGER;
           data2    numtab2;
           TYPE numtab3 IS TABLE OF NUMBER (4) INDEX BY BINARY_INTEGER;
           data3    numtab3;
           TYPE numtab4 IS TABLE OF NUMBER (4) INDEX BY BINARY_INTEGER;
           data4    numtab4;
          v_cnt number := 1 ;
         begin
          for i in 1 .. 100000 loop
            data1(data1.count +1) := v_cnt + 1;
            data2(data2.count +1) := v_cnt + 1;
            data3(data3.count +1) := v_cnt + 1;
            data4(data4.count +1) := v_cnt + 1;
            v_cnt  := v_cnt + 1;
          --proc_pop_tab (v_var1 ,v_var2,v_var3,v_var4);
         end loop;
           forall j in 1 ..data1.count
             insert into pop_tab
                 values (  --- How to use  the above collection variables here
          commit;
          exception when others then
           DBMS_OUTPUT.PUT_LINE ( 'proc_lvl_load'||sqlcode||','||sqlerrm );
        end proc_lvl_ld;
    end;Could you please help me out in this and let me know if i'm not clear
    Edited by: Smile on Sep 7, 2012 11:37 AM

    Use:
           forall j in 1 ..data1.count
             insert into pop_tab
                 values (data1(j),data2(j),data3(j),data4(j));       Now:
    SQL> create or replace package body test_collect
      2   is
      3     procedure proc_lvl_ld
      4      is
      5     TYPE numtab1 IS TABLE OF NUMBER (4) INDEX BY BINARY_INTEGER;
      6     data1    numtab1;
      7     TYPE numtab2 IS TABLE OF NUMBER (4) INDEX BY BINARY_INTEGER;
      8     data2    numtab2;
      9     TYPE numtab3 IS TABLE OF NUMBER (4) INDEX BY BINARY_INTEGER;
    10     data3    numtab3;
    11     TYPE numtab4 IS TABLE OF NUMBER (4) INDEX BY BINARY_INTEGER;
    12     data4    numtab4;
    13    v_cnt number := 1 ;
    14   begin
    15    for i in 1 .. 100000 loop
    16      data1(data1.count +1) := v_cnt + 1;
    17      data2(data2.count +1) := v_cnt + 1;
    18      data3(data3.count +1) := v_cnt + 1;
    19      data4(data4.count +1) := v_cnt + 1;
    20      v_cnt  := v_cnt + 1;
    21        --proc_pop_tab (v_var1 ,v_var2,v_var3,v_var4);
    22       end loop;
    23     forall j in 1 ..data1.count
    24       insert into pop_tab
    25       values (data1(j),data2(j),data3(j),data4(j));  
    26    commit;
    27    exception when others then
    28     DBMS_OUTPUT.PUT_LINE ( 'proc_lvl_load'||sqlcode||','||sqlerrm );
    29   
    30      end proc_lvl_ld;
    31  end;
    32  /
    Package body created.
    SQL> exec test_collect.proc_lvl_ld;
    proc_lvl_load-6502,ORA-06502: PL/SQL: numeric or value error: number precision too large
    PL/SQL procedure successfully completed.
    SQL> Why? You declared associative arrays as NUMBER(4) while values you are trying to assign their elements are in range:
    for i in 1 .. 100000 loopIf I change it to:
    for i in 1 .. 9998 loopThen:
    SQL> create or replace package body test_collect
      2   is
      3     procedure proc_lvl_ld
      4      is
      5     TYPE numtab1 IS TABLE OF NUMBER (4) INDEX BY BINARY_INTEGER;
      6     data1    numtab1;
      7     TYPE numtab2 IS TABLE OF NUMBER (4) INDEX BY BINARY_INTEGER;
      8     data2    numtab2;
      9     TYPE numtab3 IS TABLE OF NUMBER (4) INDEX BY BINARY_INTEGER;
    10     data3    numtab3;
    11     TYPE numtab4 IS TABLE OF NUMBER (4) INDEX BY BINARY_INTEGER;
    12     data4    numtab4;
    13    v_cnt number := 1 ;
    14   begin
    15    for i in 1 .. 9998 loop
    16      data1(data1.count +1) := v_cnt + 1;
    17      data2(data2.count +1) := v_cnt + 1;
    18      data3(data3.count +1) := v_cnt + 1;
    19      data4(data4.count +1) := v_cnt + 1;
    20      v_cnt  := v_cnt + 1;
    21        --proc_pop_tab (v_var1 ,v_var2,v_var3,v_var4);
    22       end loop;
    23     forall j in 1 ..data1.count
    24       insert into pop_tab
    25       values (data1(j),data2(j),data3(j),data4(j));  
    26    commit;
    27    exception when others then
    28     DBMS_OUTPUT.PUT_LINE ( 'proc_lvl_load'||sqlcode||','||sqlerrm );
    29   
    30      end proc_lvl_ld;
    31  end;
    32  /
    Package body created.
    SQL> exec test_collect.proc_lvl_ld;
    PL/SQL procedure successfully completed.
    SQL> select count(*) from pop_tab
      2  /
      COUNT(*)
          9998
    SQL> SY.

  • Using Collections

    HI EXPERTS
    i want to implement the below procedure using pl/sql collections can any one suggest for the followinG
    create or replace procedure test_proc
    is
    cursor c1 is select * from temp;
    cursor c1 is select * from MONITORING;
    i temp%rowtype;
    j MONITORING%type;
    begin
    open c1
    loop
    if (I.RES_CODE = '02' and i.CUST_ACCNO = j.CUST_ACCNO and i.CUST_MMID = j.CUST_MMID and i.CUST_MOBNO = j.CUST_MOBNO) then
    Insert into APP
    (CUST_ACCNO,CUST_MOBNO,CUST_MMID,REMARKS,RES_CODE)
    SELECT I.CUST_ACCNO,I.CUST_MOBNO,I.CUST_MMID,i.RES_CODE,'03'
    FROM temp I
    WHERE EXISTS (SELECT NULL FROM MONITORING M WHERE M.CUST_ACCNO = I.CUST_ACCNO AND M.CUST_MOBNO = I.CUST_MOBNO AND M.CUST_MMID = I.CUST_MMID)
    AND I.RES_CODE = '02';
    elsif (I.RES_CODE = '02' and (i.CUST_ACCNO != j.CUST_ACCNO or i.CUST_MMID != j.CUST_MMID or i.CUST_MOBNO != j.CUST_MOBNO)) then
    Insert into APP
    (CUST_ACCNO,CUST_MOBNO,CUST_MMID,REMARKS,RES_CODE)
    SELECT I.CUST_ACCNO,I.CUST_MOBNO,I.CUST_MMID,i.RES_CODE,'04'
    FROM temp I
    WHERE NOT EXISTS (SELECT NULL FROM MONITORING M WHERE M.CUST_ACCNO = I.CUST_ACCNO AND M.CUST_MOBNO = I.CUST_MOBNO AND M.CUST_MMID = I.CUST_MMID)
    AND I.RES_CODE = '02';
    elsif I.RES_CODE != '02' then
    Insert into APP
    (CUST_ACCNO,CUST_MOBNO,CUST_MMID,REMARKS,RES_CODE)
    SELECT I.CUST_ACCNO,I.CUST_MOBNO,I.CUST_MMID,i.RES_CODE,'02'
    FROM temp I
    WHERE I.RES_CODE != '02';
    exit whenc1
    end loop;
    close c1;
    end;
    /

    Didn't you have a discussion just yesterday about Re: Collections:?
    As was discussed in your previous thread, if the goal is to improve efficiency, it would be more efficient to get rid of the cursors and to just issue SQL statements to insert all the rows at once. Using collections may be an improvement over slow row-by-row processing but set-based processing will be even more efficient.
    In yesterdays thread, multiple people showed you how to use collections. Is there some specific problem/ question that you have? Presumably, the goal of you posting here is to learn how to use collections on your own, not to post all of your procedures one at a time and ask others to rewrite them using collections.
    The code you posted can't possibly compile. For example, you have two different declarations of the c1 cursor that query two completely different tables. There is an "exit whenc1" call that doesn't appear to match to any loop. Your code is also rather hard to follow since it is not formatted. If you put the tag \ (6 characteers all lower case) immediately before and after a code snippet, the forum will maintain all the spacing.  That makes the code much, much easier to read.
    Justin                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Collective confirmation

    Hi, in co11n, we can do single operation confirmation. is there any option to enter multi operations confirmation in single screen. pls advise.

    Hi,
    Also try CORK if you are in  PP PI.
    This transaction used collective confirmation.
    regards
    SANIL

  • I recieved an Adobe Master Collection License number from my school (Stevens Institute of Technology) and I can't figure out how to use it in order to get the product. I've created a username and that's as far as I've gotten.

    I recieved an Adobe Master Collection License number from my school (Stevens Institute of Technology) and I can't figure out how to use it in order to get the product. I've created a username and that's as far as I've gotten. I need to download the product and I can't figure out where to begin.

    Ask someone at your school... Do you have a Cloud redemption code, or a CS6 serial number?
    If Cloud, Redemption Code http://helpx.adobe.com/x-productkb/global/redemption-code-help.html and
    http://www.adobe.com/products/creativecloud/faq.html
    http://helpx.adobe.com/creative-cloud/help/install-apps.html to install or uninstall
    http://forums.adobe.com/community/download_install_setup/creative_cloud_faq
    What it is http://helpx.adobe.com/creative-cloud/help/creative-cloud-desktop.html
    Cloud Getting Started https://helpx.adobe.com/creative-cloud.html
    If CS6, download at Other downloads and enter your serial number when prompted
    Again... your 1st resource is your school

  • How to use oracle collection type with JDBC?

    I try to use oracle collection type in java program. So I made some package and java program, however Java program was not found "package.collectiontype"(JDBC_ERP_IF_TEST.NUM_ARRAY) . please, show me how to use this.
    Java Version : Java 1.4
    JDBC Driver : Oracle Oci Driver
    DB: Oracle 9i
    No 1. Package
    ===========================================
    create or replace package JDBC_ERP_IF_TEST AS
    type NUM_ARRAY is table of number;
    procedure JDBC_ERP_IF_ARRAY_TEST(P_NUM_ARRAY IN NUM_ARRAY, ERR_NO OUT NUMBER, ERR_TEXT OUT VARCHAR2);
    procedure TEST(ABC IN NUMBER);
    END JDBC_ERP_IF_TEST;
    ==================================================
    No 2. Package Body
    ===============================================
    CREATE OR REPLACE package BODY JDBC_ERP_IF_TEST is
    procedure JDBC_ERP_IF_ARRAY_TEST(p_num_array IN NUM_ARRAY,
    ERR_NO OUT NUMBER,
    ERR_TEXT OUT VARCHAR2) is
    begin
    ERR_NO := 0;
    ERR_TEXT := '';
    dbms_output.enable;
    for i in 1 .. p_num_array.count() loop
    dbms_output.put_line(p_num_array(i));
    insert into emp (empno) values (p_num_array(i));
    commit;
    end loop;
    EXCEPTION
    WHEN OTHERS THEN
    ERR_NO := SQLCODE;
    ERR_TEXT := ERR_TEXT ||
    ' IN JDBC INTERFACE TEST FOR ORACLE ERP OPEN API..';
    ROLLBACK;
    RETURN;
    end JDBC_ERP_IF_ARRAY_TEST;
    procedure TEST(ABC IN NUMBER) IS
    begin
    insert into emp(empno) values (ABC);
    commit;
    end TEST;
    end JDBC_ERP_IF_TEST;
    ===============================================
    NO 3. Java Program
    ===============================================
    ArrayDescriptor descriptor = ArrayDescriptor.createDescriptor("JDBC_ERP_IF_TEST.NUM_ARRAY", getConnection());
    ARRAY array = new ARRAY(descriptor, getConnection(), arrs);
    cstmt = getConnection().prepareCall(LQueryFactory.getInstance().get("Meta/Basic/testJdbcErpArrayIf").getSql());
    cstmt.setArray(1, array);
    cstmt.registerOutParameter(2, Types.INTEGER);
    cstmt.registerOutParameter(3, Types.VARCHAR);
    ====================================================
    couldn't find this phase => JDBC_ERP_IF_TEST.NUM_ARRAY
    what can i do for this package and program? please help me..

    Something like this:
    create or replace type t_record as  object (
    id number,
    no number
    CREATE or replace type t_table AS TABLE OF t_record;
    set serveroutput on
    declare
      v_table t_table := t_table();
      v_t1 t_table := t_table();
    begin
      v_table.extend(1);
      v_table(1).ID := 1;
      v_table(1).No := 10;
      v_table.extend(1);
      v_table(2).ID := 2;
      v_table(2).ID := 20;
      SELEC t_record (ID,NO) BULK COLLECT INTO v_t1
      from TableA
      FROM TABLEA
      WHERE ID IN (select t.ID from table(v_Table) t);
      for i in 1..v_t1.count loop
        dbms_output.put_line(v_t1(i).ID);
        dbms_output.put_line(v_t1(i).No);
      end loop;
    end;
    /Untested!
    P;
    Edited by: bluefrog on Mar 5, 2010 5:08 PM

Maybe you are looking for

  • Problem with indesign CS4 program

    I've searched for this already but have had no luck finding a fix. My problem is that when I am running indesign CS4 on my laptop I cannot select the master page nor any other pages. Also certain other controls are not functioning like ruler guides,

  • EBay 'My Messages' scroll bar error in Firefox 3.6.20. Does not

    Windows 7 Home Premium 64 bit Firefox 3.6.20 There is a problem with the scroll bar in Firefox 3.6.20 when displaying eBay 'My Messages' There are 26 message headers per page (in both IE 9 and Firefox 3.6.20). Both browsers require scrolling to view

  • AirPort Help: Configuring "Network"

    In attempting to install NetWare for the iPhone 3G (another story!), I must have inadvertently deleted all of the Network and Airport settings that had allowed me to use Airport alone to pick up an open signal/network in my neighborhood. I had no rec

  • What does this parameter do "Force SQLExecute" in the background.

    Can anybody tell me  what does this parameter does  "Force SQLExecute" in the background? It is in the sbo file.

  • Multicam Angle Editor Clips Can't Be Moved

    I have a multicam clip and when I open it in the Angle Editor, I can't move any of the clips. They just snap back to where they were. For whatever reason, FCP X really fudged up the "auto" syncing of these clips and I have to move them around and syn