Home » Developer & Programmer » Forms » Looping the Records with the Check Box Value (Oracle 10G Forms)
Looping the Records with the Check Box Value [message #587609] Mon, 17 June 2013 07:14 Go to next message
katangur.nikethan
Messages: 31
Registered: December 2009
Location: Hyderabad
Member
Hi,

I am Using the Check Box in the Detailed Block & I Have Assigned values 'Y' and 'N' when Checked & Unchecked

If there are 3 Values Retrieved in the Detailed Block, Among that 2 Values are Checked the Cursor is Directly going the 2nd Value and Displaying the 2nd Value 2 Times rather than Displaying the 1st Value.

Below Attached is the Code Which i am Using.

 GO_BLOCK ('ITEM_RESULT');
L_ITEM_CODE := :ITEM_RESULT.ITEM_CODE;--71720;--
   first_record;
        loop        
                   message (' item id is '||  L_ITEM_CODE  || '-' ||  :ITEM_RESULT.CHECKBOX); 
                               
      if     L_ITEM_CODE is not null and :ITEM_RESULT.CHECKBOX = 'Y' then                  
                  begin
                                APPS.Create_component_item_bom_PRO
                                (p_assembly_item_id =>l_Assembly_item_id ,
                                P_ORGANIZATION_ID =>l_Assembly_org_id,
                                P_COMPONENT_ITEM =>L_ITEM_CODE, 
                                x_err_msg =>l_err_msg,
                                x_err_status=>l_err_status
                                );
                                               COMMIT;
                              EXCEPTION
                                  WHEN OTHERS
                                  THEN
                                  fnd_message.set_string('debuging  testing '||SQLERRM||'In Exception Block');
                                  fnd_message.show;
                                  fnd_message.set_string('Component Item is Not Attached to Assembled item');      
                                  fnd_message.show;                              
                              end;                         
                  if l_err_status='S' THEN          
                   
                  fnd_message.set_string('Component Item is Attached to Assembled item');
                    fnd_message.show;     
                    Exit_Form;          
                  ELSE
                  	fnd_message.set_string('API Errors'||l_err_msg);
                    fnd_message.show;                 
            
                  	END IF;
      else
          fnd_message.set_string('Component Item not founding');
        fnd_message.show;
      end if;
      
      standard.commit;
    

exit when :system.last_record='TRUE';
next_record;

	end loop;
Re: Looping the Records with the Check Box Value [message #587611 is a reply to message #587609] Mon, 17 June 2013 07:20 Go to previous messageGo to next message
cookiemonster
Messages: 13919
Registered: September 2008
Location: Rainy Manchester
Senior Member
Which value is displaying multiple times?
l_item_code?
Re: Looping the Records with the Check Box Value [message #587613 is a reply to message #587611] Mon, 17 June 2013 07:22 Go to previous messageGo to next message
katangur.nikethan
Messages: 31
Registered: December 2009
Location: Hyderabad
Member
Hi,

Last Checked Value is Getting Displayed Multiple Times.

Thanks
K Nikethan Reddy.
Re: Looping the Records with the Check Box Value [message #587615 is a reply to message #587613] Mon, 17 June 2013 07:27 Go to previous messageGo to next message
katangur.nikethan
Messages: 31
Registered: December 2009
Location: Hyderabad
Member
Hi ,


If Multiple Records Are Checked (for Example 5 Recods 1,2,3,4,5) the Cursor is Going Directly to Last Record (ie 5) & it is Getting displayed multiple time ( 5 is Getting Displayed 5 Times Rather than 1,2,3,4)

Thanks in Advance
K Nikethan Reddy.

Re: Looping the Records with the Check Box Value [message #587616 is a reply to message #587615] Mon, 17 June 2013 07:30 Go to previous messageGo to next message
cookiemonster
Messages: 13919
Registered: September 2008
Location: Rainy Manchester
Senior Member
How precisely are you determining that? From the message after the loop command?
Which trigger is this run from?
Re: Looping the Records with the Check Box Value [message #587618 is a reply to message #587616] Mon, 17 June 2013 07:33 Go to previous messageGo to next message
katangur.nikethan
Messages: 31
Registered: December 2009
Location: Hyderabad
Member
When_Button_Pressed. Trigger
Re: Looping the Records with the Check Box Value [message #587620 is a reply to message #587618] Mon, 17 June 2013 07:55 Go to previous message
cookiemonster
Messages: 13919
Registered: September 2008
Location: Rainy Manchester
Senior Member
That answers the last question, what about the 1st?
Previous Topic: frm-40735 pre-query trigger raised unhandled exception ora-06502
Next Topic: USB Finger Print Reader
Goto Forum:
  


Current Time: Tue Apr 16 06:43:39 CDT 2024