0% found this document useful (0 votes)
133 views1 page

Set Block Property

This code checks a user's responsibility against an application, sets blocks to not allow inserts or updates if the responsibility is invalid, and handles exceptions by also setting the blocks to not allow inserts or updates.

Uploaded by

khaleelap
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
133 views1 page

Set Block Property

This code checks a user's responsibility against an application, sets blocks to not allow inserts or updates if the responsibility is invalid, and handles exceptions by also setting the blocks to not allow inserts or updates.

Uploaded by

khaleelap
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

DECLARE lc_found VARCHAR2(3) := 'NO' ; BEGIN IF FND_GLOBAL.

resp_id <> -1 THEN BEGIN SELECT 'YES' INTO lc_found FROM fnd_responsibility WHERE 1 = 1 AND responsibility_id = FND_GLOBAL.resp_id AND application_id = FND_GLOBAL.RESP_APPL_ID and application_id IN (SELECT application_id FROM fnd_application WHERE application_short_name='AR' ); IF lc_found != 'YES' THEN Set_Block_Property('TRX_HDR_ATTR',INSERT_ALLOWED,PROPERTY_FALSE); Set_Block_Property('TRX_HDR_ATTR',UPDATE_ALLOWED,PROPERTY_FALSE); Set_Block_Property('TRX_LINES_ATTR',INSERT_ALLOWED,PROPERTY_FALSE); Set_Block_Property('TRX_LINES_ATTR',UPDATE_ALLOWED,PROPERTY_FALSE); END IF ; EXCEPTION WHEN OTHERS THEN Set_Block_Property('TRX_HDR_ATTR',INSERT_ALLOWED,PROPERTY_FALSE); Set_Block_Property('TRX_HDR_ATTR',UPDATE_ALLOWED,PROPERTY_FALSE); Set_Block_Property('TRX_LINES_ATTR',INSERT_ALLOWED,PROPERTY_FALSE); Set_Block_Property('TRX_LINES_ATTR',UPDATE_ALLOWED,PROPERTY_FALSE); END ; ELSE Set_Block_Property('TRX_HDR_ATTR',INSERT_ALLOWED,PROPERTY_FALSE); Set_Block_Property('TRX_HDR_ATTR',UPDATE_ALLOWED,PROPERTY_FALSE); Set_Block_Property('TRX_LINES_ATTR',INSERT_ALLOWED,PROPERTY_FALSE); Set_Block_Property('TRX_LINES_ATTR',UPDATE_ALLOWED,PROPERTY_FALSE); END IF ; END ;

You might also like