Adding a record

Hi can someone please show me how to add a record to an object such as an AR Invoice using DI? I'm trying to figure it out but no luck yet.

This is what I have so far, but it doesn't work:
private SAPbobsCOM.Documents oInvoice;
private SAPbobsCOM.Document_Lines oInvoiceRows;
oInvoice = ( ( SAPbobsCOM.Documents )( oCompany.GetBusinessObject( SAPbobsCOM.BoObjectTypes.oInvoices ) ) );
               int lRetCode;
               oInvoice.CardCode = "979";
               oInvoice.CardName = "t";
               oInvoice.DocDate = DateTime.Parse("18.07.2007");
               oInvoice.DocDueDate =  DateTime.Parse("18.07.2007");
               oInvoice.TaxDate =  DateTime.Parse("18.07.2007");
               oInvoice.DocTotal = 23.00;
               oInvoiceRows.ItemCode = "12345";
               oInvoiceRows.ItemDescription = "CONNETTORE";
               oInvoiceRows.Quantity = 2;
               oInvoiceRows.Price = 10.00;
               oInvoiceRows.LineTotal = 20.00;
               lRetCode = oInvoice.Add();
               oInvoiceRows.Add();

Similar Messages

  • How to create a batch by adding a record to any Z Table

    Hi Experts,
    I am doing online billing info system. I need to quey the NAST table for unprocessed entries. One of the  requirement is to create a  batch  What is meant by creating a batch by adding a record to a Z Table?
    If anyone is aware, please tell me how to do it.
    Thanks
    Dan

    I think this is a question you should ask the person that gave you the specs.
    Rob

  • Problem with return table(adding extra record)

    Hi,gurus,
      I am facing a probelm with return table, i.e it is adding body record and workarea record also to the data target. so, it is adding the actual record to data target including the workarea record to with the key figure and year values as zeros and spaces. It's quite strange.
    Please help me out, thanks a lot.

    Hi,
       I have an ODS with the keys fields(ZPS_TXMID,ZPS_NODE,ZPS_NODE) and data fields(ZAU_C108,ZAU_C109,0PROJECT). I have to split one record from datasource to 6 records into my ODS. I'm updating ZAU_C109 with a routine with return table. Here is the code, please check it for me:
    <i> data: prj like /BIC/PZPS_TXMID-PROJECT.
    data: ls_icube_value like ICUBE_VALUES.
    clear ls_icube_value.
    select single PROJECT into prj from /BIC/PZPS_TXMID
            where /BIC/ZPS_TXMID = COMM_STRUCTURE-/BIC/ZPS_TXMID.
    ls_icube_value-/BIC/ZPS_TXMID = COMM_STRUCTURE-/BIC/ZPS_TXMID.
    ls_icube_value-/BIC/ZAU_C108 = COMM_STRUCTURE-/BIC/ZAU_C108.
    ls_icube_value-/BIC/ZPS_NODE = '1'.
    ls_icube_value-/BIC/ZPS_SNODE = '0'.
    ls_icube_value-PROJECT = prj.
    ls_icube_value-/BIC/ZAU_C109 = COMM_STRUCTURE-/BIC/ZPS_HJHSJ.
    APPEND ls_icube_value TO RESULT_TABLE.
    ls_icube_value-/BIC/ZPS_NODE = '1'.
    ls_icube_value-/BIC/ZPS_SNODE = '1'.
    ls_icube_value-PROJECT = prj.
    ls_icube_value-/BIC/ZAU_C109 = COMM_STRUCTURE-/BIC/ZPS_HPSJ.
    APPEND ls_icube_value TO RESULT_TABLE.
    ls_icube_value-/BIC/ZPS_NODE = '1'.
    ls_icube_value-/BIC/ZPS_SNODE = '2'.
    ls_icube_value-PROJECT = prj.
    ls_icube_value-/BIC/ZAU_C109 = COMM_STRUCTURE-/BIC/ZAU_C101.
    APPEND ls_icube_value TO RESULT_TABLE.
    ls_icube_value-/BIC/ZPS_NODE = '2'.
    ls_icube_value-/BIC/ZPS_SNODE = '0'.
    ls_icube_value-PROJECT = prj.
    ls_icube_value-/BIC/ZAU_C109 = COMM_STRUCTURE-/BIC/ZPS_TJHSJ.
    APPEND ls_icube_value TO RESULT_TABLE.
    ls_icube_value-/BIC/ZPS_NODE = '2'.
    ls_icube_value-/BIC/ZPS_SNODE = '1'.
    ls_icube_value-PROJECT = prj.
    ls_icube_value-/BIC/ZAU_C109 = COMM_STRUCTURE-/BIC/ZPS_TDSJ.
    APPEND ls_icube_value TO RESULT_TABLE.
    ls_icube_value-/BIC/ZPS_NODE = '2'.
    ls_icube_value-/BIC/ZPS_SNODE = '2'.
    ls_icube_value-PROJECT = prj.
    ls_icube_value-/BIC/ZAU_C109 = COMM_STRUCTURE-/BIC/ZAU_C102.
    APPEND ls_icube_value TO RESULT_TABLE.
    ABORT = 0.</i>
       After loading, I checked the contents of ODS, there are 6 records(0project, ZAU_C108 are blank, other fields are correct) + 1 more record(ZPS_TXMID,0project, ZAU_C108 are correct, other fields are blank), what I expect is only 6 records with all fields being filled properly, no blanks, no extra records. Is it strange? or am I doing sth. wrong?
      Your help is appreciated.

  • Adding a record in a table from a workflow process

    Hi all,
    I need to add a recod in a table using a workflow. Here the scenario:
    A user add a record into table A, when done MDM trigger the workflow in Visio. The workflow has to add a record in table B coping some values of table A.
    Thank in advance for your help.
    Vito

    Hi Vito,
    I am really doubt that MDM has the feature of adding a record to an table thru workflow process, rather workflow process can be triggered as you said while creating a record.
    thanks
    Alexander

  • Adding a record in a database using the jbutton

    hi i'm a newbie of jdeveloper.. i just wannna ask how to code adding a record in a database POSTGRESQL using the jbutton.. i already connected in the database but in the model form it has already navigation buttons.. but i want to learn how to code the jbutton in a form without using navigation buttons. THANKS..

    I guess you are talking about swing JButton.
    If I remember it correctly you need to have a listener to the JButton something like this:-
    http://www.javaworld.com/jw-03-2001/print/listing5.txt
    Where on the cick of the button you will call a method that fetches the records from your Table

  • Adding Multiple Records with Express

    Hello All,
    We have a CRUD application written in Express 2.0 that allows users to
    enter part numbers and associated information. Our part numbers are
    structured as a prefix, alpha, suffix and 'M' or 'P' number variations :
    1 AB 2 P3 for example. We have provided functionality to allow the
    user to enter multiple P or M variations all at once, say 1 AB 2 P1 thru
    P100,
    using a dialog box where they enter the starting number, ending number
    and step.
    The problem comes in the AddRecordsToSave method.
    This method correctly builds the array of BusinessClass needed to be
    passed to the Save method, however, the Save method adds only the
    initial record (the one from the original Express data entry screen)
    to the database.
    I have traced the problem to the BusinessClient.Update method called
    from
    Save. I believe I am missing some query information that should be
    built into
    AddRecordsToSave, but I am completely unsure of how to provide this.
    As you can see in the attached code, we are using the LogAttr method to
    post
    changes. Apparently this is not enough. What am I missing here?
    The InstanceStatus key of the added records is set to ST_EMPTY by
    default....
    I have tried forcing this to ST_UPDATE, only to receive an error that it
    should
    be ST_EMPTY......?? I am confused. If anyone can shed some light on this
    for me,
    I would appreciate it. Thanks for any help.
    Scott Guman E-mail: [email protected]
    IRM Analyst II Phone: (610) 709-2144
    Mack Trucks, Inc. Fax: (610) 709-4713
    Allentown, PA 18105

    Hi There,
    If attr is not specified in your LogAttr() call, the
    BusinessClass
    will be put in the update state but not attributes will
    be logged.
    That may be the reason why only the displayed record(
    fetched from
    the DB ) is getting logged, but not the new records.
    I think you should use ATTR_SIMPLE with LogAttr. This
    will cause
    all the attributes to be logged and a proper query to
    be built
    to insert the newly created record. I am no Express
    Guru,
    but it works fine for me. Also, try not to modify
    InstanceStatus directly.
    Sometimes it might lead to inconsistencies. The online
    help
    The Add Records to Save example really helps.
    Good luck!
    Ajith Kallambella. M.
    Forte Systems Engineer,
    International Business Corporation
    -----Original Message-----
    From: Scott Guman [SMTP:[email protected]]
    Sent: Wednesday, September 16, 1998 9:34 AM
    To: 'Forte Users'
    Subject: Adding Multiple Records with Express
    Hello All,
    We have a CRUD application written in Express 2.0 that
    allows users to
    enter part numbers and associated information. Our
    part numbers are
    structured as a prefix, alpha, suffix and 'M' or 'P'
    number variations :
    1 AB 2 P3 for example. We have provided functionality
    to allow the
    user to enter multiple P or M variations all at once,
    say 1 AB 2 P1 thru
    P100,
    using a dialog box where they enter the starting
    number, ending number
    and step.
    The problem comes in the AddRecordsToSave method.
    This method correctly builds the array of BusinessClass
    needed to be
    passed to the Save method, however, the Save method
    adds only the
    initial record (the one from the original Express
    data entry screen)
    to the database.
    I have traced the problem to the BusinessClient.Update
    method called
    from
    Save. I believe I am missing some query information
    that should be
    built into
    AddRecordsToSave, but I am completely unsure of how to
    provide this.
    As you can see in the attached code, we are using the
    LogAttr method to
    post
    changes. Apparently this is not enough. What am I
    missing here?
    The InstanceStatus key of the added records is set to
    ST_EMPTY by
    default....
    I have tried forcing this to ST_UPDATE, only to receive
    an error that it
    should
    be ST_EMPTY......?? I am confused. If anyone can shed
    some light on this
    for me,
    I would appreciate it. Thanks for any help.
    Scott Guman E-mail:
    [email protected]
    IRM Analyst II Phone: (610) 709-2144
    Mack Trucks, Inc. Fax: (610) 709-4713
    Allentown, PA 18105
    << File: AddRecordsToSave.txt >>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • Help! We have a form with more than 200 entries and when I looked at it yesterday it had one! When you download the form to excel they all show up. However, when I added another record today it disappeared. Can you tell me what's happening? I've been usin

    Help! We have a form with more than 200 entries and when I looked at it yesterday it had one! When you download the form to excel they all show up. However, when I added another record today it disappeared. Can you tell me what's happening? I've been using adobe forms for 2 years with mass response feedback and have never had this problem.

    Greetings,
    I've never seen this issue, and I handle many iPads, of all versions. WiFi issues are generally local to the WiFi router - they are not all of the same quality, range, immunity to interference, etc. You have distance, building construction, and the biggie - interference.
    At home, I use Apple routers, and have no issues with any of my WiFi enabled devices, computers, mobile devices, etc - even the lowly PeeCees. I have locations where I have Juniper Networks, as well as Aruba, and a few Netgears - all of them work as they should.
    The cheaper routers, Linksys, D-Link, Seimens home units, and many other no name devices have caused issues of various kinds, and even connectivity.
    I have no idea what Starbucks uses, but I always have a good connection, and I go there nearly every morning and get some work done, as well as play.
    You could try changing channels, 2.4 to 5 Gigs, changing locations of the router. I have had to do all of these at one time or another over the many years that I have been a Network Engineer.
    Good Luck - Cheers,
    M.

  • RFC code for Adding Customer Record

    Dear all
    Can any body provide RFC code for adding a record
    in customer table ( KNA1) ?
    regards
    - Victor

    Victor,
    I created a remote-enabled function module (z_customer_create) which calls SD_CUSTOMER_MAINTAIN_ALL.  The 'z' function module was published as a web service and is working well.  We did have a few hurdles but there are many forum posts for  FM SD_CUSTOMER_MAINTAIN_ALL that will help should you run into trouble.

  • Adding AAAA records to DNS manually (Server Manager don't let you add them)

    Using the following webpage http://www.isi.edu/~bmanning/v6DNS.html#named.conf I have been able to get IPv6 name resolution setup, so that clients will use IPv6 for connecting to my server on the LAN when possible (e.g. Mail, iChat, Web).
    This is working well, and the records also display in Server Manager. I have tested add/remove/update to existing records in DNS to make sure the manually added AAAA records don't get wiped out, and they don't .
    NOTE: Put AAAA records above A records. Not sure why, but this prevented a few problems I initially had.
    I haven't had a go at making a reverse lookup zone yet for IPv6, but if/when I do, I shall post here.
    Below is a before -> after of the following files I had to edit, using nano under sudo in Terminal:
    Zone name: test.com
    File: /var/named/zones/db.test.com.zone.apple
    Owner: root:wheel
    *Before AAAA:*
    ;GUID=9ACB60A1-BB9E-496A-BF3F-D23D8BA52DE4
    $TTL 10800
    test.com. IN SOA test.com. admin.test.com (
    2009081800 ;Serial
    86400 ;Refresh
    3600 ;Retry
    604800 ;Expire
    345600 ;Negative caching TTL
    test.com. IN NS test.com.
    test.com. IN A 172.16.0.143
    test.com. IN HINFO "Mac Pro 1.1, 9GB RAM" "Mac OS X Leopard Server 10.5"
    SipuraSPA.test.com. IN A 172.16.0.148
    camera.test.com. IN A 172.16.0.175
    dd-wrt.test.com. IN A 172.16.0.200
    XBMC.test.com. IN A 172.16.0.147
    XBMC.test.com. IN HINFO "Microsoft XBox" "XBox Media Center"
    Office-Mac-mini.test.com. IN A 172.16.0.149
    Office-Mac-mini.test.com. IN HINFO "Mac Mini G4" "Mac OS X Leopard 10.5"
    N95.test.com. IN A 172.16.0.141
    N95.test.com. IN HINFO "Nokia N95 8GB" "Symbian OS"
    switch.test.com. IN A 172.16.0.173
    ucs.test.com. IN A 172.16.0.230
    LinksysPAP.test.com. IN A 172.16.0.152
    wireless.test.com. IN A 172.16.0.131
    trixbox.test.com. IN A 172.16.0.129
    trixbox.test.com. IN HINFO "Dell Precision Workstation" "Trixbox 2.6"
    trixbox.test.com. IN TXT "IP PBX"
    intranet.test.com. IN A 172.16.0.143
    lb.dns-sd.udp IN PTR test.com.
    test.com. IN MX 10 test.com.
    *After AAAA:*
    ;GUID=9ACB60A1-BB9E-496A-BF3F-D23D8BA52DE4
    $TTL 10800
    test.com. IN SOA test.com. admin.test.com (
    2009081800 ;Serial
    86400 ;Refresh
    3600 ;Retry
    604800 ;Expire
    345600 ;Negative caching TTL
    test.com. IN NS test.com.
    test.com. IN AAAA 2002:aaaa:aaaa:0000:0217:f2ff:fe04:35ec
    test.com. IN A 172.16.0.143
    test.com. IN HINFO "Mac Pro 1.1, 9GB RAM" "Mac OS X Leopard Server 10.5"
    SipuraSPA.test.com. IN A 172.16.0.148
    camera.test.com. IN A 172.16.0.175
    dd-wrt.test.com. IN A 172.16.0.200
    XBMC.test.com. IN A 172.16.0.147
    XBMC.test.com. IN HINFO "Microsoft XBox" "XBox Media Center"
    Office-Mac-mini.test.com. IN A 172.16.0.149
    Office-Mac-mini.test.com. IN HINFO "Mac Mini G4" "Mac OS X Leopard 10.5"
    N95.test.com. IN A 172.16.0.141
    N95.test.com. IN HINFO "Nokia N95 8GB" "Symbian OS"
    switch.test.com. IN A 172.16.0.173
    ucs.test.com. IN A 172.16.0.230
    LinksysPAP.test.com. IN A 172.16.0.152
    wireless.test.com. IN A 172.16.0.131
    trixbox.test.com. IN AAAA 2002:aaaa:aaaa:0000:020d:56ff:fe10:deb7
    trixbox.test.com. IN A 172.16.0.129
    trixbox.test.com. IN HINFO "Dell Precision Workstation" "Trixbox 2.6"
    trixbox.test.com. IN TXT "IP PBX"
    intranet.test.com. IN AAAA 2002:aaaa:aaaa:0000:0217:f2ff:fe04:35ec
    intranet.test.com. IN A 172.16.0.143
    lb.dns-sd.udp IN PTR test.com.
    test.com. IN MX 10 test.com.
    I hope this comes in handy for someone.
    Tony

    Tony,
    Be aware that your ;SERIAL directive MUST change if you made changes to the file.
    The <serial-number> directive is a numerical value incremented every time the zone file is altered to indicate it is time for named to reload the zone.
    I do not know for sure, but this might be why the data has not been wiped out or otherwise modified by Named or might have caused or is hiding some of the difficulty you experienced.
    Peter

  • Error while adding a record

    I am getting the following error while adding record into the table CM_RECIPE_ITEM :
    <h4> Error </h4>
    ORA-20505: Error in DML: p_rowid=626, p_alt_rowid=CRI_ID, p_rowid2=, p_alt_rowid2=. ORA-01410: invalid ROWID ORA-06512: at "COSTMAN.CM_RECIPE_ITEM_T3_AFTER", line 11 ORA-04088: error during execution of trigger 'COSTMAN.CM_RECIPE_ITEM_T3_AFTER'
         Error      Unable to process row of table CM_RECIPE_ITEM.
    Kindly suggest if the problem is because of the Global temporary table or the triggers given below. Also suggest the solution.
    Thanking You,
    Yogesh
    <h4> CM_RECIPE_ITEM Table </h4>
    CRI_ID------CRI_CR_ID--------CRI_BOM_CODE--------CRI_CIFG_CODE---------CRI_CIRM_CODE--------CRI_SEQ--------CRI_QTY--------CRI_RM_COST
    625----------464-----------------PRODUCT3001----------FG003----------------------10---------------------------1-------------------60-----------------10
    626----------464-----------------PRODUCT3001----------FG003----------------------12---------------------------2-------------------40------------------10
    <h4>Global temporary table</h4>
    DROP TABLE COSTMAN.INTERIM CASCADE CONSTRAINTS;
    CREATE GLOBAL TEMPORARY TABLE COSTMAN.INTERIM
    ROW_ID ROWID
    ON COMMIT PRESERVE ROWS
    NOCACHE;
    CREATE OR REPLACE TRIGGER COSTMAN."CM_RECIPE_ITEM_T3"
    BEFORE INSERT OR UPDATE ON "CM_RECIPE_ITEM" FOR EACH ROW
    BEGIN
    INSERT INTO interim VALUES (:new.rowid);
    END;
    <h4>Trigger to update data on CM_RECIPE table </h4>
    CREATE OR REPLACE TRIGGER COSTMAN."CM_RECIPE_ITEM_T3_AFTER"
    AFTER INSERT OR UPDATE ON "CM_RECIPE_ITEM"
    BEGIN
    FOR ds IN (SELECT row_id FROM interim) LOOP
    UPDATE CM_RECIPE
    SET CR_RMC = (
    SELECT SUM(CRI_QTY * CRI_RM_COST)/SUM(CR_QUANTITY)
    FROM CM_RECIPE_ITEM
    WHERE CRI_BOM_CODE = CR_BOM_CODE
    AND rowid = ds.row_id
    UPDATE CM_RECIPE
    SET CR_TOTAL_COST = (
    SELECT CIFG_PACKING + CIFG_OVERHEAD +CIFG_OTHERS
    FROM CM_ITEM_FG
    WHERE CIFG_CODE = CR_CIFG_CODE
    AND rowid = ds.row_id
    ) + CR_RMC;
    UPDATE CM_RECIPE
    SET CR_GROSS_MARGIN =
    (SELECT CIFG_DP_RATE
    FROM CM_ITEM_FG
    WHERE CIFG_CODE = CR_CIFG_CODE
    AND rowid = ds.row_id) - CR_TOTAL_COST) / CR_TOTAL_COST;
    END LOOP;
    END;
    /

    The scripts of the tables CM_ITEM_FG, CM_RECIPE, CM_RECIPE_ITEM are as follows :
    <h4>CM_ITEM_FG</h4>
    ALTER TABLE COSTMAN.CM_ITEM_FG
    DROP PRIMARY KEY CASCADE;
    DROP TABLE COSTMAN.CM_ITEM_FG CASCADE CONSTRAINTS;
    CREATE TABLE COSTMAN.CM_ITEM_FG
    CIFG_CODE VARCHAR2(13 BYTE) NOT NULL,
    CIFG_CCG_ID NUMBER NOT NULL,
    CIFG_NAME VARCHAR2(50 BYTE) NOT NULL,
    CIFG_PACKING NUMBER NOT NULL,
    CIFG_OVERHEAD NUMBER NOT NULL,
    CIFG_OTHERS NUMBER NOT NULL,
    CIFG_DP_RATE NUMBER NOT NULL,
    CIFG_CR_BY VARCHAR2(32 BYTE),
    CIFG_CR_ON DATE,
    CIFG_UPD_BY VARCHAR2(32 BYTE),
    CIFG_UPD_ON DATE
    TABLESPACE COST_MANAGER
    PCTUSED 0
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    LOGGING
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    MONITORING;
    CREATE UNIQUE INDEX COSTMAN.CM_ITEM_FG_PK_001 ON COSTMAN.CM_ITEM_FG
    (CIFG_CODE, CIFG_CCG_ID)
    LOGGING
    TABLESPACE COST_MANAGER
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    NOPARALLEL;
    CREATE UNIQUE INDEX COSTMAN.CM_ITEM_FG_UK_001 ON COSTMAN.CM_ITEM_FG
    (CIFG_CODE)
    LOGGING
    TABLESPACE COST_MANAGER
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    NOPARALLEL;
    CREATE OR REPLACE TRIGGER COSTMAN."CM_ITEM_FG_T1"
    BEFORE UPDATE ON "CM_ITEM_FG"
    FOR EACH ROW
    BEGIN
    BEGIN
    UPDATE CM_RECIPE
    SET CR_TOTAL_COST = (CR_RMC + :NEW.CIFG_PACKING + :NEW.CIFG_OVERHEAD + :NEW.CIFG_OTHERS);
    END;
    BEGIN
    UPDATE CM_RECIPE
    SET CR_GROSS_MARGIN = (:NEW.CIFG_DP_RATE - CR_TOTAL_COST) / CR_TOTAL_COST;
    END;
    END;
    ALTER TABLE COSTMAN.CM_ITEM_FG ADD (
    CONSTRAINT CM_ITEM_FG_PK_001
    PRIMARY KEY
    (CIFG_CODE, CIFG_CCG_ID)
    USING INDEX
    TABLESPACE COST_MANAGER
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    CONSTRAINT CM_ITEM_FG_UK_001
    UNIQUE (CIFG_CODE)
    USING INDEX
    TABLESPACE COST_MANAGER
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    ALTER TABLE COSTMAN.CM_ITEM_FG ADD (
    CONSTRAINT CM_ITEM_FG_FK_001
    FOREIGN KEY (CIFG_CCG_ID)
    REFERENCES COSTMAN.CM_COST_GROUP (CCG_ID));
    <h4>CM_RECIPE</H4>
    ALTER TABLE COSTMAN.CM_RECIPE
    DROP PRIMARY KEY CASCADE;
    DROP TABLE COSTMAN.CM_RECIPE CASCADE CONSTRAINTS;
    CREATE TABLE COSTMAN.CM_RECIPE
    CR_ID NUMBER NOT NULL,
    CR_CCG_ID NUMBER,
    CR_EFF_FROM DATE,
    CR_CIFG_CODE VARCHAR2(10 BYTE) NOT NULL,
    CR_BOM_CODE VARCHAR2(50 BYTE),
    CR_QUANTITY NUMBER,
    CR_RMC NUMBER,
    CR_TOTAL_COST NUMBER,
    CR_GROSS_MARGIN NUMBER,
    CR_CR_BY VARCHAR2(32 BYTE),
    CR_CR_ON DATE,
    CR_UPD_BY VARCHAR2(32 BYTE),
    CR_UPD_ON DATE
    TABLESPACE COST_MANAGER
    PCTUSED 0
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    LOGGING
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    MONITORING;
    CREATE UNIQUE INDEX COSTMAN.CM_RECIPE_PK_001 ON COSTMAN.CM_RECIPE
    (CR_CCG_ID, CR_ID, CR_CIFG_CODE)
    LOGGING
    TABLESPACE COST_MANAGER
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    NOPARALLEL;
    CREATE UNIQUE INDEX COSTMAN.CM_RECIPE_UK_001 ON COSTMAN.CM_RECIPE
    (CR_ID)
    LOGGING
    TABLESPACE COST_MANAGER
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    NOPARALLEL;
    CREATE UNIQUE INDEX COSTMAN.CM_RECIPE_UK_002 ON COSTMAN.CM_RECIPE
    (CR_BOM_CODE)
    LOGGING
    TABLESPACE COST_MANAGER
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    NOPARALLEL;
    CREATE OR REPLACE TRIGGER COSTMAN."CM_RECIPE_T1"
    BEFORE INSERT ON "CM_RECIPE"
    FOR EACH ROW
    DECLARE
    L_ID NUMBER;
    BEGIN
    IF INSERTING THEN
    IF :NEW.CR_ID IS NULL THEN
    --SELECT CM_RECIPE_SEQ.NEXTVAL INTO L_ID FROM DUAL;
    :NEW.CR_ID := CM_RECIPE_SEQ.NEXTVAL; --L_ID;
    END IF;
    :NEW.CR_CR_ON := SYSDATE;
    :NEW.CR_CR_BY := nvl(v('APP_USER'),USER);
    END IF;
    IF UPDATING THEN
    :NEW.CR_UPD_ON := SYSDATE;
    :NEW.CR_UPD_BY := nvl(v('APP_USER'),USER);
    END IF;
    END;
    ALTER TABLE COSTMAN.CM_RECIPE ADD (
    CHECK ("CR_EFF_FROM" IS NOT NULL) DISABLE,
    CHECK ("CR_CCG_ID" IS NOT NULL) DISABLE,
    CHECK ("CR_QUANTITY" IS NOT NULL) DISABLE,
    CHECK ("CR_QUANTITY" IS NOT NULL) DISABLE,
    CHECK ("CR_QUANTITY" IS NOT NULL) DISABLE,
    CHECK ("CR_QUANTITY" IS NOT NULL) DISABLE,
    CHECK ("CR_QUANTITY" IS NOT NULL) DISABLE,
    CHECK ("CR_QUANTITY" IS NOT NULL) DISABLE,
    CONSTRAINT CM_RECIPE_PK_001
    PRIMARY KEY
    (CR_ID)
    USING INDEX
    TABLESPACE COST_MANAGER
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    CONSTRAINT CM_RECIPE_UK_002
    UNIQUE (CR_BOM_CODE)
    USING INDEX
    TABLESPACE COST_MANAGER
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    <h4>CM_RECIPE_ITEM</H4>
    ALTER TABLE COSTMAN.CM_RECIPE_ITEM
    DROP PRIMARY KEY CASCADE;
    DROP TABLE COSTMAN.CM_RECIPE_ITEM CASCADE CONSTRAINTS;
    CREATE TABLE COSTMAN.CM_RECIPE_ITEM
    CRI_ID NUMBER NOT NULL,
    CRI_CR_ID NUMBER NOT NULL,
    CRI_BOM_CODE VARCHAR2(50 BYTE) NOT NULL,
    CRI_CIFG_CODE VARCHAR2(10 BYTE) NOT NULL,
    CRI_CIRM_CODE VARCHAR2(10 BYTE) NOT NULL,
    CRI_SEQ NUMBER,
    CRI_QTY NUMBER,
    CRI_RM_COST NUMBER,
    CRI_CR_BY VARCHAR2(32 BYTE),
    CRI_CR_ON DATE,
    CRI_UPD_BY VARCHAR2(32 BYTE),
    CRI_UPD_ON DATE
    TABLESPACE COST_MANAGER
    PCTUSED 0
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    LOGGING
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    MONITORING;
    CREATE UNIQUE INDEX COSTMAN.CM_RECIPE_ITEM_PK_001 ON COSTMAN.CM_RECIPE_ITEM
    (CRI_ID)
    LOGGING
    TABLESPACE COST_MANAGER
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    NOPARALLEL;
    CREATE OR REPLACE TRIGGER COSTMAN."CM_RECIPE_ITEM_T2"
    BEFORE INSERT OR UPDATE ON "CM_RECIPE_ITEM"
    FOR EACH ROW
    BEGIN
    IF :NEW.CRI_CR_ID IS NULL THEN
    SELECT CR_ID INTO :NEW.CRI_CR_ID
    FROM CM_RECIPE
    WHERE CR_BOM_CODE = :NEW.CRI_BOM_CODE;
    END IF;
    END;
    CREATE OR REPLACE TRIGGER COSTMAN."CM_RECIPE_ITEM_T1" BEFORE
    INSERT OR UPDATE ON "CM_RECIPE_ITEM" FOR EACH ROW
    DECLARE
    L_ID NUMBER;
    SEQ NUMBER;
    BEGIN
    IF INSERTING THEN
    IF :NEW.CRI_ID IS NULL THEN
    SELECT CM_RECIPE_ITEM_SEQ.NEXTVAL
    INTO :NEW.CRI_ID
    FROM dual;
    END IF;
    :NEW.CRI_CR_ON := SYSDATE;
    :NEW.CRI_CR_BY := NVL(v('APP_USER'),USER);
    SELECT (NVL(MAX(CRI_SEQ),0)+1)
    INTO SEQ
    FROM CM_RECIPE_ITEM
    WHERE CRI_BOM_CODE = :NEW.CRI_BOM_CODE;
    :NEW.CRI_SEQ := SEQ;
    END IF;
    IF UPDATING THEN
    :NEW.CRI_UPD_ON := SYSDATE;
    :NEW.CRI_UPD_BY := NVL(v('APP_USER'),USER);
    END IF;
    END;
    ALTER TABLE COSTMAN.CM_RECIPE_ITEM ADD (
    CHECK ("CRI_RM_COST" IS NOT NULL) DISABLE,
    CHECK ("CRI_QTY" IS NOT NULL) DISABLE,
    CHECK ("CRI_SEQ" IS NOT NULL) DISABLE,
    CONSTRAINT CM_RECIPE_ITEM_PK_001
    PRIMARY KEY
    (CRI_ID)
    USING INDEX
    TABLESPACE COST_MANAGER
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    ALTER TABLE COSTMAN.CM_RECIPE_ITEM ADD (
    CONSTRAINT CM_RECIPE_FK_002
    FOREIGN KEY (CRI_CIRM_CODE)
    REFERENCES COSTMAN.CM_ITEM_RM (CIRM_CODE),
    CONSTRAINT CM_RECIPE_ITEM_FK_001
    FOREIGN KEY (CRI_CR_ID)
    REFERENCES COSTMAN.CM_RECIPE (CR_ID));
    Yogesh

  • Adding a Record in Tabular Form

    I created a tabular report using apex_collections. Now I have created by apex_collection.add_member . It is successfully adding a new record. But I need to jump off to the last screen to view the blank record.
    Any solution to display that in the current page or jump off to the last page when the "Add Record" button is clicked.
    Thanks
    Deb

    Hi,
    Your newly added row is going to the bottom possibly because you have given 'ORDER BY SEQ_ID' in your region query. The ADD_MEMBER apeends, so the new row goes to the bottom.
    You have to make the new row appear on top. The options are
    Option 1:
    Use the apex_collection.MOVE_MEMBER_UP and MOVE_MEMBER_DOWN API to take new member to SEQ_ID = 1
    You can perform this resequencing in a process that is conditionally executed in Add Rows.
    Option 2:
    Add a sorting column to your query
    select .......from ......where....
    order by decode(<pk_col>,null,0,1), to_number(seq_id)
    order by Of course, if you change the Order By clause then you will need to make identical change in Validations , Computatiosn and Processes where you are working on the Collection.
    Regards,

  • Adding multiple records in a LightSwitch application

    I have been requested to add a new feature to my current LightSwitch application that is used to manage our employee training programme.  The problem revolves around the ability to create training needs for a multiple set of employees, instead of having
    to create each training need individually.  The obvious benefit being reduced input for the team leaders, who have to create them for their respective teams.
    The data schema looks like this:
    I have tried to implement a Many to Many Relationship (Andy Kung) but it doesn't appear to meet the requirements.
    The idea is to add some Local Properties for the team leader to Select the Course, and other required fields to capture the details of the training need.  Then to provide two data grids / lists, one which shows all employees reporting to the team
    leader the other showing which employees have been selected for the training need. I'm thinking that this should be a list of employees that once the record is saved I'd execute some code to create new training needs for each of the selected employees. 
    Am I going about this in the correct way for a LightSwitch application?  Any ideas would be appreciated.

    It may be a problem of too many relationships. If it's a case where a Class can have multiple Employees, and an Employee can have multiple Classes, the easiest solution is to make a third table linking the two and use that table to manipulate the info.
    Let's say the Class table has the following fields:
    ID
    ClassName
    ClassLocation
    ClassTime
    ClassInstructor
    and our Employee table has:
    ID
    EmployeeName
    EmployeeDepartment
    and whatever other fields you track on both, it doesn't really matter. These two tables should NOT have a relationship defined because many-to-many relationships aren't supported. (well, not directly, anyway.)
    To create the Link table that solves the problem, simply create a new table in Lightswitch, but don't put any fields in it. (You can do that later, but working with the simplest version will show you how easy this is.)  Let's call it ClassStudentLink. 
    ClassStudentLink only has one field, the auto-created Id field. Now, create a 1-to-many relationship to the Class table (which adds a collection of ClassStudentLinks to the Class table) and then another 1-to-many relationship to the Employee table (which
    adds a collection of ClassStudentLinks to that one, too.)
    Now you can create a Common Screen Set on this new link table.  When you go to the Add New ClassStudentLink screen, you get two modal pickers, once for Class, and one for Employee. Pick one of each, and save, and you just enrolled an Employee in your
    Class.
    From the Class table's View Class screens you can now add the child Link items which point to one Student each (i.e., click Add ClassStudentLinks on the data model on the left and drag it into a group on the screen. Do the same with the ClassStudentLink
    table to add the linked Employee (because there will only be one for each link) and remove all the Link table fields from the screen but the Employee Name from the child (well, grandchild) record, because that's the only one you're interested in anyway.
    You can do the exact same thing for the View Employee screen now, seeing which classes each selected Employee is enrolled in by adding the Link table there, too.
    To show a Class roster, start with the Link table, change its Query filter to a selected Class, then display the EmployeeNames from the linked record.  To show a Class Transcript for an Employee, start with the Link table again, but set its Query
    filter to a selected Employee.
    What would really be nice is if you could set the Summary property of the Link table on the fly to point to a field in either of the related child tables, but I don't think it's possible.  Perhaps with pre-defined Queries in the data model, one going
    each way, but I think you're limited to fields in the primary table only, not a child table.

  • Master detail refresh when adding new record

    Guys,
    Can't believe I need to ask this question ....but here we go
    when adding new master record --> I want to refresh the detail record..... in my case old detail records stays as it is until i click the save button
    for detail panelformlayout-->partial trigger--> i set the ids of master panelformlayout and newMasterrecord button..... but still it doesn't refresh the child record when new master record is being created.....
    any thought will be greatly appreciated

    In application module it works fine......
    Even on the page when i click next/previous button on masters it refreshes details information.
    but when i click the button "create" it doesn't refreshes details...... (but when i save the information, i certainly see the updated details)
    seems like there is some settings or binding i need to check but can't able to find one.....
    any help is greatly appreciated

  • Other ways of adding audio recording to presentations Adobe Presenter 8?

    Hi there,
    I just realised that I asked a question in the wrong language! I have a quick question re. audio recording in AP8. Is there anyway to add audio to a presnetation other than with a traditional recording device? i.e. can audio be recorded via PC or telepohne and then be added to the presentation? if so, how?
    Many thanks!
    KH

    You can use the Import Audio tool to import any MP3 or WAV audio file. Presenter doesn't care where the audio file comes from, so as long as you can record the audio as one of those two file types, or convert it to one of those file types, you should be able to bring it into Presenter.
    To simplify the process, you may want to break up the audio files so there is one for each slide, but this can be done in the audio editor if needed.

  • Data Load - Added & Transferred Record Miss Match

    Hi to all,
    I am loading data R/3 -> infoCube in 3.x, I can see that too much difference between Transferred and Added Record , Ex Transferred record -> 5032704 & Added record -> 3505696.
    I have checked there is no routine has been written .
    In Selection I have given a range for Object No.
    For 10000 to 99999 Object No Transferred and Added record is same.
    But KSM100 to KSM999 I am getting difference between added and transferred record.
    Please any one help me .
    Thanks in advance
    shalini

    Not all the times would the records would get added to your fact table. You may write an update rule for "not to update certain records". In such cases you may find the transfered and added records different. Another instance could be when you split the incoming record into 2 records in the update rules. In such an instance the no. of added records would be greater than transfered records.
    Re: difference i transfered records and added records
    Re: manage infocube

  • After adding SPF records for Hybrid Development some external mails bounced back with error SPF Unauthorized mail is prohibited.

    Added v=spf1 include:spf.protection.outlook.com -all and the txt token for the Exchange 2013 hybrid configuration, now some mails bounced back with the error "SPF Unauthorized mail is prohibited". What could be the cause? Should I customized
    the SPF record but it is not mentioned in the procedures for Hybrid configuration to do that. 

    Hi,
    Would you like to mark Ed's reply as an answer so that others can find the solution easily.
    Have a nice day : )
    Thanks
    Mavis
    Mavis Huang
    TechNet Community Support

Maybe you are looking for

  • Core duo mini crashing occasionally - how to find the cause?

    My core duo Mac mini crashes itself every now and then. The screen goes blank for a couple of seconds and the machine reboots with no explanation. This happens about three or four times a month. It has happened in the middle of the night with no acti

  • Error -36 while trying to move files on SMB mounted NAS

    Hey, I have been experiencing an error -36 while trying to move files around on my NAS. I have the feeling it has something to do with insufficient privileges that are being acquired. When mounting in windows explorer no problems arise. When using th

  • ADE Not Compatible With Password Protected PDF Files

    The version of ADE I downloaded will not work with password protected PDF files.  What do I do? Thanks.

  • How do i get access to a Hard Disk Drive

    Can anyone tell me how to access info in C: for example, someone told me it was using the IO object, but i dont know how, please help me. Thanx

  • 10.2 EM: Wrong host in data guard page

    Hi. I've installed 10.2 OEM on my host to control my oracle environment. I've a fail over cluster on 2 Solaris 9 host and some 10.1 instances on 2 logical host. I've configured one agent per host and one agent per logical host on every physical host.