Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to store multiple values in a variable & display it in its field in Forms 6i??

VijethaJan 17 2014 — edited Jan 20 2014

Hi All,

I have a new problem & struggling to get solution.

I have a form which looks like below created in Oracle Forms Builder 6i from table name RECEIVED_FORM_15G. This table is empty in Database.

Cust_Code

Cust_Name

Acct_Fd_NoForm_15gPan NoReceived_15gFinancial_YearFD_AmountAcct_Opn_DtMaturity_Dt

But Cust_Code, Acct_Fd_No, FD_Amount, Acct_Opn_Dt, Maturity_Dt is present in another table named as KEC_FDACCT_MSTR.

So when the user enter the Cust_code, i want all the above said fields to display.

For that i put in the following code for trigger KEY-NEXT-ITEM for Cust_Code:

DECLARE

  FD_NO NUMBER;

  FD_AMT NUMBER;

  OPN_DT DATE;

  MAT_DT DATE;

BEGIN

  SELECT ACCT_FD_NO, AMOUNT, ACCT_OPN_DT, MATURITY_DATE INTO FD_NO, FD_AMT, OPN_DT, MAT_DT

  FROM KEC_FDACCT_MSTR WHERE ACCT_CUST_CODE = :CUST_CODE;

  :ACCT_FD_NO := FD_NO;

  :FD_AMOUNT := FD_AMT;

  :ACCT_OPN_DATE:= OPN_DT;

  :MATURITY_DATE:= MAT_DT;

END;

This works fine if a Cust_Code has only one Acct_Fd_No like below.

Cust_Code
1446

Acct_Fd_NoForm_15gPan NoReceived_15gFinancial_YearFD_AmountAcct_Opn_DtMaturity_Dt
33034050000014-JAN-201113-JAN-2014

But when Cust_Code has more than one Acct_Fd_No , it throws an error :FRM-40735: KEY-NEXT-ITEM trigger raised unhandled exception ORA-01422.

I know the error because it returns more than one row.

So how can i store multiple rows in one variable ??

I just want to display all the Acct_Fd_No's in the field , when i enter the Cust_Code , for that particular Cust_Code like below.

For example, Cust_Code=124 has 3 Acct_Fd_No (33738, 33765, 33872).

Cust_Code
124

So after i enter the Cust_Code & i want to display like the following:

Acct_Fd_NoForm_15gPan NoReceived_15gFinancial_YearFD_AmountAcct_Opn_DtMaturity_Dt
337385000014-JAN-201013-JAN-2013
3376510000003-MAR-20112-MAR-2014
3387215000030-APR-201229-APR-2014

So how do i do this??

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 17 2014
Added on Jan 17 2014
29 comments
6,659 views