Delete command is not deleting the form records in details block

Tags:
Oracle
DECLARE
LOC_ITEM_CODE VARCHAR2(30);
LOC_ITEM_CLASS VARCHAR2(10);
LOC_ITEM_TYPE VARCHAR2(10);
LOC_ORDER_CODE VARCHAR2(10);
LOC_ITEM_LENGTH NUMBER(10,2);
LOC_ITEM_WIDTH NUMBER(10,2);
LOC_ITEM_HIGHT1 NUMBER(10,2);
LOC_REQUEST_YEAR NUMBER(4);
LOC_REQUEST_NO VARCHAR2(25);
LOC_BIG NUMBER(12,3);
LOC_SMALL NUMBER(12,3);
BEGIN
BEGIN

SELECT ITEM_CLASS,ITEM_TYPE,COP_CODE,ITEM_CODE,ITEM_LENGTH,ITEM_WIDTH,ITEM_HIGHT1,REQUEST_YEAR,REQUEST_NO,1
INTO LOC_ITEM_CLASS,LOC_ITEM_TYPE,LOC_ORDER_CODE,LOC_ITEM_CODE,LOC_ITEM_LENGTH,
LOC_ITEM_WIDTH,LOC_ITEM_HIGHT1,LOC_REQUEST_YEAR,LOC_REQUEST_NO,:GLOBAL.DUMMY
FROM IM_NEW_ITEMS
WHERE COP_CODE = :COP_ORDER_HEADER.COP_ORDER_CODE
AND REQUEST_NO = :COP_ORDER_HEADER.REQUEST_NO
AND REQUEST_YEAR = :COP_ORDER_HEADER.REQUEST_YEAR
AND ITEM_CLASS = :COP_ORDER_DETAILS.CLASS_CODE
AND ITEM_TYPE = :COP_ORDER_DETAILS.TYPE_CODE
AND ITEM_CODE = :COP_ORDER_DETAILS.ITEM_CODE;

EXCEPTION
WHEN NO_DATA_FOUND THEN
NULL ;
WHEN FORM_TRIGGER_FAILURE THEN
SHOW_MESSAGE('Error : '||SQLERRM);
RAISE FORM_TRIGGER_FAILURE ;
WHEN OTHERS THEN
SHOW_MESSAGE('Error : '||SQLERRM);
RAISE FORM_TRIGGER_FAILURE ;
END;
BEGIN
IF :GLOBAL.DUMMY = 1 THEN
DELETE FROM IM_NEW_ITEMS
WHERE COP_CODE = LOC_ORDER_CODE
AND REQUEST_NO = LOC_REQUEST_NO
AND REQUEST_YEAR = LOC_REQUEST_YEAR
AND ITEM_CLASS = LOC_ITEM_CLASS
AND ITEM_TYPE = LOC_ITEM_TYPE
AND ITEM_CODE = LOC_ITEM_CODE;
standard.commit;
SHOW_MESSAGE('The Record Has Been Deleted From IM_NEW_ITEMS'||' '||LOC_ITEM_CODE);
:GLOBAL.DUMMY := 0;

END IF;
END;
-- IM_INVENTORY & IM_LOCATION NOT FINISHED YET
BEGIN

SELECT SUM(NVL(QUANTITY_ON_HAND,0)) BIG_QTY ,SUM(NVL(CART_QTY,0))SMAL_QTY,ITEM_CODE
INTO LOC_BIG ,LOC_SMALL,LOC_ITEM_CODE FROM IM_LOCATION
WHERE ITEM_CODE = LOC_ITEM_CODE
GROUP BY ITEM_CODE;

EXCEPTION
WHEN NO_DATA_FOUND THEN
NULL ;
WHEN FORM_TRIGGER_FAILURE THEN
SHOW_MESSAGE('Error : '||SQLERRM);
RAISE FORM_TRIGGER_FAILURE ;
WHEN OTHERS THEN
SHOW_MESSAGE('Error : '||SQLERRM);
RAISE FORM_TRIGGER_FAILURE ;
END;

BEGIN
IF LOC_BIG = 0 AND LOC_SMALL = 0 THEN
DELETE FROM IM_LOCATION
WHERE ITEM_CODE = LOC_ITEM_CODE;
standard.commit;
DELETE FROM IM_INVENTORY_FINISH
WHERE ITEM_CODE = LOC_ITEM_CODE;
standard.commit;
SHOW_MESSAGE('ITEM_CODE HAS BEEN DELETED FROM IM_LOCATION & IM_INVENTORY_FINISH '||' '||LOC_ITEM_CODE);
END IF;

END;
Forms_ddl('Commit_form');
----------------
END;
Notice: The form is not deleting the records in details block, so this statement Forms_ddl('Commit_form'); is not executing.
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • carlosdl
    A DELETE command will not delete records from your blocks.  It will only delete records from your database tables.  If you want those deletions to be reflected in your blocks, you will need to re-populate them from the database.
    84,745 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: