{"id":4303,"date":"2013-11-21T20:22:37","date_gmt":"2013-11-21T20:22:37","guid":{"rendered":"http:\/\/erpschools.com\/?p=4303"},"modified":"2014-12-05T10:09:11","modified_gmt":"2014-12-05T10:09:11","slug":"oe_order_pub-add-lines-existing-sales-order","status":"publish","type":"post","link":"https:\/\/erpschools.com\/erps\/api\/om-api\/oe_order_pub-add-lines-existing-sales-order","title":{"rendered":"OE_ORDER_PUB: Add lines to existing Sales Order"},"content":{"rendered":"<p>OE_ORDER_PUB: Add lines to existing Sales Order<\/p>\n<p><code><br \/>\nset serveroutput on;<br \/>\nDECLARE<br \/>\nl_api_version_number NUMBER := 1;<br \/>\nl_return_status\t\tVARCHAR2(2000);<br \/>\nl_msg_count\t\tNUMBER;<br \/>\nl_msg_data\t\tVARCHAR2(2000);<br \/>\nl_debug_level\t\tNUMBER := 1; -- OM DEBUG LEVEL (MAX 5)<\/p>\n<p>-- IN Variables --<br \/>\nl_header_rec oe_order_pub.header_rec_type;<br \/>\nl_line_tbl oe_order_pub.line_tbl_type;<br \/>\nl_action_request_tbl oe_order_pub.Request_Tbl_Type;<\/p>\n<p>-- OUT Variables --<br \/>\nl_header_rec_out oe_order_pub.header_rec_type;<br \/>\nl_header_val_rec_out oe_order_pub.header_val_rec_type;<br \/>\nl_header_adj_tbl_out oe_order_pub.header_adj_tbl_type;<br \/>\nl_header_adj_val_tbl_out oe_order_pub.header_adj_val_tbl_type;<br \/>\nl_header_price_att_tbl_out oe_order_pub.header_price_att_tbl_type;<br \/>\nl_header_adj_att_tbl_out oe_order_pub.header_adj_att_tbl_type;<br \/>\nl_header_adj_assoc_tbl_out oe_order_pub.header_adj_assoc_tbl_type;<br \/>\nl_header_scredit_tbl_out oe_order_pub.header_scredit_tbl_type;<br \/>\nl_header_scredit_val_tbl_out oe_order_pub.header_scredit_val_tbl_type;<br \/>\nl_line_tbl_out oe_order_pub.line_tbl_type;<br \/>\nl_line_val_tbl_out oe_order_pub.line_val_tbl_type;<br \/>\nl_line_adj_tbl_out oe_order_pub.line_adj_tbl_type;<br \/>\nl_line_adj_val_tbl_out oe_order_pub.line_adj_val_tbl_type;<br \/>\nl_line_price_att_tbl_out oe_order_pub.line_price_att_tbl_type;<br \/>\nl_line_adj_att_tbl_out oe_order_pub.line_adj_att_tbl_type;<br \/>\nl_line_adj_assoc_tbl_out oe_order_pub.line_adj_assoc_tbl_type;<br \/>\nl_line_scredit_tbl_out oe_order_pub.line_scredit_tbl_type;<br \/>\nl_line_scredit_val_tbl_out oe_order_pub.line_scredit_val_tbl_type;<br \/>\nl_lot_serial_tbl_out oe_order_pub.lot_serial_tbl_type;<br \/>\nl_lot_serial_val_tbl_out oe_order_pub.lot_serial_val_tbl_type;<br \/>\nl_action_request_tbl_out oe_order_pub.request_tbl_type;<br \/>\nl_msg_index NUMBER;<br \/>\nl_data VARCHAR2(2000);<br \/>\nl_loop_count NUMBER;<br \/>\nl_debug_file VARCHAR2(200);<\/p>\n<p>b_return_status VARCHAR2(200);<br \/>\nb_msg_count NUMBER;<br \/>\nb_msg_data VARCHAR2(2000);<\/p>\n<p>BEGIN<\/p>\n<p>IF (l_debug_level > 0) THEN<br \/>\nl_debug_file := OE_DEBUG_PUB.Set_Debug_Mode('FILE');<br \/>\noe_debug_pub.initialize;<br \/>\noe_debug_pub.setdebuglevel(l_debug_level);<br \/>\nOe_Msg_Pub.initialize;<br \/>\nEND IF;<\/p>\n<p>mo_global.init('ONT');<br \/>\nmo_global.set_policy_context('S',204);<br \/>\nfnd_global.apps_initialize ( user_id      => 1318<br \/>\n                            ,resp_id      => 21623<br \/>\n                            ,resp_appl_id => 660);<\/p>\n<p>l_line_tbl(1) := oe_order_pub.G_MISS_LINE_REC;<br \/>\nl_line_tbl(1).operation := OE_GLOBALS.G_OPR_CREATE;<br \/>\nl_line_tbl(1).inventory_item_id := 162747;<br \/>\nl_line_tbl(1).ordered_quantity := 10;<br \/>\nl_line_tbl(1).ship_to_org_id := 1024;<br \/>\nl_line_tbl(1).tax_code := 'Location';<br \/>\nl_line_tbl(1).header_id := 221186;<\/p>\n<p>dbms_output.put_line('Calling API');<br \/>\noe_order_pub.Process_Order( p_api_version_number => l_api_version_number,<br \/>\np_header_rec => l_header_rec,<br \/>\np_line_tbl => l_line_tbl,<br \/>\np_action_request_tbl => l_action_request_tbl,<br \/>\n--OUT variables<br \/>\nx_header_rec => l_header_rec_out,<br \/>\nx_header_val_rec => l_header_val_rec_out,<br \/>\nx_header_adj_tbl => l_header_adj_tbl_out,<br \/>\nx_header_adj_val_tbl => l_header_adj_val_tbl_out,<br \/>\nx_header_price_att_tbl => l_header_price_att_tbl_out,<br \/>\nx_header_adj_att_tbl => l_header_adj_att_tbl_out,<br \/>\nx_header_adj_assoc_tbl => l_header_adj_assoc_tbl_out,<br \/>\nx_header_scredit_tbl => l_header_scredit_tbl_out,<br \/>\nx_header_scredit_val_tbl => l_header_scredit_val_tbl_out,<br \/>\nx_line_tbl => l_line_tbl_out,<br \/>\nx_line_val_tbl => l_line_val_tbl_out,<br \/>\nx_line_adj_tbl => l_line_adj_tbl_out,<br \/>\nx_line_adj_val_tbl => l_line_adj_val_tbl_out,<br \/>\nx_line_price_att_tbl => l_line_price_att_tbl_out,<br \/>\nx_line_adj_att_tbl => l_line_adj_att_tbl_out,<br \/>\nx_line_adj_assoc_tbl => l_line_adj_assoc_tbl_out,<br \/>\nx_line_scredit_tbl => l_line_scredit_tbl_out,<br \/>\nx_line_scredit_val_tbl => l_line_scredit_val_tbl_out,<br \/>\nx_lot_serial_tbl => l_lot_serial_tbl_out,<br \/>\nx_lot_serial_val_tbl => l_lot_serial_val_tbl_out,<br \/>\nx_action_request_tbl => l_action_request_tbl_out,<br \/>\nx_return_status => l_return_status,<br \/>\nx_msg_count => l_msg_count,<br \/>\nx_msg_data => l_msg_data);<\/p>\n<p>IF l_return_status = FND_API.G_RET_STS_SUCCESS THEN<br \/>\ndbms_output.put_line('Return status is success ');<br \/>\nCOMMIT;<br \/>\nELSE<br \/>\n dbms_output.put_line('Return status failure ');<br \/>\n if (l_debug_level > 0) then<br \/>\n  dbms_output.put_line('failure');<br \/>\n end if;<br \/>\n ROLLBACK;<br \/>\nEND IF;<\/p>\n<p>-- Display Return Status<br \/>\nif (l_debug_level > 0) then<br \/>\nDBMS_OUTPUT.PUT_LINE('process ORDER ret status IS: ' || l_return_status);<br \/>\nDBMS_OUTPUT.PUT_LINE('process ORDER msg data IS: ' || l_msg_data);<br \/>\nDBMS_OUTPUT.PUT_LINE('header.order_number IS: '|| to_char(l_header_rec_out.order_number));<br \/>\nDBMS_OUTPUT.PUT_LINE('header.header_id IS: ' ||l_header_rec_out.header_id);<br \/>\nDBMS_OUTPUT.PUT_LINE('header.order_source_id IS: '|| l_header_rec_out.order_source_id);<br \/>\nDBMS_OUTPUT.PUT_LINE('header.flow_status_code IS: '|| l_header_rec_out.flow_status_code);<br \/>\nend if;<br \/>\n--Display ERROR Messages<br \/>\nIF (l_debug_level > 0) THEN<br \/>\nFOR i IN 1 .. l_msg_count LOOP<br \/>\n     l_data := oe_msg_pub.get( p_msg_index => i, p_encoded => 'F');<br \/>\n      dbms_output.put_line( i|| ') '|| l_data);<br \/>\nEND LOOP;<br \/>\nEND IF;<br \/>\nIF (l_debug_level > 0) THEN<br \/>\n  OE_DEBUG_PUB.DEBUG_OFF;<br \/>\nEND IF;<br \/>\nEND ;<\/p>\n<p><\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>OE_ORDER_PUB: Add lines to existing Sales Order set serveroutput on; DECLARE l_api_version_number NUMBER := 1; l_return_status VARCHAR2(2000); l_msg_count NUMBER; l_msg_data VARCHAR2(2000); l_debug_level NUMBER := 1; &#8212; OM DEBUG LEVEL (MAX 5) &#8212; IN Variables &#8212; 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; &#8212; OUT Variables &#8212; 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; [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[503],"tags":[530,526],"class_list":["post-4303","post","type-post","status-publish","format-standard","hentry","category-om-api","tag-api","tag-om"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>OE_ORDER_PUB: Add lines to existing Sales Order<\/title>\n<meta name=\"description\" content=\"OE_ORDER_PUB.process_order Add lines to existing Sales Order\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/erpschools.com\/erps\/api\/om-api\/oe_order_pub-add-lines-existing-sales-order\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Renuka\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/erpschools.com\/erps\/api\/om-api\/oe_order_pub-add-lines-existing-sales-order#article\",\"isPartOf\":{\"@id\":\"https:\/\/erpschools.com\/erps\/api\/om-api\/oe_order_pub-add-lines-existing-sales-order\"},\"author\":{\"name\":\"Renuka\",\"@id\":\"https:\/\/erpschools.com\/erps\/#\/schema\/person\/cbade316c91d3f36ba5339e274c76249\"},\"headline\":\"OE_ORDER_PUB: Add lines to existing Sales Order\",\"datePublished\":\"2013-11-21T20:22:37+00:00\",\"dateModified\":\"2014-12-05T10:09:11+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/erpschools.com\/erps\/api\/om-api\/oe_order_pub-add-lines-existing-sales-order\"},\"wordCount\":18,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/erpschools.com\/erps\/#organization\"},\"keywords\":[\"API\",\"om\"],\"articleSection\":[\"OM API\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/erpschools.com\/erps\/api\/om-api\/oe_order_pub-add-lines-existing-sales-order#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/erpschools.com\/erps\/api\/om-api\/oe_order_pub-add-lines-existing-sales-order\",\"url\":\"https:\/\/erpschools.com\/erps\/api\/om-api\/oe_order_pub-add-lines-existing-sales-order\",\"name\":\"OE_ORDER_PUB: Add lines to existing Sales Order\",\"isPartOf\":{\"@id\":\"https:\/\/erpschools.com\/erps\/#website\"},\"datePublished\":\"2013-11-21T20:22:37+00:00\",\"dateModified\":\"2014-12-05T10:09:11+00:00\",\"description\":\"OE_ORDER_PUB.process_order Add lines to existing Sales Order\",\"breadcrumb\":{\"@id\":\"https:\/\/erpschools.com\/erps\/api\/om-api\/oe_order_pub-add-lines-existing-sales-order#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/erpschools.com\/erps\/api\/om-api\/oe_order_pub-add-lines-existing-sales-order\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/erpschools.com\/erps\/api\/om-api\/oe_order_pub-add-lines-existing-sales-order#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/erpschools.com\/erps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"OE_ORDER_PUB: Add lines to existing Sales Order\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/erpschools.com\/erps\/#website\",\"url\":\"https:\/\/erpschools.com\/erps\/\",\"name\":\"erpSchools\",\"description\":\"Oracle Apps\",\"publisher\":{\"@id\":\"https:\/\/erpschools.com\/erps\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/erpschools.com\/erps\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/erpschools.com\/erps\/#organization\",\"name\":\"erpSchools\",\"url\":\"https:\/\/erpschools.com\/erps\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/erpschools.com\/erps\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/erps_logo7.png\",\"contentUrl\":\"https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/erps_logo7.png\",\"width\":250,\"height\":60,\"caption\":\"erpSchools\"},\"image\":{\"@id\":\"https:\/\/erpschools.com\/erps\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"http:\/\/facebook.com\/erpschools\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/erpschools.com\/erps\/#\/schema\/person\/cbade316c91d3f36ba5339e274c76249\",\"name\":\"Renuka\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/erpschools.com\/erps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/cce370e0af70415e6928d71fa62e268258b9b5de89d5d65e0d14c63abd3cad0c?s=96&d=blank&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/cce370e0af70415e6928d71fa62e268258b9b5de89d5d65e0d14c63abd3cad0c?s=96&d=blank&r=g\",\"caption\":\"Renuka\"},\"url\":\"https:\/\/erpschools.com\/erps\/author\/renuka\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"OE_ORDER_PUB: Add lines to existing Sales Order","description":"OE_ORDER_PUB.process_order Add lines to existing Sales Order","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/erpschools.com\/erps\/api\/om-api\/oe_order_pub-add-lines-existing-sales-order","twitter_misc":{"Written by":"Renuka","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/erpschools.com\/erps\/api\/om-api\/oe_order_pub-add-lines-existing-sales-order#article","isPartOf":{"@id":"https:\/\/erpschools.com\/erps\/api\/om-api\/oe_order_pub-add-lines-existing-sales-order"},"author":{"name":"Renuka","@id":"https:\/\/erpschools.com\/erps\/#\/schema\/person\/cbade316c91d3f36ba5339e274c76249"},"headline":"OE_ORDER_PUB: Add lines to existing Sales Order","datePublished":"2013-11-21T20:22:37+00:00","dateModified":"2014-12-05T10:09:11+00:00","mainEntityOfPage":{"@id":"https:\/\/erpschools.com\/erps\/api\/om-api\/oe_order_pub-add-lines-existing-sales-order"},"wordCount":18,"commentCount":0,"publisher":{"@id":"https:\/\/erpschools.com\/erps\/#organization"},"keywords":["API","om"],"articleSection":["OM API"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/erpschools.com\/erps\/api\/om-api\/oe_order_pub-add-lines-existing-sales-order#respond"]}]},{"@type":"WebPage","@id":"https:\/\/erpschools.com\/erps\/api\/om-api\/oe_order_pub-add-lines-existing-sales-order","url":"https:\/\/erpschools.com\/erps\/api\/om-api\/oe_order_pub-add-lines-existing-sales-order","name":"OE_ORDER_PUB: Add lines to existing Sales Order","isPartOf":{"@id":"https:\/\/erpschools.com\/erps\/#website"},"datePublished":"2013-11-21T20:22:37+00:00","dateModified":"2014-12-05T10:09:11+00:00","description":"OE_ORDER_PUB.process_order Add lines to existing Sales Order","breadcrumb":{"@id":"https:\/\/erpschools.com\/erps\/api\/om-api\/oe_order_pub-add-lines-existing-sales-order#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/erpschools.com\/erps\/api\/om-api\/oe_order_pub-add-lines-existing-sales-order"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/erpschools.com\/erps\/api\/om-api\/oe_order_pub-add-lines-existing-sales-order#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/erpschools.com\/erps"},{"@type":"ListItem","position":2,"name":"OE_ORDER_PUB: Add lines to existing Sales Order"}]},{"@type":"WebSite","@id":"https:\/\/erpschools.com\/erps\/#website","url":"https:\/\/erpschools.com\/erps\/","name":"erpSchools","description":"Oracle Apps","publisher":{"@id":"https:\/\/erpschools.com\/erps\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/erpschools.com\/erps\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/erpschools.com\/erps\/#organization","name":"erpSchools","url":"https:\/\/erpschools.com\/erps\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/erpschools.com\/erps\/#\/schema\/logo\/image\/","url":"https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/erps_logo7.png","contentUrl":"https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/erps_logo7.png","width":250,"height":60,"caption":"erpSchools"},"image":{"@id":"https:\/\/erpschools.com\/erps\/#\/schema\/logo\/image\/"},"sameAs":["http:\/\/facebook.com\/erpschools"]},{"@type":"Person","@id":"https:\/\/erpschools.com\/erps\/#\/schema\/person\/cbade316c91d3f36ba5339e274c76249","name":"Renuka","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/erpschools.com\/erps\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/cce370e0af70415e6928d71fa62e268258b9b5de89d5d65e0d14c63abd3cad0c?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cce370e0af70415e6928d71fa62e268258b9b5de89d5d65e0d14c63abd3cad0c?s=96&d=blank&r=g","caption":"Renuka"},"url":"https:\/\/erpschools.com\/erps\/author\/renuka"}]}},"_links":{"self":[{"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/posts\/4303","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/comments?post=4303"}],"version-history":[{"count":0,"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/posts\/4303\/revisions"}],"wp:attachment":[{"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/media?parent=4303"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/categories?post=4303"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/tags?post=4303"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}