Home » Developer & Programmer » Forms » cursor(control) on current record (forms6i)
cursor(control) on current record [message #516493] Mon, 18 July 2011 13:32 Go to next message
rajendaroracle
Messages: 80
Registered: May 2011
Location: India
Member

Hi,

In my form line level block contains 100 records.i will check the check box for line number 96 and 97. Then i will press save(I have written some logic here) button it will generate one number for selected check boxes. After generating this number cursor(control) should be on same line number 96 or 97.How? Please suggest me on this?

[Updated on: Mon, 18 July 2011 13:36]

Report message to a moderator

Re: cursor(control) on current record [message #516494 is a reply to message #516493] Mon, 18 July 2011 15:03 Go to previous messageGo to next message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
set mouse_navigable to NO on the button?
Re: cursor(control) on current record [message #516495 is a reply to message #516494] Mon, 18 July 2011 15:22 Go to previous messageGo to next message
cookiemonster
Messages: 13937
Registered: September 2008
Location: Rainy Manchester
Senior Member
By looping through the records with next_record untill you get to one that's checked.
Re: cursor(control) on current record [message #516897 is a reply to message #516495] Thu, 21 July 2011 06:35 Go to previous messageGo to next message
rajendaroracle
Messages: 80
Registered: May 2011
Location: India
Member

please see attached code and suggest me.after end loop i have written First_Record so cursor(control)is going to first line(record).but i need to stop what ever i have selected check boxes after generating number it should show same selected line.

regards,
rajendar
  • Attachment: formcode.sql
    (Size: 1.38KB, Downloaded 1130 times)
Re: cursor(control) on current record [message #516902 is a reply to message #516897] Thu, 21 July 2011 06:49 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
That's unreadable. Format the code, enclose it into the [code] tags to preserve formatting and post it here (not as an attachment, but as a part of your message).
Re: cursor(control) on current record [message #516906 is a reply to message #516902] Thu, 21 July 2011 07:07 Go to previous messageGo to next message
rajendaroracle
Messages: 80
Registered: May 2011
Location: India
Member

pls check this code.

DECLARE
L_REQUESTID NUMBER ;
V_REQ_NO NUMBER(20);
BEGIN
L_REQUESTID := FND_REQUEST.SUBMIT_REQUEST('PO',
'XXABCINTERFACE',
'XXABC Int Prog',
SYSDATE,
FALSE,
CHR(0),
);
COMMIT;

FOR J IN 1.. :PARAMETER.RECORD_COUNT LOOP

IF :XXABC_PO_REQUISITION_STG.REQUISITION_CHECKBOX='Y' THEN
BEGIN
SELECT PRHL.SEGMENT1 INTO :XXABC_PO_REQUISITION_STG.REQ_NUMBER
FROM FND_CONCURRENT_REQUESTS FCR , PO_REQUISITION_HEADERS_ALL PRHL
WHERE FCR.REQUEST_ID=PRHL.REQUEST_ID
AND FCR.PARENT_REQUEST_ID=L_REQUESTID;

END;
IF :SYSTEM.LAST_RECORD= 'TRUE' THEN
EXIT;
ELSIF :SYSTEM.LAST_RECORD= 'FALSE' THEN
NEXT_RECORD;
END IF;
--NEXT_RECORD;
ELSIF :XXABC_PO_REQUISITION_STG.REQUISITION_CHECKBOX IS NULL THEN
NEXT_RECORD;
END IF;
END LOOP;
FIRST_RECORD;
EXCEPTION
WHEN NO_DATA_FOUND THEN
FND_MESSAGE.SET_STRING('Please check Log file');
FND_MESSAGE.SHOW;
END;







Re: cursor(control) on current record [message #516909 is a reply to message #516906] Thu, 21 July 2011 07:14 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Please, read How to use [code] tags and make your code easier to read? (Other forum members will appreciate it) and do as it is described in there.
Re: cursor(control) on current record [message #516910 is a reply to message #516909] Thu, 21 July 2011 07:19 Go to previous messageGo to next message
rajendaroracle
Messages: 80
Registered: May 2011
Location: India
Member

DECLARE
L_REQUESTID NUMBER ;
V_REQ_NO NUMBER(20);
BEGIN
L_REQUESTID := FND_REQUEST.SUBMIT_REQUEST('PO',
'XXABCINTERFACE',
'XXABC Int Prog',
SYSDATE,
FALSE,
CHR(0),
);
COMMIT;

FOR J IN 1.. :PARAMETER.RECORD_COUNT LOOP

IF :XXABC_PO_REQUISITION_STG.REQUISITION_CHECKBOX='Y' THEN
BEGIN
SELECT PRHL.SEGMENT1 INTO :XXABC_PO_REQUISITION_STG.REQ_NUMBER
FROM FND_CONCURRENT_REQUESTS FCR , PO_REQUISITION_HEADERS_ALL PRHL
WHERE FCR.REQUEST_ID=PRHL.REQUEST_ID
AND FCR.PARENT_REQUEST_ID=L_REQUESTID;

END;
IF :SYSTEM.LAST_RECORD= 'TRUE' THEN
EXIT;
ELSIF :SYSTEM.LAST_RECORD= 'FALSE' THEN
NEXT_RECORD;
END IF;
--NEXT_RECORD;
ELSIF :XXABC_PO_REQUISITION_STG.REQUISITION_CHECKBOX IS NULL THEN
NEXT_RECORD;
END IF;
END LOOP;
FIRST_RECORD;
EXCEPTION
WHEN NO_DATA_FOUND THEN
FND_MESSAGE.SET_STRING('Please check Log file');
FND_MESSAGE.SHOW;
END;


Re: cursor(control) on current record [message #516914 is a reply to message #516910] Thu, 21 July 2011 07:34 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
There seems to be misunderstanding between the two of us. Why didn't you format code you posted? Enclosing it into the [code] tags won't automagically format it.

When it is a simple script, OK - no problem. But, when you use loops, multiple IFs, ..., it is difficult to see what belongs to what. Someone might format it for him/herself and answer your question. I will not, until you properly format the code. If you don't know what it means, take a look at the topic from my previous message again and see the difference between formatted and unformatted code.
Re: cursor(control) on current record [message #516968 is a reply to message #516914] Thu, 21 July 2011 09:16 Go to previous messageGo to next message
rajendaroracle
Messages: 80
Registered: May 2011
Location: India
Member

DECLARE
L_REQUESTID NUMBER ;
V_REQ_NO NUMBER(20);
BEGIN
L_REQUESTID := FND_REQUEST.SUBMIT_REQUEST('PO',
'XXABCINTERFACE',
'XXABC Int Prog',
SYSDATE,
FALSE,
CHR(0),
);
COMMIT;

FOR J IN 1.. :PARAMETER.RECORD_COUNT LOOP

IF :XXABC_PO_REQUISITION_STG.REQUISITION_CHECKBOX='Y' THEN
BEGIN
SELECT PRHL.SEGMENT1 INTO :XXABC_PO_REQUISITION_STG.REQ_NUMBER
FROM FND_CONCURRENT_REQUESTS FCR , PO_REQUISITION_HEADERS_ALL PRHL
WHERE FCR.REQUEST_ID=PRHL.REQUEST_ID
AND FCR.PARENT_REQUEST_ID=L_REQUESTID;

END;
IF :SYSTEM.LAST_RECORD= 'TRUE' THEN
EXIT;
ELSIF :SYSTEM.LAST_RECORD= 'FALSE' THEN
NEXT_RECORD;
END IF;
--NEXT_RECORD;
ELSIF :XXABC_PO_REQUISITION_STG.REQUISITION_CHECKBOX IS NULL THEN
NEXT_RECORD;
END IF;
END LOOP;
FIRST_RECORD;
EXCEPTION
WHEN NO_DATA_FOUND THEN
FND_MESSAGE.SET_STRING('Please check Log file');
FND_MESSAGE.SHOW;
END;
Re: cursor(control) on current record [message #516971 is a reply to message #516968] Thu, 21 July 2011 09:20 Go to previous message
cookiemonster
Messages: 13937
Registered: September 2008
Location: Rainy Manchester
Senior Member
I can't see any difference between that and your last post. Do you know what indentation means?
Previous Topic: Need a D2k Project
Next Topic: reports to mail
Goto Forum:
  


Current Time: Sun Sep 08 23:05:46 CDT 2024