7 Replies Latest reply: Mar 9, 2013 10:50 AM by Ahmed Alsaied RSS

    stored procedures with view in tabular form

    Ahmed Alsaied
      Dears,
      i use apex 4.2 and database xe 11g , i have create tabular depend on view and i use stored procedures in process after computation and validation , the problem that view not update
      this tabular form query
      select 
      "ROWID",
      "DOC_DET_ID",
      "DOC_ID",
      "MOV_QNTY",
      BATCH_DET,
      "ITEM_NAME",
      "UOM_NAME",
      "SIZE_NAME",
      "COLOR_NAME",
      "STOREG_BRCHAS_BATCHINTERNN",
      "EXPR_DATE",
      "PROD_DATE",
      AVL_QNTY,
      storage_code,
      "LOCATION_CODE"
      from "#OWNER#"."STORAGE_MOV_DET_VIEW"
      WHERE DOC_ID =:P117_DOC_ID
      this a process that i use stored procedure in it
      DECLARE
         V_OLD     NUMBER:=0;
      BEGIN
         FOR i IN 1 .. apex_application.g_f02.COUNT  LOOP
            
            IF apex_application.g_f02 (i) IS NOT NULL THEN 
             
               SELECT MOV_QNTY INTO V_OLD 
                FROM STORAGE_MOV_DET
                WHERE DOC_DET_ID =apex_application.g_f02 (i);
      
                 IF apex_application.g_f13 (i) >  V_OLD THEN 
                   V_OLD :=apex_application.g_f13 (i)- V_OLD;
                 END IF;
           ELSE
               V_OLD :=apex_application.g_f13 (i);
           END IF;
           
           if  V_OLD  <> 0 then 
              GET_EXTRACT_PARENT_ITEM(apex_application.g_f04 (i) ,
                                     :P117_STORAGE_CODE ,
                                     apex_application.g_f12 (i) ,
                                     V_OLD);
          end if;
      END LOOP;
      END;
      when i use update this error i found
      Current version of data in database has changed since user initiated update process. current row version identifier = "A80CEBCFF06062F98D920BC75CB415AE" application row version identifier = "BCBA67120A87213D64EE059E10F3B15C" (Row 1)
      please help