Total Pageviews

August 15, 2015

8/15/2015 10:15:00 PM
Please find script for hold Release
DECLARE
   vReturnStatus   VARCHAR2 (240);
   vMsgCount       NUMBER := 0;
   vMsg            VARCHAR2 (2000);
   v_order_tbl     OE_HOLDS_PVT.ORDER_TBL_TYPE;
   v_header_id     OE_ORDER_HEADERS.HEADER_ID%TYPE;
   v_line_id       OE_ORDER_LINES.LINE_ID%TYPE;
BEGIN
   DEBUG ('Releasing holds on ' || rHolds.header_id || '-' || rHolds.line_id);
   DEBUG ('Hold ID' || rHolds.header_id || '-' || rHolds.line_id);

   --DBMS_APPLICATION_INFO.SET_CLIENT_INFO(204); For 11iLEC
   SELECT   ooha.header_id, oola.line_id
     INTO   v_header_id, v_line_id
     FROM   oe_order_headers_all ooha, oe_order_lines_all oola
    WHERE   ooha.order_number = p_order_number--Pass your order number here
            and ooha.header_id=oola.header_id;   
   mo_global.Init ('ONT');                                 -- Required for R12
   mo_global.Set_org_context (204, NULL, 'ONT');
   fnd_global.Set_nls_context ('AMERICAN');
   mo_global.Set_policy_context ('S', 204);                -- Required for R12
   v_order_tbl.DELETE;
   v_order_tbl (1).header_id := v_header_id;
   v_order_tbl (1).line_id := v_line_id;
   OE_HOLDS_PUB.Release_Holds (
      p_api_version           => 1.0,
      p_init_msg_list         => FND_API.G_FALSE,
      p_commit                => FND_API.G_FALSE,
      p_validation_level      => FND_API.G_VALID_LEVEL_FULL,
      p_order_tbl             => v_order_tbl,
      p_hold_id               => 1000,
      p_release_reason_code   => 'Hold Released',
      p_release_comment       => NULL,
      x_return_status         => vReturnStatus,
      x_msg_count             => vMsgCount,
      x_msg_data              => vMsg
   );
   DEBUG ('Status of Release Holds ' || vReturnStatus);
EXCEPTION
   WHEN OTHERS
   THEN
      NULL;
end;



More notes on Oracle Order Import

 
Related Posts Plugin for WordPress, Blogger...