How Do I Examples
How Do I Examples
********************************************************************
********************************************************************
********************************************************************
********************************************************************
********************************************************************
--
-- Get database currently logged into
--
SELECT NAME
INTO v_database
FROM v$database;
IF v_database = 'PROD'
THEN
v_database := NULL;
ELSE
v_database := v_database || ' ';
END IF;
********************************************************************
********************************************************************
********************************************************************
v_from_date DATE;
v_to_date DATE;
--
-- Convert dates
--
v_from_date := TO_DATE (SUBSTR (p_week_ending_low, 1, 10), 'YYYY/MM/DD');
v_to_date := TO_DATE (SUBSTR (p_week_ending_high, 1, 10), 'YYYY/MM/DD');
********************************************************************
********************************************************************
Use the “HOT_ORGANIZATIONS” value set. The 3 letter org will appear on the lov but the org_id
number will be passed on.
********************************************************************
********************************************************************
:1,$s/<Ctl-v><Enter>//g
********************************************************************
********************************************************************
********************************************************************
********************************************************************
Where the Default Values reads:
********************************************************************
********************************************************************
fnd_standard.set_who;
********************************************************************
********************************************************************
SELECT organization_id
FROM hotus.hot_dm_org_extract_v
WHERE operating_unit = 338
********************************************************************
********************************************************************
********************************************************************
********************************************************************
l_completion_status VARCHAR2(30);
l_temp BOOLEAN;
......
.......
<<interface_end>>
l_temp := FND_CONCURRENT.SET_COMPLETION_STATUS(l_completion_status,'');
IF l_completion_status = 'NORMAL' THEN
errbuf := 'Interface trip stop is completed successfully';
retcode := '0';
ELSIF l_completion_status = 'WARNING' THEN
errbuf := 'Interface trip stop is completed with warning';
retcode := '1';
ELSE
errbuf := 'Interface trip stop is completed with error';
retcode := '2';
END IF;
********************************************************************
********************************************************************
v_ret BOOLEAN;
begin
v_ret := FND_CONCURRENT.SET_COMPLETION_STATUS('WARNING','');
********************************************************************
********************************************************************
********************************************************************
********************************************************************
SELECT column_value
FROM TABLE (hot_list_files ('/app/gentranedi/TEST/inbound'))
WHERE column_value NOT IN ('failed', 'processed')
********************************************************************
Before moving the reports to application do the following to make sure that the report is Oracle
Applications compliant.
1. Remove the '_all' tables from the FROM clause. For instance instead of using PA_PROJECTS_ALL table
use PA_PROJECTS (view).
2. Add a User Parameter P_CONC_REQUEST_ID. The datatype of this parameter is Number , Size is 15,
initial value is 0
3. In the BEFORE REPORT Trigger add this piece of code to set the environment variables.
4. In the AFTER REPORT trigger add this piece of code to reset the environment variables.
********************************************************************
********************************************************************
********************************************************************
--
-- Vefify that year for customer has been defined
--
IF v_count = 0
THEN
raise_application_error (-20000,
'Start date for year '
|| TO_CHAR (p_year)
|| ' is not defined for custoemer: '
|| p_customer
);
END IF;
********************************************************************
Form button trigger to get user, loop through items and suppress commit messages
********************************************************************
DECLARE
v_total NUMBER := 0;
v_user NUMBER := TO_NUMBER(FND_PROFILE.VALUE('USER_ID'));
BEGIN
IF :control.carton IS NULL THEN
SHOWMESSAGE('You must enter a carton number first.');
RETURN;
END IF;
GO_BLOCK('OE_ORDER_LINES_ALL');
FIRST_RECORD;
********************************************************************
********************************************************************