26: -- For each distinct customer in OKI_SALES_K_HDRS
27: -- For valid period from GL_PERIODS
28: -- Calculate the forecast, booked and lost amounts
29: -- Determine if the record should be inserted or updated
30: -- Update OKI_REFRESHS table with concurrent manager statistics
31: --
32: -- End of comments
33: --------------------------------------------------------------------------------
34:
34:
35: -- Global variable declaration
36:
37: -- variables to log this job run from concurrent manager
38: g_request_id oki.oki_refreshs.request_id%TYPE;
39: g_program_application_id oki.oki_refreshs.PROGRAM_APPLICATION_ID%TYPE;
40: g_program_id oki.oki_refreshs.PROGRAM_ID%TYPE;
41: g_program_update_date oki.oki_refreshs.PROGRAM_UPDATE_DATE%TYPE;
42:
35: -- Global variable declaration
36:
37: -- variables to log this job run from concurrent manager
38: g_request_id oki.oki_refreshs.request_id%TYPE;
39: g_program_application_id oki.oki_refreshs.PROGRAM_APPLICATION_ID%TYPE;
40: g_program_id oki.oki_refreshs.PROGRAM_ID%TYPE;
41: g_program_update_date oki.oki_refreshs.PROGRAM_UPDATE_DATE%TYPE;
42:
43:
36:
37: -- variables to log this job run from concurrent manager
38: g_request_id oki.oki_refreshs.request_id%TYPE;
39: g_program_application_id oki.oki_refreshs.PROGRAM_APPLICATION_ID%TYPE;
40: g_program_id oki.oki_refreshs.PROGRAM_ID%TYPE;
41: g_program_update_date oki.oki_refreshs.PROGRAM_UPDATE_DATE%TYPE;
42:
43:
44: --------------------------------------------------------------------------------
37: -- variables to log this job run from concurrent manager
38: g_request_id oki.oki_refreshs.request_id%TYPE;
39: g_program_application_id oki.oki_refreshs.PROGRAM_APPLICATION_ID%TYPE;
40: g_program_id oki.oki_refreshs.PROGRAM_ID%TYPE;
41: g_program_update_date oki.oki_refreshs.PROGRAM_UPDATE_DATE%TYPE;
42:
43:
44: --------------------------------------------------------------------------------
45: -- Procedure to create the forecast by organization records.