Multi records block [message #608143] |
Mon, 17 February 2014 00:18 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](//www.gravatar.com/avatar/a59247482a11edb9544247f102223e8d?s=64&d=mm&r=g) |
mist598
Messages: 1195 Registered: February 2013 Location: Hyderabad
|
Senior Member |
|
|
Hi all,
I have multi records displayed block and if i select the 3 records from the 14 records and click on the find button , i want to show the 3 records detail ,means how to display the 3 records(how could i know?)
But in code only takes 1 item_number, how can i take 3 records and displayed specific details please help me.
BEGIN
SELECT Count(1)
INTO v_count1
FROM regal_inv_landed_cost_tab ril,
mtl_system_items mtk
WHERE ril.inventory_item_id = mtk.inventory_item_id
AND ril.organization_id = mtk.organization_id
AND ril.organization_id IN( '81', '82' )
AND Nvl(mtk.inventory_item_status_code, 'Inactive') = 'Inactive'
AND ril.item_number = :RHCLANDEDCOSTDET.item_number;
IF ( v_count1 > 0 ) THEN
v_alert := Show_alert('ACTIVE');
RAISE form_trigger_failure;
END IF;
END;
Thank You
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Multi records block [message #608413 is a reply to message #608389] |
Wed, 19 February 2014 08:40 ![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) |
![](//www.gravatar.com/avatar/a59247482a11edb9544247f102223e8d?s=64&d=mm&r=g) |
mist598
Messages: 1195 Registered: February 2013 Location: Hyderabad
|
Senior Member |
|
|
BEGIN
first_record;
LOOP
SELECT Count(1)
INTO v_count
FROM mtl_system_items_kfv a
WHERE inventory_item_id IN(SELECT inventory_item_id
FROM xxc_inv_landed_cost_tab b
WHERE item_number = :Blockname.item_number
AND file_number = :Blockname.file_number
AND selected_flag = 'Y')
AND organization_id = '82';
IF v_count = 0 THEN
fnd_message.Set_string('This'||:Blockname.item_number||' Number is not assigned into the THS'); --testing
fnd_message.show;
--raise form_trigger_failure;
--END IF;
--END;
Exit WHEN :System.last_record = 'TRUE';
END IF;
next_record;
END LOOP;
END;
I have 3 items per 1 file_number and i selected the all 3 and click on the Button.
It shows the last means(current slected) record only . I want to validate to all and display the message
Suppose in my 3 items ,2 items are not assigned into the THS, i want to show the alert the both(2 items are not assigned )
Validate one after the one shows the alerts.
Please help
-
Attachment: image1.png
(Size: 9.11KB, Downloaded 884 times)
[Updated on: Wed, 19 February 2014 08:41] Report message to a moderator
|
|
|
|
|
Re: Multi records block [message #608465 is a reply to message #608452] |
Thu, 20 February 2014 02:37 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
You're looping through all the records in the block. Each record contains an item that tells you if the record needs checking.
You really shouldn't need me to point out the code you need to add.
|
|
|