Urgent: how to cancel orders in OM using API.oe_order_pub

Hi All,
I have written API - oe_order_pub, its compiling successfully but the orders are not getting cancelled. Do I need to add few more things for the following code...
Please help
create or replace package body apcx_test_cancel_order is
PROCEDURE process_order_api (
p_header_rec IN OUT oe_order_pub.header_rec_type,
p_line_tbl IN OUT oe_order_pub.line_tbl_type,
p_action_request_tbl IN OUT oe_order_pub.request_tbl_type,
x_return_status OUT VARCHAR2,
x_msg_count OUT NUMBER,
x_msg_data OUT VARCHAR2) IS
l_header_val_rec oe_order_pub.header_val_rec_type;
l_header_adj_tbl oe_order_pub.header_adj_tbl_type;
l_header_adj_val_tbl oe_order_pub.header_adj_val_tbl_type;
l_header_price_att_tbl oe_order_pub.header_price_att_tbl_type;
l_header_adj_att_tbl oe_order_pub.header_adj_att_tbl_type;
l_header_adj_assoc_tbl oe_order_pub.header_adj_assoc_tbl_type;
l_header_scredit_tbl oe_order_pub.header_scredit_tbl_type;
l_header_scredit_val_tbl
oe_order_pub.header_scredit_val_tbl_type;
l_line_val_tbl oe_order_pub.line_val_tbl_type;
l_line_adj_tbl oe_order_pub.line_adj_tbl_type;
l_line_adj_val_tbl oe_order_pub.line_adj_val_tbl_type;
l_line_price_att_tbl oe_order_pub.line_price_att_tbl_type;
l_line_adj_att_tbl oe_order_pub.line_adj_att_tbl_type;
l_line_adj_assoc_tbl oe_order_pub.line_adj_assoc_tbl_type;
l_line_scredit_tbl oe_order_pub.line_scredit_tbl_type;
l_line_scredit_val_tbl oe_order_pub.line_scredit_val_tbl_type;
l_lot_serial_tbl oe_order_pub.lot_serial_tbl_type;
l_lot_serial_val_tbl oe_order_pub.lot_serial_val_tbl_type;
BEGIN
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_false,
p_action_commit => fnd_api.g_false,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data,
p_header_rec => p_header_rec,
p_line_tbl => p_line_tbl,
p_action_request_tbl => p_action_request_tbl,
x_header_rec => p_header_rec,
x_header_val_rec => l_header_val_rec,
x_header_adj_tbl => l_header_adj_tbl,
x_header_adj_val_tbl => l_header_adj_val_tbl,
x_header_price_att_tbl => l_header_price_att_tbl,
x_header_adj_att_tbl => l_header_adj_att_tbl,
x_header_adj_assoc_tbl => l_header_adj_assoc_tbl,
x_header_scredit_tbl => l_header_scredit_tbl,
x_header_scredit_val_tbl => l_header_scredit_val_tbl,
x_line_tbl => p_line_tbl,
x_line_val_tbl => l_line_val_tbl,
x_line_adj_tbl => l_line_adj_tbl,
x_line_adj_val_tbl => l_line_adj_val_tbl,
x_line_price_att_tbl => l_line_price_att_tbl,
x_line_adj_att_tbl => l_line_adj_att_tbl,
x_line_adj_assoc_tbl => l_line_adj_assoc_tbl,
x_line_scredit_tbl => l_line_scredit_tbl,
x_line_scredit_val_tbl => l_line_scredit_val_tbl,
x_lot_serial_tbl => l_lot_serial_tbl,
x_lot_serial_val_tbl => l_lot_serial_val_tbl,
x_action_request_tbl => p_action_request_tbl);
END process_order_api;
PROCEDURE cancel_order (
p_order_header_id oe_order_headers.header_id%TYPE,
p_change_reason_code VARCHAR2,
p_change_comments VARCHAR2,
x_return_status OUT VARCHAR2,
x_msg_count OUT NUMBER,
x_msg_data OUT VARCHAR2) IS
l_header_rec oe_order_pub.header_rec_type := oe_order_pub.g_miss_header_rec;
l_stmt NUMBER;
BEGIN
l_stmt := 10;
l_header_rec := OE_ORDER_PUB.G_MISS_HEADER_REC;
l_header_rec.operation := oe_globals.g_opr_update;
l_header_rec.header_id := p_order_header_id;
l_header_rec.cancelled_flag := 'Y';
l_header_rec.change_reason := p_change_reason_code;
l_header_rec.change_comments := p_change_comments;
-- Call process order api
l_stmt := 20;
process_order_api (p_header_rec => l_header_rec,
p_line_tbl => oe_order_pub.g_miss_line_tbl,
p_action_request_tbl => oe_order_pub.g_miss_request_tbl,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data);
l_stmt := 30;
EXCEPTION
WHEN OTHERS THEN
oe_msg_pub.add_text ('Unexpected error in apcx_test_order_api.cancel_order, stmt ' || l_stmt || ': ' ||SQLERRM);
x_msg_count := NVL (x_msg_count, 0) + 1;
x_return_status := fnd_api.g_ret_sts_unexp_error;
if x_return_status = FND_API.G_RET_STS_SUCCESS then
dbms_output.put_line('success');
commit;
else
dbms_output.put_line('failure');
rollback;
end if;
end;
END apcx_test_cancel_order;
Thanks in advance.
Raj
Message was edited by:
user613675

