Home » Developer & Programmer » Forms » Please help me :"FRM-40735 WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA01422&
Please help me :"FRM-40735 WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA01422& [message #192365] |
Tue, 12 September 2006 01:23 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
voralux
Messages: 72 Registered: January 2006
|
Member |
|
|
Have 2 Table Name
Field INVOICE_ID
Field INVOICE_NUM
Field INVOICE_DESCRIPTION
Field INVOICE_AMOUNT
Table LINE
Field INVOICE_ID
Field LINE_NUM
Field LINE_DESCRIPTION
Field LINE_AMOUNT
Data
Table : INVOICE
INVOICE_ID,INVOICE_NUM,INVOICE_DESCRIPTION,INVOICE_AMOUNT
1001, NUM001, Description 001, 500
1002, NUM002, Description 002, 1000
1003, NUM003, Description 003, 1500 Table : LINE
INVOICE_ID,LINE_NUM,LINE_DESCRIPTION,LINE_AMOUNT
1001, 1, Description 001 Line 1, 200
1001, 2, Description 001 Line 2, 300
1002, 1, Description 002 Line 1, 1000
1003, 1, Description 003 Line 1, 400
1003, 2, Description 003 Line 2, 500
1003, 3, Description 003 Line 3, 600
I create a form have a 2 blocks
I add a procedure for show invoice line after selete invoice_num
but the program show only INVOICE_ID = 1002 (Have a 1 Line)
if a select inv_num = NUM001 this program show error = "FRM-40735 WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA01422"
SELECT Line.Line_Amount,
Line.Line_Description
INTO :LINE.Line_Amount,
:LINE.Line_Description
FROM Invoice,
Line
WHERE Invoice.Invoice_Id = Line.Invoice_Id
AND Invoice.Invoice_num = :INVOICE.Invoice_num
AND Invoice.Invoice_Id = :INVOICE.Invoice_Id;
Upd-Mod: Please format your code and present it in a readable form.
[Updated on: Tue, 12 September 2006 21:17] by Moderator Report message to a moderator
|
|
|
|
|
|
Re: Please help me :"FRM-40735 WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA01422& [message #192718 is a reply to message #192365] |
Wed, 13 September 2006 06:06 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
voralux
Messages: 72 Registered: January 2006
|
Member |
|
|
if i add from your suggest
Create Relationship between Master & Detail Block and
Set Property Deffered to Yes
Set AutoQuery to No,
Then Write When-Button-Pressed Trigger on ur Button as
Go_block('Detail');
Then Write When-Button-Pressed Trigger on ur Button as
Go_block('Detail');
not show data in block "detail"
for my work.
If i select the invoice number = NUM001 & select item "A" (block "item")
I want to the program (block "line") show 2 record
1001, 1, Description 001 Line 1, 200
1001, 2, Description 001 Line 2, 300
same result if i use the wizard
|
|
|
|
|
Re: Please help me :"FRM-40735 WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA01422& [message #194128 is a reply to message #192365] |
Wed, 20 September 2006 22:06 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
voralux
Messages: 72 Registered: January 2006
|
Member |
|
|
for save record : after i change data
i use "commit;"
for delete record :
I use "DELETE FROM TABLE_NAME_INVOICE
WHERE invoice_id = :BLOCK_NAME_INVOICE.invoice_id;
COMMIT;
DELETE FROM TABLE_NAME_LINE
WHERE invoice_id = :BLOCK_NAME_LINE.invoice_id;
COMMIT;
but i have a question
this program show block "Do you want to save the changes you have made?
Yes or No or Cancel" and Press Ctrl+Tab to move between choices, Enter to select.
I click "No" this program show detail invoice line.
I want to this program no show block.
|
|
|
|
|
|
Re: Please help me :"FRM-40735 WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA01422& [message #195103 is a reply to message #192365] |
Wed, 27 September 2006 01:54 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
voralux
Messages: 72 Registered: January 2006
|
Member |
|
|
I have a more question
I have a Table Name = TABLE_INVOICE
Fields :
Invoice_Number,
Invoice_Amount,
Invoice_Description,
Line_Number,
Line_Amount,
Line_Date
Data
INV_001, 1000.00, DESCRPTION NO1, 1, 1000, 01-JAN-06
INV_002, 2000.00, DESCRPTION NO2, 1, 1200, 05-JAN-06
INV_002, 2000.00, DESCRPTION NO2, 2, 800, 05-JAN-06
INV_003, 3000.00, DESCRPTION NO3, 1, 500, 11-JAN-06
INV_003, 3000.00, DESCRPTION NO3, 2, 1400, 11-JAN-06
INV_003, 3000.00, DESCRPTION NO3, 3, 1100, 11-JAN-06
If I select invoice_number, I want to the program show data invoice line & can edit field line_date
Ex. If I select Invoice_number = INV_002
The program show 2 lines,
INV_002, 2000.00, DESCRPTION NO2, 2, 800, 05-JAN-06
INV_003, 3000.00, DESCRPTION NO3, 1, 500, 11-JAN-06
I have 2 Data Blocks
1. Control : have fields – Invoice_number, OK
OK : WHEN-BUTTON-PRESSED
set_block_property(TABLE_INVOICE,DEFAULT_WHERE,'INVOICE_NUMBER ='||:control.INVOICE_NUMBER);
Go_block('TABLE_INVOICE');
clear_block(no_validate);
execute_query;
2. TABLE_INVOICE : have field – Line_Number, Line_Amount, Line_Date
I want to show data If I select Invoice_number & Click “OK”
But after I click “OK” the program show “FRM-40505: ORACLE error unable to perform query
Please help me,
Thank you
|
|
|
|
Re: Please help me :"FRM-40735 WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA01422& [message #195151 is a reply to message #192365] |
Wed, 27 September 2006 03:58 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
voralux
Messages: 72 Registered: January 2006
|
Member |
|
|
Error Show
"SELECT ROWID,ITEM_DESCRIPTION,QUANTITY,UNIT_PRICE,REQ_NUMBER_SEGMENT1,HEADER_DESCRIPTION,NEED_BY_DATE,GL_DATE FROM PO_REQUISITIONS_INTERFACE_ALL WHERE REQ_NUMBER_SEGMENT1 =PR06/07/2721 "
it correct =SELECT ROWID,ITEM_DESCRIPTION,QUANTITY,UNIT_PRICE,REQ_NUMBER_SEGMENT1,HEADER_DESCRIPTION,NEED_BY_DATE,GL_DATE FROM PO_REQUISITIONS_INTERFACE_ALL WHERE REQ_NUMBER_SEGMENT1 = 'PR06/07/2721'
please suggest edit?
|
|
|
|
|
|
|
Re: Please help me :"FRM-40735 WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA01422& [message #195192 is a reply to message #192365] |
Wed, 27 September 2006 06:35 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
RJ.Zijlstra
Messages: 104 Registered: December 2005 Location: Netherlands - IJmuiden
|
Senior Member |
|
|
Well Voralux,
You can now be assured you have created a form which in a few years nobody will understand the logic of... (and will 'praise' your name)
Please, take my advice and use the standard Forms functionality and if not, write very extensive documentation for every trigger/program unit you create. A few hundred pages per form will be suffuicient, I think.
I work here with some appl. where the forms 'logic' is often made of these nice constructions; consequences:
1) You almost do not dare to change a thing, because the whole bloody thing will collapse in front of your eyes with the most misleading error messages.
2) The time you need to understand the 'logic' of these monstuosities is much better spend in a more productive way.
3) Often it's much easiier to throw the whole existing form in the wastebucket and rebuild it from scratch, but then in a 'normal' way.
Don't think I'm harsh on you specially, I give some advice I learned the hard way...
Regards,
Rob Zijlstra
|
|
|
Goto Forum:
Current Time: Sat Feb 08 14:53:24 CST 2025
|