Oracle EBS AP 发票放弃行

-- purpose: 应付发票放弃发票行
-- 12.2.6 环境
-- author:jenrry  create_date: 2017-06-07
declare
  l_dummy_msg      VARCHAR2(2000);
  l_msg_data       VARCHAR2(2000);
  l_line_rec       ap_invoice_lines%ROWTYPE;
  l_result_boolean BOOLEAN;
begin
  BEGIN
    FND_GLOBAL.APPS_INITIALIZE(USER_ID      => 1110,
                               RESP_ID      => 50897,
                               RESP_APPL_ID => 20004);
    mo_global.init('SQLAP');
    MO_GLOBAL.set_policy_context('S', 105);
  END;
  l_line_rec.INVOICE_ID  := 14122;
  l_line_rec.LINE_NUMBER := 5;
  l_line_rec.accounting_date := sysdate;
  l_line_rec.period_name     := '2017-06';
  l_result_boolean       := AP_INVOICE_LINES_PKG.Discard_Inv_Line(P_line_rec          => l_line_rec,
                                                                  P_calling_mode      => 'DISCARD',
                                                                  --P_inv_cancellable   => 'N',
                                                                  P_last_updated_by   => -1,
                                                                  P_last_update_login => -1,
                                                                  P_error_code        => l_msg_data,
                                                                  P_token             => l_dummy_msg,
                                                                  P_calling_sequence  => null);

  IF l_result_boolean THEN
    DBMS_OUTPUT.put_line('S');
  END IF;
  DBMS_OUTPUT.put_line('P_error_code: ' || l_msg_data);
  DBMS_OUTPUT.put_line('P_token: ' || l_dummy_msg);
end;

  

posted on 2018-11-26 15:50  Jenrry  阅读(843)  评论(0编辑  收藏  举报