Unable to insert the new sales order line using API.

Hi,
when i am tring to insert the deleted line with ENTERED Status, i am getting the follwing error msg.
Yesterday morning i insert the lines, but from yesterday evening onwords i am unable to insert line and i am getting below error msg.
Item with inventory_item_id=394131 is not defined in Item validation Org
i written the code like this
l_step                     varchar2(250);
l_err_msg               varchar2(1000);
l_line_tbl                oe_order_pub.Line_Tbl_Type;
lx_return_status           VARCHAR2(2000);
lx_msg_count                NUMBER;
lx_msg_data                VARCHAR2(2000);
lx_header_rec                oe_order_pub.Header_Rec_Type;
lx_header_val_rec           oe_order_pub.Header_Val_Rec_Type;
lx_header_adj_tbl           oe_order_pub.Header_Adj_Tbl_Type;
lx_header_adj_val_tbl           oe_order_pub.Header_Adj_Val_Tbl_Type;
lx_header_price_att_tbl      oe_order_pub.Header_Price_Att_Tbl_Type;
lx_header_adj_att_tbl           oe_order_pub.Header_Adj_Att_Tbl_Type;
lx_header_adj_assoc_tbl      oe_order_pub.Header_Adj_Assoc_Tbl_Type;
lx_header_scredit_tbl           oe_order_pub.Header_Scredit_Tbl_Type;
lx_header_scredit_val_tbl      oe_order_pub.Header_Scredit_Val_Tbl_Type;
lx_Header_Payment_tbl           oe_order_pub.Header_Payment_Tbl_Type;
lx_Header_Payment_val_tbl      oe_order_pub.Header_Payment_Val_Tbl_Type;
lx_line_tbl                oe_order_pub.Line_Tbl_Type;
lx_line_val_tbl           oe_order_pub.Line_Val_Tbl_Type;
lx_Line_Adj_tbl           oe_order_pub.Line_Adj_Tbl_Type;
lx_Line_Adj_val_tbl           oe_order_pub.Line_Adj_Val_Tbl_Type;
lx_Line_price_Att_tbl           oe_order_pub.Line_Price_Att_Tbl_Type;
lx_Line_Adj_Att_tbl           oe_order_pub.Line_Adj_Att_Tbl_Type;
lx_Line_Adj_Assoc_tbl           oe_order_pub.Line_Adj_Assoc_Tbl_Type;
lx_Line_Scredit_tbl           oe_order_pub.Line_Scredit_Tbl_Type;
lx_Line_Scredit_val_tbl      oe_order_pub.Line_Scredit_Val_Tbl_Type;
lx_Line_Payment_tbl           oe_order_pub.Line_Payment_Tbl_Type;
lx_Line_Payment_val_tbl      oe_order_pub.Line_Payment_Val_Tbl_Type;
lx_Lot_Serial_tbl           oe_order_pub.Lot_Serial_Tbl_Type;
lx_Lot_Serial_val_tbl           oe_order_pub.Lot_Serial_Val_Tbl_Type;
lx_action_request_tbl           oe_order_pub.Request_Tbl_Type;
v_hold_release_rec OE_HOLDS_PVT.order_tbl_type;
v_hold_source_rec OE_HOLDS_PVT.Hold_Source_Rec_Type;
v_err_msg               VARCHAR2(2000);
v_return_flag VARCHAR2(1);
v_err_flag               VARCHAR2(1);
BEGIN     
FOR c_ins_rec in (SELECT *          
          FROM terom_sales_order_lines_stg          
LOOP
     IF c_ins_rec.flow_status_code = 'ENTERED' THEN
     -- ASSIGNMENT OF LINE RECORD FOR ENTERED STATUS
     l_line_tbl(1)           := OE_ORDER_PUB.G_MISS_LINE_REC;
     l_line_tbl(1).header_id      := c_ins_rec.header_id;
     l_line_tbl(1).inventory_item_id := c_ins_rec.inventory_item_id;     
     l_line_tbl(1).ordered_quantity := c_ins_rec.ordered_quantity;
     l_line_tbl(1).operation      := OE_GLOBALS.G_OPR_CREATE;      
ELSE
     -- ASSIGNMENT OF LINE RECORD
     l_line_tbl(1)           := OE_ORDER_PUB.G_MISS_LINE_REC;
     l_line_tbl(1).header_id      := c_ins_rec.header_id;
     l_line_tbl(1).inventory_item_id := c_ins_rec.inventory_item_id;
     l_line_tbl(1).ordered_quantity := c_ins_rec.cancelled_quantity;     
     l_line_tbl(1).operation      := OE_GLOBALS.G_OPR_CREATE;
     END IF;
     -- API CALL
     APPS.OE_ORDER_PUB.PROCESS_ORDER(
                         p_api_version_number      => 1.0,
                         p_init_msg_list           => apps.fnd_api.g_true,
                         p_return_values           => apps.fnd_api.g_false,
                         x_return_status           => lx_return_status,
                         x_msg_count                => lx_msg_count,
                         x_msg_data                => lx_msg_data,
                         p_line_tbl                => l_line_tbl,
                         x_header_rec           => lx_header_rec,
                         x_header_val_rec           => lx_header_val_rec,
                         x_header_adj_tbl           => lx_header_adj_tbl,
                         x_header_adj_val_tbl      => lx_header_adj_val_tbl,
                         x_header_price_att_tbl      => lx_header_price_att_tbl,
                         x_header_adj_att_tbl      => lx_header_adj_att_tbl,
                         x_header_adj_assoc_tbl      => lx_header_adj_assoc_tbl,
                         x_header_scredit_tbl      => lx_header_scredit_tbl,
                         x_header_scredit_val_tbl     => lx_header_scredit_val_tbl,
                         x_line_tbl                => lx_line_tbl,
                         x_line_val_tbl           => lx_line_val_tbl,
                         x_line_adj_tbl           => lx_line_adj_tbl,
                         x_line_adj_val_tbl           => lx_line_adj_val_tbl,
                         x_line_price_att_tbl      => lx_line_price_att_tbl,
                         x_line_adj_att_tbl           => lx_line_adj_att_tbl,
                         x_line_adj_assoc_tbl      => lx_line_adj_assoc_tbl,
                         x_line_scredit_tbl           => lx_line_scredit_tbl,
                         x_line_scredit_val_tbl      => lx_line_scredit_val_tbl,
                         x_lot_serial_tbl           => lx_lot_serial_tbl,
                         x_lot_serial_val_tbl      => lx_lot_serial_val_tbl,
                         x_action_request_tbl      => lx_action_request_tbl
COMMIT;
can any one help me why this error mesg is coming, it's very URGENT.
Thank,
Shravan Kumar Kota.

Hi,
Have you checked this link?
http://download-west.oracle.com/docs/cd/B25516_08/current/acrobat/115omapi.zip
it has extensive information on OM APIs
Regards
Prashant Pathak

Similar Messages

  • Can anyone tell me how to insert the new sales order lines using API.

    Hi,
    I am trying to Insert new sales order lines using oe_order_pub.Process_Order API, but i am unable to insert.
    Help me on this.
    Thanks in Adavance
    Shravan Kumar.

    Hi,
    Have you checked this link?
    http://download-west.oracle.com/docs/cd/B25516_08/current/acrobat/115omapi.zip
    it has extensive information on OM APIs
    Regards
    Prashant Pathak

  • Unable to cancel sales order line using API

    Hi,
    After running the below API script I am getting the error message as
    Error Message: FND FND_AS_UNEXPECTED_ERROR N PKG_NAME OE_Order_PVT N
    PROCEDURE_NAME Process_Order N ERROR_TEXT ORA-01403: no data found
    Help me out to fix the issue.
    Please find the code below :
    create or replace procedure xxso_line_cancel
    is
    l_user_id NUMBER;
    l_resp_id NUMBER;
    l_appl_id NUMBER;
    l_header_rec_in oe_order_pub.header_rec_type;
    l_line_tbl_in oe_order_pub.line_tbl_type;
    l_action_request_tbl_in oe_order_pub.request_tbl_type;
    l_header_rec_out oe_order_pub.header_rec_type;
    l_line_tbl_out oe_order_pub.line_tbl_type;
    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;
    l_chr_program_unit_name VARCHAR2 (100);
    l_ret_status VARCHAR2 (1000) := NULL;
    l_msg_count NUMBER := 0;
    l_msg_data VARCHAR2 (2000);
    l_api_version NUMBER := 1.0;
    CURSOR c_so_details
    IS
    SELECT ol.line_number, ol.shipment_number, ol.header_id, ol.line_id, ol.flow_status_code
    FROM
    oe_order_headers_all oh,
    oe_order_lines_all ol
    WHERE
    ol.header_id = oh.header_id
    AND ol.flow_status_code IN ('AWAITING_SHIPPING','ENTERED')
    AND oh.flow_status_code IN ('BOOKED', 'ENTERED')
    and oh.header_id = 34756
    and line_number=1;
    begin
    fnd_global.apps_initialize ( user_id => 1257 ,resp_id => 21623 , resp_appl_id => 660);
    mo_global.set_policy_context('S',122);
    mo_global.init('ONT');
    FOR i IN c_so_details
    LOOP
    l_line_tbl_in (1) := oe_order_pub.g_miss_line_rec;
    l_line_tbl_in (1).line_id := i.line_id;
    l_line_tbl_in (1).ordered_quantity := 0;
    l_line_tbl_in (1).cancelled_quantity := 4;
    l_line_tbl_in (1).cancelled_flag := 'Y';
    l_line_tbl_in (1).change_reason := '1'; --Administrative Reason
    l_line_tbl_in (1).change_comments := 'Cancel Order Line with reference to ticket#000000';
    l_line_tbl_in (1).operation := oe_globals.g_opr_update;
    oe_msg_pub.delete_msg;
    oe_order_pub.process_order
    (p_api_version_number => l_api_version,
    p_init_msg_list => fnd_api.g_true,
    p_return_values => fnd_api.g_true,
    p_action_commit => fnd_api.g_true,
    p_line_tbl => l_line_tbl_in,
    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_ret_status,
    x_msg_count => l_msg_count,
    x_msg_data => l_msg_data
    commit;
    l_msg_data := NULL;
    IF l_ret_status <> 'S'
    THEN
    FOR iindx IN 1 .. l_msg_count
    LOOP
    l_msg_data := l_msg_data || ' ' || oe_msg_pub.get (iindx);
    END LOOP;
    DBMS_OUTPUT.put_line ('Return Status: ' || l_ret_status);
    DBMS_OUTPUT.put_line ('Error Message: ' || l_msg_data);
    ELSE
    DBMS_OUTPUT.put_line ('Return Status: ' || l_ret_status);
    DBMS_OUTPUT.put_line ('Error Message: ' || l_msg_data);
    END IF;
    END LOOP;
    END;

    Hi,
    After running the below API script I am getting the error message as
    Error Message: FND FND_AS_UNEXPECTED_ERROR N PKG_NAME OE_Order_PVT N
    PROCEDURE_NAME Process_Order N ERROR_TEXT ORA-01403: no data found
    Help me out to fix the issue.
    Please find the code below :
    create or replace procedure xxso_line_cancel
    is
    l_user_id NUMBER;
    l_resp_id NUMBER;
    l_appl_id NUMBER;
    l_header_rec_in oe_order_pub.header_rec_type;
    l_line_tbl_in oe_order_pub.line_tbl_type;
    l_action_request_tbl_in oe_order_pub.request_tbl_type;
    l_header_rec_out oe_order_pub.header_rec_type;
    l_line_tbl_out oe_order_pub.line_tbl_type;
    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;
    l_chr_program_unit_name VARCHAR2 (100);
    l_ret_status VARCHAR2 (1000) := NULL;
    l_msg_count NUMBER := 0;
    l_msg_data VARCHAR2 (2000);
    l_api_version NUMBER := 1.0;
    CURSOR c_so_details
    IS
    SELECT ol.line_number, ol.shipment_number, ol.header_id, ol.line_id, ol.flow_status_code
    FROM
    oe_order_headers_all oh,
    oe_order_lines_all ol
    WHERE
    ol.header_id = oh.header_id
    AND ol.flow_status_code IN ('AWAITING_SHIPPING','ENTERED')
    AND oh.flow_status_code IN ('BOOKED', 'ENTERED')
    and oh.header_id = 34756
    and line_number=1;
    begin
    fnd_global.apps_initialize ( user_id => 1257 ,resp_id => 21623 , resp_appl_id => 660);
    mo_global.set_policy_context('S',122);
    mo_global.init('ONT');
    FOR i IN c_so_details
    LOOP
    l_line_tbl_in (1) := oe_order_pub.g_miss_line_rec;
    l_line_tbl_in (1).line_id := i.line_id;
    l_line_tbl_in (1).ordered_quantity := 0;
    l_line_tbl_in (1).cancelled_quantity := 4;
    l_line_tbl_in (1).cancelled_flag := 'Y';
    l_line_tbl_in (1).change_reason := '1'; --Administrative Reason
    l_line_tbl_in (1).change_comments := 'Cancel Order Line with reference to ticket#000000';
    l_line_tbl_in (1).operation := oe_globals.g_opr_update;
    oe_msg_pub.delete_msg;
    oe_order_pub.process_order
    (p_api_version_number => l_api_version,
    p_init_msg_list => fnd_api.g_true,
    p_return_values => fnd_api.g_true,
    p_action_commit => fnd_api.g_true,
    p_line_tbl => l_line_tbl_in,
    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_ret_status,
    x_msg_count => l_msg_count,
    x_msg_data => l_msg_data
    commit;
    l_msg_data := NULL;
    IF l_ret_status <> 'S'
    THEN
    FOR iindx IN 1 .. l_msg_count
    LOOP
    l_msg_data := l_msg_data || ' ' || oe_msg_pub.get (iindx);
    END LOOP;
    DBMS_OUTPUT.put_line ('Return Status: ' || l_ret_status);
    DBMS_OUTPUT.put_line ('Error Message: ' || l_msg_data);
    ELSE
    DBMS_OUTPUT.put_line ('Return Status: ' || l_ret_status);
    DBMS_OUTPUT.put_line ('Error Message: ' || l_msg_data);
    END IF;
    END LOOP;
    END;

  • Import new sales order line in existing sales order

    Hi All,
    I want to import new sales order line in existing sales order using these open Interface tables or APIs.
    I did some test but the import request always give me the error message:
    You are trying to insert an existing order or update an order that does not exist. Please enter a correct operation code.
    Help..
    BR,
    Edited by: user7993358 on 2011/5/26 下午 8:48

    Hi,
    The script available in Oracle Note 746796.1 may be of help with your troubleshooting.
    Cheers,
    Arun

  • Information about the deleted sales order line item in idoc.

    Hi Experts,
    I am new to IDOC.We have the following idoc requirement,
    When a line item is deleted from the sales order(VA02) ,
    the outbound idoc getting triggered for the sales order has the information about the rest all line items other than the deleted line item.We now want the information about the deleted line item in the Idoc .
    Please help me in proceeding further.

    Hi,
    I am facing the same scenario of capturing the  deleted sales order line item in idoc.
    I am using ORDRSP message type , where in E1EDP01- ACTION contains value  "000" .
    And the Deletion line item is not been captured, is there any configuration setting required to
    capture the deleted line item in Idoc.
    Based on the posting in this thread i understand that there is an  indicator which has to be set .
    Please let me know what is that indicator and how to set it?
    Thanks
    Sathish

  • How to sets the Reason for Rejection of the Open Sales Order Lines

    Hello gurus,
              I want to set the Reason for Rejection of the Open Sales Order Lines, Case is like :
    If current date is exeed the Auto Void Confirmed Back Order Days(for item level) +  date (last responding from customer), then reason for rejection should be set, So i want the logic to find out the date is exceed or not.
    Thanks
    Anjana

    Hello anjana,
       Actually your question is some confusing, but if u want to get eldest change as active sales order then logic is as follows:
    1.  On base of OBJNR u have to get UDATE from JCDS table
    2. then write logic as:
    SORT i_jcds BY objnr stat chgnr DESCENDING.
          LOOP AT i_jcds INTO wa_jcds1.
            CLEAR lv_stat.
            lv_stat = wa_jcds1-stat.
            AT NEW objnr.
              AT NEW stat.
                CLEAR: wa_tab.
                wa_tab-objnr = wa_jcds1-objnr.
                wa_tab-stat = lv_stat.
              ENDAT.
            ENDAT.
            IF wa_jcds1-inact = 'X'.
              CLEAR lv_tabix.
              IF sy-tabix > 1.
                lv_tabix = sy-tabix - 1.
              ELSE.
                lv_tabix = 1.
              ENDIF.
              READ TABLE i_jcds INTO wa_jcds2 INDEX lv_tabix.
              IF sy-subrc = 0.
                wa_tab-chgnr = wa_jcds2-chgnr.
                wa_tab-udate = wa_jcds2-udate.
                wa_tab-utime = wa_jcds2-utime.
                APPEND wa_tab TO i_tab.
              ENDIF.
              CONTINUE.
            ELSE.
              wa_tab-chgnr = wa_jcds1-chgnr.
              wa_tab-udate = wa_jcds1-udate.
              wa_tab-utime = wa_jcds1-utime.
            ENDIF.
            AT END OF objnr .
              AT END OF stat.
                APPEND wa_tab TO i_tab.
              ENDAT.
            ENDAT.
          ENDLOOP.
          DELETE ADJACENT DUPLICATES FROM i_tab COMPARING objnr stat.
          SORT i_tab BY objnr stat udate utime.
          DELETE ADJACENT DUPLICATES FROM i_tab COMPARING objnr.
    3. now in i_tab table u'll get eldest UDATE
    Hope its work for u.
    Thanks & Regards,
    Sumit Joshi

  • Cannot change Tax Code from the referenced sales order line

    hi,
    Has anyone ever got this error when creating Sales Order(SO): "*cannot change Tax Code from the referenced sales order line*"?
    The error occur with order type Return.
    This SO is created by copying from another SO.
    Please help.
    Regards & thanks,
    eRie

    hi,
    Has anyone ever got this error when creating Sales Order(SO): "*cannot change Tax Code from the referenced sales order line*"?
    The error occur with order type Return.
    This SO is created by copying from another SO.
    Please help.
    Regards & thanks,
    eRie

  • How to cancel a Move Order line using API

    Hi
    I have a requirement, where I have to cancel Move order lines.
    At times, multiple Move order lines are getting created for the same Sales order line.
    Even after the Sales Order line is shipped and closed, the move order line is still open and it also has a corresponding pending transaction in mtl_material_transactions_temp table.
    I came across INV_MOVE_ORDER_PUB.process move order line API.
    how do I use it to cancel the move order line. Any sample codes would be highly welcome.
    Thanks

    Finally, found an alternate solution.
    used the following code.
    ===================================
    SET serveroutput on size 1000000
    DECLARE
    l_return_status VARCHAR2(100);
    l_msg_count NUMBER;
    l_msg_data VARCHAR2(2000);
    l_msg_index NUMBER;
    l_user_id NUMBER;
    l_resp_id NUMBER;
    l_appl_id NUMBER;
    l_org_id NUMBER := &org_id;
    l_move_order_line_id NUMBER := &mo_line_id ;
    BEGIN
    SELECT user_id
    INTO l_user_id
    FROM fnd_user
    WHERE user_name = 'PRAWILNSON';
    SELECT responsibility_id
    ,application_id
    INTO l_resp_id
    ,l_appl_id
    FROM fnd_responsibility_vl
    WHERE responsibility_name = 'Order Management Super User';
    FND_GLOBAL.apps_initialize (l_user_id, l_resp_id, l_appl_id);
    MO_GLOBAL.set_policy_context ('S', l_org_id);
    MO_GLOBAL.init;
    DBMS_OUTPUT.put_line ('Calling INV_MO_BACKORDER_PVT to Backorder MO');
    DBMS_OUTPUT.put_line ('===============================');
    inv_mo_backorder_pvt.backorder (p_line_id => l_move_order_line_id
    ,x_return_status => l_return_status
    ,x_msg_count => l_msg_count
    ,x_msg_data => l_msg_data);
    DBMS_OUTPUT.put_line ('Return Status is : '|| l_return_status);
    -- Check Return Status
    IF l_return_status = fnd_api.g_ret_sts_success THEN
    DBMS_OUTPUT.put_line ('Successfully BackOrdered the Move Order Line');
    COMMIT;
    ELSE
    DBMS_OUTPUT.put_line ('Could not able to Back Order Line Due to Following Reasons' );
    ROLLBACK;
    FOR j IN 1 .. l_msg_count LOOP
    FND_MSG_PUB.get(p_msg_index => j
    ,p_encoded => fnd_api.g_false
    ,p_data => l_msg_data
    ,p_msg_index_out => l_msg_index);
    DBMS_OUTPUT.put_line ('Error Message is : '|| l_msg_data);
    END LOOP;
    END IF;
    END;
    /

  • How to amend the seeded sales order lines workflow

    Hi,
    I'd like to amend the workflow of order lines in sales order form in Order Management
    I want to clear the schedule ship date field because
    it is auto deafulted with sysdate
    How to download the seeded workflow ?
    How can i determien the needed amendment ?
    Any Guide PLS ?
    Thanks

    You can download the workflow using the WFLOAD command - see MOS Doc 1569004.1
    You will need Workflow Builder on a Windows PC to modify the workflow - see MOS Doc 1461991.1 and MOS Doc 125067.1

  • Unable to change the existing sales order

    Hi
    I need to change the existing sales order document which was already created and replicated into R/3.The following error has been giving
    "Document is being distributed - Changes are not possible".
    Can anybody help me how to change the document.
    early response would be rewarded,.
    Regards
    Vikram

    Hi Vikram,
    The problem is caused by a program error.
    Please follow the SAP Note for complete information.
    SAP Note : 718065
    Regards,
    Johnny.
    Reward with points if it helps.

  • Error in cancelling sales order line using process order API

    Hi,
    I have created a sales order which is in booked status. I want to cancel the order line . when I am running the concurrent request I am getting the following error message.I am using the process order API to perform this operation.
    API Error Message You are not allowed to update Inventory Item because:
    line has been booked
    API Error Message You are not allowed to update Line Type because:
    Line is Booked
    Can anyone help.
    thanks
    Ashwini

    Hi,
    What is the application release?
    What concurrent program you are running? Is it a custom or seeded one? And, what is the API name?
    Please see if these docs are applicable.
    Unable To Manual Mass Update Items For Multiple Booked Sales Order Lines [ID 887905.1]
    Cannot Update Ordered Item To Related Item On Booked Sales Order Line [ID 298796.1]
    Thanks,
    Hussein

  • Need to report on sales order lines using specific pricing modifier

    Is there a report I can run for a specific modifier number that will give me all the sales order lines that were adjusted using that pricing modifier?

    Use oe_price_adjustments table and link that to the qp_list_headers and lines to get the details of the modifiers.
    Thanks
    Nagamohan

  • Sales Order line Reservation API

    Hi All,
    how to do reserve the sales order line by using plsql program. Can you provide the API name which i can use for sales order line reservation.
    thanks
    reddy

    Hi,
    Please mention the application release and the OS. Also, post the code of the API you are using.
    Please See if these documents are applicable.
    Note: 887776.1 - NO LOT VALIDATION AFTER PATCH 4649626
    Note: 396645.1 - "APP-GMI-83119 Invalid lot no" While Transferring from Newly Created Lot with Null Inventory
    Note: 428393.1 - Cannot Move Lot with No Onhand Inventory
    Regards,
    Hussein

  • Need to pass in line charges when cancel order line using API?

    Hi,
    Do we need to pass in line charges (charges, freight cost) when cancel order line using Oe_Order_Pub.Process_Order API?

    I found the answer to my own question:
    Yes it is a supported feature. It is documented on the following page:
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/desktop/NativeApp lication.html#event:invoke
    When you subscribe to the invoke event of the NativeApplication it will subsequently dispatch the event and you read the e.arguments Array object to get the startup arguments passed into the native application.

  • Unable to copy the Price Modifiers associated with a Sales Order Line

    Dear All,
    I am copying Sales Order Line using the process_order API. I was not able to copy the Price Modifiers associated with the Lines. How can I accomplish this..?
    Is there any API available for copying the Price Modifier info associated with the Sales Order Line..?
    Environment is 11i and OS is SUN Solaris
    Please update...
    Many thanks in advance..

    Hello All,
    Please let me know is this possible to have the list of Invoices for an associated Sales Order.
    Thanks,
    Abdul

Maybe you are looking for

  • XML Sax Exception with 9.2.0.5 express*.jar files for Olap API

    I was using the olap_api_92.jar that came with jdeveloper for the olap api and having a coding problem.. In trying to see if I could resolve the previous problem, I set my classpath to use the jar files provided with the 9.2.0.5 install for AiX.. all

  • Reverse the Stock in transit

    Hi all , I have a material as stock in transit - long back ( using Mvt type 641).I dont have previous history for that stock ( delivery, document etc ) .So every time it is showing as Material in transit in Material master but it is not coming in MB5

  • INSERTS slow

    I have a batch process that comepletes in 3 hrs max if I process all the rows in one shot. something like this insert into dest_table select * from source_table; But when I process the same at an entity level by passing in the entity pk the process i

  • Restoring from 9.2.0.5 DB to 9.2.0.8

    I have a Production database running 9.2.0.5. I also a TEST and DEV database - running 9.2.0.5 and 9.2.0.8 (the 9.2.0.8 database in DEV was upgraded recently but no one has had the time to test it out) Now I have to duplicate my PROD (9.2.0.5) databa

  • Really stuck with multipart message...

    I post below the essence of my code... I read a lot of pages on the internet but my multipart message doesn't want to work : With Outlook the mailer says that the encoding is unsupported and it attaches the multipart as a text file... In outlook expr