Procedure to call an Oracle Application Submit_Request from a Oracle_Customer Business Object:
This procedure creates a concurrent request and imports customer information from the interface table. Oracle Application Log and Out files are in their respective directories. The user can view the Log and Out files with the View Request (log/out) option.
Create Or Replace Procedure Cw_Item_Interface(pUserid Number, pResId Number,
pApplication_id Number, pOrgId Number, pAllOrg Number, pCreateUpdate Varchar2, pProcess_Id Number) Is
v_reqid number;
v_retval boolean;
v_Create_Update number;
begin
v_retval:=FND_REQUEST.SET_MODE(DB_TRIGGER => TRUE);
v_retval:=FND_REQUEST.SET_OPTIONS(IMPLICIT => 'ERROR');
fnd_global.APPS_INITIALIZE(pUserid, pResId, pApplication_Id);
-- Input Parameters
--
-- - Oranization_ID
-- - All Organization (Yes/No)
-- - Validate Items (Yes/No)
-- - Process Items (Yes/No)
-- - Delete Processed rows (Yes/No)
-- - Process Set
-- - CREATE/UPDATE Record (1/2)
If pCreateUpdate = 'CREATE' Then
v_Create_Update := 1;
End If;
If pCreateUpdate = 'UPDATE' Then
v_Create_Update := 2;
End If;
v_reqid := Fnd_Request.Submit_request('INV', 'INCOIN', '', sysdate, FALSE, pOrgId,
pAllOrg, 1, 1, 1, pProcess_Id, v_Create_Update) ;
if v_reqid=0 then
raise_application_error(-20170, FND_MESSAGE.GET);
end if;
end;
/
show errors;