src-db/database/model/functions/AD_SYNCHRONIZE.xml
changeset 1605 8a0fe0193bef
parent 1576 bb3c7a88250a
child 1654 995d29b99937
equal deleted inserted replaced
1604:a1c518e6ed93 1605:8a0fe0193bef
     1 <?xml version="1.0"?>
     1 <?xml version="1.0"?>
     2   <database name="FUNCTION AD_SYNCHRONIZE">
     2   <database name="FUNCTION AD_SYNCHRONIZE">
     3     <function name="AD_SYNCHRONIZE" type="NULL">
     3     <function name="AD_SYNCHRONIZE" type="NULL">
     4       <parameter name="p_pinstance_id" type="NUMERIC" mode="in">
     4       <parameter name="p_pinstance_id" type="VARCHAR" mode="in">
     5         <default/>
     5         <default/>
     6       </parameter>
     6       </parameter>
     7       <body><![CDATA[/*************************************************************************
     7       <body><![CDATA[/*************************************************************************
     8   * The contents of this file are subject to the Compiere Public
     8   * The contents of this file are subject to the Compiere Public
     9   * License 1.1 ("License"); You may not use this file except in
     9   * License 1.1 ("License"); You may not use this file except in
    36   ************************************************************************/
    36   ************************************************************************/
    37   -- Logistice
    37   -- Logistice
    38   v_ResultStr VARCHAR2(2000):='';
    38   v_ResultStr VARCHAR2(2000):='';
    39   v_Message VARCHAR2(2000):='';
    39   v_Message VARCHAR2(2000):='';
    40   v_Result NUMBER:=1; -- 0=failure
    40   v_Result NUMBER:=1; -- 0=failure
    41   v_Record_ID NUMBER;
    41   v_Record_ID VARCHAR2(32);
    42   v_AD_User_ID NUMBER;
    42   v_AD_User_ID VARCHAR2(32);
    43   -- Parameter
    43   -- Parameter
    44   TYPE RECORD IS REF CURSOR;
    44   TYPE RECORD IS REF CURSOR;
    45     Cur_Parameter RECORD;
    45     Cur_Parameter RECORD;
    46     -- Parameter Variables
    46     -- Parameter Variables
    47     v_rowcount NUMBER;
    47     v_rowcount NUMBER;
    69     END IF;
    69     END IF;
    70   BEGIN --BODY
    70   BEGIN --BODY
    71     ---------------------------------------------------------------------------
    71     ---------------------------------------------------------------------------
    72     DBMS_OUTPUT.PUT_LINE('Adding missing Elements') ;
    72     DBMS_OUTPUT.PUT_LINE('Adding missing Elements') ;
    73     DECLARE
    73     DECLARE
    74       NextNo NUMBER;
    74       NextNo varchar2(32);
    75       Cur_Column RECORD;
    75       Cur_Column RECORD;
    76       Cur_Process RECORD;
    76       Cur_Process RECORD;
    77     BEGIN
    77     BEGIN
    78       DBMS_OUTPUT.PUT_LINE('Column:') ;
    78       DBMS_OUTPUT.PUT_LINE('Column:') ;
    79       FOR Cur_Column IN
    79       FOR Cur_Column IN
    91             CREATED, CREATEDBY, UPDATED, UPDATEDBY,
    91             CREATED, CREATEDBY, UPDATED, UPDATEDBY,
    92             ColumnName, NAME, PrintName, Description,
    92             ColumnName, NAME, PrintName, Description,
    93             Help
    93             Help
    94           )
    94           )
    95           VALUES
    95           VALUES
    96           (NextNo, 0, 0, 'Y',
    96           (NextNo, '0', '0', 'Y',
    97           now(), 0, now(), 0,
    97           now(), '0', now(), '0',
    98           Cur_Column.ColumnName, Cur_Column.NAME, Cur_Column.NAME, Cur_Column.Description,
    98           Cur_Column.ColumnName, Cur_Column.NAME, Cur_Column.NAME, Cur_Column.Description,
    99           Cur_Column.Help) ;
    99           Cur_Column.Help) ;
   100         DBMS_OUTPUT.PUT_LINE('  added ' || Cur_Column.ColumnName) ;
   100         DBMS_OUTPUT.PUT_LINE('  added ' || Cur_Column.ColumnName) ;
   101         COMMIT;
   101         COMMIT;
   102       END LOOP;
   102       END LOOP;
   116             CREATED, CREATEDBY, UPDATED, UPDATEDBY,
   116             CREATED, CREATEDBY, UPDATED, UPDATEDBY,
   117             ColumnName, NAME, PrintName, Description,
   117             ColumnName, NAME, PrintName, Description,
   118             Help
   118             Help
   119           )
   119           )
   120           VALUES
   120           VALUES
   121           (NextNo, 0, 0, 'Y',
   121           (NextNo, '0', '0', 'Y',
   122           now(), 0, now(), 0,
   122           now(), '0', now(), '0',
   123           Cur_Process.ColumnName, Cur_Process.NAME, Cur_Process.NAME, Cur_Process.Description,
   123           Cur_Process.ColumnName, Cur_Process.NAME, Cur_Process.NAME, Cur_Process.Description,
   124           Cur_Process.Help) ;
   124           Cur_Process.Help) ;
   125         DBMS_OUTPUT.PUT_LINE('  added ' || Cur_Process.ColumnName) ;
   125         DBMS_OUTPUT.PUT_LINE('  added ' || Cur_Process.ColumnName) ;
   126         COMMIT;
   126         COMMIT;
   127       END LOOP;
   127       END LOOP;