Search This Blog

Monday, April 6, 2015

Calling Procedure in personalization or Running Conc Program from Personalization

Calling procedure to execute from personalization
Actions:
10 Builtin     

Builtin Type: Exceute a Procedure
Argument :

='declare
begin
XX_I_JOIN_DATE_I_REQUEST('''||${ps.per_security_profile_id.value}||''')
end'



Notes:

XX_I_JOIN_DATE_I_REQUEST is the procedure having parameter
CREATE OR REPLACE procedure APPS.XX_I_JOIN_DATE_I_REQUEST(P_PER_SEC_PRO_ID number)
IS
vRequest_id varchar2(20);
BEGIN
vRequest_id:= APPS.FND_REQUEST.SUBMIT_REQUEST(
                'PER',
                'DUTY_RESUME',--This is the short_name of Concurrent Program
                '',
                '',
                NULL,
                P_PER_SEC_PRO_ID);
                COMMIT;
END;

Notes2:
${ps.per_security_profile_id.value} where ps = profile security

More in Detailed:
 Steps:
1. Personalize the form
2. Create an action of type “BuiltIn”
3. BuiltIn Type for Action should be “Execute a Procedure”
4. Argument should be as below
=’declare
v_field_value VARCHAR2(200) ;
begin
plsql_package.procedurenameHere ;
end’
or alternately
=’declare
v_field_value VARCHAR2(200) ;
begin
XX_PRC(”’||${item.PO_CONTROL_RULES.OBJECT_CODE_DISPLAYED_VALUE.value}||”’);
end’
Note the syntax, after =, entire declare begin end is within single quote.
Also, there is no semi colon after “end”
You can pass field values as
”’||${item.BLOCKNAME.FIELDNAME.value}||”’
e.g.
A simple way to understand is the begin end block should be enclosed in single quotes and the fields should be enclosed in double quotes.
=‘begin
test_procedure( “’||:GLOBAL.field||’”,”‘||${item.block.field.value}||’”);
end’

http://www.oracleerpappsguide.com/2011/10/calling-stored-procedure-through-forms.html

No comments:

Post a Comment