Monday, September 15, 2008

DFF Segment Disabling

Used in situations where you enable a DFF segment and can update the value in only one responsibility and not allow other responsibilities to update the value.


In custom.pll write code for When-Validate-Record.

Here check if resp<> 'X'


Now if its a new record then the user should not assign any value to this DFF segment from this reponsibility. user can assign only from Resp X.


So if record status=new and block.attribute1 is not null means he assigned a value. So raise error.

If its an old record and user is trying to update the value then check the old value from the database. compare this value with the new value which has been entered in the form.


If both are same then he didnt update so no need to throw an error. If both values are different he has updated so need to throw error.


To get the old value from database u will need to query the table with the current record primary key.New value is assigned to the form item.


Below is the pseudo code

If event='When-Validate-Record' then

if current_responsibility<>'X' and record_status='INSERT' and block.attribute1 is not null then

fnd_message.set_string('Cant assign value');

fnd_message.error;

raise form_trigger_failure;

elsif current_responsibility<>'X' and record_status='CHANGED' and block.attribute1!=old value of attribute1(queried from database) then

fnd_message.set_string('Cant assign value');

fnd_message.error;

raise form_trigger_failure;

end if;

end if;

How to find Oracle Application file versions

Here are the commands to find the file versions of server file types


Note:

  1. Before running the commands make sure you are in directory where the file for which you want to find is located. or you can explicitly specify complete path along with file name
  2. Some environments you many not find ident command


FORM

ident form.frm | grep Revision (Ex. ident POXPOMPO.frm | grep Revision)

strings -a form.frm | grep Revision (Ex. strings -a POXPOMPO.frm |grep Revision)


REPORT

ident report.rdf | grep Head (Ex. ident ARBARL.rdf | grep Header)

strings -a report.rdf | grep Head (Ex. strings -a ARBARL.rdf | grep Header)


Steps to Register shell script as Concurrent Program

1. Create host file with .prog extension (For ex test.prog).
2. Grant execute permission to the file
3. From the directory of the host file execute following command to create a symbolic link
ln -s $FND_TOP/bin/fndcpesr
ln -s $FND_TOP/bin/fndcpesr test
Note: Step 3 is very critical, concurrent program will error out with out this step
4. Create a concurrent Program executable
5. Create concurrent program