Reservation with Process_order API

HI
When Passing the Reserved_quantity in Process_order API, is there any way to make reservation to particular Warehouse,
for example i need to reseve quantity in 'WHS'(Subinventory) not on any others,
i am able to do it using Reservation API, but can i do the same with Process_order
Thanks
Edited by: user469514 on Oct 10, 2008 10:32 AM

If you create the order line with the subinventory and if the item is not serial, lot or revision controlled item then it will reserve automatically at the suinventory level. If the item has any of those controls, obviously you have to use reservation API.
Thanks
Nagamohan

Similar Messages

  • Issues in creating the sales order with oe_order_pub.process_order api

    Hi All,
    I am trying to create a sales order with BOOKED status using oe_order_pub.process_order api, and I am getting response as
    <X_RETURN_STATUS>E</X_RETURN_STATUS>
              <X_MSG_COUNT>1</X_MSG_COUNT>
              <X_MSG_DATA>ONTOE_LOCK_ROW_DELETED</X_MSG_DATA>
    Can any one help me in fixing this issue ..!
    Thanks,
    Vamsi…
    Edited by: user11147471 on Jul 9, 2009 2:02 AM

    When using the API, are you trying to create the order as booked using the booked flag or the book action?  I would recommend using the action if you are not. To troubleshoot, I would try the API without booking and then use the following article to determine the issue:
    Unable To Setup A Credit Card Bank Account For The Customer. CC Information On The Order Is Not Valid (Doc ID 1450936.1)

  • How can I create a reserve invoice with DI API?

    HI,
    I need to create a reserve invoice with DI API, how do I this?.  I have SAP B1 2005A.
    Sorry for my english.
    Thank's.

    Hi César,
    Unfortunately, I think the reserve invoice is only available in the DI API in version 2007A.
    Kind Regards,
    Owen

  • Process_order API() with bank account process flow in 11i

    Hi all,
    I want to know the basic process flow for customer bank account creation and assignment process. I.e I had pass the customer details ,credit card information throw the oe_order_pub.process_order() API .after this processing this api ,how the bank account creation and updation process works? , and it's process flow.
    process_order API manual process:
    BEGIN
    l_header_rec := OE_ORDER_PUB.G_MISS_HEADER_REC;
    l_header_rec.header_id := '100192';
    l_header_rec.credit_card_holder_name := 'myname';
    l_header_rec.credit_card_number := 'xxxxxxxxxxxxxxxx1111';
    l_header_rec.credit_card_expiration_date := '1-Jan-28';
    l_header_rec.credit_card_code := 'VISA';
    l_header_rec.payment_type_code := 'CREDIT_CARD';
    l_header_rec.sold_to_org_id := '17118';
    l_header_rec.credit_card_approval_code := '34545656676';
    l_header_rec.operation := OE_GLOBALS.G_OPR_UPDATE;
    OE_ORDER_PUB.process_order (p_api_version_number => 1.0
    , p_init_msg_list => fnd_api.g_false
    , p_return_values => fnd_api.g_false
    , p_action_commit => fnd_api.g_false
    , x_return_status => l_return_status
    , x_msg_count => l_msg_count
    , x_msg_data => l_msg_data
    , p_header_rec => l_header_rec
    , p_line_tbl => l_line_tbl
    , p_action_request_tbl => l_action_request_tbl
    x_header_rec => l_header_rec
    , x_header_val_rec => x_header_val_rec
    , x_Header_Adj_tbl => x_Header_Adj_tbl
    , x_Header_Adj_val_tbl => x_Header_Adj_val_tbl
    , x_Header_price_Att_tbl => x_Header_price_Att_tbl
    , x_Header_Adj_Att_tbl => x_Header_Adj_Att_tbl
    , x_Header_Adj_Assoc_tbl => x_Header_Adj_Assoc_tb
    ............etc );
    END;
    After this api process , how the bank account will update regarding this value.
    Thanks
    prabu

    Hi all,
    I want to know the basic process flow for customer bank account creation and assignment process. I.e I had pass the customer details ,credit card information throw the oe_order_pub.process_order() API .after this processing this api ,how the bank account creation and updation process works? , and it's process flow.
    process_order API manual process:
    BEGIN
    l_header_rec := OE_ORDER_PUB.G_MISS_HEADER_REC;
    l_header_rec.header_id := '100192';
    l_header_rec.credit_card_holder_name := 'myname';
    l_header_rec.credit_card_number := 'xxxxxxxxxxxxxxxx1111';
    l_header_rec.credit_card_expiration_date := '1-Jan-28';
    l_header_rec.credit_card_code := 'VISA';
    l_header_rec.payment_type_code := 'CREDIT_CARD';
    l_header_rec.sold_to_org_id := '17118';
    l_header_rec.credit_card_approval_code := '34545656676';
    l_header_rec.operation := OE_GLOBALS.G_OPR_UPDATE;
    OE_ORDER_PUB.process_order (p_api_version_number => 1.0
    , p_init_msg_list => fnd_api.g_false
    , p_return_values => fnd_api.g_false
    , p_action_commit => fnd_api.g_false
    , x_return_status => l_return_status
    , x_msg_count => l_msg_count
    , x_msg_data => l_msg_data
    , p_header_rec => l_header_rec
    , p_line_tbl => l_line_tbl
    , p_action_request_tbl => l_action_request_tbl
    x_header_rec => l_header_rec
    , x_header_val_rec => x_header_val_rec
    , x_Header_Adj_tbl => x_Header_Adj_tbl
    , x_Header_Adj_val_tbl => x_Header_Adj_val_tbl
    , x_Header_price_Att_tbl => x_Header_price_Att_tbl
    , x_Header_Adj_Att_tbl => x_Header_Adj_Att_tbl
    , x_Header_Adj_Assoc_tbl => x_Header_Adj_Assoc_tb
    ............etc );
    END;
    After this api process , how the bank account will update regarding this value.
    Thanks
    prabu

  • How to use OE_ORDER_PUB.PROCESS_ORDER API for serial controlled items?

    Hi Guys
    We are using OE_ORDER_PUB.PROCESS_ORDER API with a custom application (R12 12.0.4/12.0.6) for booking sales orders. Right now we don't have serial controlled items, however pretty soon, we will launch medical equipment sales for which we have to start using serial controlled items.
    Anybody has a sample script for the API dealing with serial controlled items?
    Regards,
    Raj

    What kind of serial number related information do you capture during order creation?
    Most businesses either generate serial numbers at the time of Sales order issue OR at wip completion.
    Sometimes a serial number is generated at WIP assembly begin.
    In any case, as long as you don't ALLOCATE serial numbers to a sales order at the time of entry or booking or reservation, you won't need to worry about serial# for oe_order_pub.
    The serial# will come into picture for RMA processing. For that, you can use l_lot_serial_tbl_out oe_order_pub.lot_serial_tbl_type in the oe_order_pub. This will let you record the serial number for the product that is being returned.
    Sandeep Gandhi

  • Process_Order API is not working in OM - r12.1.3

    Hello,
    I am writing a process_order API to create sales orders in Oracle from  Blanket Sales Agreements.  But below mentioned API is neither throwing any errors nor it is importing. Not sure what am I missing.   Complete code is mentioned below.
    Hope to get lucky in getting advise from gurus on this forum.
    code
    /* Formatted on 8/15/2013 2:54:52 PM (QP5 v5.252.13127.32867) */
    CREATE OR REPLACE PACKAGE BODY XXCH_BSA_ORDER
    IS
       PROCEDURE BSA_PROCESS_ORDER (errbuf             OUT VARCHAR2,
                                    retcode            OUT VARCHAR2,
                                    p_blanket_number       NUMBER,
                                    p_blanket_line         NUMBER,
                                    p_select               VARCHAR2,
                                    p_order_type           NUMBER,
                                    p_copies               NUMBER)
       AS
          v_error   VARCHAR2 (2000);
       BEGIN
          INSERT INTO LOGFILE (STEPID, MODULE)
               VALUES (1, 'VERIZON');
          COMMIT;
          FOR i IN 1 .. p_copies
          LOOP
             INSERT INTO LOGFILE (STEPID, MODULE)
                  VALUES (2, 'VERIZON');
             BSA_API (p_blanket_number   => p_blanket_number,
                      p_blanket_line     => p_blanket_line,
                      p_select           => p_select,
                      p_order_type       => p_order_type);
          END LOOP;
       EXCEPTION
          WHEN OTHERS
          THEN
             v_error := SQLERRM;
             RAISE_APPLICATION_ERROR (-20001, v_error);
       END;
       PROCEDURE BSA_API (p_blanket_number    NUMBER,
                          p_blanket_line      NUMBER,
                          p_select            VARCHAR2,
                          p_order_type        NUMBER)
       AS
          l_header_rec                   oe_order_pub.header_rec_type;
          l_line_tbl                     oe_order_pub.line_tbl_type;
          l_action_request_tbl           oe_order_pub.request_tbl_type;
          l_header_adj_tbl               oe_order_pub.header_adj_tbl_type;
          l_line_adj_tbl                 oe_order_pub.line_adj_tbl_type;
          l_header_scr_tbl               oe_order_pub.header_scredit_tbl_type;
          l_line_scredit_tbl             oe_order_pub.line_scredit_tbl_type;
          l_request_rec                  oe_order_pub.request_rec_type;
          l_return_status                VARCHAR2 (3000);
          l_msg_count                    NUMBER;
          l_msg_data                     VARCHAR2 (3000);
          p_api_version_number           NUMBER := 1.0;
          p_init_msg_list                VARCHAR2 (1000) := fnd_api.g_true;
          p_return_values                VARCHAR2 (1000) := fnd_api.g_true;
          p_action_commit                VARCHAR2 (1000) := fnd_api.g_true;
          x_return_status                VARCHAR2 (10);
          x_msg_count                    NUMBER;
          x_msg_data                     VARCHAR2 (3000);
          p_header_rec                   oe_order_pub.header_rec_type
                                            := oe_order_pub.g_miss_header_rec;
          p_old_header_rec               oe_order_pub.header_rec_type
                                            := oe_order_pub.g_miss_header_rec;
          p_header_val_rec               oe_order_pub.header_val_rec_type
                                            := oe_order_pub.g_miss_header_val_rec;
          p_old_header_val_rec           oe_order_pub.header_val_rec_type
                                            := oe_order_pub.g_miss_header_val_rec;
          p_header_adj_tbl               oe_order_pub.header_adj_tbl_type
                                            := oe_order_pub.g_miss_header_adj_tbl;
          p_old_header_adj_tbl           oe_order_pub.header_adj_tbl_type
                                            := oe_order_pub.g_miss_header_adj_tbl;
          p_header_adj_val_tbl           oe_order_pub.header_adj_val_tbl_type
                                            := oe_order_pub.g_miss_header_adj_val_tbl;
          p_old_header_adj_val_tbl       oe_order_pub.header_adj_val_tbl_type
                                            := oe_order_pub.g_miss_header_adj_val_tbl;
          p_header_price_att_tbl         oe_order_pub.header_price_att_tbl_type
             := oe_order_pub.g_miss_header_price_att_tbl;
          p_old_header_price_att_tbl     oe_order_pub.header_price_att_tbl_type
             := oe_order_pub.g_miss_header_price_att_tbl;
          p_header_adj_att_tbl           oe_order_pub.header_adj_att_tbl_type
             := oe_order_pub.g_miss_header_adj_att_tbl;
          p_old_header_adj_att_tbl       oe_order_pub.header_adj_att_tbl_type
             := oe_order_pub.g_miss_header_adj_att_tbl;
          p_header_adj_assoc_tbl         oe_order_pub.header_adj_assoc_tbl_type
             := oe_order_pub.g_miss_header_adj_assoc_tbl;
          p_old_header_adj_assoc_tbl     oe_order_pub.header_adj_assoc_tbl_type
             := oe_order_pub.g_miss_header_adj_assoc_tbl;
          p_header_scredit_tbl           oe_order_pub.header_scredit_tbl_type
             := oe_order_pub.g_miss_header_scredit_tbl;
          p_old_header_scredit_tbl       oe_order_pub.header_scredit_tbl_type
             := oe_order_pub.g_miss_header_scredit_tbl;
          p_header_scredit_val_tbl       oe_order_pub.header_scredit_val_tbl_type
             := oe_order_pub.g_miss_header_scredit_val_tbl;
          p_old_header_scredit_val_tbl   oe_order_pub.header_scredit_val_tbl_type
             := oe_order_pub.g_miss_header_scredit_val_tbl;
          p_line_tbl                     oe_order_pub.line_tbl_type
                                            := oe_order_pub.g_miss_line_tbl;
          p_old_line_tbl                 oe_order_pub.line_tbl_type
                                            := oe_order_pub.g_miss_line_tbl;
          p_line_val_tbl                 oe_order_pub.line_val_tbl_type
                                            := oe_order_pub.g_miss_line_val_tbl;
          p_old_line_val_tbl             oe_order_pub.line_val_tbl_type
                                            := oe_order_pub.g_miss_line_val_tbl;
          p_line_adj_tbl                 oe_order_pub.line_adj_tbl_type
                                            := oe_order_pub.g_miss_line_adj_tbl;
          p_old_line_adj_tbl             oe_order_pub.line_adj_tbl_type
                                            := oe_order_pub.g_miss_line_adj_tbl;
          p_line_adj_val_tbl             oe_order_pub.line_adj_val_tbl_type
             := oe_order_pub.g_miss_line_adj_val_tbl;
          p_old_line_adj_val_tbl         oe_order_pub.line_adj_val_tbl_type
             := oe_order_pub.g_miss_line_adj_val_tbl;
          p_line_price_att_tbl           oe_order_pub.line_price_att_tbl_type
             := oe_order_pub.g_miss_line_price_att_tbl;
          p_old_line_price_att_tbl       oe_order_pub.line_price_att_tbl_type
             := oe_order_pub.g_miss_line_price_att_tbl;
          p_line_adj_att_tbl             oe_order_pub.line_adj_att_tbl_type
             := oe_order_pub.g_miss_line_adj_att_tbl;
          p_old_line_adj_att_tbl         oe_order_pub.line_adj_att_tbl_type
             := oe_order_pub.g_miss_line_adj_att_tbl;
          p_line_adj_assoc_tbl           oe_order_pub.line_adj_assoc_tbl_type
             := oe_order_pub.g_miss_line_adj_assoc_tbl;
          p_old_line_adj_assoc_tbl       oe_order_pub.line_adj_assoc_tbl_type
             := oe_order_pub.g_miss_line_adj_assoc_tbl;
          p_line_scredit_tbl             oe_order_pub.line_scredit_tbl_type
             := oe_order_pub.g_miss_line_scredit_tbl;
          p_old_line_scredit_tbl         oe_order_pub.line_scredit_tbl_type
             := oe_order_pub.g_miss_line_scredit_tbl;
          p_line_scredit_val_tbl         oe_order_pub.line_scredit_val_tbl_type
             := oe_order_pub.g_miss_line_scredit_val_tbl;
          p_old_line_scredit_val_tbl     oe_order_pub.line_scredit_val_tbl_type
             := oe_order_pub.g_miss_line_scredit_val_tbl;
          p_lot_serial_tbl               oe_order_pub.lot_serial_tbl_type
                                            := oe_order_pub.g_miss_lot_serial_tbl;
          p_old_lot_serial_tbl           oe_order_pub.lot_serial_tbl_type
                                            := oe_order_pub.g_miss_lot_serial_tbl;
          p_lot_serial_val_tbl           oe_order_pub.lot_serial_val_tbl_type
             := oe_order_pub.g_miss_lot_serial_val_tbl;
          p_old_lot_serial_val_tbl       oe_order_pub.lot_serial_val_tbl_type
             := oe_order_pub.g_miss_lot_serial_val_tbl;
          p_action_request_tbl           oe_order_pub.request_tbl_type
                                            := oe_order_pub.g_miss_request_tbl;
          x_header_val_rec               oe_order_pub.header_val_rec_type;
          x_header_adj_tbl               oe_order_pub.header_adj_tbl_type;
          x_header_adj_val_tbl           oe_order_pub.header_adj_val_tbl_type;
          x_header_price_att_tbl         oe_order_pub.header_price_att_tbl_type;
          x_header_adj_att_tbl           oe_order_pub.header_adj_att_tbl_type;
          x_header_adj_assoc_tbl         oe_order_pub.header_adj_assoc_tbl_type;
          x_header_scredit_tbl           oe_order_pub.header_scredit_tbl_type;
          x_header_scredit_val_tbl       oe_order_pub.header_scredit_val_tbl_type;
          x_line_val_tbl                 oe_order_pub.line_val_tbl_type;
          x_line_adj_tbl                 oe_order_pub.line_adj_tbl_type;
          x_line_adj_val_tbl             oe_order_pub.line_adj_val_tbl_type;
          x_line_price_att_tbl           oe_order_pub.line_price_att_tbl_type;
          x_line_adj_att_tbl             oe_order_pub.line_adj_att_tbl_type;
          x_line_adj_assoc_tbl           oe_order_pub.line_adj_assoc_tbl_type;
          x_line_scredit_tbl             oe_order_pub.line_scredit_tbl_type;
          x_line_scredit_val_tbl         oe_order_pub.line_scredit_val_tbl_type;
          x_lot_serial_tbl               oe_order_pub.lot_serial_tbl_type;
          x_lot_serial_val_tbl           oe_order_pub.lot_serial_val_tbl_type;
          x_action_request_tbl           oe_order_pub.request_tbl_type;
          x_debug_file                   VARCHAR2 (100);
          l_line_tbl_index               NUMBER;
          l_msg_index_out                NUMBER;
          l_user_id                      fnd_user.user_id%TYPE;
          l_appl_id                      fnd_application.application_id%TYPE;
          l_resp_id                      fnd_responsibility.responsibility_id%TYPE;
          l_org_id                       hr_operating_units.organization_id%TYPE;
          l_sold_to_org_id               hz_cust_accounts.cust_account_id%TYPE;
          l_ship_to_org_id               hz_cust_site_uses_all.site_use_id%TYPE;
          l_cust_acct_site_id            hz_cust_acct_sites_all.cust_acct_site_id%TYPE;
          l_party_id                     hz_parties.party_id%TYPE;
          l_price_list_id                qp_list_headers_b.list_header_id%TYPE;
          l_primary_salesrep_id          ra_salesreps.salesrep_id%TYPE;
          l_order_type_id                oe_transaction_types_all.transaction_type_id%TYPE;
          l_order_line_type_id           oe_transaction_types_all.transaction_type_id%TYPE;
          l_order_category_code          oe_transaction_types_all.order_category_code%TYPE;
          l_inventory_item_id            mtl_system_items_b.inventory_item_id%TYPE;
          l_currency_code                qp_list_headers.currency_code%TYPE;
          l_party_site_id                hz_party_sites.party_site_id%TYPE;
          xbreak                         VARCHAR2 (33);
          errorx                         VARCHAR2 (3000);
          k                              INTEGER := 0;
          CURSOR BlanketHeader
          IS
             SELECT *
               FROM oe_blanket_headers_all
              WHERE header_id = p_blanket_number;
          CURSOR BlanketLines (
             v_agreement_id    NUMBER)
          IS
             SELECT *
               FROM oe_blanket_lines_all
              WHERE     header_id = v_agreement_id
                    AND line_number = NVL (p_blanket_line, line_number);
       BEGIN
          -- Create Header
          xbreak := '100';
          fnd_global.apps_initialize (12647, 51839, 660);
          --       pass in user_id, responsibility_id, and application_id
          oe_msg_pub.initialize;
          oe_debug_pub.initialize;
          l_org_id := fnd_profile.VALUE ('ORG_ID');
          xbreak := '101';
          fnd_file.Put_line (
             fnd_file.LOG,
             '*********************************************** BOOK ORDER **************************');
          fnd_file.put_line (fnd_file.LOG,
                             'Begining of the procedure Book Order');
          --    Initialize header record
          xbreak := '102';
          FOR i IN BlanketHeader
          LOOP
          insert into logfile(stepid,module) values (23,'BPO:'||to_char(i.header_id));
           l_header_rec := oe_order_pub.g_miss_header_rec;
             xbreak := '103';
             l_header_rec.cust_po_number := i.cust_po_number;
             l_header_rec.ordered_date := SYSDATE;
             l_header_rec.salesrep_id := i.salesrep_id;
             l_header_rec.order_type_id := p_order_type;
             l_header_rec.operation := oe_globals.g_opr_create; --Specifies that Order is getting created
             --xbreak := '104';
             l_header_rec.order_category_code := 'ORDER';
             --         l_num_tbl_index := 1;
             l_header_rec.booked_flag := 'Y';
             xbreak := '105';
             l_header_rec.sold_to_org_id := i.sold_to_org_id;
             l_header_rec.invoice_to_org_id := i.invoice_to_org_id;
             l_header_rec.ship_to_org_id := i.ship_to_org_id;
             l_header_rec.price_list_id := i.price_list_id;
             --Create Line record
             FOR j IN BlanketLines(i.header_id)
             LOOP
                l_line_tbl_index := 1;
                -- FIRST LINE RECORD
                -- Initialize record to missing
                l_line_tbl (l_line_tbl_index) := oe_order_pub.g_miss_line_rec;
                -- Line attributes
                l_line_tbl (l_line_tbl_index).inventory_item_id :=
                   j.inventory_item_id;
                l_line_tbl (l_line_tbl_index).ordered_quantity := 1;
                -- Set to 'N' when you need to pass unit_selling_price
                l_line_tbl (l_line_tbl_index).calculate_price_flag := 'N';
                l_line_tbl (l_line_tbl_index).unit_selling_price := NULL;
                l_line_tbl (l_line_tbl_index).ship_from_org_id := j.org_id;
                l_line_tbl (l_line_tbl_index).operation := oe_globals.g_opr_create;
             END LOOP;
    x_debug_file := oe_debug_pub.set_debug_mode ('FILE');
    oe_debug_pub.setdebuglevel (5);
             oe_order_pub.process_order (
                p_org_id  => l_org_id,
                p_operating_unit => l_org_id,
                p_api_version_number       => 1.0,
                p_init_msg_list            => fnd_api.g_true,
                p_return_values            => fnd_api.g_true,
                p_action_commit            => fnd_api.g_true,
                x_return_status            => l_return_status,
                x_msg_count                => l_msg_count,
                x_msg_data                 => l_msg_data,
                p_header_rec               => l_header_rec,
                p_line_tbl                 => l_line_tbl,
                p_action_request_tbl       => l_action_request_tbl -- OUT PARAMETERS
                x_header_rec               => l_header_rec,
                x_header_val_rec           => x_header_val_rec,
                x_header_adj_tbl           => x_header_adj_tbl,
                x_header_adj_val_tbl       => x_header_adj_val_tbl,
                x_header_price_att_tbl     => x_header_price_att_tbl,
                x_header_adj_att_tbl       => x_header_adj_att_tbl,
                x_header_adj_assoc_tbl     => x_header_adj_assoc_tbl,
                x_header_scredit_tbl       => x_header_scredit_tbl,
                x_header_scredit_val_tbl   => x_header_scredit_val_tbl,
                x_line_tbl                 => l_line_tbl,
                x_line_val_tbl             => x_line_val_tbl,
                x_line_adj_tbl             => x_line_adj_tbl,
                x_line_adj_val_tbl         => x_line_adj_val_tbl,
                x_line_price_att_tbl       => x_line_price_att_tbl,
                x_line_adj_att_tbl         => x_line_adj_att_tbl,
                x_line_adj_assoc_tbl       => x_line_adj_assoc_tbl,
                x_line_scredit_tbl         => x_line_scredit_tbl,
                x_line_scredit_val_tbl     => x_line_scredit_val_tbl,
                x_lot_serial_tbl           => x_lot_serial_tbl,
                x_lot_serial_val_tbl       => x_lot_serial_val_tbl,
                x_action_request_tbl       => l_action_request_tbl);
             COMMIT;
             INSERT INTO LOGFILE (STEPID, MODULE)
                     VALUES (
                               22,
                                  TO_CHAR (l_header_rec.header_id)
                               || '-'
                               || l_msg_data);
             COMMIT;
             xbreak := '106';
          END LOOP;
          FOR i IN 1 .. l_msg_count
          LOOP
             k := k + 1;
             xbreak := '108';
             Oe_Msg_Pub.get (p_msg_index       => k,
                             p_encoded         => Fnd_Api.G_FALSE,
                             p_data            => l_msg_data,
                             p_msg_index_out   => l_msg_index_out);
                               INSERT INTO LOGFILE (STEPID, MODULE)
                     VALUES (
                               24,l_msg_data);
          END LOOP;
          /* Check if the process order goes through then it prints the success message, otherwise it prints failed message.*/
          IF l_return_status = FND_API.G_RET_STS_SUCCESS
          THEN
             xbreak := '109';
             fnd_file.put_line (
                fnd_file.LOG,
                   'Return from the API:-'
                || 'return status'
                || l_return_status
                || '-'
                || l_header_rec.header_id);
          ELSE
             xbreak := '110';
             fnd_file.put_line (
                fnd_file.LOG,
                   'Return from the API'
                || 'return status'
                || l_return_status
                || '-'
                || TO_CHAR (l_header_rec.header_id));
          END IF;
       EXCEPTION
          WHEN OTHERS
          THEN
             errorx := xbreak || '-' || SQLERRM;
             raise_application_error (-20002, errorx);
       END;
    END;
    Thanks
    Darsh

    Hussein,
    As always - Thank you.   I have passed the above issue but now in the same API, it is not importing lines.  I need to enter multiple lines for a given sales order through this API. As per the note from you on this thread, I am now maintaining separate set of input and output variables.
    When I searched metalink and google, there are countless examples of process_order APIs  giving example of importing one sales order line along with header at the time of creation.  Then, they ask to add subsequent lines through an UPDATE operations for existing order that was just created. Thus, forcing me to write process_order api call two times.
    Can't I just create a loop and add multiple lines right at the time of order creation? Please see the revised code as shown below.  This code is not working - it throws "no data found" for a weird reason.  I know for a fact that data is fetched properly by blanketLines cursor.
    /* Formatted on 8/16/2013 4:23:09 PM (QP5 v5.252.13127.32867) */
    CREATE OR REPLACE PACKAGE BODY XXCH_BSA_ORDER
    IS
       PROCEDURE BSA_PROCESS_ORDER (errbuf             OUT VARCHAR2,
                                    retcode            OUT VARCHAR2,
                                    p_blanket_number       NUMBER,
                                    p_select               VARCHAR2,
                                    p_blanket_line         NUMBER,
                                    p_order_type           NUMBER,
                                    p_copies               NUMBER)
       AS
          v_error          VARCHAR2 (2000);
          o_order_number   NUMBER;
       BEGIN
          INSERT INTO LOGFILE (STEPID, MODULE)
               VALUES (1, 'VERIZON');
          COMMIT;
          FOR i IN 1 .. p_copies
          LOOP
             INSERT INTO LOGFILE (STEPID, MODULE)
                  VALUES (2, 'VERIZON');
             BSA_API (p_blanket_number   => p_blanket_number,
                      p_blanket_line     => p_blanket_line,
                      p_select           => p_select,
                      p_order_type       => p_order_type,
                      p_order_number     => o_order_number);
             fnd_file.put_line (fnd_file.OUTPUT,
                                'Order Number Created:-' || o_order_number);
          END LOOP;
       EXCEPTION
          WHEN OTHERS
          THEN
             v_error := SQLERRM;
             RAISE_APPLICATION_ERROR (-20001, v_error);
       END;
       PROCEDURE BSA_API (p_blanket_number       NUMBER,
                          p_blanket_line         NUMBER,
                          p_select               VARCHAR2,
                          p_order_type           NUMBER,
                          p_order_number     OUT NUMBER)
       AS
          l_header_rec                   oe_order_pub.header_rec_type;
          l_header_rec_out               oe_order_pub.header_rec_type;
          l_line_tbl                     oe_order_pub.line_tbl_type;
          l_line_tbl_out                 oe_order_pub.line_tbl_type;
          l_action_request_tbl           oe_order_pub.request_tbl_type;
          l_header_adj_tbl               oe_order_pub.header_adj_tbl_type;
          l_line_adj_tbl                 oe_order_pub.line_adj_tbl_type;
          l_header_scr_tbl               oe_order_pub.header_scredit_tbl_type;
          l_line_scredit_tbl             oe_order_pub.line_scredit_tbl_type;
          l_request_rec                  oe_order_pub.request_rec_type;
          l_return_status                VARCHAR2 (3000);
          l_msg_count                    NUMBER;
          l_msg_data                     VARCHAR2 (3000);
          p_api_version_number           NUMBER := 1.0;
          p_init_msg_list                VARCHAR2 (1000) := fnd_api.g_true;
          p_return_values                VARCHAR2 (1000) := fnd_api.g_true;
          p_action_commit                VARCHAR2 (1000) := fnd_api.g_true;
          x_return_status                VARCHAR2 (10);
          x_msg_count                    NUMBER;
          x_msg_data                     VARCHAR2 (3000);
          p_header_rec                   oe_order_pub.header_rec_type
                                            := oe_order_pub.g_miss_header_rec;
          p_old_header_rec               oe_order_pub.header_rec_type
                                            := oe_order_pub.g_miss_header_rec;
          p_header_val_rec               oe_order_pub.header_val_rec_type
                                            := oe_order_pub.g_miss_header_val_rec;
          p_old_header_val_rec           oe_order_pub.header_val_rec_type
                                            := oe_order_pub.g_miss_header_val_rec;
          p_header_adj_tbl               oe_order_pub.header_adj_tbl_type
                                            := oe_order_pub.g_miss_header_adj_tbl;
          p_old_header_adj_tbl           oe_order_pub.header_adj_tbl_type
                                            := oe_order_pub.g_miss_header_adj_tbl;
          p_header_adj_val_tbl           oe_order_pub.header_adj_val_tbl_type
                                            := oe_order_pub.g_miss_header_adj_val_tbl;
          p_old_header_adj_val_tbl       oe_order_pub.header_adj_val_tbl_type
                                            := oe_order_pub.g_miss_header_adj_val_tbl;
          p_header_price_att_tbl         oe_order_pub.header_price_att_tbl_type
             := oe_order_pub.g_miss_header_price_att_tbl;
          p_old_header_price_att_tbl     oe_order_pub.header_price_att_tbl_type
             := oe_order_pub.g_miss_header_price_att_tbl;
          p_header_adj_att_tbl           oe_order_pub.header_adj_att_tbl_type
             := oe_order_pub.g_miss_header_adj_att_tbl;
          p_old_header_adj_att_tbl       oe_order_pub.header_adj_att_tbl_type
             := oe_order_pub.g_miss_header_adj_att_tbl;
          p_header_adj_assoc_tbl         oe_order_pub.header_adj_assoc_tbl_type
             := oe_order_pub.g_miss_header_adj_assoc_tbl;
          p_old_header_adj_assoc_tbl     oe_order_pub.header_adj_assoc_tbl_type
             := oe_order_pub.g_miss_header_adj_assoc_tbl;
          p_header_scredit_tbl           oe_order_pub.header_scredit_tbl_type
             := oe_order_pub.g_miss_header_scredit_tbl;
          p_old_header_scredit_tbl       oe_order_pub.header_scredit_tbl_type
             := oe_order_pub.g_miss_header_scredit_tbl;
          p_header_scredit_val_tbl       oe_order_pub.header_scredit_val_tbl_type
             := oe_order_pub.g_miss_header_scredit_val_tbl;
          p_old_header_scredit_val_tbl   oe_order_pub.header_scredit_val_tbl_type
             := oe_order_pub.g_miss_header_scredit_val_tbl;
          p_line_tbl                     oe_order_pub.line_tbl_type
                                            := oe_order_pub.g_miss_line_tbl;
          p_old_line_tbl                 oe_order_pub.line_tbl_type
                                            := oe_order_pub.g_miss_line_tbl;
          p_line_val_tbl                 oe_order_pub.line_val_tbl_type
                                            := oe_order_pub.g_miss_line_val_tbl;
          p_old_line_val_tbl             oe_order_pub.line_val_tbl_type
                                            := oe_order_pub.g_miss_line_val_tbl;
          p_line_adj_tbl                 oe_order_pub.line_adj_tbl_type
                                            := oe_order_pub.g_miss_line_adj_tbl;
          p_old_line_adj_tbl             oe_order_pub.line_adj_tbl_type
                                            := oe_order_pub.g_miss_line_adj_tbl;
          p_line_adj_val_tbl             oe_order_pub.line_adj_val_tbl_type
             := oe_order_pub.g_miss_line_adj_val_tbl;
          p_old_line_adj_val_tbl         oe_order_pub.line_adj_val_tbl_type
             := oe_order_pub.g_miss_line_adj_val_tbl;
          p_line_price_att_tbl           oe_order_pub.line_price_att_tbl_type
             := oe_order_pub.g_miss_line_price_att_tbl;
          p_old_line_price_att_tbl       oe_order_pub.line_price_att_tbl_type
             := oe_order_pub.g_miss_line_price_att_tbl;
          p_line_adj_att_tbl             oe_order_pub.line_adj_att_tbl_type
             := oe_order_pub.g_miss_line_adj_att_tbl;
          p_old_line_adj_att_tbl         oe_order_pub.line_adj_att_tbl_type
             := oe_order_pub.g_miss_line_adj_att_tbl;
          p_line_adj_assoc_tbl           oe_order_pub.line_adj_assoc_tbl_type
             := oe_order_pub.g_miss_line_adj_assoc_tbl;
          p_old_line_adj_assoc_tbl       oe_order_pub.line_adj_assoc_tbl_type
             := oe_order_pub.g_miss_line_adj_assoc_tbl;
          p_line_scredit_tbl             oe_order_pub.line_scredit_tbl_type
             := oe_order_pub.g_miss_line_scredit_tbl;
          p_old_line_scredit_tbl         oe_order_pub.line_scredit_tbl_type
             := oe_order_pub.g_miss_line_scredit_tbl;
          p_line_scredit_val_tbl         oe_order_pub.line_scredit_val_tbl_type
             := oe_order_pub.g_miss_line_scredit_val_tbl;
          p_old_line_scredit_val_tbl     oe_order_pub.line_scredit_val_tbl_type
             := oe_order_pub.g_miss_line_scredit_val_tbl;
          p_lot_serial_tbl               oe_order_pub.lot_serial_tbl_type
                                            := oe_order_pub.g_miss_lot_serial_tbl;
          p_old_lot_serial_tbl           oe_order_pub.lot_serial_tbl_type
                                            := oe_order_pub.g_miss_lot_serial_tbl;
          p_lot_serial_val_tbl           oe_order_pub.lot_serial_val_tbl_type
             := oe_order_pub.g_miss_lot_serial_val_tbl;
          p_old_lot_serial_val_tbl       oe_order_pub.lot_serial_val_tbl_type
             := oe_order_pub.g_miss_lot_serial_val_tbl;
          p_action_request_tbl           oe_order_pub.request_tbl_type
                                            := oe_order_pub.g_miss_request_tbl;
          l_header_val_rec_out           oe_order_pub.header_val_rec_type;
          l_header_adj_tbl_out           oe_order_pub.header_adj_tbl_type;
          l_header_adj_val_tbl_out       oe_order_pub.header_adj_val_tbl_type;
          l_header_price_att_tbl_out     oe_order_pub.header_price_att_tbl_type;
          l_header_adj_att_tbl_out       oe_order_pub.header_adj_att_tbl_type;
          l_header_adj_assoc_tbl_out     oe_order_pub.header_adj_assoc_tbl_type;
          l_header_scredit_tbl_out       oe_order_pub.header_scredit_tbl_type;
          l_header_scredit_val_tbl_out   oe_order_pub.header_scredit_val_tbl_type;
          l_line_val_tbl_out             oe_order_pub.line_val_tbl_type;
          l_line_adj_tbl_out             oe_order_pub.line_adj_tbl_type;
          l_line_adj_val_tbl_out         oe_order_pub.line_adj_val_tbl_type;
          l_line_price_att_tbl_out       oe_order_pub.line_price_att_tbl_type;
          l_line_adj_att_tbl_out         oe_order_pub.line_adj_att_tbl_type;
          l_line_adj_assoc_tbl_out       oe_order_pub.line_adj_assoc_tbl_type;
          l_line_scredit_tbl_out         oe_order_pub.line_scredit_tbl_type;
          l_line_scredit_val_tbl_out     oe_order_pub.line_scredit_val_tbl_type;
          l_lot_serial_tbl_out           oe_order_pub.lot_serial_tbl_type;
          l_lot_serial_val_tbl_out       oe_order_pub.lot_serial_val_tbl_type;
          l_action_request_tbl_out       oe_order_pub.request_tbl_type;
          x_debug_file                   VARCHAR2 (100);
          l_line_tbl_index               INTEGER := 0;
          l_msg_index_out                NUMBER;
          l_user_id                      fnd_user.user_id%TYPE;
          l_appl_id                      fnd_application.application_id%TYPE;
          l_resp_id                      fnd_responsibility.responsibility_id%TYPE;
          l_org_id                       hr_operating_units.organization_id%TYPE;
          l_sold_to_org_id               hz_cust_accounts.cust_account_id%TYPE;
          l_ship_to_org_id               hz_cust_site_uses_all.site_use_id%TYPE;
          l_cust_acct_site_id            hz_cust_acct_sites_all.cust_acct_site_id%TYPE;
          l_party_id                     hz_parties.party_id%TYPE;
          l_price_list_id                qp_list_headers_b.list_header_id%TYPE;
          l_primary_salesrep_id          ra_salesreps.salesrep_id%TYPE;
          l_order_type_id                oe_transaction_types_all.transaction_type_id%TYPE;
          l_order_line_type_id           oe_transaction_types_all.transaction_type_id%TYPE;
          l_order_category_code          oe_transaction_types_all.order_category_code%TYPE;
          l_inventory_item_id            mtl_system_items_b.inventory_item_id%TYPE;
          l_currency_code                qp_list_headers.currency_code%TYPE;
          l_party_site_id                hz_party_sites.party_site_id%TYPE;
          xbreak                         VARCHAR2 (33);
          errorx                         VARCHAR2 (3000);
          k                              INTEGER := 0;
          ln_kount                       INTEGER := 0;
          v_order                        NUMBER;
          CURSOR BlanketHeader
          IS
             SELECT *
               FROM oe_blanket_headers_all
              WHERE header_id = p_blanket_number;
          CURSOR BlanketLines (
             v_agreement_id    NUMBER)
          IS
             SELECT *
               FROM oe_blanket_lines_all
              WHERE     header_id = v_agreement_id
                    AND line_number = NVL (p_blanket_line, line_number);
       BEGIN
          -- Create Header
          xbreak := '100';
          l_org_id := fnd_profile.VALUE ('ORG_ID');
          INSERT INTO logfile (stepid, module)
               VALUES (1, 'orgid:' || TO_CHAR (l_org_id));
          oe_msg_pub.initialize;
          oe_debug_pub.initialize;
          mo_global.set_policy_context ('S', l_org_ID);
          mo_global.init ('ONT');
          fnd_global.apps_initialize (12647, 51839, 660);
          --       pass in user_id, responsibility_id, and application_id
          oe_debug_pub.setdebuglevel (5);
          x_debug_file := oe_debug_pub.set_debug_mode ('FILE');
          INSERT INTO logfile (stepid, module)
               VALUES (25, 'debug:' || x_debug_File);
          COMMIT;
          l_org_id := fnd_profile.VALUE ('ORG_ID');
          xbreak := '101';
          fnd_file.Put_line (
             fnd_file.LOG,
             '*********************************************** BOOK ORDER **************************');
          fnd_file.put_line (fnd_file.LOG,
                             'Begining of the procedure Book Order');
          --    Initialize header record
          xbreak := '102';
          FOR i IN BlanketHeader
          LOOP
             INSERT INTO logfile (stepid, module)
                  VALUES (23, 'BPO:' || TO_CHAR (i.header_id));
             l_header_rec := oe_order_pub.g_miss_header_rec;
             xbreak := '103';
             l_header_rec.cust_po_number := i.cust_po_number;
             l_header_rec.ordered_date := SYSDATE;
             l_header_rec.salesrep_id := i.salesrep_id;
             l_header_rec.order_type_id := p_order_type;
             l_header_rec.operation := oe_globals.g_opr_create; --Specifies that Order is getting created
             --xbreak := '104';
             l_header_rec.order_category_code := 'ORDER';
             --         l_num_tbl_index := 1;
             l_header_rec.booked_flag := 'N';
             l_header_rec.flow_status_code := 'ENTERED';
             xbreak := '105';
             l_header_rec.sold_to_org_id := i.sold_to_org_id;
             l_header_rec.invoice_to_org_id := i.invoice_to_org_id;
             l_header_rec.ship_to_org_id := i.ship_to_org_id;
             l_header_rec.price_list_id := i.price_list_id;
             l_header_rec.shipping_instructions := i.shipping_instructions;
             l_header_rec.freight_terms_code := i.freight_terms_code;
             l_header_rec.attribute10 := i.attribute1;
             l_header_rec.salesrep_id := i.salesrep_id;
             l_action_request_tbl (1) := OE_ORDER_PUB.G_MISS_REQUEST_REC;
             INSERT INTO logfile (stepid, module)
                  VALUES (53, 'BPO:' || TO_CHAR (i.header_id));  -- Create Lines .
             xbreak := '206';
             FOR j IN BlanketLines (i.header_id)
             LOOP
                xbreak := '205';
                ln_kount := ln_kount + 1;
                l_line_tbl_index := 1;
                l_line_tbl (l_line_tbl_index) := oe_order_pub.g_miss_line_rec;
                l_line_tbl (l_line_tbl_index).operation := oe_globals.g_opr_create;
                l_line_tbl (l_line_tbl_index).inventory_item_id :=
                   j.inventory_item_id;
                INSERT INTO logfile (stepid, module)
                     VALUES (57, 'BPO:' || TO_CHAR (j.inventory_item_id));
                l_line_tbl (l_line_tbl_index).order_quantity_uom := 'EA';
                l_line_tbl (l_line_tbl_index).payment_term_id := 1000;
                l_line_tbl (l_line_tbl_index).schedule_arrival_date := SYSDATE + 1;
                l_line_tbl (l_line_tbl_index).schedule_ship_date := SYSDATE + 1;
                l_line_tbl (l_line_tbl_index).request_date := SYSDATE;
                l_line_tbl (l_line_tbl_index).promise_date := SYSDATE;
                l_line_tbl (l_line_tbl_index).shipping_method_code := NULL;
                l_line_tbl (l_line_tbl_index).freight_terms_code := NULL;
                l_line_tbl (l_line_tbl_index).line_number := 1;
                l_line_tbl (l_line_tbl_index).ordered_quantity := 1;
                l_line_tbl (l_line_tbl_index).calculate_price_flag := 'N';
                l_line_tbl (l_line_tbl_index).unit_selling_price := NULL;
                l_line_tbl (l_line_tbl_index).ship_from_org_id := j.org_id;
                l_line_tbl (l_line_tbl_index).ship_to_org_id := j.ship_to_org_id;
             END LOOP;
             oe_order_pub.process_order (
                p_org_id                   => l_org_id,
                p_operating_unit           => NULL,
                p_api_version_number       => 1.0,
                --            p_init_msg_list => fnd_api.g_true,
                --                                p_return_values => fnd_api.g_true,
                --                                p_action_commit => fnd_api.g_true,
                p_header_rec               => l_header_rec,
                p_line_tbl                 => l_line_tbl,
                p_action_request_tbl       => l_action_request_tbl -- OUT PARAMETERS
                x_header_rec               => l_header_rec_out,
                x_header_val_rec           => l_header_val_rec_out,
                x_header_adj_tbl           => l_header_adj_tbl_out,
                x_header_adj_val_tbl       => l_header_adj_val_tbl_out,
                x_header_price_att_tbl     => l_header_price_att_tbl_out,
                x_header_adj_att_tbl       => l_header_adj_att_tbl_out,
                x_header_adj_assoc_tbl     => l_header_adj_assoc_tbl_out,
                x_header_scredit_tbl       => l_header_scredit_tbl_out,
                x_header_scredit_val_tbl   => l_header_scredit_val_tbl_out,
                x_line_tbl                 => l_line_tbl_out,
                x_line_val_tbl             => l_line_val_tbl_out,
                x_line_adj_tbl             => l_line_adj_tbl_out,
                x_line_adj_val_tbl         => l_line_adj_val_tbl_out,
                x_line_price_att_tbl       => l_line_price_att_tbl_out,
                x_line_adj_att_tbl         => l_line_adj_att_tbl_out,
                x_line_adj_assoc_tbl       => l_line_adj_assoc_tbl_out,
                x_line_scredit_tbl         => l_line_scredit_tbl_out,
                x_line_scredit_val_tbl     => l_line_scredit_val_tbl_out,
                x_lot_serial_tbl           => l_lot_serial_tbl_out,
                x_lot_serial_val_tbl       => l_lot_serial_val_tbl_out,
                x_action_request_tbl       => l_action_request_tbl_out,
                x_return_status            => l_return_status,
                x_msg_count                => l_msg_count,
                x_msg_data                 => l_msg_data);
             COMMIT;
             FND_FILE.PUT_LINE (
                FND_FILE.LOG,
                   'OM Debug file: '
                || oe_debug_pub.g_dir
                || '/'
                || oe_debug_pub.g_file);
             INSERT INTO LOGFILE (STEPID, MODULE)
                     VALUES (
                               22,
                                  TO_CHAR (l_header_rec_out.header_id)
                               || '-'
                               || l_msg_data);
             COMMIT;
             xbreak := '106';
             SELECT order_number
               INTO v_order
               FROM oe_order_headerS_all
              WHERE header_id = l_header_rec_out.header_id;
             p_order_number := v_order;
          END LOOP;
          FOR i IN 1 .. l_msg_count
          LOOP
             k := k + 1;
             xbreak := '108';
             Oe_Msg_Pub.get (p_msg_index       => k,
                             p_encoded         => Fnd_Api.G_FALSE,
                             p_data            => l_msg_data,
                             p_msg_index_out   => l_msg_index_out);
             INSERT INTO LOGFILE (STEPID, MODULE)
                  VALUES (24, l_msg_data);
             fnd_file.put_line (
                fnd_file.LOG,
                   'Return from the API:-'
                || 'return status:-'
                || l_return_status
                || '-'
                || l_msg_data);
          END LOOP;
          /* Check if the process order goes through then it prints the success message, otherwise it prints failed message.*/
          IF l_return_status = FND_API.G_RET_STS_SUCCESS
          THEN
             xbreak := '109';
             fnd_file.put_line (
                fnd_file.LOG,
                   'Return from the API:-'
                || 'return status:-'
                || l_return_status
                || '-'
                || l_header_rec_out.header_id);
          ELSE
             xbreak := '110';
             fnd_file.put_line (
                fnd_file.LOG,
                   'Return from the API:-'
                || 'return status:-'
                || l_return_status
                || '-'
                || TO_CHAR (l_header_rec_out.header_id));
          END IF;
       EXCEPTION
          WHEN OTHERS
          THEN
             errorx := xbreak || '-' || SQLERRM;
             raise_application_error (-20002, errorx);
       END;
    END;

  • Process_order api - Validation Failed for Field Bill To

    I am relatively new to the EBS world and I'm having some issues with calling the OE_Order_Pub.Process_order API. When I call this API I am getting a return error of "Validation failed for field - Bill To".
    For a background...I have an APEX application where users can choose parts from a small part master list to add to an existing order. The existing order will not have a status of Closed or Cancelled and there will be atleast 1 line in the order before the new parts are added. The parts will be added as new lines to the order with some of the new line data defaulting to the same information as the first line. I am using EBS version 12.1.3 with a multi-org setup. It seems that the orders under one org (id=3) are working fine, but another org(id=569) they never work and keep getting the error. I am setting the context to the org of the order and initializing the apps user information with the responsibility "Order Management Super User".
    Do you have any idea what could be wrong or how I can debug the error to get a little more detail?
    Here is the procedure I have.
    PROCEDURE TEK_ORD_PROCESS_ORDER(p_order_id IN NUMBER, p_return_code OUT NOCOPY VARCHAR2, p_status OUT NOCOPY VARCHAR2) IS
        CURSOR c_order_parts IS
          SELECT *
            FROM TEK_APEX.TEK_ORD_ORDER_PARTS
           WHERE ORDER_ID = p_order_id;
        TYPE t_parts IS TABLE OF TEK_APEX.TEK_ORD_ORDER_PARTS%ROWTYPE;
        v_order_parts t_parts;
        --Setup variables
        H_Op_Code      VARCHAR2(25) DEFAULT OE_GLOBALS.G_OPR_UPDATE;
        L_Op_Code      VARCHAR2(25) DEFAULT OE_GLOBALS.G_OPR_CREATE;
        v_install_type VARCHAR2(25) := 'PTO';
        v_source_id    NUMBER;
        v_user_id      NUMBER;
        v_resp_id      NUMBER;
        v_app_id       NUMBER;
        v_debug        VARCHAR2(32767);
        v_oracle_order OE_ORDER_HEADERS_ALL%ROWTYPE;
        v_apex_order   TEK_APEX.TEK_ORD_SALES_ORDERS%ROWTYPE;
        p_header_rec                    OE_Order_Pub.Header_Rec_Type;
        p_header_val_rec                OE_Order_Pub.Header_Val_Rec_Type;
        p_Header_Adj_tab                OE_Order_Pub.Header_Adj_Tbl_Type;
        p_Header_Adj_val_tab            OE_Order_Pub.Header_Adj_Val_Tbl_Type;
        p_Header_price_Att_tab          OE_Order_Pub.Header_Price_Att_Tbl_Type;
        p_Header_Adj_Att_tab            OE_Order_Pub.Header_Adj_Att_Tbl_Type;
        p_Header_Adj_Assoc_tab          OE_Order_Pub.Header_Adj_Assoc_Tbl_Type;
        p_Header_Scredit_tab            OE_Order_Pub.Header_Scredit_Tbl_Type;
        p_Header_Scredit_val_tab        OE_Order_Pub.Header_Scredit_Val_Tbl_Type;
        p_line_tab                      OE_Order_Pub.Line_Tbl_Type;
        p_line_val_tab                  OE_Order_Pub.Line_Val_Tbl_Type;
        p_Line_Adj_tab                  OE_Order_Pub.Line_Adj_Tbl_Type;
        p_Line_Adj_val_tab              OE_Order_Pub.Line_Adj_Val_Tbl_Type;
        p_Line_price_Att_tab            OE_Order_Pub.Line_Price_Att_Tbl_Type;
        p_Line_Adj_Att_tab              OE_Order_Pub.Line_Adj_Att_Tbl_Type;
        p_Line_Adj_Assoc_tab            OE_Order_Pub.Line_Adj_Assoc_Tbl_Type;
        p_Line_Scredit_tab              OE_Order_Pub.Line_Scredit_Tbl_Type;
        p_Line_Scredit_val_tab          OE_Order_Pub.Line_Scredit_Val_Tbl_Type;
        p_Lot_Serial_tab                OE_Order_Pub.Lot_Serial_Tbl_Type;
        p_Lot_Serial_val_tab            OE_Order_Pub.Lot_Serial_Val_Tbl_Type;
        p_action_request_tab            OE_Order_pub.Request_Tbl_Type;
        l_header_rec                    OE_Order_Pub.Header_Rec_Type;
        l_header_val_rec                OE_Order_Pub.Header_Val_Rec_Type;
        l_Header_Adj_tab                OE_Order_Pub.Header_Adj_Tbl_Type;
        l_Header_Adj_val_tab            OE_Order_Pub.Header_Adj_Val_Tbl_Type;
        l_Header_price_Att_tab          OE_Order_Pub.Header_Price_Att_Tbl_Type;
        l_Header_Adj_Att_tab            OE_Order_Pub.Header_Adj_Att_Tbl_Type;
        l_Header_Adj_Assoc_tab          OE_Order_Pub.Header_Adj_Assoc_Tbl_Type;
        l_Header_Scredit_tab            OE_Order_Pub.Header_Scredit_Tbl_Type;
        l_Header_Scredit_val_tab        OE_Order_Pub.Header_Scredit_Val_Tbl_Type;
        l_line_tab                      OE_Order_Pub.Line_Tbl_Type;
        l_line_val_tab                  OE_Order_Pub.Line_Val_Tbl_Type;
        l_Line_Adj_tab                  OE_Order_Pub.Line_Adj_Tbl_Type;
        l_Line_Adj_val_tab              OE_Order_Pub.Line_Adj_Val_Tbl_Type;
        l_Line_price_Att_tab            OE_Order_Pub.Line_Price_Att_Tbl_Type;
        l_Line_Adj_Att_tab              OE_Order_Pub.Line_Adj_Att_Tbl_Type;
        l_Line_Adj_Assoc_tab            OE_Order_Pub.Line_Adj_Assoc_Tbl_Type;
        l_Line_Scredit_tab              OE_Order_Pub.Line_Scredit_Tbl_Type;
        l_Line_Scredit_val_tab          OE_Order_Pub.Line_Scredit_Val_Tbl_Type;
        l_Lot_Serial_tab                OE_Order_Pub.Lot_Serial_Tbl_Type;
        l_Lot_Serial_val_tab            OE_Order_Pub.Lot_Serial_Val_Tbl_Type;
        l_ret_status                    VARCHAR2(200);
        l_msg_count                     NUMBER;
        l_msg_data                      VARCHAR2(200);
           --Email information
        v_email_address           varchar2(100);
           v_msg_text                varchar(1000);
           v_subject_text            varchar(1000);
           --Default line information
        v_item_id           NUMBER;
        v_contact_id        NUMBER;
        v_invoice_to_org_id oe_order_lines_all.INVOICE_TO_ORG_ID%TYPE;
        v_ship_to_org_id    oe_order_lines_all.SHIP_TO_ORG_ID%TYPE;
        v_sold_to_org_id    oe_order_lines_all.SOLD_TO_ORG_ID%TYPE;
        v_flow_status_code  oe_order_lines_all.FLOW_STATUS_CODE%TYPE;
        FUNCTION GET_ORACLE_ORDER(p_order_number IN OE_ORDER_HEADERS_ALL.ORDER_NUMBER%TYPE)
          RETURN OE_ORDER_HEADERS_ALL%ROWTYPE IS
          v_order OE_ORDER_HEADERS_ALL%ROWTYPE;
        BEGIN
          SELECT *
            INTO v_order
            FROM APPS.OE_ORDER_HEADERS_ALL
           WHERE ORDER_NUMBER = p_order_number;
          RETURN v_order;
        EXCEPTION
          WHEN OTHERS THEN
            RETURN NULL;
        END GET_ORACLE_ORDER;
        FUNCTION GET_APEX_ORDER(p_order_id IN TEK_APEX.TEK_ORD_SALES_ORDERS.ORDER_ID%TYPE)
          RETURN TEK_APEX.TEK_ORD_SALES_ORDERS%ROWTYPE IS
          v_order TEK_APEX.TEK_ORD_SALES_ORDERS%ROWTYPE;
        BEGIN
          SELECT *
            INTO v_order
            FROM TEK_APEX.TEK_ORD_SALES_ORDERS
           WHERE ORDER_ID = p_order_id;
          RETURN v_order;
        EXCEPTION
          WHEN OTHERS THEN
            RETURN NULL;
        END GET_APEX_ORDER;
        FUNCTION GET_SOURCE_ID(p_source_name IN VARCHAR2)
          RETURN OE_ORDER_SOURCES.ORDER_SOURCE_ID%TYPE IS
          v_source_id OE_ORDER_SOURCES.ORDER_SOURCE_ID%TYPE;
        BEGIN
          SELECT ORDER_SOURCE_ID
            INTO v_source_id
            FROM APPS.OE_ORDER_SOURCES
           WHERE NAME = p_source_name;
          RETURN v_source_id;
        EXCEPTION
          WHEN OTHERS THEN
            RETURN NULL;
        END GET_SOURCE_ID;
        FUNCTION GET_ITEM_ID(p_part_number IN VARCHAR2, p_org_id IN NUMBER)
          RETURN MTL_SYSTEM_ITEMS.INVENTORY_ITEM_ID%TYPE IS
          v_item_id MTL_SYSTEM_ITEMS.INVENTORY_ITEM_ID%TYPE;
        BEGIN
          SELECT INVENTORY_ITEM_ID
            INTO v_item_id
            FROM APPS.MTL_SYSTEM_ITEMS
           WHERE SEGMENT1 = p_part_number
             AND ORGANIZATION_ID = p_org_id;
          RETURN v_item_id;
        EXCEPTION
          WHEN OTHERS THEN
            RETURN NULL;
        END GET_ITEM_ID;
      BEGIN
        apps.mo_global.set_policy_context('S',3);
        apps.mo_global.init('XXTEK');
        BEGIN
          SELECT USER_ID
            INTO v_user_id
            FROM APPS.FND_USER
           WHERE USER_NAME = 'SYSADMIN';
        EXCEPTION
          WHEN OTHERS THEN
            RAISE_APPLICATION_ERROR(-20001, 'Error selecting user');
        END;
        BEGIN
          SELECT RESPONSIBILITY_ID, APPLICATION_ID
            INTO v_resp_id, v_app_id
            FROM TEK_APEX.TEK_RR_ACTIVE_RESP_VW
           WHERE UPPER(RESPONSIBILITY_NAME) = 'ORDER MANAGEMENT SUPER USER';
          --Set current user information
          fnd_global.apps_initialize (user_id      => v_user_id
                                     ,resp_id      => v_resp_id
                                     ,resp_appl_id => v_app_id);
        EXCEPTION
          WHEN OTHERS THEN
            RAISE_APPLICATION_ERROR(-20001, 'Error selecting responsibility');
        END;
        --Get the order information from Oracle and APEX
        v_apex_order := GET_APEX_ORDER(p_order_id);
        IF v_apex_order.ORDER_ID IS NULL THEN
          RAISE_APPLICATION_ERROR(-20001, 'APEX Order ID is invalid: ' || p_order_id);
        END IF;
        v_oracle_order := GET_ORACLE_ORDER(TO_NUMBER(v_apex_order.ORDER_NUMBER));
        IF v_oracle_order.ORDER_NUMBER IS NULL THEN
          RAISE_APPLICATION_ERROR(-20001, 'Order Number not found in Oracle: ' || v_apex_order.ORDER_NUMBER);
        END IF;
        apps.mo_global.set_policy_context('S', v_oracle_order.ORG_ID);
        v_source_id := GET_SOURCE_ID('IMPORT');
        IF v_source_id IS NULL THEN
          RAISE_APPLICATION_ERROR(-20001, 'Source ID not found for IMPORT');
        END IF;
        /* ********** Gather Order Header********** */
        /* ********** Info.              ********** */
        OE_Order_Pub.Get_Order(p_api_version_number    =>      1.0,
                               p_init_msg_list         =>      FND_API.G_TRUE,
                               p_return_values         =>      FND_API.G_TRUE,
                               x_return_status         =>      l_ret_status,
                               x_msg_count             =>      l_msg_count,
                               x_msg_data              =>      l_msg_data,
                               p_header_id             =>      v_oracle_order.HEADER_ID,
                               p_header                =>      NULL,
                               x_header_rec            =>      l_header_rec,
                               x_header_val_rec        =>      l_header_val_rec,
                               x_Header_Adj_tbl        =>      l_Header_Adj_tab,
                               x_Header_Adj_val_tbl    =>      l_Header_Adj_val_tab,
                               x_Header_price_Att_tbl  =>      l_Header_price_Att_tab,
                               x_Header_Adj_Att_tbl    =>      l_Header_Adj_Att_tab,
                               x_Header_Adj_Assoc_tbl  =>      l_Header_Adj_Assoc_tab,
                               x_Header_Scredit_tbl    =>      l_Header_Scredit_tab,
                               x_Header_Scredit_val_tbl=>      l_Header_Scredit_val_tab,
                               x_line_tbl              =>      l_line_tab,
                               x_line_val_tbl          =>      l_line_val_tab,
                               x_Line_Adj_tbl          =>      l_Line_Adj_tab,
                               x_Line_Adj_val_tbl      =>      l_Line_Adj_val_tab,
                               x_Line_price_Att_tbl    =>      l_Line_price_Att_tab,
                               x_Line_Adj_Att_tbl      =>      l_Line_Adj_Att_tab,
                               x_Line_Adj_Assoc_tbl    =>      l_Line_Adj_Assoc_tab,
                               x_Line_Scredit_tbl      =>      l_Line_Scredit_tab,
                               x_Line_Scredit_val_tbl  =>      l_Line_Scredit_val_tab,
                               x_Lot_Serial_tbl        =>      l_Lot_Serial_tab,
                               x_Lot_Serial_val_tbl    =>      l_Lot_Serial_val_tab);
        --Save defaults from first line
        IF l_line_tab.EXISTS(1) THEN
          v_contact_id        := l_line_tab(1).SHIP_TO_CONTACT_ID;
          v_invoice_to_org_id := l_line_tab(1).INVOICE_TO_ORG_ID;
          v_ship_to_org_id    := l_line_tab(1).SHIP_TO_ORG_ID;
          v_sold_to_org_id    := l_line_tab(1).SOLD_TO_ORG_ID;
          v_flow_status_code  := l_line_tab(1).FLOW_STATUS_CODE;
        END IF;
        --Clear out the line array before adding any new parts
        FOR i IN l_line_tab.FIRST..l_line_tab.LAST LOOP
          l_line_tab.DELETE(i);
          l_line_val_tab.DELETE(i);
          l_line_adj_tab.DELETE(i);
          l_line_adj_val_tab.DELETE(i);
          l_line_price_att_tab.DELETE(i);
          l_line_adj_att_tab.DELETE(i);
          l_line_adj_assoc_tab.DELETE(i);
          l_line_scredit_tab.DELETE(i);
          l_line_scredit_val_tab.DELETE(i);
          l_lot_serial_tab.DELETE(i);
          l_lot_serial_val_tab.DELETE(i);
        END LOOP;
        /* ********** Gather Order Lines ********** */
        OPEN c_order_parts;
        FETCH c_order_parts BULK COLLECT INTO v_order_parts;
        CLOSE c_order_parts;
        FOR i IN v_order_parts.FIRST..v_order_parts.LAST LOOP
          v_item_id := GET_ITEM_ID(v_order_parts(i).PART_NUMBER, v_oracle_order.SHIP_FROM_ORG_ID);
          IF v_item_id IS NULL THEN
            RAISE_APPLICATION_ERROR(-20001, 'Error selecting part number ' || v_order_parts(i).PART_NUMBER);
          END IF;
          --Clear line first
          l_line_tab(i)             := OE_Order_Pub.G_Miss_Line_Rec;
             l_line_val_tab(i)         := OE_ORDER_PUB.G_MISS_LINE_VAL_REC;
          l_line_adj_tab(i)             := OE_ORDER_PUB.G_MISS_LINE_ADJ_REC;
          l_line_adj_val_tab(i)     := OE_ORDER_PUB.G_MISS_LINE_ADJ_VAL_REC;
          l_line_price_att_tab(i)      := OE_ORDER_PUB.G_MISS_LINE_PRICE_ATT_REC ;
          l_line_adj_att_tab(i)     := OE_ORDER_PUB.G_MISS_LINE_ADJ_ATT_REC;
          l_line_adj_assoc_tab(i)   := OE_ORDER_PUB.G_MISS_LINE_ADJ_ASSOC_REC;
          l_line_scredit_tab(i)     := OE_ORDER_PUB.G_MISS_LINE_SCREDIT_REC;
          l_line_scredit_val_tab(i) := OE_ORDER_PUB.G_MISS_LINE_SCREDIT_VAL_REC;
          l_lot_serial_tab(i)       := OE_ORDER_PUB.G_MISS_LOT_SERIAL_REC;
          l_lot_serial_val_tab(i)   := OE_ORDER_PUB.G_MISS_LOT_SERIAL_VAL_REC;
          --Set line information
             l_line_tab(i).PRICE_LIST_ID          := v_oracle_order.PRICE_LIST_ID;
          l_line_tab(i).header_id              := v_oracle_order.header_id;
          l_line_tab(i).inventory_item_id      := v_item_id;
          l_line_tab(i).ordered_quantity       := v_order_parts(i).QUANTITY;
          l_line_tab(i).operation              := l_op_code;
          l_line_tab(i).unit_list_price        := 0;
          l_line_tab(i).ship_from_org_id       := v_oracle_order.ship_from_org_id;
          l_line_tab(i).program_id             := fnd_global.conc_program_id ;
          l_line_tab(i).program_application_id := fnd_global.PROG_APPL_ID;
          l_line_tab(i).order_source_id        := v_source_id;
          l_line_tab(i).calculate_price_flag   := 'N' ;
          l_line_tab(i).unit_selling_price     := 0.00 ;
             l_line_tab(i).request_date           := v_apex_order.onsite_date;
             l_line_tab(i).Schedule_ship_date     := v_apex_order.onsite_date;
             l_line_tab(i).promise_date           := null;
          l_line_tab(i).invoice_to_org_id      := v_invoice_to_org_id;
          l_line_tab(i).ship_to_org_id         := v_ship_to_org_id;
          l_line_tab(i).sold_to_org_id         := v_sold_to_org_id;
          l_line_tab(i).ship_to_contact_id     := v_contact_id;
        END LOOP;
    --OE_DEBUG_PUB.DEBUG_ON;
    --OE_DEBUG_PUB.Initialize;
    --OE_DEBUG_PUB.SetDebugLevel(5);
        --Add lines to order
        OE_Order_Pub.Process_order(p_api_version_number            =>      1.0,
                                   p_init_msg_list                 =>      FND_API.G_TRUE,
                                   p_return_values                 =>      FND_API.G_TRUE,
                                   p_action_commit                 =>      FND_API.G_FALSE,
                                   x_return_status                 =>      l_ret_status,
                                   x_msg_count                     =>      l_msg_count,
                                   x_msg_data                      =>      l_msg_data,
                                   p_header_rec                    =>  l_header_rec,
                                   p_old_header_rec                =>  l_header_rec,
                                   p_header_val_rec                =>  l_header_val_rec,
                                   p_old_header_val_rec            =>  l_header_val_rec,
                                   p_Header_Adj_tbl                =>  l_Header_Adj_tab,
                                   p_old_Header_Adj_tbl            =>  l_Header_Adj_tab,
                                   p_Header_Adj_val_tbl            =>  l_Header_Adj_val_tab,
                                   p_old_Header_Adj_val_tbl        =>  l_Header_Adj_val_tab,
                                   p_Header_price_Att_tbl          =>  l_Header_price_Att_tab,
                                   p_old_Header_Price_Att_tbl      =>  l_Header_price_Att_tab,
                                   p_Header_Adj_Att_tbl            =>  l_Header_Adj_Att_tab,
                                   p_old_Header_Adj_Att_tbl        =>  l_Header_Adj_Att_tab,
                                   p_Header_Adj_Assoc_tbl          =>  l_Header_Adj_Assoc_tab,
                                   p_old_Header_Adj_Assoc_tbl      =>  l_Header_Adj_Assoc_tab,
                                   p_Header_Scredit_tbl            =>  l_Header_Scredit_tab,
                                   p_old_Header_Scredit_tbl        =>  l_Header_Scredit_tab,
                                   p_Header_Scredit_val_tbl        =>  l_Header_Scredit_val_tab,
                                   p_old_Header_Scredit_val_tbl    =>  l_Header_Scredit_val_tab,
                                   p_line_tbl                      =>  l_line_tab,
                                   p_line_val_tbl                  =>  l_line_val_tab,
                                   p_Line_Adj_tbl                  =>  l_line_adj_tab,
                                   p_Line_Adj_val_tbl              =>  l_line_adj_val_tab,
                                   p_Line_price_Att_tbl            =>  l_line_price_att_tab,
                                   p_Line_Adj_Att_tbl              =>  l_line_adj_att_tab,
                                   p_Line_Adj_Assoc_tbl            =>  l_line_adj_assoc_tab,
                                   p_Line_Scredit_tbl              =>  l_line_scredit_tab,
                                   p_Line_Scredit_val_tbl          =>  l_line_scredit_val_tab,
                                   p_Lot_Serial_tbl                =>  l_lot_serial_tab,
                                   p_Lot_Serial_val_tbl            =>  l_lot_serial_val_tab,
                                   p_action_request_tbl            =>  OE_ORDER_PUB.G_MISS_REQUEST_TBL,
                                   x_header_rec                    =>      p_header_rec,
                                   x_header_val_rec                =>      p_header_val_rec,
                                   x_Header_Adj_tbl                =>      p_Header_Adj_tab,
                                   x_Header_Adj_val_tbl            =>      p_Header_Adj_val_tab,
                                   x_Header_price_Att_tbl          =>      p_Header_price_Att_tab,
                                   x_Header_Adj_Att_tbl            =>      p_Header_Adj_Att_tab,
                                   x_Header_Adj_Assoc_tbl          =>      p_Header_Adj_Assoc_tab,
                                   x_Header_Scredit_tbl            =>      p_Header_Scredit_tab,
                                   x_Header_Scredit_val_tbl        =>      p_Header_Scredit_val_tab,
                                   x_line_tbl                      =>      p_line_tab,
                                   x_line_val_tbl                  =>      p_line_val_tab,
                                   x_line_adj_tbl                  =>      p_line_adj_tab,
                                   x_line_adj_val_tbl              =>      p_line_adj_val_tab,
                                   x_line_price_att_tbl            =>      p_line_price_att_tab,
                                   x_line_adj_att_tbl              =>      p_line_adj_att_tab,
                                   x_line_adj_assoc_tbl            =>      p_line_adj_assoc_tab,
                                   x_line_scredit_tbl              =>      p_line_scredit_tab,
                                   x_line_scredit_val_tbl          =>      p_line_scredit_val_tab,
                                   x_lot_serial_tbl                =>      p_lot_serial_tab,
                                   x_lot_serial_val_tbl            =>      p_lot_serial_val_tab,
                                   x_action_request_tbl            =>      p_action_request_tab);
    --  OE_DEBUG_PUB.DEBUG_OFF;
        p_return_code := l_ret_status;
        IF l_ret_status != 'S' THEN
          DBMS_OUTPUT.PUT_LINE(l_msg_data);
          IF l_msg_count = 1 THEN
            p_status := OE_Msg_Pub.Get(1,'F');
          ELSE
            FOR i IN 1..l_msg_count LOOP
              p_status := OE_Msg_Pub.Get(i,'F') || '<br />';
            END LOOP;
          END IF;
          p_status := 'Error loading lines<br>' || p_status;
        ELSE
          p_status := 'Order Processed Successfully<br>' || v_order_parts.COUNT || ' Line(s) Loaded';
        END IF;
    --    WHILE OE_DEBUG_PUB.G_DEBUG_INDEX < OE_DEBUG_PUB.CountDebug LOOP
    --      OE_DEBUG_PUB.GetNext(v_debug);
    --      DBMS_OUTPUT.PUT_LINE(v_debug);
    --    END LOOP;
      EXCEPTION
        WHEN OTHERS THEN
          ROLLBACK;
          RAISE;
      END TEK_ORD_PROCESS_ORDER;Thanks!
    Jonathan Hart

    Hello,
    Try the following
    1) Check if any processing constraints are applied to customer/location
    2) Try to create a new customer and associate internal location.
    Create a new order to reproduce the issue
    Thanks
    -Arif

  • How to change Analyzer user password with Administration API?

    Hi,<BR>I would like to change Analyzer user password with Administration API. Can someone post some sample commands to do the task?<BR><BR>I would just like to write an application to change end user's Analyzer password.<BR>As I see I would need to do the following:<BR>1. login with admin userid/password<BR>2. execute some method to change password for required userid. I think the input parameter should be userid (of the user I would like to change password) and new password (the new password for the user).<BR>3. logout<BR><BR>Can someone post some sample code (commands to execute)?<BR><BR>Thanks,<BR>grofaty<BR><BR>My system:<BR>Analyzer Server 7.0.1.<BR>Essbase server 7.1<BR>Windows XP SP2<BR>

    <blockquote>quote:<br><hr><i>Originally posted by: <b>knightrich</b></i><BR>Hello Mr. Jordan.<BR><BR>I would like to exchange some thoughts about "housekeeping" Analyzer reports in preparation for migration from Analyzer 7.0.0.0.01472 to 9.x:<BR><BR>...<BR><BR>Did you solved such a problem or do you have an idea if it could be solved with the Admin API methods?<BR> ...<BR>Migration from 7.00 to 9.x: As we heard last week the "Migration Wizard for Reports" in 9.3 should be able to migrate reports. Do you have experience or more detailed information about that Wizard?<BR><BR>Many thanks in advance<BR><BR>knigthrich<hr></blockquote><BR><BR>knighrich, <BR>I'd like to be more help, but I have no experience with System 9. I did substantial cleanup when we migrated from Analyzer 6 to Analyzer 7.1, and even more cleanup when moving up to 7.2, but our installation is smaller in scale than yours and we didn't need to automate report cleanup.<BR><BR>You might be able to get the ownership information you need through the back door, doing a direct query on the database, but simpler might be an export users, at least from 7.0. (This facility probably doesn't exist in system 9; it was dropped in 7.2 in favor of an undocumented API) The export file is an xml file that could easily be parsed to identify reports that have the administrator as user and then a second pass to delete those with otuer ownership as well. As previously suggested, you might be able to get this by a well crafted SQL query against the repository.<BR><BR>Procedurally, we have both public reports that have the blessing of management and are widely available, owned by a "public owner", and private reports developed by indivdual users and shared or not. Our team maintains the public reports, but not the private reports. We may be asked to make a previously private report public and take over maintenance of it. <BR><BR>I hope that you can find a solution that meets your needs. Certainly a call to customer support to identify a poorly documented feature would be in order.<BR>

  • Getting error while uploading multiple files in sharepoint hosted app in 2013 with REST API

    Hi All,
    In one of my tasks, I was struck with one issue, that is "While uploading multiple files into custom list with REST API".
    Iam trying to upload multiple files in library with REST calls for an APP development, my issue is if i wants to upload 4 image at once its storing only
    3 image file and further giving "Conflict" error". Below is the attached screenshot of exact error.
    Error within screenshot are : status Code : 409
    status Text :conflict
    For this operation i am uploading different files as an attachment to an list item, below is the code used for uploading multiple files.
    my code is
    function PerformUpload(listName, fileName, listItem, fileData)
        var urlOfAttachment="";
       // var itemId = listItem.get_id();
        urlOfAttachment = appWebUrl + "/_api/web/lists/GetByTitle('" + listName + "')/items(" + listItem + ")/AttachmentFiles/add(FileName='" + fileName + "')"
        // use the request executor (cross domain library) to perform the upload
        var reqExecutor = new SP.RequestExecutor(appWebUrl);
        reqExecutor.executeAsync({
            url: urlOfAttachment,
            method: "POST",
            headers: {
                "Accept": "application/json; odata=verbose",
                "X-RequestDigest": digest              
            contentType: "application/json;odata=verbose",
            binaryStringRequestBody: true,
            body: fileData,
            success: function (x, y, z) {
                alert("Success!");
            error: function (x, y, z) {
                alert(z);

    Hi,
    THis is common issue if your file size exceeds 
     upload a document of size more than 1mb. worksss well for kb files.
    https://social.technet.microsoft.com/Forums/office/en-US/b888ac78-eb4e-4653-b69d-1917c84cc777/getting-error-while-uploading-multiple-files-in-sharepoint-hosted-app-in-2013-with-rest-api?forum=sharepointdevelopment
    or try the below method
    https://social.technet.microsoft.com/Forums/office/en-US/40b0cb04-1fbb-4639-96f3-a95fe3bdbd78/upload-files-using-rest-api-in-sharepoint-2013?forum=sharepointdevelopment
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • Process_Order API Error

    Hi to all,
    I want to create a new Sales Order using PL/SQL, so i used the process_order API to achieve this.
    I first set the client info using fnd_client_info.set_org_context(82) and then set the initialization parameters using fnd_global.apps_initilize (1090,21623,660).
    To get the initialization parameters i used this query:
    select fu.user_Id ,
    fur.responsibility_Id,
    fur.responsibility_application_Id,
    frt.responsibility_name
    from fnd_user fu,
    fnd_responsibility_tl frt,
    fnd_user_resp_groups fur
    where user_name = '<USER>'
    and fu.user_Id = fur.user_Id
    and fur.responsibility_Id = frt.responsibility_Id
    order by fur.responsibility_Id
    I then called my api but i get errors, such as ORA-01403: no data found and ORA-06512 at APPS.OE_ORDER_CACHE and ORA-01403 no data found in Package OE_ORDER_UTIL Procedure GET_ATTRIBUTE_NAME.
    Below is my code:
    BEGIN
         fnd_client_info.set_org_context(82);
         fnd_global.apps_initialize(1090,21623,660); -- pass in user_id, responsibility_id, and application_id     
    END;
    DECLARE
    --for get order
    x_return_status VARCHAR2(1000);
    x_msg_count NUMBER(20);
    x_msg_data VARCHAR2(1000);
    x_header_rec Oe_Order_Pub.Header_Rec_Type;
    x_header_val_rec Oe_Order_Pub.Header_Val_Rec_Type;
    x_Header_Adj_tbl Oe_Order_Pub.Header_Adj_Tbl_Type;
    x_Header_Adj_val_tbl Oe_Order_Pub.Header_Adj_Val_Tbl_Type;
    x_Header_price_Att_tbl Oe_Order_Pub.Header_Price_Att_Tbl_Type;
    x_Header_Adj_Att_tbl Oe_Order_Pub.Header_Adj_Att_Tbl_Type;
    x_Header_Adj_Assoc_tbl Oe_Order_Pub.Header_Adj_Assoc_Tbl_Type;
    x_Header_Scredit_tbl Oe_Order_Pub.Header_Scredit_Tbl_Type;
    x_Header_Scredit_val_tbl Oe_Order_Pub.Header_Scredit_Val_Tbl_Type;
    x_line_tbl Oe_Order_Pub.Line_Tbl_Type;
    x_line_val_tbl Oe_Order_Pub.Line_Val_Tbl_Type;
    x_Line_Adj_tbl Oe_Order_Pub.Line_Adj_Tbl_Type;
    x_Line_Adj_val_tbl Oe_Order_Pub.Line_Adj_Val_Tbl_Type;
    x_Line_price_Att_tbl Oe_Order_Pub.Line_Price_Att_Tbl_Type;
    x_Line_Adj_Att_tbl Oe_Order_Pub.Line_Adj_Att_Tbl_Type;
    x_Line_Adj_Assoc_tbl Oe_Order_Pub.Line_Adj_Assoc_Tbl_Type;
    x_Line_Scredit_tbl Oe_Order_Pub.Line_Scredit_Tbl_Type;
    x_Line_Scredit_val_tbl Oe_Order_Pub.Line_Scredit_Val_Tbl_Type;
    x_Lot_Serial_tbl Oe_Order_Pub.Lot_Serial_Tbl_Type;
    x_Lot_Serial_val_tbl Oe_Order_Pub.Lot_Serial_Val_Tbl_Type;
    --for adding a new line to process order
    x_header_rec2 Oe_Order_Pub.Header_Rec_Type;
    x_line_tbl2 Oe_Order_Pub.Line_Tbl_Type;
    x_action_request_tbl Oe_Order_Pub.Request_Tbl_Type;
    --for getting messages
    v_msg_data VARCHAR2(8000);
    v_msg_index_out NUMBER(10);
    CCIDGOOD varchar2(1);
    X_RETURN_CCID number;
    X_CONCAT_SEGS varchar2(250);
    X_CONCAT_IDS varchar2(250);
    X_CONCAT_DESCRS varchar2(250);
    -- X_MSG_COUNT number;
    X_ERRMSG varchar2(1000);
    X_ORDER_LINE_ID number;
    X_FLEX_NUMBER number;
    X_DEBUG_FILE varchar2(100);
    x_fnd_debug varchar2(32000);
    x_status boolean;
    p_ship_from number;
    BEGIN
    fnd_global.apps_initialize(1318,21623,660); pass in user_id, responsibility_id, and application_id
    --dbms_application_info.SET_CLIENT_INFO('82');
    fnd_global.apps_initialize(1090,21623,660); pass in user_id, responsibility_id, and application_id
    oe_debug_pub.initialize;
    X_DEBUG_FILE := OE_DEBUG_PUB.Set_Debug_Mode('TABLE');
    oe_debug_pub.SetDebugLevel(1); -- Use 5 for the most debuging output, I warn you its a lot of data
    Oe_Msg_Pub.initialize;
    -- Setting Up the Header Record
    -- initialize record to (a record template?)
    x_header_rec2 := OE_ORDER_PUB.G_MISS_HEADER_REC;
    -- required attributes (e.g. Order Type and Customer)
    x_header_rec2.order_type_id := 1001; -- You need a valid Order_Type
    x_header_rec2.sold_to_org_id := 1049; -- You need to have a valid Org_id for your Customer AR_CUSTOMERS_V.CUSTOMER_ID
    --x_header_rec2.invoice_to_org_id := 1025;
    x_header_rec2.ship_to_org_id := 1040; -- You need to have a valid SHIP_TO_ORG_ID
    --x_header_rec2.ship_from_org_id := 207;
    --x_header_rec2.sold_from_org_id := 204;
    --x_header_rec2.payment_term_id := 1020;
    x_header_rec2.cust_po_number := 'PONUMBERORDER';
    -- Pricing
    --x_header_rec2.price_list_id := 6041;
    -- Null attribute: no defaulting for freight terms
    -- check biz rules on this, copied from sample code
    --x_header_rec2.freight_terms_code := NULL;
    -- Indicates to process order that a new header is being created
    x_header_rec2.operation := OE_GLOBALS.G_OPR_CREATE;
    -- FIRST LINE RECORD
    --x_line_tbl2(1) := Oe_Order_Pub.G_MISS_LINE_REC;
    -- x_line_tbl2(1).inventory_item_id := 3178; -- Your INVENTORY_ITEM_ID VALUE goes here
    --x_line_tbl2(1).ordered_quantity := 2;
    --x_line_tbl2(1).operation := Oe_Globals.G_OPR_CREATE;
    IF TRUE THEN -- enable/disable toggle for Process_Order
    Oe_Order_Pub.Process_Order
    ( 1
    , Fnd_Api.G_FALSE
    , Fnd_Api.G_FALSE
    , Fnd_Api.G_FALSE
    , x_return_status
    , x_msg_count
    , x_msg_data
    --IN PARAMETERS
    , p_line_tbl => x_line_tbl2
    , p_header_rec => x_header_rec2
    --OUT PARAMETERS
    , x_header_rec => x_header_rec
    , x_header_val_rec => x_header_val_rec
    , x_Header_Adj_tbl => x_Header_Adj_tbl
    , x_Header_Adj_val_tbl => x_Header_Adj_val_tbl
    , x_Header_price_Att_tbl => x_Header_price_Att_tbl
    , x_Header_Adj_Att_tbl => x_Header_Adj_Att_tbl
    , x_Header_Adj_Assoc_tbl => x_Header_Adj_Assoc_tbl
    , x_Header_Scredit_tbl => x_Header_Scredit_tbl
    , x_Header_Scredit_val_tbl => x_Header_Scredit_val_tbl
    , x_line_tbl => x_line_tbl
    , x_line_val_tbl => x_line_val_tbl
    , x_Line_Adj_tbl => x_Line_Adj_tbl
    , x_Line_Adj_val_tbl => x_Line_Adj_val_tbl
    , x_Line_price_Att_tbl => x_Line_price_Att_tbl
    , x_Line_Adj_Att_tbl => x_Line_Adj_Att_tbl
    , x_Line_Adj_Assoc_tbl => x_Line_Adj_Assoc_tbl
    , x_Line_Scredit_tbl => x_Line_Scredit_tbl
    , x_Line_Scredit_val_tbl => x_Line_Scredit_val_tbl
    , x_Lot_Serial_tbl => x_Lot_Serial_tbl
    , x_Lot_Serial_val_tbl => x_Lot_Serial_val_tbl
    , x_action_request_tbl => x_action_request_tbl
    COMMIT;
    DBMS_OUTPUT.PUT_LINE('process ORDER ret status IS: ' || x_return_status);
    DBMS_OUTPUT.PUT_LINE('process ORDER msg data IS: ' || x_msg_data);
    DBMS_OUTPUT.PUT_LINE('process ORDER msg COUNT IS: ' || x_msg_count);
    DBMS_OUTPUT.PUT_LINE('header.order_number IS: ' || x_header_rec.order_number);
    DBMS_OUTPUT.PUT_LINE('header.return_status IS: ' || x_header_rec.return_status);
    DBMS_OUTPUT.PUT_LINE('header.booked_flag IS: ' || x_header_rec.booked_flag);
    DBMS_OUTPUT.PUT_LINE('header.header_id IS: ' || x_header_rec.header_id);
    DBMS_OUTPUT.PUT_LINE('header.order_source_id IS: ' || x_header_rec.order_source_id);
    DBMS_OUTPUT.PUT_LINE('header.flow_status_code IS: ' || x_header_rec.flow_status_code);
    END IF;
    FOR i IN 1 .. x_msg_count LOOP
    Oe_Msg_Pub.get(
    p_msg_index => i
    ,p_encoded => Fnd_Api.G_FALSE
    ,p_data => v_msg_data
    ,p_msg_index_out => v_msg_index_out);
    DBMS_OUTPUT.PUT_LINE('message is: ' || v_msg_data);
    DBMS_OUTPUT.PUT_LINE('message index is: ' || v_msg_index_out);
    END LOOP;
    DBMS_OUTPUT.PUT_LINE('oe_msg_pub.count_msg = ' || Oe_Msg_Pub.count_msg);
    DBMS_OUTPUT.PUT_LINE('****************************************************');
    DBMS_OUTPUT.PUT_LINE('* OUTPUT FROM OM: DEBUG LEVEL PROFILE SETTING *');
    DBMS_OUTPUT.PUT_LINE('****************************************************');
    for i in 1..OE_DEBUG_PUB.g_debug_count loop
    dbms_output.put_line(OE_DEBUG_PUB.G_debug_tbl(i));
    end loop;
    OE_DEBUG_PUB.DEBUG_OFF;
    DBMS_OUTPUT.PUT_LINE('****************************************************');
    DBMS_OUTPUT.PUT_LINE('* SUMMARY OF RETURNED RESULTS *');
    DBMS_OUTPUT.PUT_LINE('****************************************************');
    DBMS_OUTPUT.PUT_LINE('Output Parameters: ');
    DBMS_OUTPUT.PUT_LINE('Debug = ' || OE_DEBUG_PUB.G_DEBUG);
    DBMS_OUTPUT.PUT_LINE('Debug Level = ' || to_char(OE_DEBUG_PUB.G_DEBUG_LEVEL));
    DBMS_OUTPUT.PUT_LINE('Debug File = ' || OE_DEBUG_PUB.G_DIR||'/'||
    OE_DEBUG_PUB.G_FILE);
    DBMS_OUTPUT.PUT_LINE('X_RETURN_CCID = ' || to_char(X_RETURN_CCID));
    DBMS_OUTPUT.PUT_LINE('X_CONCAT_SEGS = ' || X_CONCAT_SEGS);
    DBMS_OUTPUT.PUT_LINE('X_CONCAT_IDS = ' || X_CONCAT_IDS);
    DBMS_OUTPUT.PUT_LINE('X_CONCAT_DESCRS = ' || X_CONCAT_DESCRS);
    DBMS_OUTPUT.PUT_LINE('X_ERRMSG = ' || X_ERRMSG);
    DBMS_OUTPUT.PUT_LINE('****************************************************');
    END;
    Please someone help me as i am stuck for days and i need to complete this as soon as possible.
    Thanks
    Antonis

    Antonis,
    I am using following process which is working fine
    create or replace procedure tnq_so_import_api ( retcode number,errbuff
    varchar2)
    is
    --gmigapi.item_rec_typ;
    l_header_rec OE_Order_PUB.Header_Rec_Type;
    l_line_tbl OE_Order_PUB.Line_Rec_Type;
    l_line_adj_tbl OE_Order_PUB.Line_Adj_Rec_Type;
    l_header_scr_tbl OE_Order_PUB.Header_Scredit_Tbl_Type;
    l_header_adj_tbl OE_Order_PUB.Header_Adj_Val_Tbl_Type;
    l_line_scredit_tbl OE_Order_PUB.Line_Scredit_Rec_Type;
    l_return_status VARCHAR2 (1) := fnd_api.g_ret_sts_success;
    l_msg_count NUMBER;
    l_msg_data VARCHAR2 (10000);
    begin --@1
    -- SETTING UP THE HEADER RECORD
    -- Initialize record to missing
    l_header_rec := OE_ORDER_PUB.G_MISS_HEADER_REC;
    -- Required attributes (e.g. Order Type and Customer)
    l_header_rec.order_type_id := 1000;
    l_header_rec.sold_to_org_id := 100;
    -- Other attributes
    l_header_rec.price_list_id := 10;
    -- Null attribute: no defaulting for freight terms
    l_header_rec.freight_terms_code := NULL;
    -- Indicates to process order that a new header is being created
    l_header_rec.operation := OE_GLOBALS.G_OPR_CREATE;
    -- FIRST LINE RECORD
    -- Initialize record to missing
    l_line_tbl := OE_ORDER_PUB.G_MISS_LINE_REC;
    -- Line attributes
    l_line_tbl.inventory_item_id := 311;
    l_line_tbl.ordered_quantity := 1;
    l_line_tbl.operation := OE_GLOBALS.G_OPR_CREATE;
    -- SECOND LINE RECORD
    -- Initialize record to missing
    --l_line_tbl(2) := OE_ORDER_PUB.G_MISS_LINE_REC;
    -- Line attributes
    --l_line_tbl(2).inventory_item_id := 312;
    --l_line_tbl(2).ordered_quantity := 2;
    --l_line_tbl(2).operation := OE_GLOBALS.G_OPR_CREATE;
    -- CALL TO PROCESS ORDER
    OE_Order_PUB.Process_Order
    ( -- Passing just the entity records that are a part of this order
    p_header_rec => l_header_rec
         ,p_line_tbl => l_line_tbl
         ,p_line_adj_tbl => l_line_adj_tbl
         -- OUT variables
         ,x_header_rec => l_header_rec
         ,x_header_scredit_tbl => l_header_scr_tbl
         ,x_header_adj_tbl => l_header_adj_tbl
         ,x_line_tbl => l_line_tbl
         ,x_line_scredit_tbl => l_line_scredit_tbl
         ,x_line_adj_tbl => l_line_adj_tbl
         ,x_return_status => l_return_status
         ,x_msg_count => l_msg_count
         ,x_msg_data => l_msg_data
    OE_Order_PUB.Process_Order
    ( -- Passing just the entity records that are a part of this order
    p_api_version_number IN NUMBER
    , p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE
    , p_return_values IN VARCHAR2 := FND_API.G_FALSE
    , p_action_commit IN VARCHAR2 := FND_API.G_FALSE
    , x_return_status OUT VARCHAR2
    , x_msg_count OUT NUMBER
    , x_msg_data OUT VARCHAR2
    , p_header_rec IN Header_Rec_Type :=
    G_MISS_HEADER_REC
    , p_old_header_rec IN Header_Rec_Type :=
    G_MISS_HEADER_REC
    , p_header_val_rec IN Header_Val_Rec_Type :=
    G_MISS_HEADER_VAL_REC
    , p_old_header_val_rec IN Header_Val_Rec_Type :=
    G_MISS_HEADER_VAL_REC
    , p_Header_Adj_tbl IN Header_Adj_Tbl_Type :=
    G_MISS_HEADER_ADJ_TBL
    , p_old_Header_Adj_tbl IN Header_Adj_Tbl_Type :=
    G_MISS_HEADER_ADJ_TBL
    , p_Header_Adj_val_tbl IN Header_Adj_Val_Tbl_Type :=
    G_MISS_HEADER_ADJ_VAL_TBL
    , p_old_Header_Adj_val_tbl IN Header_Adj_Val_Tbl_Type :=
    G_MISS_HEADER_ADJ_VAL_TBL
    , p_Header_price_Att_tbl IN Header_Price_Att_Tbl_Type :=
    G_MISS_HEADER_PRICE_ATT_TBL
    , p_old_Header_Price_Att_tbl IN Header_Price_Att_Tbl_Type :=
    G_MISS_HEADER_PRICE_ATT_TBL
    , p_Header_Adj_Att_tbl IN Header_Adj_Att_Tbl_Type :=
    G_MISS_HEADER_ADJ_ATT_TBL
    , p_old_Header_Adj_Att_tbl IN Header_Adj_Att_Tbl_Type :=
    G_MISS_HEADER_ADJ_ATT_TBL
    , p_Header_Adj_Assoc_tbl IN Header_Adj_Assoc_Tbl_Type :=
    G_MISS_HEADER_ADJ_ASSOC_TBL
    , p_old_Header_Adj_Assoc_tbl IN Header_Adj_Assoc_Tbl_Type :=
    G_MISS_HEADER_ADJ_ASSOC_TBL
    , p_Header_Scredit_tbl IN Header_Scredit_Tbl_Type :=
    G_MISS_HEADER_SCREDIT_TBL
    , p_old_Header_Scredit_tbl IN Header_Scredit_Tbl_Type :=
    G_MISS_HEADER_SCREDIT_TBL
    , p_Header_Scredit_val_tbl IN Header_Scredit_Val_Tbl_Type :=
    G_MISS_HEADER_SCREDIT_VAL_TBL
    , p_old_Header_Scredit_val_tbl IN Header_Scredit_Val_Tbl_Type :=
    G_MISS_HEADER_SCREDIT_VAL_TBL
    , p_line_tbl IN Line_Tbl_Type :=
    G_MISS_LINE_TBL
    , p_old_line_tbl IN Line_Tbl_Type :=
    G_MISS_LINE_TBL
    , p_line_val_tbl IN Line_Val_Tbl_Type :=
    G_MISS_LINE_VAL_TBL
    , p_old_line_val_tbl IN Line_Val_Tbl_Type :=
    G_MISS_LINE_VAL_TBL
    , p_Line_Adj_tbl IN Line_Adj_Tbl_Type :=
    G_MISS_LINE_ADJ_TBL
    , p_old_Line_Adj_tbl IN Line_Adj_Tbl_Type :=
    G_MISS_LINE_ADJ_TBL
    , p_Line_Adj_val_tbl IN Line_Adj_Val_Tbl_Type :=
    G_MISS_LINE_ADJ_VAL_TBL
    , p_old_Line_Adj_val_tbl IN Line_Adj_Val_Tbl_Type :=
    G_MISS_LINE_ADJ_VAL_TBL
    , p_Line_price_Att_tbl IN Line_Price_Att_Tbl_Type :=
    G_MISS_LINE_PRICE_ATT_TBL
    , p_old_Line_Price_Att_tbl IN Line_Price_Att_Tbl_Type :=
    G_MISS_LINE_PRICE_ATT_TBL
    , p_Line_Adj_Att_tbl IN Line_Adj_Att_Tbl_Type :=
    G_MISS_LINE_ADJ_ATT_TBL
    , p_old_Line_Adj_Att_tbl IN Line_Adj_Att_Tbl_Type :=
    G_MISS_LINE_ADJ_ATT_TBL
    , p_Line_Adj_Assoc_tbl IN Line_Adj_Assoc_Tbl_Type :=
    G_MISS_LINE_ADJ_ASSOC_TBL
    , p_old_Line_Adj_Assoc_tbl IN Line_Adj_Assoc_Tbl_Type :=
    G_MISS_LINE_ADJ_ASSOC_TBL
    , p_Line_Scredit_tbl IN Line_Scredit_Tbl_Type :=
    G_MISS_LINE_SCREDIT_TBL
    , p_old_Line_Scredit_tbl IN Line_Scredit_Tbl_Type :=
    G_MISS_LINE_SCREDIT_TBL
    , p_Line_Scredit_val_tbl IN Line_Scredit_Val_Tbl_Type :=
    G_MISS_LINE_SCREDIT_VAL_TBL
    , p_old_Line_Scredit_val_tbl IN Line_Scredit_Val_Tbl_Type :=
    G_MISS_LINE_SCREDIT_VAL_TBL
    , p_Lot_Serial_tbl IN Lot_Serial_Tbl_Type :=
    G_MISS_LOT_SERIAL_TBL
    , p_old_Lot_Serial_tbl IN Lot_Serial_Tbl_Type :=
    G_MISS_LOT_SERIAL_TBL
    , p_Lot_Serial_val_tbl IN Lot_Serial_Val_Tbl_Type :=
    G_MISS_LOT_SERIAL_VAL_TBL
    , p_old_Lot_Serial_val_tbl IN Lot_Serial_Val_Tbl_Type :=
    G_MISS_LOT_SERIAL_VAL_TBL
    , p_action_request_tbl     IN Request_Tbl_Type :=
                             G_MISS_REQUEST_TBL
    , x_header_rec OUT Header_Rec_Type
    , x_header_val_rec OUT Header_Val_Rec_Type
    , x_Header_Adj_tbl OUT Header_Adj_Tbl_Type
    , x_Header_Adj_val_tbl OUT Header_Adj_Val_Tbl_Type
    , x_Header_price_Att_tbl OUT Header_Price_Att_Tbl_Type
    , x_Header_Adj_Att_tbl OUT Header_Adj_Att_Tbl_Type
    , x_Header_Adj_Assoc_tbl OUT Header_Adj_Assoc_Tbl_Type
    , x_Header_Scredit_tbl OUT Header_Scredit_Tbl_Type
    , x_Header_Scredit_val_tbl OUT Header_Scredit_Val_Tbl_Type
    , x_line_tbl OUT Line_Tbl_Type
    , x_line_val_tbl OUT Line_Val_Tbl_Type
    , x_Line_Adj_tbl OUT Line_Adj_Tbl_Type
    , x_Line_Adj_val_tbl OUT Line_Adj_Val_Tbl_Type
    , x_Line_price_Att_tbl OUT Line_Price_Att_Tbl_Type
    , x_Line_Adj_Att_tbl OUT Line_Adj_Att_Tbl_Type
    , x_Line_Adj_Assoc_tbl OUT Line_Adj_Assoc_Tbl_Type
    , x_Line_Scredit_tbl OUT Line_Scredit_Tbl_Type
    , x_Line_Scredit_val_tbl OUT Line_Scredit_Val_Tbl_Type
    , x_Lot_Serial_tbl OUT Lot_Serial_Tbl_Type
    , x_Lot_Serial_val_tbl OUT Lot_Serial_Val_Tbl_Type
    , x_action_request_tbl     OUT Request_Tbl_Type
    --For bug 3390458
    , p_rtrim_data IN Varchar2 :='N'
    -- Retrieve messages
    if l_msg_count > 0 then
    for l_index in 1..l_msg_count loop
         l_msg_data := oe_msg_pub.get(p_msg_index => l_index, p_encoded => 'F');
    end loop;
    end if;
    -- Check the return status
    if l_return_status = FND_API.G_RET_STS_SUCCESS then
    DBMS_OUTPUT.put_line ('Return Status =' || l_msg_data ||' Success ');
    else
    DBMS_OUTPUT.put_line ('Return Status =' || l_msg_data ||' Failure ');
    end if;
    exception --@1
    when others then
    fnd_file.put_line(fnd_file.log,' Exception others in main procedure @1
    :'||sqlerrm);
    end tnq_so_import_api;
    Check if you can get any help from this
    *** Regards
    Narender

  • Lion server file sharing issue with windows API read/write ini file (GetPrivateProfileString)

    Hello,
    I try to config lion server as file server for a windows application we use at work. All other computers are windows 7 or XP, lion server is the only mac. I choose lion server because it's size, quality and personal love of apple products.
    10.7.2 lion server's samba file sharing works almost perfectly with all my windows machines, I can copy, delete, modify any text files or office files without any issue, but the most important windows application for my business doesn't work with samba file sharing. After some digging, I found it is because windows program can't read or write INI file stored on lion share. Windows API GetPrivateProfileString always returns empty if the INI file is store on lion share.
    You can download a small application for read/write windows INI file from codeproject.com to test this problem:
    http://www.codeproject.com/KB/files/ini.aspx
    I can open/edit the in file using any text editor without any problem. The only problem is with those windows APIs. ACL is turned on for my lion share and assigned "delete" rights to samba users.
    I install samba3 on the same server; it works perfectly with windows API. My windows program also works. Looks like there is something wrong with lion server's sambax.
    I'd prefer to use built-in samba even I have samba3 working. Built-in samba is very immature right now, but considered how young it is, I will give apple some time to make it mature.
    Does anyone have same issue or knows how to fix it?
    Thanks,
    Michael.

    All the memory is fine. The server rarely if ever goes down when there are only around 10-12 users connected. When there are 20+ users connected and working heavily it goes down often. When I say working heavily, I mean they are transferring huge files to the SAN (100GB+), sometimes 5 at a time per user, and there are a bunch of others who are reading large video files at a minimum of 220MB/sec from the SAN.
    Though this worked on Snow Leopard without any issues, Lion just doesn't seem to be able to handle it. The odd thing is, on Snow Leopard there was only a single 1GB ethernet connection to a NAS system, whereas with Lion we have a much more powerful machine with a 6-port 10GB ethernet card and a 4 lane 8GB fiber card to a true SAN. You would think that the newer scenario with Lion would handle far more users with ease.
    So far, very disappointing with regards to Lion's file serving performance.

  • PO Goods Receipt with Serial / Batch number with DI API

    I am creating PO Goods Receipt with DI API. This works fine. But when i have items with serial numbers and batch numbers in the same PO, then i am getting either of the following errors:
    1. [OITM]Item has no serial number management
    2. [OIBT] Invalid Item Code.
    I debugged the code and the values i set seems to be correct. I am using VB.Net and SAP 2004 with Patch 23.
    Thanks
    Anand

    Anand,
    When you are working with a Serialized item in the first scenario, have you tested working with the item in the Business One application itself?  Have you tried to have the system assign a serial number for the item when issuing a Goods Receipt?  Do you get the same issue through the Business One interface.  With respect to working with Batches, have you setup the Batches for inventory items through the Business One interface yet?  If you have not setup Batches, this would be why you would not have any data in the OIBT table.
    HTH,
    Eddy

  • "Save as..." hang on long PDF with annots.api plugin enabled

    Hi,
    I am not a regular Acrobat user but I have been attempting to use it recently to process some fairly long PDF files with up to 20K pages which weigh in at 50MB.  I thought I'd share something interesting I have discovered with the community.
    What I found is that the larger the file (not sure whether it is the number of pages, number of bytes or something else) the longer it takes for the "Save as..." dialog box to appear.  Then, when the filename has been chosen (just saving as a normal PDF) the amount of time before the progress bar appears also seems to get longer for longer files.
    In fact while the save as box is getting ready and while the progress bar is not yet showing, Adobe Acrobat seems to hang and stop responding.  We found that disabling plugins entirely (by shift clicking to open the document) eliminated entirely even for large documents.  We then narrowed it down to a specific plugin called annots.api.
    My questions for the community are: 
    Is this a known issue with annots.api?
    What does annots.api actually do?
    This seems to be the same for Adobe Reader X (Windows 2012), Adobe Acrobat X (Windows XP), Adobe Reader 11 (Windows 7), Adobe Acrobat XI (Windows 8) and Adobe Acrobat (Windows XI).
    Thanks,
    James
    P.S. If somebody from Adobe want help to recreate the issue, I can provide some sample PDF files that clearly illustrate the issue and snow a possible polynomial performance curve.

    i do not have a .mac account. i checked my preferences on that point and confirmed there is no effort to sync with iDisk.
    i am only user (account) on this eMac. So i do not have a basis for compaing other users. i may set up a dummy account (other dummy?) to test this theory.
    i checked my energy saver prefs. i had computer and display set to Never sleep. i had the box checked to put disk to sleep when possible. i have now unchecked that box.
    i also have just downloaded update to 10.4.4. so, i will try that.
    any other ideas, most appreciated. i am especially interested to know if there is software to look for possible virus infection that might cause this. since it happens randomly, i suspect it might be some bug (not sure if that is logical analysis on my part)
    steve

  • Error while transforming XSLT by calling function with Reflection API

    Hi,
    I'm new to Reflection API. I want to call function from the jar file which is not in my application context. So I have loaded that jar ( say XXX.jar) file at runtime with URLClassLoader and call the function say [ *myTransform(Document document)* ]. Problem is that when I want to transform any XSLT file in that function it throws exception 'Could not compile stylesheet'. All required classes are in XXX.jar.
    If I call 'myTransform' function directly without reflection API then it transformation successfully completed.
    Following is code of reflection to invoke function
            ClassLoader contextCL = Thread.currentThread().getContextClassLoader();
            URLClassLoader loader = new URLClassLoader(jarURLs, contextCL);
            Class c = loader.loadClass(fullClasspath);
            Constructor constructor = c.getDeclaredConstructor(constructorParamsClasses);
            Object instance = constructor.newInstance(constructorParams);
            Method method = c.getDeclaredMethod("myTransform", methodParamsClasses);
            Object object = method.invoke(instance, methodParams);Following is function to be called with reflection API.
    public Document myTransform ( Document document ) {
    // Reference of Document (DOM NODE) used to hold the result of transformation.
                Document doc = null ;
                // DocumentBuilderFactory instance which is used to initialize DocumentBuilder to create newDocumentBuilder.
                DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance () ;
                // Reference of DocumentBuilder used to create new Document (DOM NODE).
                DocumentBuilder builder;
                try {
                      // Initialize DocumentBuilder by using DocumentBuilderFactory instance.
                      builder = factory.newDocumentBuilder ();
                      // Initialize new document instance by using DocumentBuilder instance.
                      doc = builder.newDocument () ;
                      // Creates new DOMSource by using document (DOM NODE) which is coming through current transform() method parameter.
                      DOMSource domsource = new DOMSource ( document ) ;
                      // Creates new instance of TransformerFactory.
                      TransformerFactory transformerfactory = TransformerFactory.newInstance () ;
                      // Creates new Transformer instance by using TransformerFactory which holds XSLT file.
                      Transformer transformer = null;
    ********* exception is thrown from here onward ******************
                      transformer = transformerfactory.newTransformer (new StreamSource (xsltFile));
                      // Transform XSLT on document (DOM NODE) and store result in doc (DOM NODE).
                      transformer.transform ( domsource , new DOMResult ( doc ) ) ;
                } catch (ParserConfigurationException ex) {
                      ex.printStackTrace();
                } catch (TransformerConfigurationException ex) {
                      ex.printStackTrace();
                } catch (TransformerException ex) {
                     ex.printStackTrace();
                } catch (Exception ex) {
                     ex.printStackTrace();
                //holds result of transformation.
                return doc ;
    }Following is full exception stacktrace
    ERROR:  'The first argument to the non-static Java function 'myBeanMethod' is not a valid object reference.'
    FATAL ERROR:  'Could not compile stylesheet'
    javax.xml.transform.TransformerConfigurationException: Could not compile stylesheet
            at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:829)
            at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:623)
            at com.actl.dxchange.utilities.Transformation.transform(Transformation.java:83)
            at com.actl.dxchange.base.BaseConnector.transform(BaseConnector.java:330)
            at com.actl.dxchange.connectors.KuoniConnector.doRequestProcess(KuoniConnector.java:388)
            at com.actl.dxchange.connectors.KuoniConnector.hotelAvail(KuoniConnector.java:241)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            ...........

    Hi,
    Thanks for response.
    Following is code for setting 'methodParamsClasses' array object. I do ensure that Document is not null and valid. My application is web application.
    Document requestObj = /* my code for generating Document object*/
    Object[] methodParams = new Object[]{requestObj}
    Class[] methodParamsClasses = new Class[]{};
                if (methodParams != null) {
                    methodParamsClasses = new Class[methodParams.length];
                    for (int i = 0; i < methodParams.length; i++) {
                        if (methodParams[i] instanceof Document) {
    /************** if parameter is instance of Document then I set class type as "Document.class" ***********/
                            methodParamsClasses[i] = Document.class;
                        } else {
                            methodParamsClasses[i] = methodParams.getClass();

  • How to create the service lines in a sales order using Process_order API

    Hi ,
    I have to create the service lines in a Config to order using process Order API. When i am trying to create a sercvice line , it is comming as new line all together. but i need that one to happen in the configuration itself after the option item but not like standalone line.
    what are the manditory fields for service lines to create using Process_order API.
    Apprciate your help on this.
    Thanks
    Rags

    Moderator message - Please do some analysis before posting here - thread locked
    Rob

Maybe you are looking for

  • How do I get Apple to unlock a Verizon unlocked 4s to use domestically on a GSM network?

    I have 4 iPhone 4S's in my family.  The contract with Verizon ended on December 5, 2013.  Early in 2014 I requested from Verizon that all 4 iPhones be unlocked, which was done and confirmed by Verizon.  However, subsequently I have learned that the V

  • Error while reading template file

    Hi, i have successfully created a template file from a domain(weblogic server 11.3.5).now i have to use this template file to configure a new weblogic server(11.3.5) domain. i have installed the new instance of weblogic server and successfully ran th

  • Force front row to play video on 16:9 aspect ratio

    Hello, I would like to know if there is a way to force front row to play a 3:4 video in 16:9 aspect ratio. As you can imagine, I have a 16:9 TV and I would like to see it, better in 16:9. This can be done very well by Quicktime, I don't know why it s

  • Video on iPhone 3G

    does anyone think that apple will put video recording onto the iPhone ???

  • IWork Numbers chart legend does not appear

    Anyone have any idea what I'm doing wrong? I've made a chart from a table that has headers, checked the boxes to show the title and the legend and the chart title appears but the legend is not there. It doesn't matter if I resize the table, switch be