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