Hi,
Can you pls try by passing this parameter value too.
l_header_adj.adjusted_amount := 5;
Thanks,
Praveen

Similar Messages

  • How to develop a web browser using API javatv?

    How to develop a web browser using API javatv?
    I'm tryin' to build a web browser using the API javaTv and
    I want to know if that is possible and if somebody already made this.
    This web browser will run a page developed in jsp.
    Thanks.

    You don't need JavaTV to write a web browser.
    Whichever Java platform you're using with JavaTV should provide enough.

  • How to cancel "Order Line Fulfilled"?

    Dears,
    When I want cancel order ,it display :
    "You are not allowed to cancel Order Line because:
    Line Fulfilled"
    Is there any method to cancel the order line? Which column decide order line Fulfilled??

    Hi Sandeep Gandhi ,
    Thank you for your response.
    1.I wonder why the creditonly line created manually can be cancelled from screen?Also after lines be booked .
    But the retrobill line cannot cancel although the line status ='Entered'.
    2.I don't wnat canceling from sql but try to make the line not become "Fulfilled" before line created.

  • How to create NC data by using API?

    Hi, all
    I want to log NC by using API.  but can't complet succsessful .
    please help me check the following source code.
    thanks.
    NCProductionServiceInterface ncPSI = Services.getService("com.sap.me.nonconformance", "NCProductionService");
    CreateNCRequest ncRequest = new CreateNCRequest();
    //NC500_part: copy from NC500,and ALLOW_PARTIAL=YES
    ncRequest.setActivity("NC500_part");
    ncRequest.setSfcRef(new SFCBOHandle(site, sfc).toString());
    ncRequest.setValidateNCCodeOperation(true);
    // defined NCCODE: NCJPN1
    ncRequest.setNcCodeRef(new NCCodeBOHandle(site,"NCJPN1").toString());
    ncRequest.setDefectCount(new BigDecimal("3"));
    CreateNCResponse ncResponse = ncPSI.createNC(ncRequest);
    DispositionRequest disRequest = new DispositionRequest();
    disRequest.setActivity("NC500_part");  //what can be set for this Activity,  NC500_part is OK?
    disRequest.setSfcRef(new SFCBOHandle(site, sfc).toString());
    ProductionContext productionCtx = new ProductionContext();
    productionCtx.setResourceRef(new ResourceBOHandle(site, "COIL").toString());
    disRequest.setProdCtx(productionCtx);
    DispositionSelection disSelection = new DispositionSelection();
    //DispositionSelection is must need, but what shuold be set?
    disSelection.setXXXX();
    disRequest.setDispositionSelection(disSelection);
    disRequest.setNcCodeRef(new NCCodeBOHandle(site,"NCJPN1").toString());
    disRequest.setTotalDefectCount(new BigDecimal("3"));
    // DispositionNC
    DispositionResponse disResponse = ncPSI.disposition(disRequest);

    I log the nc to my SFC,but how to complete the nc process by API?
    Wait for you help,thanks

  • How to create Custom WEB ADI using API Only for both Dowload/Upload process

    I am able to create custom WEB ADI using API for upload process. I have written the following code to create custom WEB ADI using API for upload process.
    DECLARE
    v_application_id NUMBER:= 20003;
    v_object_code VARCHAR2(255):='WEBADI_API_DEM_17';
    v_int_user_name VARCHAR2(255):='WEBADI_API_DEM_17';
    v_language VARCHAR2(255):='US';
    v_source_lang VARCHAR2(255):='US';
    v_user_id NUMBER :=1345;
    v_integrator_code VARCHAR2(255);--:='WEBADI_API_DEM_17_INTG';
    v_param_list_code VARCHAR2(255);
    --v_interface_code  VARCHAR2(255);
    v_interface_code VARCHAR2(255);--:='WEBADI_API_DEM_17_INTF';
    p_layout_code VARCHAR2(255):='WEBADI_API_DEM_17_LAYOUT';
    V_MAPPING_CODE VARCHAR2(255);
    BEGIN
    BNE_INTEGRATOR_UTILS.CREATE_INTEGRATOR(P_APPLICATION_ID =>v_application_id,
    P_OBJECT_CODE =>v_object_code,
    P_INTEGRATOR_USER_NAME =>v_int_user_name,
    P_LANGUAGE =>v_language,
    P_SOURCE_LANGUAGE =>v_source_lang,
    P_USER_ID =>v_user_id,
    P_INTEGRATOR_CODE =>v_integrator_code);
    BNE_INTEGRATOR_UTILS.CREATE_INTERFACE_FOR_API (P_APPLICATION_ID =>v_application_id,
    P_OBJECT_CODE =>v_object_code,
    P_INTEGRATOR_CODE =>v_integrator_code,
    P_API_PACKAGE_NAME =>'XXDH_PRICE_LIST_POC_PKG',
    P_API_PROCEDURE_NAME =>'CREATE_PRICE_LIST',
    P_INTERFACE_USER_NAME =>'WEBADI_API_DEM_17',
    P_PARAM_LIST_NAME =>'WEBADI_API_DEM_17',
    P_API_TYPE =>'PROCEDURE',
    P_API_RETURN_TYPE =>NULL,
    P_UPLOAD_TYPE =>2,
    P_LANGUAGE =>v_language,
    P_SOURCE_LANG =>v_source_lang,
    P_USER_ID =>v_user_id,
    P_PARAM_LIST_CODE =>v_param_list_code,
    P_INTERFACE_CODE =>v_interface_code);
    BNE_INTEGRATOR_UTILS.CREATE_DEFAULT_LAYOUT
    (P_APPLICATION_ID =>v_application_id,
    P_OBJECT_CODE =>v_object_code,
    P_INTEGRATOR_CODE =>v_integrator_code,
    P_INTERFACE_CODE =>v_interface_code,
    P_USER_ID =>v_user_id,
    P_FORCE =>FALSE,
    P_ALL_COLUMNS =>TRUE,
    P_LAYOUT_CODE =>p_layout_code);
    BNE_CONTENT_UTILS.CREATE_CONTENT_COLS_FROM_VIEW (P_APPLICATION_ID =>v_application_id,
    P_CONTENT_CODE =>'WEBADI_API_DEM_17'||'_CNT',
    P_VIEW_NAME =>'XXDH_PRICE_LIST_POC_V',
    P_LANGUAGE =>v_language,
    P_SOURCE_LANGUAGE =>v_source_lang,
    P_USER_ID =>v_user_id);
    BNE_CONTENT_UTILS.CREATE_CONTENT_TO_API_MAP (P_APPLICATION_ID =>v_application_id,
    P_OBJECT_CODE =>v_object_code,
    P_INTEGRATOR_CODE =>v_integrator_code,
    P_CONTENT_CODE =>'WEBADI_API_DEM_17'||'_CNT',
    P_INTERFACE_CODE =>v_interface_code,
    P_LANGUAGE =>v_language,
    P_SOURCE_LANGUAGE =>v_source_lang,
    P_USER_ID =>v_user_id,
    P_MAPPING_CODE =>V_MAPPING_CODE);
    END;
    I need to know what are API we can use to create download+upload ADI? anyone has already prepared script....please share it it me. My email id - [email protected]
    Thanks

    Use FNDLOAD, it's the only way.
    There are 2 seperate scripts, 1 for the Integrator and 1 for Layout.
    FNDLOAD apps/<pw> 0 Y DOWNLOAD $BNE_TOP/patch/115/import/bneintegrator.lct <your name>.ldt BNE_INTEGRATORS INTEGRATOR_ASN="XXX" INTEGRATOR_CODE="<your code>"
    FNDLOAD apps/<pw> 0 Y DOWNLOAD $BNE_TOP/patch/115/import/bnelay.lct <your name>.ldt BNE_LAYOUTS LAYOUT_ASN="XXX" LAYOUT_CODE="<your code>"
    Cheers
    Jeroen

  • No longer needing extra 20GB of space (iCloud). How to cancel order and payments?

    I ordered and paid for an additional 20GB of space (iCloud) per month.
    How do I cancel the order now that I no longer need?

    See the "Downgrade your iCloud storage plan" section of iCloud storage upgrades and downgrades - Apple Support

  • URGENT : how to change the report to use two date sets

    Hi,
    I have a summary report with the name of the sales agents and their total sales for the period from so and so. Now I need to run the same report to be able to see their total sales but from two set of dates, for eg. the same report for 2006 and 2007, side by side to compare the sales done by these agents.. to get an idea if their performance is improving, etc. How do I do this??
    The report already has two parameters date1 and date2, so in this I can give the date as from 01-JAN-2006 to 31-MAR-2006. But in the same report, I also need the total sales from 01-JAN-2007 to 31-MAR-2007, so that it can be compared.
    Please advise. Its urgent. Its for the chairman.
    Thx.

    Hi,
    I have a summary report with the name of the sales agents and their total sales for the period from so and so. Now I need to run the same report to be able to see their total sales but from two set of dates, for eg. the same report for 2006 and 2007, side by side to compare the sales done by these agents.. to get an idea if their performance is improving, etc. How do I do this??
    The report already has two parameters date1 and date2, so in this I can give the date as from 01-JAN-2006 to 31-MAR-2006. But in the same report, I also need the total sales from 01-JAN-2007 to 31-MAR-2007, so that it can be compared.
    Please advise. Its urgent. Its for the chairman.
    Thx.

  • How to cancel order made today?

    Could I ask for help wit canceling my order made today for moving phone line from Sky and for broadband. Apparently my partner sorted Sky issues when I was ordering BT.
    What should I do?

    Hi Rainmakerjg,
    Thanks for the post and welcome to the forum.  I can cancel this order for you.
    Please drop me an email via the 'Contact Us' link in my profile. (click on my name and you will find the link under the "about me" section). Include your BT order number if you have received one, your full address details and the link to this thread.
    Cheers
    Sean
    BTCare Community Manager
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry that we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)

  • Please Its very urgent How to connect the thumb device using java media fra

    I was new to JMF please help me
    i wnat the code for connecting to the signatuure pad or thumb device present iam doing project in biometrics please if any body knows
    the code farward it tome bye
    Advance Thanks

    The SecuGen FDx SDK for Java 1.0 Beta1 is now available. It is posted at http://sgdn.secugen.com. This is a JNI wrapper for the SecuGen FDx SDK v3.0. Sample source code including JSGD, A SWING version of the SecuGen Diagnostic utility. Currently only MS-Windows is supported.
    Best regards.
    =Dan=
    Dan Riley - SecuGen

  • Back order Delivery Detail using API

    Hi All,
    Is there any API to back order the Delivery detail?.. Please let me know what is the API and how it can be done.
    Thanks and Regards,
    Mahesh

    I used WSH_INTERFACE.Update_Shipping_Attributes to backorder the lines.
    Thanks and Regads,
    Mahesh

  • How could I ADD ITEM by using API

    Hi,
    I have Portal 9.0.3 installed.
    I want to call wwsbr_api from a javascript code (HTML portlet) to add a text item to a region, but I have some problem using this API:
    1; I don't know how could I get the p_caid, the p_folder_id and the region_id
    I found out that p_caid can be find WWSBR_SITES.ID. Is this correct?
    2; when I've tried to call this API from address line I've got a 404 ERROR (but it might have been casued by the wrong attribute values)
    So I need to know:
    - How could I find out the correct IDs?
    - How could I call wwsbr_api.add_item function from a javascript?
    Thanks for your help!
    THE BOOGIE IS OVER

    WWSBR_API is currently not supported in Portal Release 2 (902). Support for this API will return in the next version (9.0.2.6, planned for early 2003).
    Regards,
    Portal Product Manager

  • How to update file in Jar using API

    Hi,
    I have a jar file (actually a war file), and I need to update the properties in one of the files before I deploy it.
    I have been able to open it, get the correct JarEntry, load the properties, update the properties, but am struggling to figure out how to save it back to the Jar file?
    Any ideas?
    cheers,
    David

    So why isn't your build process just creating thecorrect contents of that properties file
    before including it in the war it builds, in thefirst place?
    Because we deploy it in many customers. They will
    obviously have different ip addresses eg for the
    database machine.
    Therefore we have certain properties that are
    customer-specific we need to update in the war before
    we deploy it.
    cheers,
    DavidI wasn't implying that your build process is only run one time. The build process can be run each time you build for each deployment. So do you mean you only want to deliver one generic WAR to each customer, and you want this change of properties to happen on the customer side somehow? What code are you going to run on that side to change it - not code in your web app because at that point it's too late - you've already loaded the web app and its files, which this/these property files are a part of. Sounds like you need a "build process" to bundle up the app for each unique target.
    Alternatively you could investigate adding or altering the manifest file in the WAR (or EAR) file to reference an additional standalone, or loose, directory (outside the WAR/EAR structure) and put your property files there. Then that directory would become part of your app's classpath just like it were in your WAR/EAR, and you could update that file independently.

  • OIM 11g - How to run a schedule task using API

    Hi All,
    May I know how i can run a schedule job in OIM 11g through API.I referred the below link but it is for 9.x version.I need the same functionality in 11g?.
    Schedule Tasks
    Thanks in advance.

    Check this :
    SchedulerService schService = oimClient.getService(SchedulerService.class);
    schService.triggerNow("Second Demo Scheduled Task");
    API Reference :
    void triggerNow(java.lang.String jobName)
    throws SchedulerException,
    SchedulerAccessDeniedException
    Runs the specified job
    Parameters:
    jobName - The job that is to be triggered
    Throws:
    SchedulerException - when an error occurs at the Quartz Engine or scheduler is not running.
    SchedulerAccessDeniedException - This exception will be thrown if access permission for operation is not available to the user

  • Freight Charges at Header Level using API oe_order_pub

    Hello,
    I am trying to process Header Level Freight Charges using oe_order_pub.process_order api. Please advice me as it is not entering charges. Here is my code. Thanks for your time and appreicate your help.
    ====
    declare
    l_header_rec Oe_Order_Pub.header_rec_type;
    l_header_adj oe_order_pub.Header_Adj_Rec_Type;
    l_header_scredit_tbl Oe_Order_Pub.header_scredit_tbl_type;
    l_header_adj_tbl Oe_Order_Pub.header_adj_val_tbl_type;
    l_action_request_tbl Oe_Order_Pub.request_tbl_type;
    l_line_tbl Oe_Order_Pub.line_tbl_type;
    l_line_adj_tbl Oe_Order_Pub.line_adj_tbl_type;
    l_line_scredit_tbl Oe_Order_Pub.line_scredit_rec_type;
    /*Out Parameters for Order API*/
    l_header_rec_out Oe_Order_Pub.header_rec_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_tbl_out Oe_Order_Pub.line_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;
    /*Local Variables*/
    l_ret_stat VARCHAR2 (1);
    l_msg_cnt NUMBER;
    l_msg_data VARCHAR2 (2000);
    x_return_status VARCHAR2 (1) := '';
    l_order_type VARCHAR2(80);
    l_order_type_id NUMBER;
    l_accounting_rule_id NUMBER;
    l_invoicing_rule_id NUMBER;
    l_price_list_id NUMBER;
    l_header_id NUMBER;
    l_customer_id NUMBER;
    l_order_number NUMBER;
    l_line_xml XMLTYPE;
    icount NUMBER;
    l_item_id NUMBER;
    l_count NUMBER;
    p_status varchar2(10);
    p_header_id number;
    p_error varchar2(1000);
    l_created_by number:=9930;
    BEGIN
    DBMS_APPLICATION_INFO.set_client_info ('104');
    Fnd_Global.apps_initialize (9930,50257,660);
    ---Initialise In Parameters
    l_header_rec := Oe_Order_Pub.g_miss_header_rec;
    l_action_request_tbl (1) := Oe_Order_Pub.g_miss_request_rec;
    l_line_tbl (1) := Oe_Order_Pub.g_miss_line_rec;
    /*required Fields for Header Record*/
    l_header_rec.orig_sys_document_ref :=8089;
    l_header_rec.order_type_id := 1245;
    l_header_rec.sold_to_org_id := 16273647;
    l_header_rec.order_number := 8094; -- Currenlty commented, eventuall we need to use this as this needs be to unique.
    l_header_rec.attribute1 := 8088; -- Currenlty capturing Order Number in ATT1
    l_header_rec.price_list_id := 150022; -- l_price_list_id;
    l_header_rec.payment_term_id := 1040;
    l_header_rec.operation := Oe_Globals.g_opr_create; --'CREATE';
    l_header_rec.flow_status_code := 'ENTERED';
    --l_header_adj  := Oe_Order_Pub.G_MISS_HEADER_ADJ_TBL;
    l_header_adj.header_id := 9584924;
    l_header_adj.automatic_flag :='N';
    l_header_adj.list_header_id :=154010;
    l_header_adj.list_line_id :=150071;
    l_header_adj.list_line_type_code :='FREIGHT_CHARGE';
    l_header_adj.change_reason_code :='MANUAL';
    l_header_adj.change_reason_text :='TEST';
    l_header_adj.updated_flag :='Y';
    l_header_adj.applied_flag :='Y';
    l_header_adj.operand :=10;
    l_header_adj.arithmetic_operator:='LUMPSUMP';
    l_header_adj.charge_type_code :='FREIGHT';
    l_header_adj.modifier_level_code :='ORDER';
    icount :=1;
    -- FOR icount IN 1 .. l_line_tbl.COUNT LOOP
    ---Initialising Line table records
    l_line_tbl (1) := Oe_Order_Pub.g_miss_line_rec;
    /*required Fields for Line Record*/
    l_line_tbl (icount).inventory_item_id := 71161;
    l_line_tbl (icount).operation := Oe_Globals.g_opr_create;
    l_line_tbl (icount).ordered_quantity := 3;
    l_line_tbl (icount).unit_selling_price := 5;
    l_line_tbl (icount).unit_list_price :=5;
    l_line_tbl (icount).calculate_price_flag :='P';
    ---Reset message
    Oe_Msg_Pub.initialize;
    ---Call API to Create Sales order with 2 lines in Entered Status
    --dbms_output.put_line(l_header_rec.order_number||'-'||l_order_number);
    apps.Oe_Order_Pub.process_order
    (p_api_version_number => 1.0
    ,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_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_stat
    ,x_msg_count => l_msg_cnt
    ,x_msg_data => l_msg_data
    -- COMMIT;
    DBMS_OUTPUT.PUT_LINE ('Return Status is ' || l_ret_stat);
    DBMS_OUTPUT.PUT_LINE ( 'Order Number in ARB Org is '
    || l_header_rec_out.order_number||'-'||
    l_header_rec_out.header_id
    p_status := l_ret_stat;
    p_header_id := l_header_rec_out.header_id;
    -- p_error := ltrim(rtrim(l_msg_data));
    Xx_Xmldb_Pkg.xx_insert_errors
    ('With or w/o Error After API'
    ,p_error
    ,p_header_id
    ,p_status
    ,SYSDATE
    ,l_created_by
    /*Check Errors */
    IF l_ret_stat <> 'S' THEN
    p_status :='FAILURE';
    IF l_msg_cnt > 0
    THEN
    FOR i IN 1 .. l_msg_cnt
    LOOP
    l_msg_data := Oe_Msg_Pub.get (p_msg_index => i
    ,p_encoded => 'F');
    -- p_error := ltrim(rtrim(l_msg_data));
    DBMS_OUTPUT.PUT_LINE ('Errors ...' || l_msg_data);
    Xx_Xmldb_Pkg.xx_insert_errors
    ('Error After API'
    ,p_error
    ,p_header_id
    ,p_status
    ,SYSDATE
    ,l_created_by
    END LOOP;
    END IF;
    END IF;
    IF l_ret_stat = Fnd_Api.g_ret_sts_success
    THEN
    l_header_rec := Oe_Order_Pub.g_miss_header_rec;
    l_action_request_tbl (1) := Oe_Order_Pub.g_miss_request_rec;
    l_line_tbl (1) := Oe_Order_Pub.g_miss_line_rec;
    ---Book Order
    l_action_request_tbl (1).request_type := Oe_Globals.g_book_order;
    l_action_request_tbl (1).entity_code := Oe_Globals.g_entity_header;
    l_action_request_tbl (1).entity_id := l_header_rec_out.header_id;
    ---Book the order
    /* Oe_Msg_Pub.initialize;
    ---API Call to Book the Order
    Oe_Order_Book_Util.complete_book_eligible
    (1.0
    ,Fnd_Api.g_false
    ,l_header_rec_out.header_id
    ,l_ret_stat
    ,l_msg_cnt
    ,l_msg_data
    -- COMMIT;
    IF l_ret_stat <> 'S' THEN
    p_status :='FAILURE';
    IF l_msg_cnt > 0
    THEN
    FOR i IN 1 .. l_msg_cnt
    LOOP
    l_msg_data :=
    Oe_Msg_Pub.get (p_msg_index => i
    ,p_encoded => 'F');
    DBMS_OUTPUT.PUT_LINE (l_msg_data);
    Xx_Xmldb_Pkg.xx_insert_errors ('Load XML Order Data, After api error .'
    ,l_msg_data
    ,null
    ,NULL
    ,SYSDATE
    ,1124
    END LOOP;
    END IF;
    END IF;
    IF l_ret_stat = Fnd_Api.g_ret_sts_success
    THEN
    x_return_status := l_action_request_tbl (1).return_status;
    END IF;
    ELSE
    DBMS_OUTPUT.PUT_LINE ('Failure');
    p_status :='FAILURE';
    END IF;
    end;
    /

    Hi,
    Can you pls try by passing this parameter value too.
    l_header_adj.adjusted_amount := 5;
    Thanks,
    Praveen

  • How can I find details for an API?

    hi all,
    how can I find details for an API (oe_order_pub.process_order)?
    http://etrm.oracle.com/ has no information for API's.
    regards

    Hi,
    Visit following links.
    1.4. Order Management APIs
    http://oracleappsengineering.blogspot.in/2012/03/oeorderpubprocessorder-api-to-create.html
    oe_order_pub.process_order api book order

Maybe you are looking for

  • HT4859 The restore from iCloud was not set up when my iPad was reset

    The restore from iCloud was not set up when my iPad was reset

  • Error Code: 6 Cannot download Photoshop C....Can you please help?

    My first time downloading Adobe products.   I was able to download Lightroom5 but not the Photoshop CC.  What is an error code 6 and how can I fix?

  • Installing Error: is unknown trust

    [root@Acid zach]# pacman -Syu :: Synchronizing package databases... core is up to date extra is up to date community is up to date arch-fonts is up to date :: Starting full system upgrade... resolving dependencies... looking for inter-conflicts... Ta

  • Repeating instances help

    In a repeating subform I have a DDL with Item A, B and TextFieldA and TextFieldB(Hidden). In case of item B: TextFieldA become Hidden and TextFieldB become visible. It's work when I select ItemB 9TextFieldA become Hidden and TextFieldB become visible

  • Newly created playlists not syncing to Nano

    I'm creating a playlist in iTunes which is fully operational in iTunes buy for some reason it is not syncing (appearing) in my Nano playlists. The standard default playlists (On-the-go, Top Rated, etc.) do sync (appear). Anyone else experiencing this