Infolinks

Friday 6 July 2012

FINALLY CLOSE IN ORACLE APPS

Finally Close PO in ORACLA APPS

DECLARE
x_action constant varchar2(20) := 'FINALLY CLOSE'; -- Change this parameter as per requirement
x_calling_mode constant varchar2(2) := 'PO';
x_conc_flag constant varchar2(1) := 'N';
x_return_code_h varchar2(100);
x_auto_close constant varchar2(1) := 'N';
x_origin_doc_id number;
x_returned boolean:=null;

begin
apps.fnd_client_info.set_org_context(204);
fnd_global.apps_initialize(1318,50578,201);
DBMS_OUTPUT.PUT_LINE ('Calling PO_Actions.close_po for Closing/Finally Closing PO =>' );
x_returned :=
po_actions.close_po(
p_docid => 110386,
p_doctyp => 'PO',
p_docsubtyp => 'STANDARD',
p_lineid => null,
p_shipid => null,--Line_Location_ID.
p_action => x_action,
p_reason => NULL,
p_calling_mode => x_calling_mode,
p_conc_flag => x_conc_flag,
p_return_code => x_return_code_h,
p_auto_close => x_auto_close,
p_action_date => SYSDATE,
p_origin_doc_id => NULL);
COMMIT;
IF x_returned = TRUE THEN
DBMS_OUTPUT.PUT_LINE ('Purchase Order which just got Closed/Finally Closed is ' );
dbms_output.put_line(x_return_code_h);
--dbms_output.put_line(x_returned);

ELSE
DBMS_OUTPUT.PUT_LINE ('API Failed to Close/Finally Close the Purchase Order');
--dbms_output.put_line('return codeis:'||X_RETURNED);
END IF;
END;

2 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Please give me a process for auto close work order, purchase requisition and purchase order in oracle EBS.

    ReplyDelete