ORA-01009: Missing mandatory parameter

Tags:
ORA
Oracle
Dear Friends I have this script in the WHEN-BUTTON-PRESSED Button
DECLARE
LOC_FLAG NUMBER;
BEGIN

:IM_NEW_ITEMS.COLOR_CODE := TO_CHAR(NVL(:IM_NEW_ITEMS.COLOR_CODE,0));
:IM_NEW_ITEMS.SHAPE_CODE := TO_CHAR(NVL(:IM_NEW_ITEMS.SHAPE_CODE,0));

SELECT NVL(FIN_FLAG,0) INTO LOC_FLAG FROM IM_CLASS
WHERE CLASS_CODE =:ITEM_CLASS;

IF LOC_FLAG = 1 THEN

BEGIN
SELECT ITEM_CODE INTO :GLOBAL.DUMMY
FROM IM_INVENTORY_FINISH
WHERE ITEM_CLASS = TO_NUMBER(RTRIM(LTRIM(:IM_NEW_ITEMS.ITEM_CLASS)))
AND ITEM_TYPE = TO_NUMBER(RTRIM(LTRIM(:IM_NEW_ITEMS.ITEM_TYPE)))
AND ITEM_LENGTH = NVL(:IM_NEW_ITEMS.ITEM_LENGTH,0)
AND ITEM_WIDTH = NVL(:IM_NEW_ITEMS.ITEM_WIDTH,0)
AND ITEM_HIGHT1 = NVL(:IM_NEW_ITEMS.ITEM_HIGHT1,0)
AND ITEM_HIGHT2 = NVL(:IM_NEW_ITEMS.ITEM_HIGHT2,0)
AND COLOR_CODE = TO_NUMBER(RTRIM(LTRIM(:IM_NEW_ITEMS.COLOR_CODE)))
AND SHAPE_CODE = TO_NUMBER(RTRIM(LTRIM(:IM_NEW_ITEMS.SHAPE_CODE)));
IF :GLOBAL.APP_LANG = 1 THEN
SHOW_MESSAGE('This Item Already Exist IN The Item Definition File !!!'||' '||:GLOBAL.DUMMY);
RAISE FORM_TRIGGER_FAILURE;
ELSE
SHOW_MESSAGE(This product is not defined in Item Definition File !!!');
get_err_message(87);
RAISE FORM_TRIGGER_FAILURE;

END IF;
EXCEPTION
WHEN NO_DATA_FOUND THEN
:IM_NEW_ITEMS.ITEM_CODE := Ltrim(:IM_NEW_ITEMS.ITEM_TYPE||'000'||'1');
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

SELECT SUBSTR(A.ITEM_CODE,1,6)||Ltrim(To_char((MAX(TO_NUMBER(SUBSTR(A.ITEM_CODE,7)))+1),'fm0000'))
INTO :IM_NEW_ITEMS.ITEM_CODE
FROM IM_INVENTORY_FINISH A
WHERE A.ITEM_CLASS = :IM_NEW_ITEMS.ITEM_CLASS
AND A.ITEM_TYPE = :IM_NEW_ITEMS.ITEM_TYPE
GROUP BY
SUBSTR(A.ITEM_CODE,1,6);

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

END;

DECLARE
LOC_DESC_E VARCHAR2(100);
LOC_DESC_A VARCHAR2(100);
LOC_COLOR_E VARCHAR2(100);
LOC_COLOR_A VARCHAR2(100);
LOC_SHAPE_DESC_E VARCHAR2(100);
LOC_SHAPE_DESC_A VARCHAR2(100);
LOC_VAR_E VARCHAR2(100);
LOC_VAR_A VARCHAR2(100);
BEGIN
SELECT TYPE_DESC_E,TYPE_DESC_A INTO LOC_DESC_E,LOC_DESC_A FROM IM_TYPE
WHERE TYPE_CODE = :ITEM_TYPE;

SELECT COLOR_DESC_E,COLOR_DESC_A INTO LOC_COLOR_E,LOC_COLOR_A FROM IM_COLOR
WHERE COLOR_CODE = :COLOR_CODE;

SELECT SHAPE_DESC_E,SHAPE_DESC_A INTO LOC_SHAPE_DESC_E,LOC_SHAPE_DESC_A
FROM IM_SHAPE
WHERE SHAPE_CODE = :SHAPE_CODE;
IF (NVL(:IM_NEW_ITEMS.ITEM_LENGTH,0) <> 0 AND NVL(:IM_NEW_ITEMS.ITEM_WIDTH,0) <> 0
AND NVL(:IM_NEW_ITEMS.ITEM_HIGHT1,0) <> 0 AND NVL(:IM_NEW_ITEMS.ITEM_HIGHT2,0) = 0) THEN

LOC_DESC_E := LOC_DESC_E ||' ' ||TO_CHAR(:IM_NEW_ITEMS.ITEM_LENGTH)||'*'||TO_CHAR(:IM_NEW_ITEMS.ITEM_WIDTH)
||'*'|| TO_CHAR(:IM_NEW_ITEMS.ITEM_HIGHT1);
:GLOBAL.LOC_VAR_E :=LOC_DESC_E || ' '||LOC_COLOR_E || ' '||LOC_SHAPE_DESC_E;
LOC_DESC_A :=LOC_DESC_A ||' ' ||TO_CHAR(:IM_NEW_ITEMS.ITEM_LENGTH)||'*'||TO_CHAR(:IM_NEW_ITEMS.ITEM_WIDTH)
||'*'|| TO_CHAR(:IM_NEW_ITEMS.ITEM_HIGHT1);
:GLOBAL.LOC_VAR_A := LOC_DESC_A ||' '||LOC_COLOR_A ||' '||LOC_SHAPE_DESC_A;

ELSIF (NVL(:IM_NEW_ITEMS.ITEM_LENGTH,0) <> 0 AND NVL(:IM_NEW_ITEMS.ITEM_WIDTH,0) <> 0
AND NVL(:IM_NEW_ITEMS.ITEM_HIGHT1,0) <> 0 AND NVL(:IM_NEW_ITEMS.ITEM_HIGHT2,0) <> 0) THEN

LOC_DESC_E := LOC_DESC_E ||' ' ||TO_CHAR(:IM_NEW_ITEMS.ITEM_LENGTH)||'*'||TO_CHAR(:IM_NEW_ITEMS.ITEM_WIDTH)
||'*'|| TO_CHAR(:IM_NEW_ITEMS.ITEM_HIGHT1)||'/'|| TO_CHAR(:IM_NEW_ITEMS.ITEM_HIGHT2);

:GLOBAL.LOC_VAR_E :=LOC_DESC_E || ' '||LOC_COLOR_E || ' '||LOC_SHAPE_DESC_E;

LOC_DESC_A :=LOC_DESC_A ||' ' ||TO_CHAR(:IM_NEW_ITEMS.ITEM_LENGTH)||'*'||TO_CHAR(:IM_NEW_ITEMS.ITEM_WIDTH)
||'*'|| TO_CHAR(:IM_NEW_ITEMS.ITEM_HIGHT1)||''|| TO_CHAR(:IM_NEW_ITEMS.ITEM_HIGHT2);

:GLOBAL.LOC_VAR_A := LOC_DESC_A ||' '||LOC_COLOR_A ||' '||LOC_SHAPE_DESC_A;

ELSE

:GLOBAL.LOC_VAR_E :=LOC_DESC_E || ' '||LOC_COLOR_E || ' '||LOC_SHAPE_DESC_E;

:GLOBAL.LOC_VAR_A := LOC_DESC_A ||' '||LOC_COLOR_A ||' '||LOC_SHAPE_DESC_A;

END IF;
END;
END IF;

END;
--- HERE
DECLARE
V_PRICE NUMBER(16,6);

BEGIN
IF :ITEM_CLASS = 110 THEN

---
------------- CALCULATING VOLUME AND PRICE FOAM

IF NVL(:IM_NEW_ITEMS.ITEM_LENGTH,0) <> 0 AND NVL(:IM_NEW_ITEMS.ITEM_WIDTH,0) <> 0 AND NVL(:IM_NEW_ITEMS.ITEM_HIGHT1,0)<> 0 THEN

:GLOBAL.VOLUME := ((NVL(:IM_NEW_ITEMS.ITEM_LENGTH,0) * NVL(:IM_NEW_ITEMS.ITEM_WIDTH,0) * NVL(:IM_NEW_ITEMS.ITEM_HIGHT1,0)) /(1000000));

END IF;

BEGIN

SELECT NVL(TYPE_PRICE,0) INTO V_PRICE FROM IM_TYPE
WHERE CLASS_CODE = :ITEM_CLASS
AND TYPE_CODE = :ITEM_TYPE;
-- SHOW_MESSAGE(':GLOBAL.VOLUME'||' '||:GLOBAL.VOLUME);

:GLOBAL.ITEM_PRICE1 := ROUND((NVL(:GLOBAL.VOLUME,0) * (V_PRICE)),5);
-- SHOW_MESSAGE(':GLOBAL.ITEM_PRICE1 '||' '||:GLOBAL.ITEM_PRICE1 );
:IM_NEW_ITEMS.VOLUME := :GLOBAL.VOLUME;
-- LAST COMMIT :GLOBAL.PRICE_PER_SQUAR := NVL(:GLOBAL.ITEM_PRICE1,0) /NVL(:IM_NEW_ITEMS.VOLUME,0);

END;
ELSE
BEGIN
:GLOBAL.ITEM_PRICE1 :=:IM_NEW_ITEMS.PRICE_AMT ;

END;
END IF;
END;

BEGIN
BEGIN

SELECT ITEM_CODE INTO :GLOBAL.DUMMY
FROM IM_INVENTORY_FINISH
WHERE ITEM_CLASS = TO_NUMBER(RTRIM(LTRIM(:IM_NEW_ITEMS.ITEM_CLASS)))
AND ITEM_TYPE = TO_NUMBER(RTRIM(LTRIM(:IM_NEW_ITEMS.ITEM_TYPE)))
AND ITEM_LENGTH = NVL(:IM_NEW_ITEMS.ITEM_LENGTH,0)
AND ITEM_WIDTH = NVL(:IM_NEW_ITEMS.ITEM_WIDTH,0)
AND ITEM_HIGHT1 = NVL(:IM_NEW_ITEMS.ITEM_HIGHT1,0)
AND ITEM_HIGHT2 = NVL(:IM_NEW_ITEMS.ITEM_HIGHT2,0)
AND COLOR_CODE = NVL(TO_NUMBER(RTRIM(LTRIM(:IM_NEW_ITEMS.COLOR_CODE))),0)
AND SHAPE_CODE = NVL(TO_NUMBER(RTRIM(LTRIM(:IM_NEW_ITEMS.SHAPE_CODE))),0);
IF :GLOBAL.APP_LANG = 1 THEN
SHOW_MESSAGE('This Item Already Exist IN The Item Definition File !!!');
RAISE FORM_TRIGGER_FAILURE;

ELSE
SHOW_MESSAGE(!!!');
get_err_message(87);
RAISE FORM_TRIGGER_FAILURE;

END IF;
EXCEPTION
WHEN NO_DATA_FOUND THEN
IF NVL(:IM_NEW_ITEMS.QTY,0) = 0 THEN
show_message('هذا الصنف معرف في ملف الاصناف');
GO_FIELD(':QTY');
RAISE FORM_TRIGGER_FAILURE;

ELSE

INSERT INTO IM_INVENTORY_FINISH
(ITEM_CODE,ITEM_NAME_A,ITEM_NAME_E,STOCK_ITEM,ITEM_CLASS,ITEM_TYPE,SUPP_CODE,ITEM_LENGTH,ITEM_WIDTH,
ITEM_HIGHT1,ITEM_HIGHT2,COLOR_CODE,SHAPE_CODE,ITEM_SIZE_TYPE,VOLUME,CON_FACTOR,ITEM_PRICE1,
ITEM_DISCOUNT,MIN_QTY,MAX_QTY,COSTING_METHOD,ITEM_COST,STANDARD_COST,WEIGHT,ITEM_PRICE2,ITEM_PRICE3,
OPENING_COST,LAST_PUR_COST,QTY_FOR_PRICE2,QTY_FOR_PRICE3,ITEM_PRICE_METHOD,USER_ID,USER_DATE)

VALUES(:IM_NEW_ITEMS.ITEM_CODE,:GLOBAL.LOC_VAR_A,:GLOBAL.LOC_VAR_E,'1',:IM_NEW_ITEMS.ITEM_CLASS,:IM_NEW_ITEMS.ITEM_TYPE,'0',
NVL(:IM_NEW_ITEMS.ITEM_LENGTH,0),NVL(:IM_NEW_ITEMS.ITEM_WIDTH,0),NVL(:IM_NEW_ITEMS.ITEM_HIGHT1,0),NVL(:IM_NEW_ITEMS.ITEM_HIGHT2,0),
TO_CHAR(NVL(:IM_NEW_ITEMS.COLOR_CODE,0)),TO_CHAR(NVL(:IM_NEW_ITEMS.SHAPE_CODE,0)),:IM_NEW_ITEMS.ITEM_SIZE_TYPE,NVL(:IM_NEW_ITEMS.VOLUME,0),1,:GLOBAL.ITEM_PRICE1,0.00,0.00,0.00,'1',0.00,0.00,
0.00,:GLOBAL.ITEM_PRICE1,:GLOBAL.ITEM_PRICE1,0.000,0.000,0.000,0.000,1,:IM_NEW_ITEMS.USER_ID,:IM_NEW_ITEMS.USER_DATE);

standard.commit;
clear_message;

END IF;

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;

END;

DECLARE
FRM FORMMODULE;
BEGIN

FRM := FIND_FORM('C:SALESSTORE_USED.FMX');
:IM_NEW_ITEMS.FLAG := 1;

:IM_NEW_ITEMS.CREATE_FLAGE := 1;
:GLOBAL.S_ITEM_CODE := :IM_NEW_ITEMS.ITEM_CODE;
:GLOBAL.LOC_ITEM := :IM_NEW_ITEMS.ITEM_CODE;
SHOW_MESSAGE(':GLOBAL.S_ITEM_CODE'||' '||:GLOBAL.S_ITEM_CODE );
SHOW_MESSAGE(':GLOBAL.LOC_ITEM'||' '||:GLOBAL.LOC_ITEM);
COMMIT_FORM;
-- NEW_FORM('C:SALESSTORE_USED.FMX',TO_SAVEPOINT);
-- call_form('C:SALESSTORE_USED.FMX',NO_HIDE,NO_REPLACE);
IF ID_NULL(FRM) THEN
:GLOBAL.S_ITEM_CODE := :IM_NEW_ITEMS.ITEM_CODE;
:GLOBAL.LOC_ITEM := :IM_NEW_ITEMS.ITEM_CODE;

OPEN_FORM('C:SALESSTORE_USED.FMX',ACTIVATE);
ELSE
:GLOBAL.S_ITEM_CODE := :IM_NEW_ITEMS.ITEM_CODE;
:GLOBAL.LOC_ITEM := :IM_NEW_ITEMS.ITEM_CODE;

GO_FORM('C:SALESSTORE_USED.FMX');
END IF;
END;
I am getting this error message and the form exit. Ora-01009: Missing Mandatory Parameter Waiting for valuable answer Best Regards Jamil Alshaibani
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: 9  Replies

 
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
    Hi Jamil,

    I didn't read the whole code.  Sorry, it is too much code and the formatting doesn't help.

    The error message and code implies that you are calling a procedure or function (it could a local or a database stored one) but one parameter that is not optional is missing in your call.

    If you can post only the relevant code portions (the lines that call procedures or functions, and the procedures and functions signatures), I will be happy to take a look and try to help you further.
    84,580 pointsBadges:
    report
  • MAY05659292714

    Hi carlosdl 

    I am  not calling a procedure or function just I am passing those GLOBAL variables to be inserted in to the   table IM_INVENTORY_FINISH

    Actually I am creating the Item in the Item definition table that is called  (IM_INVENTORY_FINISH ) through this push button , for the first item it works well , but for the second item creation it display this message Ora-01009: Missing  Mandatory Parameter and the program exit totally to the desktop 

    and this part of the script that I am using in the pus button with the global variables that I am passing to the table  IM_INVENTORY_FINISH.

     -----------------------------------------------------------------------------------

    :GLOBAL.LOC_VAR_E  :=LOC_DESC_E || ' '||LOC_COLOR_E || ' '||LOC_SHAPE_DESC_E;

    :GLOBAL.LOC_VAR_A  := LOC_DESC_A ||' '||LOC_COLOR_A ||' '||LOC_SHAPE_DESC_A;

    :GLOBAL.VOLUME := ((NVL(:IM_NEW_ITEMS.ITEM_LENGTH,0) * NVL(:IM_NEW_ITEMS.ITEM_WIDTH,0) * NVL(:IM_NEW_ITEMS.ITEM_HIGHT1,0)) /(1000000));

    :GLOBAL.ITEM_PRICE1 := ROUND((NVL(:GLOBAL.VOLUME,0) * (V_PRICE)),5);

    :IM_NEW_ITEMS.VOLUME := :GLOBAL.VOLUME;

    :GLOBAL.ITEM_PRICE1 :=:IM_NEW_ITEMS.PRICE_AMT ;

              INSERT INTO IM_INVENTORY_FINISH

               ITEM_CODE,ITEM_NAME_A,ITEM_NAME_E,STOCK_ITEM,ITEM_CLASS,ITEM_TYPE,SUPP_CODE,ITEM_LENGTH,ITEM_WIDTH,

               ITEM_HIGHT1,ITEM_HIGHT2,COLOR_CODE,SHAPE_CODE,ITEM_SIZE_TYPE,VOLUME,CON_FACTOR,ITEM_PRICE1,

               ITEM_DISCOUNT,MIN_QTY,MAX_QTY,COSTING_METHOD,ITEM_COST,STANDARD_COST,WEIGHT,ITEM_PRICE2,ITEM_PRICE3,

               OPENING_COST,LAST_PUR_COST,QTY_FOR_PRICE2,QTY_FOR_PRICE3,ITEM_PRICE_METHOD,USER_ID,USER_DATE)

                       VALUES(:IM_NEW_ITEMS.ITEM_CODE,:GLOBAL.LOC_VAR_A,:GLOBAL.LOC_VAR_E,'1',:IM_NEW_ITEMS.ITEM_CLASS,:IM_NEW_ITEMS.ITEM_TYPE,'0',

                 NVL(:IM_NEW_ITEMS.ITEM_LENGTH,0),NVL(:IM_NEW_ITEMS.ITEM_WIDTH,0),NVL(:IM_NEW_ITEMS.ITEM_HIGHT1,0),NVL(:IM_NEW_ITEMS.ITEM_HIGHT2,0),

               TO_CHAR(NVL(:IM_NEW_ITEMS.COLOR_CODE,0)),TO_CHAR(NVL(:IM_NEW_ITEMS.SHAPE_CODE,0)),:IM_NEW_ITEMS.ITEM_SIZE_TYPE,NVL(:IM_NEW_ITEMS.VOLUME,0),1,:GLOBAL.ITEM_PRICE1,0.00,0.00,0.00,'1',0.00,0.00,

               0.00,:GLOBAL.ITEM_PRICE1,:GLOBAL.ITEM_PRICE1,0.000,0.000,0.000,0.000,1,:IM_NEW_ITEMS.USER_ID,:IM_NEW_ITEMS.USER_DATE);

               standard.commit; 

               clear_message;

      IF ID_NULL(FRM) THEN

              :GLOBAL.S_ITEM_CODE := :IM_NEW_ITEMS.ITEM_CODE;

              :GLOBAL.LOC_ITEM    := :IM_NEW_ITEMS.ITEM_CODE;

                         OPEN_FORM('C:\SALES\STORE_USED.FMX',ACTIVATE);

     ELSE

           :GLOBAL.S_ITEM_CODE := :IM_NEW_ITEMS.ITEM_CODE;

           :GLOBAL.LOC_ITEM    := :IM_NEW_ITEMS.ITEM_CODE;

               GO_FORM('C:\SALES\STORE_USED.FMX');

     END IF;

    Thank you very much for your cooperation .

    I am waiting for your valuable answer.

    Best regards

    Jamil

    145 pointsBadges:
    report
  • carlosdl
    Hi Jamil,

    You are actually calling lots of functions and procedures (nvl, round, to_char, Id_null, open_form, etc).

    I would suggest adding debug messages after every line of code, so you can identify the exact line that causes the error.

    If after identifying the line you still need help, post your results here, so we can take a look.
    84,580 pointsBadges:
    report
  • MAY05659292714

     

    Hi carlosdl

    I could not identify the exact line that causes the error, because  it is working fine for the first insertion  ,but for next insert it is not executing the script , it is displaying the above error message and exit the program , and aloes for deleting a record it is deleting the first record but when I try to delete  another record it is display the same message as the above and  exit from the program

     

    Best regards

    Jamil

    145 pointsBadges:
    report
  • rvijay926

    Hi Jamil,

    Though the code is huge but I see its line up of 4 anonymous blocks. I observed a few syntax errors which I have corrected them and pasting below. check it and let me know if you still face the error. I guess that error is due to that syntax error.

    /* Formatted on 9/2/2015 3:34:50 PM (QP5 v5.256.13226.35510) */




    DECLARE



    LOC_FLAG NUMBER;




    BEGIN



    :IM_NEW_ITEMS.COLOR_CODE := TO_CHAR (NVL ( :IM_NEW_ITEMS.COLOR_CODE, 0));


    :IM_NEW_ITEMS.SHAPE_CODE := TO_CHAR (NVL ( :IM_NEW_ITEMS.SHAPE_CODE, 0));


    SELECT NVL (FIN_FLAG, 0)


    INTO LOC_FLAG


    FROM IM_CLASS


    WHERE CLASS_CODE = :ITEM_CLASS;


    IF LOC_FLAG = 1


    THEN


    BEGIN


    SELECT ITEM_CODE


    INTO :GLOBAL.DUMMY


    FROM IM_INVENTORY_FINISH


    WHERE ITEM_CLASS =


    TO_NUMBER (RTRIM (LTRIM ( :IM_NEW_ITEMS.ITEM_CLASS)))


    AND ITEM_TYPE =


    TO_NUMBER (RTRIM (LTRIM ( :IM_NEW_ITEMS.ITEM_TYPE)))


    AND ITEM_LENGTH = NVL ( :IM_NEW_ITEMS.ITEM_LENGTH, 0)


    AND ITEM_WIDTH = NVL ( :IM_NEW_ITEMS.ITEM_WIDTH, 0)


    AND ITEM_HIGHT1 = NVL ( :IM_NEW_ITEMS.ITEM_HIGHT1, 0)


    AND ITEM_HIGHT2 = NVL ( :IM_NEW_ITEMS.ITEM_HIGHT2, 0)


    AND COLOR_CODE =


    TO_NUMBER (RTRIM (LTRIM ( :IM_NEW_ITEMS.COLOR_CODE)))


    AND SHAPE_CODE =


    TO_NUMBER (RTRIM (LTRIM ( :IM_NEW_ITEMS.SHAPE_CODE)));


    IF :GLOBAL.APP_LANG = 1


    THEN


    SHOW_MESSAGE (


    'This Item Already Exist IN The Item Definition File !!!'


    || ' '


    || :GLOBAL.DUMMY);


    RAISE FORM_TRIGGER_FAILURE;


    ELSE


    SHOW_MESSAGE (


    'This product is not defined in Item Definition File !!!');


    get_err_message (87);


    RAISE FORM_TRIGGER_FAILURE;


    END IF;


    EXCEPTION


    WHEN NO_DATA_FOUND


    THEN


    :IM_NEW_ITEMS.ITEM_CODE :=


    LTRIM ( :IM_NEW_ITEMS.ITEM_TYPE || '000' || '1');


    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


    SELECT SUBSTR (A.ITEM_CODE, 1, 6)


    || LTRIM (


    TO_CHAR (


    (MAX (TO_NUMBER (SUBSTR (A.ITEM_CODE, 7))) + 1),


    'fm0000'))


    INTO :IM_NEW_ITEMS.ITEM_CODE


    FROM IM_INVENTORY_FINISH A


    WHERE A.ITEM_CLASS = :IM_NEW_ITEMS.ITEM_CLASS


    AND A.ITEM_TYPE = :IM_NEW_ITEMS.ITEM_TYPE


    GROUP BY SUBSTR (A.ITEM_CODE, 1, 6);


    EXCEPTION


    WHEN NO_DATA_FOUND


    THEN


    NULL;


    WHEN OTHERS


    THEN


    SHOW_MESSAGE ('Error : ' || SQLERRM);


    RAISE FORM_TRIGGER_FAILURE;


    END;


    DECLARE


    LOC_DESC_E VARCHAR2 (100);


    LOC_DESC_A VARCHAR2 (100);


    LOC_COLOR_E VARCHAR2 (100);


    LOC_COLOR_A VARCHAR2 (100);


    LOC_SHAPE_DESC_E VARCHAR2 (100);


    LOC_SHAPE_DESC_A VARCHAR2 (100);


    LOC_VAR_E VARCHAR2 (100);


    LOC_VAR_A VARCHAR2 (100);


    BEGIN


    SELECT TYPE_DESC_E, TYPE_DESC_A


    INTO LOC_DESC_E, LOC_DESC_A


    FROM IM_TYPE


    WHERE TYPE_CODE = :ITEM_TYPE;


    SELECT COLOR_DESC_E, COLOR_DESC_A


    INTO LOC_COLOR_E, LOC_COLOR_A


    FROM IM_COLOR


    WHERE COLOR_CODE = :COLOR_CODE;


    SELECT SHAPE_DESC_E, SHAPE_DESC_A


    INTO LOC_SHAPE_DESC_E, LOC_SHAPE_DESC_A


    FROM IM_SHAPE


    WHERE SHAPE_CODE = :SHAPE_CODE;


    IF ( NVL ( :IM_NEW_ITEMS.ITEM_LENGTH, 0) <> 0


    AND NVL ( :IM_NEW_ITEMS.ITEM_WIDTH, 0) <> 0


    AND NVL ( :IM_NEW_ITEMS.ITEM_HIGHT1, 0) <> 0


    AND NVL ( :IM_NEW_ITEMS.ITEM_HIGHT2, 0) = 0)


    THEN


    LOC_DESC_E :=



    LOC_DESC_E


    || ' '


    || TO_CHAR ( :IM_NEW_ITEMS.ITEM_LENGTH)


    || '*'


    || TO_CHAR ( :IM_NEW_ITEMS.ITEM_WIDTH)


    || '*'


    || TO_CHAR ( :IM_NEW_ITEMS.ITEM_HIGHT1);


    :GLOBAL.LOC_VAR_E :=


    LOC_DESC_E || ' ' || LOC_COLOR_E || ' ' || LOC_SHAPE_DESC_E;


    LOC_DESC_A :=



    LOC_DESC_A


    || ' '


    || TO_CHAR ( :IM_NEW_ITEMS.ITEM_LENGTH)


    || '*'


    || TO_CHAR ( :IM_NEW_ITEMS.ITEM_WIDTH)


    || '*'


    || TO_CHAR ( :IM_NEW_ITEMS.ITEM_HIGHT1);


    :GLOBAL.LOC_VAR_A :=


    LOC_DESC_A || ' ' || LOC_COLOR_A || ' ' || LOC_SHAPE_DESC_A;


    ELSIF ( NVL ( :IM_NEW_ITEMS.ITEM_LENGTH, 0) <> 0


    AND NVL ( :IM_NEW_ITEMS.ITEM_WIDTH, 0) <> 0


    AND NVL <font color="#0000f

    280 pointsBadges:
    report
  • rvijay926

    Hi Jamil

    I have checked the code and looks it is a combination of 4 anonymous blocks and observed few syntax errors. I guess the error is due to that. I have changed the script but unable to copy here, let me know your email so that I can mail you the code.

    Vijay

    280 pointsBadges:
    report
  • MAY05659292714
    Hi Vijay
    Thank you very much for your help .
    my email JAMIL_ALSHAIBANI@YAHOO.COM

    Best Regards

    Jamil
    145 pointsBadges:
    report
  • MAY05659292714
    Dear Friends 
    My actual problem started her in this script but it is working fine for the first call to this program STORE_USED.FMX 
    but for next call to this program it is displayed this message 

    ORA-01009: Missing mandatory parameter

    The script is :

    :global.command_line   := 'C:\SALES\STORE_USED.FMX' ;

    --------------------------------------------------------------------------------------

    :global.command_line   := 'C:\SALES\STORE_USED.FMX' ;

    DECLARE

    FRM FORMMODULE;

    BEGIN

     

      FRM := FIND_FORM(:global.command_line);   

      

      IF :System.Record_Status  IN  ('INSERT','NEW') THEN

        

          :IM_NEW_ITEMS.FLAG := 1; 

                      

          :IM_NEW_ITEMS.CREATE_FLAGE := 1;

          :GLOBAL.S_ITEM_CODE := :IM_NEW_ITEMS.ITEM_CODE;

          :GLOBAL.LOC_ITEM    := :IM_NEW_ITEMS.ITEM_CODE;

           COMMIT_FORM;

        IF ID_NULL(FRM) THEN 

        

        SHOW_MESSAGE('My Problem For The First Call It is Working Fine But Next Call It is Statred Here When I Call The Program For Next Call For '|| '  '||:global.command_line);

        

        open_form(:global.command_line,ACTIVATE);

        

        ELSE

            GO_FORM(':global.command_line');

      END IF;

       :IM_NEW_ITEMS.FLAG := 1;  

      END IF;       

    END;   

    ---------------------------------------------------------------
    Best Regards
    Jamil


    145 pointsBadges:
    report
  • carlosdl
    Hi,

    The problem could be here:

        ELSE

            GO_FORM(':global.command_line');

      END IF;

    You shouldn't have quotes there, otherwise you are not passing the path to your form, but the string ':global.command...'.  I think it works  the first time because at that moment the form is not open so it doesn't get into the 'ELSE' part.


    Could you try removing the quotes and letting us know the results?


    84,580 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: