SlideShare a Scribd company logo
1 of 21
1 ProceduresforMonth-EndClose Day1| ClearChannel rev.091211(sbz)
PROCEDURE FOR MONTH-END
DAY 1
(NOTE: This process will start anywhere between 5:30 – 7:00 p.m. depending on when Trade Entries
and Postings are completed)
Step 1: InformEddie Stolts (SeniorDatabase Engineer) aheadof time whengettingreadytorunJAXvia
email.
Step 2: CheckwithKushanEdussuriya(BusinessISManager) tomake sure all Trade Entriesare out.
STOP: YOU CANNOT PROCEED FORWARDUNTIL YOU RECEIVE THE APPROVAL FROM KUSHAN. THIS
APPROVAL WILL BE REQUIRED FOR THE SERVICE NOW TICKET REFERENCED BELOW.
Step 3: ContactAngelaDelatorre orChristinaHuertaandmake sure theyhave completedposting.
STOP: YOU CANNOT PROCEED FORWARDUNTIL YOU RECEIVE THE APPROVAL FROM ANGELAOR
CHRISTINA. THIS APPROVAL WILL BE REQUIRED FOR THE SERVICE NOW TICKET REFERENCED BELOW.
2 ProceduresforMonth-EndClose Day1| ClearChannel rev.091211(sbz)
Step 4: ContactJoe Mann (SeniorBusinessInformationSystemsAnalyst) andaskhimto editeveryone’s
AXaccess to ReadOnly[CorpRO] andinformeveryone viaemail. If Joe isout of the office,followthe
process referenced below. Make sure youturn everyone’s permissionback onafter the completionof
month-end.
STOP: YOUCAN NOT PROCEED FORWARD UNTIL YOUHAVE BEEN NOTIFIED THAT EVERYONE’S
PERMISSIONHAS BEEN CHANGED.
Step 4(a): RunHow to FindAR Users SQL Script:OpenWindowsDocument. If you usethescript, make
sure to changethe dateforinformationalpurposes only (i.e. ---for8/31/2011 close).
Linkto access script: CCIFS1SATCommonFinancial InfoSystems&ReportingAX
QueriesMonthendMonthEndProceduresSQLScriptsDay1HowToFindARUsers.sql
Make sure to highlight useProduction_DynamicsAX andhitExecute.RunEntire Script.
ServerName: AXSQLCluster
Database: Prod_DynamicsAX
Authentication: WindowsAuthentication
--- for 7/30/2011 close
use Prod_DynamicsAX
Select aa.NAME
, Case aa.ENABLE
When 1 Then 'Active'
else 'Inactive'
End as TheStatus
3 ProceduresforMonth-EndClose Day1| ClearChannel rev.091211(sbz)
, GroupID
From UserInfo aa (nolock)
Join USERGROUPLIST bb (nolock)
On aa.ID = bb.USERID
Where (
bb.GROUPID like 'CorpTrans'
or bb.GROUPID like 'ARadmin'
or bb.GROUPID like 'ARPoster'
or bb.Groupid like 'CorpRO'
or bb.GROUPID like 'Admin%'
)
Order By aa.ENABLE desc
, aa.Name
Select Distinct aa.GroupID
From USERGROUPLIST aa (nolock)
Select Distinct lt.Name
, ljt.JOURNALNUM
, ljt.Transdate
, lt.CREATEDBY
, ui.NAME
, lt.POSTED
From LedgerJournalTable lt (nolock)
Join LEDGERJOURNALTRANS ljt (nolock)
On lt.JOURNALNUM = ljt.JOURNALNUM
Join USERINFO ui (nolock)
On lt.CREATEDBY = ui.ID
Where ljt.TRANSDATE >= '1/1/2011'
--- And lt.NAME like '%Applied%'
Order By ljt.JOURNALNUM, lt.NAME
The SQL Script will return the name of all the users that needto be changed to Read Only. The listwill
return both Active and Inactive AX users. It issuggestedthat you copy and paste theminto excel. Do
not do anything with the Inactive Users.
4 ProceduresforMonth-EndClose Day1| ClearChannel rev.091211(sbz)
Step 4(b): Go to AXAdministrationUsers>lookupeachuserbyselectingSortAscending. ClickGroups
and Remove CorpTransandkeeponlyCorpRO.
AX Users
AX Roles & Permissions
STOP: MAKE SURE EVERYONE’S PERMISSIONHAS BEEN REMOVED BEFORE MOVING FORWARD.
Step 5: Create a service nowticketandaddressitto Eddie Stolts.
NOTE: MAKE SURE TO NOTE DOWNTHE INCIDENT NUMBER AND EMAIL OR IM TO EDDIE STOLTS.
ALSO MAKE SURE TO INFORMHIM THAT YOUNEED TO ONCETHIS PROCESS IS COMPLETE.
5 ProceduresforMonth-EndClose Day1| ClearChannel rev.091211(sbz)
This ticket populatesthe PeopleSoftheader and detail tables. The scriptbelow is forinformational
purposesonly (DONOT RUN) andlets you know the tables that will be impactedby Eddie’s job.
/********************* FAILED JOURNAL *********************************/
--Run this to find any failed journals
select *
from PS_CCW_JRNL_HDR WITH (NOLOCK)
WHERE APPL_JRNL_ID='MBR_AUTO'
and CCW_IMPORT_STATUS='F'
select *
from PS_CCW_JRNL_LN
WHERE APPL_JRNL_ID='MBR_AUTO'
AND CCW_JRNL_SRC_ID='3589'
Path forService Now Ticket:IncidentGeneralSubmitwhen you completetheticket.
Populate the followingfields:
 Caller: Your Name
 Location:SAT-022
 Category:Database
 Subcategory:Data Request
 ConfigurationItem: RadioSI
 Division:Radio
 Impact: High
 Urgency: High
 AssignmentGroup:CCITDatabase Operations
 Assignedto:Eddie Stolts(ccisat1evs)
 Short Description:RunjAX:monthEnd0000loadMBR fromAXReportingw stagingtable refresh
 Description: Pleaserun“ jAX:monthEnd000loadMBR from AXReportingw staging tables
refreshAXReporting”andcreate the Cashand AdjustmentMBRtablesrecords.
6 ProceduresforMonth-EndClose Day1| ClearChannel rev.091211(sbz)
Step 5(a): You will receive anEmail orIM fromEddie Stoltsinformingyouthatthe jobhas been
completed.
NOTE: THIS JOB CANTAKE UPWARDSOF 1.5+ HOURS.
Step 6: RunSQL MBR COMBO EDITS-CONTROLACCOUNTS-INACTIVEBU(MonthEnd Cycle)(5). While
runningthe script, youmay get a differentrow count. Make sure to update the row count.In case you
run the entire scriptand loosethe row count, contact Eddie to re-run the script.
Linkto script: CCIFS1SATCommonFinancialInfoSystems&ReportingAXQueriesMonthendMonth
End ProceduresSQLScriptsDay1MBRCOMBO EDITS-CONTROLACCOUNTS-INACTIVEBU(RunDuring
MBR CashMonth End Cycle) (5).sql
Locationto save updatedscript:CCIFS1SATCommonFinancialInfoSystems&ReportingAX
QueriesMonthendMonthEndProcedures. Youwill needtocreate afolderwiththe monthandyear
and create a sub-foldercalledSQLQueries.
ServerName: pssqlclus/fnprod
Database: FNPROD
Authentication: SQL ServerAuthentication
Log In: sqldev
Password: whatareyoudoing??
Step 6(a): Runthe --SELECT * StatementforCommissionEntriesscript. Afterthe scriptruns,note
the numberof rows and correctthe rowsaffected.
STOP: DO NOT RUN THE DELETE PORTION OFTHIS STATEMEMENT AT THIS TIME.
7 ProceduresforMonth-EndClose Day1| ClearChannel rev.091211(sbz)
-/************************DELETE STATEMENT FOR COMMISSION
ENTRIES**********************************************************************
*****/
/*Run this to determine if there are any lines affecting commission
accounts*/
DELETE
--SELECT *
from dbo.PS_CCW_JRNL_LN
WHERE ACCOUNT IN ('210800','503000')
AND LINE_DESCR LIKE 'Rev%'
--Rows Affected (3680)
Step 6(b): Runthe DELETE forCommissionEntryscript. If the script isran correctly,youwill see a
message advisingyouof the numberof row countsthat were affected.
-/************************DELETE STATEMENT FOR COMMISSION
ENTRIES**********************************************************************
*****/
/*Run this to determine if there are any lines affecting commission
accounts*/
DELETE
--SELECT *
from dbo.PS_CCW_JRNL_LN
WHERE ACCOUNT IN ('210800','503000')
AND LINE_DESCR LIKE 'Rev%'
--Rows Affected (3680)
Step 6(c): Run the ----SELECT Statementfor each of the comboeditscriptsindependently.
Normally,the rowcountsare zero or the numberremainsthe same;however, there are instanceswhen
the row countis different. If anythingother than zero appearsor the number updates,make sure to
followstep 6(c)(1).
STOP: DO NOT INCLUDE THE UPDATE AS PART OF RUNNING THE SCRIPT.
/************************ UPDATE STATEMENTS FOR COMBO EDIT SCRUBBING
******************************/
8 ProceduresforMonth-EndClose Day1| ClearChannel rev.091211(sbz)
UPDATE PS_CCW_JRNL_LN
SET DEPTID = '000'
----SELECT count(*) FROM PS_CCW_JRNL_LN
WHERE DEPTID = ''
AND APPL_JRNL_ID='MBR_AUTO'
----ROWS = 0
UPDATE PS_CCW_JRNL_LN
SET DEPTID = '000'
----SELECT count(*) FROM PS_CCW_JRNL_LN
WHERE DEPTID <> '000'
AND ACCOUNT BETWEEN '100000' AND '499999'
AND APPL_JRNL_ID='MBR_AUTO'
----ROWS = 0
UPDATE PS_CCW_JRNL_LN
SET BUSINESS_UNIT = 15818
----SELECT count(*) FROM PS_CCW_JRNL_LN
WHERE BUSINESS_UNIT = '15813'
AND ACCOUNT = '820400'
AND DEPTID = '000'
AND APPL_JRNL_ID='MBR_AUTO'
----ROWS = 0
UPDATE PS_CCW_JRNL_LN
SET BUSINESS_UNIT = 23219
----SELECT count(*) FROM PS_CCW_JRNL_LN
WHERE BUSINESS_UNIT IN ('23211','23213')
AND ACCOUNT = '820400'
AND DEPTID = '000'
AND APPL_JRNL_ID='MBR_AUTO'
----ROWS = 0
UPDATE PS_CCW_JRNL_LN
SET ACCOUNT = '560005'
---- SELECT count(*) FROM PS_CCW_JRNL_LN
WHERE BUSINESS_UNIT = 15523
AND ACCOUNT = '560500'
AND DEPTID = '000'
AND APPL_JRNL_ID='MBR_AUTO'
----ROWS = 0
UPDATE PS_CCW_JRNL_LN
SET ACCOUNT = '211400'
---- SELECT count(*) FROM PS_CCW_JRNL_LN
WHERE BUSINESS_UNIT = '72711'
AND ACCOUNT = '214000'
AND DEPTID = '000'
AND APPL_JRNL_ID='MBR_AUTO'
----ROWS = 0
9 ProceduresforMonth-EndClose Day1| ClearChannel rev.091211(sbz)
----/***************************** UPDATE WHERE DEPT = '000' TO '110'
*****************************/
UPDATE PS_CCW_JRNL_LN
SET DEPTID = '110'
----SELECT COUNT (*) FROM PS_CCW_JRNL_LN
WHERE ACCOUNT IN('500200','551000')
AND DEPTID = '000'
AND APPL_JRNL_ID='MBR_AUTO'
----ROWS = 4
----/***************************** UPDATE WHERE DEPT = '000' TO '598'
*****************************/
UPDATE PS_CCW_JRNL_LN
SET DEPTID = '598'
----SELECT COUNT (*) FROM PS_CCW_JRNL_LN
WHERE ACCOUNT IN('503000','560005','566100','600000','553100')
and BUSINESS_UNIT <> 27120
AND DEPTID = '000'
AND APPL_JRNL_ID='MBR_AUTO'
----ROWS = 179
------/***************************** UPDATE WHERE DEPT = '000' TO '117'
*****************************/
UPDATE PS_CCW_JRNL_LN
SET DEPTID = '117'
----SELECT COUNT (*) FROM PS_CCW_JRNL_LN
WHERE ACCOUNT IN('503000')
and BUSINESS_UNIT = 27120
AND DEPTID = '000'
AND APPL_JRNL_ID='MBR_AUTO'
----ROWS = 0
------/***************************** UPDATE WHERE DEPT = '000' TO '731'
*****************************/
UPDATE PS_CCW_JRNL_LN
SET DEPTID = '731'
----SELECT COUNT (*) FROM PS_CCW_JRNL_LN
WHERE ACCOUNT
IN('504400','512300','512500','520000','521000','521200','550100','560200','5
60800','561600','565000','810100','800900','820400')
AND DEPTID = '000'
AND APPL_JRNL_ID='MBR_AUTO'
----ROWS = 21
10 ProceduresforMonth-EndClose Day1| ClearChannel rev.091211(sbz)
----/***************************** UPDATE WHERE DEPT = '000' TO '114'
*****************************/
UPDATE PS_CCW_JRNL_LN
SET DEPTID = '114'
----SELECT COUNT (*) FROM PS_CCW_JRNL_LN
WHERE ACCOUNT IN('566200')
AND DEPTID = '000'
AND APPL_JRNL_ID='MBR_AUTO'
----ROWS = 0
----/***************************** UPDATE WHERE DEPT = '000' TO '990'
*****************************/
UPDATE PS_CCW_JRNL_LN
SET DEPTID = '990'
----SELECT COUNT (*) FROM PS_CCW_JRNL_LN
WHERE ACCOUNT IN('930000')
AND DEPTID = '000'
AND APPL_JRNL_ID='MBR_AUTO'
----ROWS = 0
--commit
--/***************************** UPDATE WHERE DEPT = '0' TO '000'
*****************************/
UPDATE PS_CCW_JRNL_LN
SET DEPTID = '000'
----SELECT COUNT (*) FROM PS_CCW_JRNL_LN
WHERE ACCOUNT BETWEEN '100000' AND '499999'
AND DEPTID = '0'
AND APPL_JRNL_ID='MBR_AUTO'
--ROWS = 156
--/***************************** UPDATE WHERE DEPT = '0' TO '000'
*****************************/
UPDATE PS_CCW_JRNL_LN
SET CHARTFIELD1='',
JRNL_LN_REF='',
OPERATING_UNIT=''
----SELECT COUNT (*) FROM PS_CCW_JRNL_LN
WHERE CHARTFIELD1=1
AND APPL_JRNL_ID='MBR_AUTO'
--ROWS = 0
11 ProceduresforMonth-EndClose Day1| ClearChannel rev.091211(sbz)
--/***************************** UPDATE WHERE DEPT = '000' TO '598'
*****************************/
UPDATE PS_CCW_JRNL_LN
SET DEPTID = '598'
----SELECT COUNT (*) FROM PS_CCW_JRNL_LN
WHERE ACCOUNT
IN('512000','553101','551200','560005','560000','580000','600000')
AND DEPTID = '000'
AND APPL_JRNL_ID='MBR_AUTO'
--ROWS = 8
--begin tran
--/***************************** UPDATE WHERE DEPT = '000' TO '731'
*****************************/
UPDATE PS_CCW_JRNL_LN
SET DEPTID = '731'
--SELECT COUNT (*) FROM PS_CCW_JRNL_LN
WHERE ACCOUNT IN('550000','560800','800000','810200','822000','822000')
AND DEPTID = '000'
AND APPL_JRNL_ID='MBR_AUTO'
--ROWS = 67
----/***************************** UPDATE WHERE DEPT = '000' TO '113'
*****************************/
UPDATE PS_CCW_JRNL_LN
SET DEPTID = '113'
----SELECT COUNT (*) FROM PS_CCW_JRNL_LN
WHERE ACCOUNT IN('810000','561300','561400','561500','800300')
AND DEPTID = '000'
AND APPL_JRNL_ID='MBR_AUTO'
--ROWS = 23
--commit
--begin tran
--/****************** UPDATE TO SHARED SERVICES BU'S FOR TAX ACCOUNTS
*********************/
UPDATE PS_CCW_JRNL_LN
SET BUSINESS_UNIT = 16120
----SELECT COUNT (*) FROM PS_CCW_JRNL_LN
WHERE BUSINESS_UNIT = 16111
AND ACCOUNT = '214100'
AND APPL_JRNL_ID='MBR_AUTO'
--ROWS = 0
12 ProceduresforMonth-EndClose Day1| ClearChannel rev.091211(sbz)
UPDATE PS_CCW_JRNL_LN
SET BUSINESS_UNIT = 23219
----SELECT COUNT (*) FROM PS_CCW_JRNL_LN
WHERE BUSINESS_UNIT = 23211
AND ACCOUNT = '214100'
AND APPL_JRNL_ID='MBR_AUTO'
------ROWS = 0
UPDATE PS_CCW_JRNL_LN
SET BUSINESS_UNIT = 36320
----SELECT COUNT (*) FROM PS_CCW_JRNL_LN
WHERE BUSINESS_UNIT = 36311
AND ACCOUNT = '214000'
AND APPL_JRNL_ID='MBR_AUTO'
------ROWS = 0
UPDATE PS_CCW_JRNL_LN
SET BUSINESS_UNIT = 23216
--SELECT COUNT (*) FROM PS_CCW_JRNL_LN
WHERE BUSINESS_UNIT = 23211
AND ACCOUNT = '214300'
AND APPL_JRNL_ID='MBR_AUTO'
-------ROWS = 0
UPDATE PS_CCW_JRNL_LN
SET BUSINESS_UNIT = 65619
----SELECT COUNT (*) FROM PS_CCW_JRNL_LN
WHERE BUSINESS_UNIT = 65611
AND ACCOUNT = '214100'
AND APPL_JRNL_ID='MBR_AUTO'
-------ROWS = 0
UPDATE PS_CCW_JRNL_LN
SET BUSINESS_UNIT = 55010
--SELECT COUNT (*) FROM PS_CCW_JRNL_LN
WHERE BUSINESS_UNIT = 55071
AND ACCOUNT = '214500'
AND APPL_JRNL_ID='MBR_AUTO'
----ROWS = 0
----------
-------------------------------------------------
UPDATE PS_CCW_JRNL_LN
SET BUSINESS_UNIT = 27123
----SELECT COUNT (*) FROM PS_CCW_JRNL_LN
WHERE BUSINESS_UNIT = 27111
AND ACCOUNT = '214100'
AND APPL_JRNL_ID='MBR_AUTO'
----ROWS = 13
13 ProceduresforMonth-EndClose Day1| ClearChannel rev.091211(sbz)
UPDATE PS_CCW_JRNL_LN
SET BUSINESS_UNIT = 27218
----SELECT COUNT (*) FROM PS_CCW_JRNL_LN
WHERE BUSINESS_UNIT = 27211
AND ACCOUNT = '214100'
AND APPL_JRNL_ID='MBR_AUTO'
----ROWS = 0
UPDATE PS_CCW_JRNL_LN
SET BUSINESS_UNIT = 27317
----SELECT COUNT (*) FROM PS_CCW_JRNL_LN
WHERE BUSINESS_UNIT = 27311
AND ACCOUNT = '214100'
AND APPL_JRNL_ID='MBR_AUTO'
----ROWS = 0
UPDATE PS_CCW_JRNL_LN
SET BUSINESS_UNIT = 44419
----SELECT COUNT (*) FROM PS_CCW_JRNL_LN
WHERE BUSINESS_UNIT = 44411
AND ACCOUNT = '214100'
AND APPL_JRNL_ID='MBR_AUTO'
----ROWS = 0
UPDATE PS_CCW_JRNL_LN
SET BUSINESS_UNIT = 65149
----SELECT COUNT (*) FROM PS_CCW_JRNL_LN
WHERE BUSINESS_UNIT = 65142
AND ACCOUNT = '214100'
AND APPL_JRNL_ID='MBR_AUTO'
----ROWS = 0
UPDATE PS_CCW_JRNL_LN
SET BUSINESS_UNIT = 65420
----SELECT COUNT (*) FROM PS_CCW_JRNL_LN
WHERE BUSINESS_UNIT = 65421
AND ACCOUNT = '214100'
AND APPL_JRNL_ID='MBR_AUTO'
----ROWS = 0
UPDATE PS_CCW_JRNL_LN
SET BUSINESS_UNIT = 67217
----SELECT COUNT (*) FROM PS_CCW_JRNL_LN
WHERE BUSINESS_UNIT = 67211
AND ACCOUNT = '214100'
AND APPL_JRNL_ID='MBR_AUTO'
----ROWS = 0
14 ProceduresforMonth-EndClose Day1| ClearChannel rev.091211(sbz)
UPDATE PS_CCW_JRNL_LN
SET BUSINESS_UNIT = 71619
----SELECT COUNT (*) FROM PS_CCW_JRNL_LN
WHERE BUSINESS_UNIT = 71611
AND ACCOUNT = '214100'
AND APPL_JRNL_ID='MBR_AUTO'
----ROWS = 0
Step 6(c)(1): Use thisstepwhenrow countsare otherthanzero or the numberhas increased. Youwill
getthe Row count whenyourun----SELECT script. Make sure to insertthe row count before running
the UPDATE script.Run the UPDATE script to update the row count.
NOTE: THIS IS AN EXAMPLE ONLY.
UPDATE PS_CCW_JRNL_LN
SET BUSINESS_UNIT = 27123
----SELECT COUNT (*) FROM PS_CCW_JRNL_LN
WHERE BUSINESS_UNIT = 27111
AND ACCOUNT = '214100'
AND APPL_JRNL_ID='MBR_AUTO'
----ROWS = 13
Step 6(d): Runthe -----SELECT StatementforUpdate BU for TrafficAccounts. Make sure to change
the date on the script. Youwill receive anupdated row count. Make sure to insert the new row count.
STOP: DO NOT INCLUDE THE UPDATE AS PART OF RUNNING THE SCRIPT.
THEN RUN TRAFFIC ACCOUNTS – CHANGE DATES – UPDATE ROW COUNT – RUN UPDATE
SCRIPT.
------/************************** UPDATE BU FOR TRAFFIC ACCOUNTS
*******************************/
UPDATE PS_CCW_JRNL_LN
SET BUSINESS_UNIT = BUSINESS_UNIT_TRAF
-----SELECT COUNT (*) --J.BUSINESS_UNIT, BUSINESS_UNIT_TRAF,ACCOUNT
FROM PS_CCW_JRNL_LN as J WITH (NOLOCK)
JOIN PS_CCW_JRNL_HDR AS H WITH (NOLOCK)
ON H.CCW_JRNL_SRC_ID = J.CCW_JRNL_SRC_ID
JOIN PS_CCW_MBR_STATION AS M WITH (NOLOCK)
ON M.BUSINESS_UNIT = J.BUSINESS_UNIT
WHERE JOURNAL_DATE BETWEEN '07/1/11' AND '07/31/11'
AND J.ACCOUNT IN ('420750','420760')
AND H.APPL_JRNL_ID='MBR_AUTO'
----ROWS = 181
15 ProceduresforMonth-EndClose Day1| ClearChannel rev.091211(sbz)
Step 6(d)(1): Run the UPDATE scriptto update the row count.
THEN RUN TRAFFIC ACCOUNTS – CHANGE DATES – UPDATE ROW COUNT – RUN UPDATE
SCRIPT.
------/************************** UPDATE BU FOR TRAFFIC ACCOUNTS
*******************************/
UPDATE PS_CCW_JRNL_LN
SET BUSINESS_UNIT = BUSINESS_UNIT_TRAF
-----SELECT COUNT (*) --J.BUSINESS_UNIT, BUSINESS_UNIT_TRAF,ACCOUNT
FROM PS_CCW_JRNL_LN as J WITH (NOLOCK)
JOIN PS_CCW_JRNL_HDR AS H WITH (NOLOCK)
ON H.CCW_JRNL_SRC_ID = J.CCW_JRNL_SRC_ID
JOIN PS_CCW_MBR_STATION AS M WITH (NOLOCK)
ON M.BUSINESS_UNIT = J.BUSINESS_UNIT
WHERE JOURNAL_DATE BETWEEN '07/1/11' AND '07/31/11'
AND J.ACCOUNT IN ('420750','420760')
AND H.APPL_JRNL_ID='MBR_AUTO'
----ROWS = 181
Step 6(e): Run the----SELECT StatementforUpdate OtherRevenue AccountsforProperAccount.
Normally,the row countis zero; however, if it is other than zero go to step 5(e)(1).
STOP: DO NOT INCLUDE THE UPDATE AS PART OF RUNNING THE SCRIPT.
--/***************************** UPDATE OTHER REVENUE ACCOUNTS FOR PROPER
ACCOUNT ********************/
UPDATE PS_CCW_JRNL_LN
SET ACCOUNT = 489900
----SELECT count(*) FROM PS_CCW_JRNL_LN
WHERE ACCOUNT = '489904'
AND APPL_JRNL_ID='MBR_AUTO'
--ROWS = 0
Step 6(e)(1): Run the UPDATE scriptto update the row count.
--/***************************** UPDATE OTHER REVENUE ACCOUNTS FOR PROPER
ACCOUNT ********************/
UPDATE PS_CCW_JRNL_LN
SET ACCOUNT = 489900
----SELECT count(*) FROM PS_CCW_JRNL_LN
WHERE ACCOUNT = '489904'
AND APPL_JRNL_ID='MBR_AUTO'
--ROWS = 0
16 ProceduresforMonth-EndClose Day1| ClearChannel rev.091211(sbz)
Step 6(f): Runthe Control Accountsand Inactive BU checksscriptsindependently.
--/**************************** Control Accounts and Inactive BU checks
********************************/
/*run this to check to determine if any accounts in the table are control
accounts. If there
are control accounts the job will end with "no success" on the journal with
the bad account.
To correct change either the control flag or change the account in the
table, then change
the status on the header table back to "R". You can then restart the
job.*/
SELECT * FROM PS_GL_ACCOUNT_TBL with (nolock)
WHERE CONTROL_FLAG = 'Y'
AND ACCOUNT IN ( select distinct ACCOUNT from PS_CCW_JRNL_LN)
/*Run this to determine if there are any lines to inactive business units*/
SELECT DISTINCT BUSINESS_UNIT FROM PS_FIN_OPEN_PERIOD WITH (NOLOCK)
WHERE LEDGER_GROUP = 'RECORDING'
AND PSFT_PRODUCT = 'GL'
AND CALENDAR_ID = 'CL'
AND BUSINESS_UNIT IN (SELECT DISTINCT BUSINESS_UNIT FROM PS_CCW_JRNL_LN)
Normally,the scriptwill returnaresultof SetID withan “O”. If this ispresent,thenyoucanproceed.
However,incaseswhere itpresentsresultsof otherthan“O,” proceedtostep5(f)(1).
17 ProceduresforMonth-EndClose Day1| ClearChannel rev.091211(sbz)
Step 6(f)(1): Whenthe script above returns resultsotherthanan“O,” thenuse the followingscriptto
correct the problem. Makesureto updatetheSet & Where BusinessUnitnumbers. You can do this by
going to AXGeneralLedgerDimensionsStationInsertBU. Once youlocated the BU number, insert
this inthe numberin the Where BusinessUnit script. Also makesure to note the site #. Filter the Site
numberand lookfor theshared services BU. Onceyou located theshared services BU,insert this
numberin the SetBusiness_UnitScript.
------/************************** UPDATE BU FOR INACTIVE BUSINESS UNITS
*******************************/
18 ProceduresforMonth-EndClose Day1| ClearChannel rev.091211(sbz)
UPDATE PS_CCW_JRNL_LN
SET BUSINESS_UNIT = '15079'
----SELECT count(*) FROM PS_CCW_JRNL_LN
WHERE BUSINESS_UNIT = '15071'
AND APPL_JRNL_ID='MBR_AUTO'
--ROWS AFFECTED = 1
Step 6(g): Run the following SELECT DISTINCT Statement. Thisispartof the same script referenced
instep5. Make sure to changethe dates.
SELECT DISTINCT
(J.BUSINESS_UNIT),
' ' AS 'Correct BU',
(M.NAME1),
(J.ACCOUNT),
' ' AS 'Correct Account',
(J.DEPTID),
' ' AS 'Correct Dept',
LINE_DESCR, FOREIGN_AMOUNT, JOURNAL_DATE
FROM PS_CCW_JRNL_LN as J WITH (NOLOCK)
JOIN PS_CCW_JRNL_HDR AS H WITH (NOLOCK)
ON H.CCW_JRNL_SRC_ID = J.CCW_JRNL_SRC_ID
LEFT OUTER JOIN /*FNPROD_READER.FNPROD.*/dbo.PS_CCW_DEPT_CE_VW AS
C --WITH (NOLOCK) Combo Edit View
ON J.BUSINESS_UNIT = C.BUSINESS_UNIT
AND J.ACCOUNT = C.ACCOUNT
AND J.DEPTID = C.DEPTID
JOIN PS_CCW_MBR_STATION AS M WITH (NOLOCK)
ON M.BUSINESS_UNIT = J.BUSINESS_UNIT
WHERE JOURNAL_DATE BETWEEN '07/1/11' AND '07/31/11'
AND C.BUSINESS_UNIT IS NULL
AND J.APPL_JRNL_ID='MBR_AUTO'
--AND J.ACCOUNT NOT IN
('420750','420760','214100','214300','214500','551200','560005','560000','550
000','560800','800000','810200','822000','822000','810000','561300','561400',
'561500')
--AND J.DEPTID <> '0'
ORDER BY J.ACCOUNT, J.BUSINESS_UNIT
Thiswill returnthe followingresult.
19 ProceduresforMonth-EndClose Day1| ClearChannel rev.091211(sbz)
Step 6(g)(1): Take the resultsandcopy andpaste all the information(including)the headersintoan
Excel file. Sendthe filetoJeanaLackey(AssistantController). She will update andreturnthisfile to
your attention. Furtheractionwill be discussedinDay2. Make sure to highlightColumnB(Correct
BU),ColumnE (Correct Account) & ColumnG (Correct Dept.), so they are aware of whatcorrections
need to be performed.
Step 7: Runthe CCW Journal EntryImportin PeopleSoft. The pathis PeopleSoftGeneral
LedgerJournalsJournal EntryCCWJournal EntryImport.
STOP: CHECK WITH KUSHAN BEFORE RUNNING THE IMPORT.
Link to PeopleSoft:
https://fnprod.mssql.peoplesoft.clearchannel.com/psp/ps/EMPLOYEE/PSFT_EP/?cmd=logout
UserID: JE_SYSTEM_USER
Password: Meatloaf
20 ProceduresforMonth-EndClose Day1| ClearChannel rev.091211(sbz)
Clickon the ImportJournalsunderthe RunControl ID to start the job.
Step 7(a): InformKushanandlethim know the Journal EntryImportis running.
Step 7(b): Runthe select babysittingscriptuntil itreturnsthe resultsinthe example forStep6(c). In
some instances,Kushanwillbabysitthe script. The babysittingcanbe done fromhome.
select CCW_IMPORT_STATUS, COUNT(*)
from PS_CCW_JRNL_HDR WITH (NOLOCK)
WHERE APPL_JRNL_ID='MBR_AUTO'
GROUP BY CCW_IMPORT_STATUS
21 ProceduresforMonth-EndClose Day1| ClearChannel rev.091211(sbz)
The script will returnthe followingresultsduringthe babysittingprocess. The Querywill returnthe
numberof failedjournals. Eachjournal wil have one or more failedcombos,whichwill be includedin
the failedcomboexcel file sendtoJeana.
S = Success
R = Ready
I = InProcess
F = Failed
Step 7(c): NotifyKushan viaEmail orIM, once the importiscomplete. Youwill see thisisanexample.
CCW_IMPORT_STATUS (Nocolumnname)
S 6476
F 12

More Related Content

Similar to PROCEDURE FOR MONTH END DAY 1 INCLUDING SCREEN SHOT & SCRIPTS (Final rev 090211)

PROCEDURE FOR MONTH END DAY 2 & 3 (Final rev 100311)
PROCEDURE FOR MONTH END DAY 2 & 3 (Final rev 100311)PROCEDURE FOR MONTH END DAY 2 & 3 (Final rev 100311)
PROCEDURE FOR MONTH END DAY 2 & 3 (Final rev 100311)Shakil Zaman
 
1_Transaction.pdf
1_Transaction.pdf1_Transaction.pdf
1_Transaction.pdfNhtHong96
 
IBM Informix dynamic server 11 10 Cheetah Sql Features
IBM Informix dynamic server 11 10 Cheetah Sql FeaturesIBM Informix dynamic server 11 10 Cheetah Sql Features
IBM Informix dynamic server 11 10 Cheetah Sql FeaturesKeshav Murthy
 
OpenWorld 2018 - Common Application Developer Disasters
OpenWorld 2018 - Common Application Developer DisastersOpenWorld 2018 - Common Application Developer Disasters
OpenWorld 2018 - Common Application Developer DisastersConnor McDonald
 
SQL/MX 3.6 Select for update feature
SQL/MX 3.6 Select for update featureSQL/MX 3.6 Select for update feature
SQL/MX 3.6 Select for update featureFrans Jongma
 
SQL Performance Tuning and New Features in Oracle 19c
SQL Performance Tuning and New Features in Oracle 19cSQL Performance Tuning and New Features in Oracle 19c
SQL Performance Tuning and New Features in Oracle 19cRachelBarker26
 
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should KnowOTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should KnowAlex Zaballa
 
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should KnowOTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should KnowAlex Zaballa
 
Formal Verification of Web Service Interaction Contracts
Formal Verification of Web Service Interaction ContractsFormal Verification of Web Service Interaction Contracts
Formal Verification of Web Service Interaction ContractsGera Shegalov
 
MSCD650 Final Exam feedback FormMSCD650 Final Exam Grading For.docx
MSCD650 Final Exam feedback FormMSCD650 Final Exam Grading For.docxMSCD650 Final Exam feedback FormMSCD650 Final Exam Grading For.docx
MSCD650 Final Exam feedback FormMSCD650 Final Exam Grading For.docxgilpinleeanna
 
MySQL 8 -- A new beginning : Sunshine PHP/PHP UK (updated)
MySQL 8 -- A new beginning : Sunshine PHP/PHP UK (updated)MySQL 8 -- A new beginning : Sunshine PHP/PHP UK (updated)
MySQL 8 -- A new beginning : Sunshine PHP/PHP UK (updated)Dave Stokes
 
Redux. From twitter hype to production
Redux. From twitter hype to productionRedux. From twitter hype to production
Redux. From twitter hype to productionFDConf
 
Dynamics ax 2012 workflow development
Dynamics ax 2012 workflow development Dynamics ax 2012 workflow development
Dynamics ax 2012 workflow development Ahmed Farag
 

Similar to PROCEDURE FOR MONTH END DAY 1 INCLUDING SCREEN SHOT & SCRIPTS (Final rev 090211) (20)

PROCEDURE FOR MONTH END DAY 2 & 3 (Final rev 100311)
PROCEDURE FOR MONTH END DAY 2 & 3 (Final rev 100311)PROCEDURE FOR MONTH END DAY 2 & 3 (Final rev 100311)
PROCEDURE FOR MONTH END DAY 2 & 3 (Final rev 100311)
 
Less09 Data
Less09 DataLess09 Data
Less09 Data
 
Les09
Les09Les09
Les09
 
1_Transaction.pdf
1_Transaction.pdf1_Transaction.pdf
1_Transaction.pdf
 
IBM Informix dynamic server 11 10 Cheetah Sql Features
IBM Informix dynamic server 11 10 Cheetah Sql FeaturesIBM Informix dynamic server 11 10 Cheetah Sql Features
IBM Informix dynamic server 11 10 Cheetah Sql Features
 
Les09 Manipulating Data
Les09 Manipulating DataLes09 Manipulating Data
Les09 Manipulating Data
 
OpenWorld 2018 - Common Application Developer Disasters
OpenWorld 2018 - Common Application Developer DisastersOpenWorld 2018 - Common Application Developer Disasters
OpenWorld 2018 - Common Application Developer Disasters
 
SQL/MX 3.6 Select for update feature
SQL/MX 3.6 Select for update featureSQL/MX 3.6 Select for update feature
SQL/MX 3.6 Select for update feature
 
SQL Performance Tuning and New Features in Oracle 19c
SQL Performance Tuning and New Features in Oracle 19cSQL Performance Tuning and New Features in Oracle 19c
SQL Performance Tuning and New Features in Oracle 19c
 
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should KnowOTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
 
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should KnowOTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
 
Formal Verification of Web Service Interaction Contracts
Formal Verification of Web Service Interaction ContractsFormal Verification of Web Service Interaction Contracts
Formal Verification of Web Service Interaction Contracts
 
Sql transacation
Sql transacationSql transacation
Sql transacation
 
MSCD650 Final Exam feedback FormMSCD650 Final Exam Grading For.docx
MSCD650 Final Exam feedback FormMSCD650 Final Exam Grading For.docxMSCD650 Final Exam feedback FormMSCD650 Final Exam Grading For.docx
MSCD650 Final Exam feedback FormMSCD650 Final Exam Grading For.docx
 
MySQL 8 -- A new beginning : Sunshine PHP/PHP UK (updated)
MySQL 8 -- A new beginning : Sunshine PHP/PHP UK (updated)MySQL 8 -- A new beginning : Sunshine PHP/PHP UK (updated)
MySQL 8 -- A new beginning : Sunshine PHP/PHP UK (updated)
 
PHP tips by a MYSQL DBA
PHP tips by a MYSQL DBAPHP tips by a MYSQL DBA
PHP tips by a MYSQL DBA
 
Banking Database
Banking DatabaseBanking Database
Banking Database
 
Redux. From twitter hype to production
Redux. From twitter hype to productionRedux. From twitter hype to production
Redux. From twitter hype to production
 
Dynamics ax 2012 workflow development
Dynamics ax 2012 workflow development Dynamics ax 2012 workflow development
Dynamics ax 2012 workflow development
 
Flashback ITOUG
Flashback ITOUGFlashback ITOUG
Flashback ITOUG
 

PROCEDURE FOR MONTH END DAY 1 INCLUDING SCREEN SHOT & SCRIPTS (Final rev 090211)

  • 1. 1 ProceduresforMonth-EndClose Day1| ClearChannel rev.091211(sbz) PROCEDURE FOR MONTH-END DAY 1 (NOTE: This process will start anywhere between 5:30 – 7:00 p.m. depending on when Trade Entries and Postings are completed) Step 1: InformEddie Stolts (SeniorDatabase Engineer) aheadof time whengettingreadytorunJAXvia email. Step 2: CheckwithKushanEdussuriya(BusinessISManager) tomake sure all Trade Entriesare out. STOP: YOU CANNOT PROCEED FORWARDUNTIL YOU RECEIVE THE APPROVAL FROM KUSHAN. THIS APPROVAL WILL BE REQUIRED FOR THE SERVICE NOW TICKET REFERENCED BELOW. Step 3: ContactAngelaDelatorre orChristinaHuertaandmake sure theyhave completedposting. STOP: YOU CANNOT PROCEED FORWARDUNTIL YOU RECEIVE THE APPROVAL FROM ANGELAOR CHRISTINA. THIS APPROVAL WILL BE REQUIRED FOR THE SERVICE NOW TICKET REFERENCED BELOW.
  • 2. 2 ProceduresforMonth-EndClose Day1| ClearChannel rev.091211(sbz) Step 4: ContactJoe Mann (SeniorBusinessInformationSystemsAnalyst) andaskhimto editeveryone’s AXaccess to ReadOnly[CorpRO] andinformeveryone viaemail. If Joe isout of the office,followthe process referenced below. Make sure youturn everyone’s permissionback onafter the completionof month-end. STOP: YOUCAN NOT PROCEED FORWARD UNTIL YOUHAVE BEEN NOTIFIED THAT EVERYONE’S PERMISSIONHAS BEEN CHANGED. Step 4(a): RunHow to FindAR Users SQL Script:OpenWindowsDocument. If you usethescript, make sure to changethe dateforinformationalpurposes only (i.e. ---for8/31/2011 close). Linkto access script: CCIFS1SATCommonFinancial InfoSystems&ReportingAX QueriesMonthendMonthEndProceduresSQLScriptsDay1HowToFindARUsers.sql Make sure to highlight useProduction_DynamicsAX andhitExecute.RunEntire Script. ServerName: AXSQLCluster Database: Prod_DynamicsAX Authentication: WindowsAuthentication --- for 7/30/2011 close use Prod_DynamicsAX Select aa.NAME , Case aa.ENABLE When 1 Then 'Active' else 'Inactive' End as TheStatus
  • 3. 3 ProceduresforMonth-EndClose Day1| ClearChannel rev.091211(sbz) , GroupID From UserInfo aa (nolock) Join USERGROUPLIST bb (nolock) On aa.ID = bb.USERID Where ( bb.GROUPID like 'CorpTrans' or bb.GROUPID like 'ARadmin' or bb.GROUPID like 'ARPoster' or bb.Groupid like 'CorpRO' or bb.GROUPID like 'Admin%' ) Order By aa.ENABLE desc , aa.Name Select Distinct aa.GroupID From USERGROUPLIST aa (nolock) Select Distinct lt.Name , ljt.JOURNALNUM , ljt.Transdate , lt.CREATEDBY , ui.NAME , lt.POSTED From LedgerJournalTable lt (nolock) Join LEDGERJOURNALTRANS ljt (nolock) On lt.JOURNALNUM = ljt.JOURNALNUM Join USERINFO ui (nolock) On lt.CREATEDBY = ui.ID Where ljt.TRANSDATE >= '1/1/2011' --- And lt.NAME like '%Applied%' Order By ljt.JOURNALNUM, lt.NAME The SQL Script will return the name of all the users that needto be changed to Read Only. The listwill return both Active and Inactive AX users. It issuggestedthat you copy and paste theminto excel. Do not do anything with the Inactive Users.
  • 4. 4 ProceduresforMonth-EndClose Day1| ClearChannel rev.091211(sbz) Step 4(b): Go to AXAdministrationUsers>lookupeachuserbyselectingSortAscending. ClickGroups and Remove CorpTransandkeeponlyCorpRO. AX Users AX Roles & Permissions STOP: MAKE SURE EVERYONE’S PERMISSIONHAS BEEN REMOVED BEFORE MOVING FORWARD. Step 5: Create a service nowticketandaddressitto Eddie Stolts. NOTE: MAKE SURE TO NOTE DOWNTHE INCIDENT NUMBER AND EMAIL OR IM TO EDDIE STOLTS. ALSO MAKE SURE TO INFORMHIM THAT YOUNEED TO ONCETHIS PROCESS IS COMPLETE.
  • 5. 5 ProceduresforMonth-EndClose Day1| ClearChannel rev.091211(sbz) This ticket populatesthe PeopleSoftheader and detail tables. The scriptbelow is forinformational purposesonly (DONOT RUN) andlets you know the tables that will be impactedby Eddie’s job. /********************* FAILED JOURNAL *********************************/ --Run this to find any failed journals select * from PS_CCW_JRNL_HDR WITH (NOLOCK) WHERE APPL_JRNL_ID='MBR_AUTO' and CCW_IMPORT_STATUS='F' select * from PS_CCW_JRNL_LN WHERE APPL_JRNL_ID='MBR_AUTO' AND CCW_JRNL_SRC_ID='3589' Path forService Now Ticket:IncidentGeneralSubmitwhen you completetheticket. Populate the followingfields:  Caller: Your Name  Location:SAT-022  Category:Database  Subcategory:Data Request  ConfigurationItem: RadioSI  Division:Radio  Impact: High  Urgency: High  AssignmentGroup:CCITDatabase Operations  Assignedto:Eddie Stolts(ccisat1evs)  Short Description:RunjAX:monthEnd0000loadMBR fromAXReportingw stagingtable refresh  Description: Pleaserun“ jAX:monthEnd000loadMBR from AXReportingw staging tables refreshAXReporting”andcreate the Cashand AdjustmentMBRtablesrecords.
  • 6. 6 ProceduresforMonth-EndClose Day1| ClearChannel rev.091211(sbz) Step 5(a): You will receive anEmail orIM fromEddie Stoltsinformingyouthatthe jobhas been completed. NOTE: THIS JOB CANTAKE UPWARDSOF 1.5+ HOURS. Step 6: RunSQL MBR COMBO EDITS-CONTROLACCOUNTS-INACTIVEBU(MonthEnd Cycle)(5). While runningthe script, youmay get a differentrow count. Make sure to update the row count.In case you run the entire scriptand loosethe row count, contact Eddie to re-run the script. Linkto script: CCIFS1SATCommonFinancialInfoSystems&ReportingAXQueriesMonthendMonth End ProceduresSQLScriptsDay1MBRCOMBO EDITS-CONTROLACCOUNTS-INACTIVEBU(RunDuring MBR CashMonth End Cycle) (5).sql Locationto save updatedscript:CCIFS1SATCommonFinancialInfoSystems&ReportingAX QueriesMonthendMonthEndProcedures. Youwill needtocreate afolderwiththe monthandyear and create a sub-foldercalledSQLQueries. ServerName: pssqlclus/fnprod Database: FNPROD Authentication: SQL ServerAuthentication Log In: sqldev Password: whatareyoudoing?? Step 6(a): Runthe --SELECT * StatementforCommissionEntriesscript. Afterthe scriptruns,note the numberof rows and correctthe rowsaffected. STOP: DO NOT RUN THE DELETE PORTION OFTHIS STATEMEMENT AT THIS TIME.
  • 7. 7 ProceduresforMonth-EndClose Day1| ClearChannel rev.091211(sbz) -/************************DELETE STATEMENT FOR COMMISSION ENTRIES********************************************************************** *****/ /*Run this to determine if there are any lines affecting commission accounts*/ DELETE --SELECT * from dbo.PS_CCW_JRNL_LN WHERE ACCOUNT IN ('210800','503000') AND LINE_DESCR LIKE 'Rev%' --Rows Affected (3680) Step 6(b): Runthe DELETE forCommissionEntryscript. If the script isran correctly,youwill see a message advisingyouof the numberof row countsthat were affected. -/************************DELETE STATEMENT FOR COMMISSION ENTRIES********************************************************************** *****/ /*Run this to determine if there are any lines affecting commission accounts*/ DELETE --SELECT * from dbo.PS_CCW_JRNL_LN WHERE ACCOUNT IN ('210800','503000') AND LINE_DESCR LIKE 'Rev%' --Rows Affected (3680) Step 6(c): Run the ----SELECT Statementfor each of the comboeditscriptsindependently. Normally,the rowcountsare zero or the numberremainsthe same;however, there are instanceswhen the row countis different. If anythingother than zero appearsor the number updates,make sure to followstep 6(c)(1). STOP: DO NOT INCLUDE THE UPDATE AS PART OF RUNNING THE SCRIPT. /************************ UPDATE STATEMENTS FOR COMBO EDIT SCRUBBING ******************************/
  • 8. 8 ProceduresforMonth-EndClose Day1| ClearChannel rev.091211(sbz) UPDATE PS_CCW_JRNL_LN SET DEPTID = '000' ----SELECT count(*) FROM PS_CCW_JRNL_LN WHERE DEPTID = '' AND APPL_JRNL_ID='MBR_AUTO' ----ROWS = 0 UPDATE PS_CCW_JRNL_LN SET DEPTID = '000' ----SELECT count(*) FROM PS_CCW_JRNL_LN WHERE DEPTID <> '000' AND ACCOUNT BETWEEN '100000' AND '499999' AND APPL_JRNL_ID='MBR_AUTO' ----ROWS = 0 UPDATE PS_CCW_JRNL_LN SET BUSINESS_UNIT = 15818 ----SELECT count(*) FROM PS_CCW_JRNL_LN WHERE BUSINESS_UNIT = '15813' AND ACCOUNT = '820400' AND DEPTID = '000' AND APPL_JRNL_ID='MBR_AUTO' ----ROWS = 0 UPDATE PS_CCW_JRNL_LN SET BUSINESS_UNIT = 23219 ----SELECT count(*) FROM PS_CCW_JRNL_LN WHERE BUSINESS_UNIT IN ('23211','23213') AND ACCOUNT = '820400' AND DEPTID = '000' AND APPL_JRNL_ID='MBR_AUTO' ----ROWS = 0 UPDATE PS_CCW_JRNL_LN SET ACCOUNT = '560005' ---- SELECT count(*) FROM PS_CCW_JRNL_LN WHERE BUSINESS_UNIT = 15523 AND ACCOUNT = '560500' AND DEPTID = '000' AND APPL_JRNL_ID='MBR_AUTO' ----ROWS = 0 UPDATE PS_CCW_JRNL_LN SET ACCOUNT = '211400' ---- SELECT count(*) FROM PS_CCW_JRNL_LN WHERE BUSINESS_UNIT = '72711' AND ACCOUNT = '214000' AND DEPTID = '000' AND APPL_JRNL_ID='MBR_AUTO' ----ROWS = 0
  • 9. 9 ProceduresforMonth-EndClose Day1| ClearChannel rev.091211(sbz) ----/***************************** UPDATE WHERE DEPT = '000' TO '110' *****************************/ UPDATE PS_CCW_JRNL_LN SET DEPTID = '110' ----SELECT COUNT (*) FROM PS_CCW_JRNL_LN WHERE ACCOUNT IN('500200','551000') AND DEPTID = '000' AND APPL_JRNL_ID='MBR_AUTO' ----ROWS = 4 ----/***************************** UPDATE WHERE DEPT = '000' TO '598' *****************************/ UPDATE PS_CCW_JRNL_LN SET DEPTID = '598' ----SELECT COUNT (*) FROM PS_CCW_JRNL_LN WHERE ACCOUNT IN('503000','560005','566100','600000','553100') and BUSINESS_UNIT <> 27120 AND DEPTID = '000' AND APPL_JRNL_ID='MBR_AUTO' ----ROWS = 179 ------/***************************** UPDATE WHERE DEPT = '000' TO '117' *****************************/ UPDATE PS_CCW_JRNL_LN SET DEPTID = '117' ----SELECT COUNT (*) FROM PS_CCW_JRNL_LN WHERE ACCOUNT IN('503000') and BUSINESS_UNIT = 27120 AND DEPTID = '000' AND APPL_JRNL_ID='MBR_AUTO' ----ROWS = 0 ------/***************************** UPDATE WHERE DEPT = '000' TO '731' *****************************/ UPDATE PS_CCW_JRNL_LN SET DEPTID = '731' ----SELECT COUNT (*) FROM PS_CCW_JRNL_LN WHERE ACCOUNT IN('504400','512300','512500','520000','521000','521200','550100','560200','5 60800','561600','565000','810100','800900','820400') AND DEPTID = '000' AND APPL_JRNL_ID='MBR_AUTO' ----ROWS = 21
  • 10. 10 ProceduresforMonth-EndClose Day1| ClearChannel rev.091211(sbz) ----/***************************** UPDATE WHERE DEPT = '000' TO '114' *****************************/ UPDATE PS_CCW_JRNL_LN SET DEPTID = '114' ----SELECT COUNT (*) FROM PS_CCW_JRNL_LN WHERE ACCOUNT IN('566200') AND DEPTID = '000' AND APPL_JRNL_ID='MBR_AUTO' ----ROWS = 0 ----/***************************** UPDATE WHERE DEPT = '000' TO '990' *****************************/ UPDATE PS_CCW_JRNL_LN SET DEPTID = '990' ----SELECT COUNT (*) FROM PS_CCW_JRNL_LN WHERE ACCOUNT IN('930000') AND DEPTID = '000' AND APPL_JRNL_ID='MBR_AUTO' ----ROWS = 0 --commit --/***************************** UPDATE WHERE DEPT = '0' TO '000' *****************************/ UPDATE PS_CCW_JRNL_LN SET DEPTID = '000' ----SELECT COUNT (*) FROM PS_CCW_JRNL_LN WHERE ACCOUNT BETWEEN '100000' AND '499999' AND DEPTID = '0' AND APPL_JRNL_ID='MBR_AUTO' --ROWS = 156 --/***************************** UPDATE WHERE DEPT = '0' TO '000' *****************************/ UPDATE PS_CCW_JRNL_LN SET CHARTFIELD1='', JRNL_LN_REF='', OPERATING_UNIT='' ----SELECT COUNT (*) FROM PS_CCW_JRNL_LN WHERE CHARTFIELD1=1 AND APPL_JRNL_ID='MBR_AUTO' --ROWS = 0
  • 11. 11 ProceduresforMonth-EndClose Day1| ClearChannel rev.091211(sbz) --/***************************** UPDATE WHERE DEPT = '000' TO '598' *****************************/ UPDATE PS_CCW_JRNL_LN SET DEPTID = '598' ----SELECT COUNT (*) FROM PS_CCW_JRNL_LN WHERE ACCOUNT IN('512000','553101','551200','560005','560000','580000','600000') AND DEPTID = '000' AND APPL_JRNL_ID='MBR_AUTO' --ROWS = 8 --begin tran --/***************************** UPDATE WHERE DEPT = '000' TO '731' *****************************/ UPDATE PS_CCW_JRNL_LN SET DEPTID = '731' --SELECT COUNT (*) FROM PS_CCW_JRNL_LN WHERE ACCOUNT IN('550000','560800','800000','810200','822000','822000') AND DEPTID = '000' AND APPL_JRNL_ID='MBR_AUTO' --ROWS = 67 ----/***************************** UPDATE WHERE DEPT = '000' TO '113' *****************************/ UPDATE PS_CCW_JRNL_LN SET DEPTID = '113' ----SELECT COUNT (*) FROM PS_CCW_JRNL_LN WHERE ACCOUNT IN('810000','561300','561400','561500','800300') AND DEPTID = '000' AND APPL_JRNL_ID='MBR_AUTO' --ROWS = 23 --commit --begin tran --/****************** UPDATE TO SHARED SERVICES BU'S FOR TAX ACCOUNTS *********************/ UPDATE PS_CCW_JRNL_LN SET BUSINESS_UNIT = 16120 ----SELECT COUNT (*) FROM PS_CCW_JRNL_LN WHERE BUSINESS_UNIT = 16111 AND ACCOUNT = '214100' AND APPL_JRNL_ID='MBR_AUTO' --ROWS = 0
  • 12. 12 ProceduresforMonth-EndClose Day1| ClearChannel rev.091211(sbz) UPDATE PS_CCW_JRNL_LN SET BUSINESS_UNIT = 23219 ----SELECT COUNT (*) FROM PS_CCW_JRNL_LN WHERE BUSINESS_UNIT = 23211 AND ACCOUNT = '214100' AND APPL_JRNL_ID='MBR_AUTO' ------ROWS = 0 UPDATE PS_CCW_JRNL_LN SET BUSINESS_UNIT = 36320 ----SELECT COUNT (*) FROM PS_CCW_JRNL_LN WHERE BUSINESS_UNIT = 36311 AND ACCOUNT = '214000' AND APPL_JRNL_ID='MBR_AUTO' ------ROWS = 0 UPDATE PS_CCW_JRNL_LN SET BUSINESS_UNIT = 23216 --SELECT COUNT (*) FROM PS_CCW_JRNL_LN WHERE BUSINESS_UNIT = 23211 AND ACCOUNT = '214300' AND APPL_JRNL_ID='MBR_AUTO' -------ROWS = 0 UPDATE PS_CCW_JRNL_LN SET BUSINESS_UNIT = 65619 ----SELECT COUNT (*) FROM PS_CCW_JRNL_LN WHERE BUSINESS_UNIT = 65611 AND ACCOUNT = '214100' AND APPL_JRNL_ID='MBR_AUTO' -------ROWS = 0 UPDATE PS_CCW_JRNL_LN SET BUSINESS_UNIT = 55010 --SELECT COUNT (*) FROM PS_CCW_JRNL_LN WHERE BUSINESS_UNIT = 55071 AND ACCOUNT = '214500' AND APPL_JRNL_ID='MBR_AUTO' ----ROWS = 0 ---------- ------------------------------------------------- UPDATE PS_CCW_JRNL_LN SET BUSINESS_UNIT = 27123 ----SELECT COUNT (*) FROM PS_CCW_JRNL_LN WHERE BUSINESS_UNIT = 27111 AND ACCOUNT = '214100' AND APPL_JRNL_ID='MBR_AUTO' ----ROWS = 13
  • 13. 13 ProceduresforMonth-EndClose Day1| ClearChannel rev.091211(sbz) UPDATE PS_CCW_JRNL_LN SET BUSINESS_UNIT = 27218 ----SELECT COUNT (*) FROM PS_CCW_JRNL_LN WHERE BUSINESS_UNIT = 27211 AND ACCOUNT = '214100' AND APPL_JRNL_ID='MBR_AUTO' ----ROWS = 0 UPDATE PS_CCW_JRNL_LN SET BUSINESS_UNIT = 27317 ----SELECT COUNT (*) FROM PS_CCW_JRNL_LN WHERE BUSINESS_UNIT = 27311 AND ACCOUNT = '214100' AND APPL_JRNL_ID='MBR_AUTO' ----ROWS = 0 UPDATE PS_CCW_JRNL_LN SET BUSINESS_UNIT = 44419 ----SELECT COUNT (*) FROM PS_CCW_JRNL_LN WHERE BUSINESS_UNIT = 44411 AND ACCOUNT = '214100' AND APPL_JRNL_ID='MBR_AUTO' ----ROWS = 0 UPDATE PS_CCW_JRNL_LN SET BUSINESS_UNIT = 65149 ----SELECT COUNT (*) FROM PS_CCW_JRNL_LN WHERE BUSINESS_UNIT = 65142 AND ACCOUNT = '214100' AND APPL_JRNL_ID='MBR_AUTO' ----ROWS = 0 UPDATE PS_CCW_JRNL_LN SET BUSINESS_UNIT = 65420 ----SELECT COUNT (*) FROM PS_CCW_JRNL_LN WHERE BUSINESS_UNIT = 65421 AND ACCOUNT = '214100' AND APPL_JRNL_ID='MBR_AUTO' ----ROWS = 0 UPDATE PS_CCW_JRNL_LN SET BUSINESS_UNIT = 67217 ----SELECT COUNT (*) FROM PS_CCW_JRNL_LN WHERE BUSINESS_UNIT = 67211 AND ACCOUNT = '214100' AND APPL_JRNL_ID='MBR_AUTO' ----ROWS = 0
  • 14. 14 ProceduresforMonth-EndClose Day1| ClearChannel rev.091211(sbz) UPDATE PS_CCW_JRNL_LN SET BUSINESS_UNIT = 71619 ----SELECT COUNT (*) FROM PS_CCW_JRNL_LN WHERE BUSINESS_UNIT = 71611 AND ACCOUNT = '214100' AND APPL_JRNL_ID='MBR_AUTO' ----ROWS = 0 Step 6(c)(1): Use thisstepwhenrow countsare otherthanzero or the numberhas increased. Youwill getthe Row count whenyourun----SELECT script. Make sure to insertthe row count before running the UPDATE script.Run the UPDATE script to update the row count. NOTE: THIS IS AN EXAMPLE ONLY. UPDATE PS_CCW_JRNL_LN SET BUSINESS_UNIT = 27123 ----SELECT COUNT (*) FROM PS_CCW_JRNL_LN WHERE BUSINESS_UNIT = 27111 AND ACCOUNT = '214100' AND APPL_JRNL_ID='MBR_AUTO' ----ROWS = 13 Step 6(d): Runthe -----SELECT StatementforUpdate BU for TrafficAccounts. Make sure to change the date on the script. Youwill receive anupdated row count. Make sure to insert the new row count. STOP: DO NOT INCLUDE THE UPDATE AS PART OF RUNNING THE SCRIPT. THEN RUN TRAFFIC ACCOUNTS – CHANGE DATES – UPDATE ROW COUNT – RUN UPDATE SCRIPT. ------/************************** UPDATE BU FOR TRAFFIC ACCOUNTS *******************************/ UPDATE PS_CCW_JRNL_LN SET BUSINESS_UNIT = BUSINESS_UNIT_TRAF -----SELECT COUNT (*) --J.BUSINESS_UNIT, BUSINESS_UNIT_TRAF,ACCOUNT FROM PS_CCW_JRNL_LN as J WITH (NOLOCK) JOIN PS_CCW_JRNL_HDR AS H WITH (NOLOCK) ON H.CCW_JRNL_SRC_ID = J.CCW_JRNL_SRC_ID JOIN PS_CCW_MBR_STATION AS M WITH (NOLOCK) ON M.BUSINESS_UNIT = J.BUSINESS_UNIT WHERE JOURNAL_DATE BETWEEN '07/1/11' AND '07/31/11' AND J.ACCOUNT IN ('420750','420760') AND H.APPL_JRNL_ID='MBR_AUTO' ----ROWS = 181
  • 15. 15 ProceduresforMonth-EndClose Day1| ClearChannel rev.091211(sbz) Step 6(d)(1): Run the UPDATE scriptto update the row count. THEN RUN TRAFFIC ACCOUNTS – CHANGE DATES – UPDATE ROW COUNT – RUN UPDATE SCRIPT. ------/************************** UPDATE BU FOR TRAFFIC ACCOUNTS *******************************/ UPDATE PS_CCW_JRNL_LN SET BUSINESS_UNIT = BUSINESS_UNIT_TRAF -----SELECT COUNT (*) --J.BUSINESS_UNIT, BUSINESS_UNIT_TRAF,ACCOUNT FROM PS_CCW_JRNL_LN as J WITH (NOLOCK) JOIN PS_CCW_JRNL_HDR AS H WITH (NOLOCK) ON H.CCW_JRNL_SRC_ID = J.CCW_JRNL_SRC_ID JOIN PS_CCW_MBR_STATION AS M WITH (NOLOCK) ON M.BUSINESS_UNIT = J.BUSINESS_UNIT WHERE JOURNAL_DATE BETWEEN '07/1/11' AND '07/31/11' AND J.ACCOUNT IN ('420750','420760') AND H.APPL_JRNL_ID='MBR_AUTO' ----ROWS = 181 Step 6(e): Run the----SELECT StatementforUpdate OtherRevenue AccountsforProperAccount. Normally,the row countis zero; however, if it is other than zero go to step 5(e)(1). STOP: DO NOT INCLUDE THE UPDATE AS PART OF RUNNING THE SCRIPT. --/***************************** UPDATE OTHER REVENUE ACCOUNTS FOR PROPER ACCOUNT ********************/ UPDATE PS_CCW_JRNL_LN SET ACCOUNT = 489900 ----SELECT count(*) FROM PS_CCW_JRNL_LN WHERE ACCOUNT = '489904' AND APPL_JRNL_ID='MBR_AUTO' --ROWS = 0 Step 6(e)(1): Run the UPDATE scriptto update the row count. --/***************************** UPDATE OTHER REVENUE ACCOUNTS FOR PROPER ACCOUNT ********************/ UPDATE PS_CCW_JRNL_LN SET ACCOUNT = 489900 ----SELECT count(*) FROM PS_CCW_JRNL_LN WHERE ACCOUNT = '489904' AND APPL_JRNL_ID='MBR_AUTO' --ROWS = 0
  • 16. 16 ProceduresforMonth-EndClose Day1| ClearChannel rev.091211(sbz) Step 6(f): Runthe Control Accountsand Inactive BU checksscriptsindependently. --/**************************** Control Accounts and Inactive BU checks ********************************/ /*run this to check to determine if any accounts in the table are control accounts. If there are control accounts the job will end with "no success" on the journal with the bad account. To correct change either the control flag or change the account in the table, then change the status on the header table back to "R". You can then restart the job.*/ SELECT * FROM PS_GL_ACCOUNT_TBL with (nolock) WHERE CONTROL_FLAG = 'Y' AND ACCOUNT IN ( select distinct ACCOUNT from PS_CCW_JRNL_LN) /*Run this to determine if there are any lines to inactive business units*/ SELECT DISTINCT BUSINESS_UNIT FROM PS_FIN_OPEN_PERIOD WITH (NOLOCK) WHERE LEDGER_GROUP = 'RECORDING' AND PSFT_PRODUCT = 'GL' AND CALENDAR_ID = 'CL' AND BUSINESS_UNIT IN (SELECT DISTINCT BUSINESS_UNIT FROM PS_CCW_JRNL_LN) Normally,the scriptwill returnaresultof SetID withan “O”. If this ispresent,thenyoucanproceed. However,incaseswhere itpresentsresultsof otherthan“O,” proceedtostep5(f)(1).
  • 17. 17 ProceduresforMonth-EndClose Day1| ClearChannel rev.091211(sbz) Step 6(f)(1): Whenthe script above returns resultsotherthanan“O,” thenuse the followingscriptto correct the problem. Makesureto updatetheSet & Where BusinessUnitnumbers. You can do this by going to AXGeneralLedgerDimensionsStationInsertBU. Once youlocated the BU number, insert this inthe numberin the Where BusinessUnit script. Also makesure to note the site #. Filter the Site numberand lookfor theshared services BU. Onceyou located theshared services BU,insert this numberin the SetBusiness_UnitScript. ------/************************** UPDATE BU FOR INACTIVE BUSINESS UNITS *******************************/
  • 18. 18 ProceduresforMonth-EndClose Day1| ClearChannel rev.091211(sbz) UPDATE PS_CCW_JRNL_LN SET BUSINESS_UNIT = '15079' ----SELECT count(*) FROM PS_CCW_JRNL_LN WHERE BUSINESS_UNIT = '15071' AND APPL_JRNL_ID='MBR_AUTO' --ROWS AFFECTED = 1 Step 6(g): Run the following SELECT DISTINCT Statement. Thisispartof the same script referenced instep5. Make sure to changethe dates. SELECT DISTINCT (J.BUSINESS_UNIT), ' ' AS 'Correct BU', (M.NAME1), (J.ACCOUNT), ' ' AS 'Correct Account', (J.DEPTID), ' ' AS 'Correct Dept', LINE_DESCR, FOREIGN_AMOUNT, JOURNAL_DATE FROM PS_CCW_JRNL_LN as J WITH (NOLOCK) JOIN PS_CCW_JRNL_HDR AS H WITH (NOLOCK) ON H.CCW_JRNL_SRC_ID = J.CCW_JRNL_SRC_ID LEFT OUTER JOIN /*FNPROD_READER.FNPROD.*/dbo.PS_CCW_DEPT_CE_VW AS C --WITH (NOLOCK) Combo Edit View ON J.BUSINESS_UNIT = C.BUSINESS_UNIT AND J.ACCOUNT = C.ACCOUNT AND J.DEPTID = C.DEPTID JOIN PS_CCW_MBR_STATION AS M WITH (NOLOCK) ON M.BUSINESS_UNIT = J.BUSINESS_UNIT WHERE JOURNAL_DATE BETWEEN '07/1/11' AND '07/31/11' AND C.BUSINESS_UNIT IS NULL AND J.APPL_JRNL_ID='MBR_AUTO' --AND J.ACCOUNT NOT IN ('420750','420760','214100','214300','214500','551200','560005','560000','550 000','560800','800000','810200','822000','822000','810000','561300','561400', '561500') --AND J.DEPTID <> '0' ORDER BY J.ACCOUNT, J.BUSINESS_UNIT Thiswill returnthe followingresult.
  • 19. 19 ProceduresforMonth-EndClose Day1| ClearChannel rev.091211(sbz) Step 6(g)(1): Take the resultsandcopy andpaste all the information(including)the headersintoan Excel file. Sendthe filetoJeanaLackey(AssistantController). She will update andreturnthisfile to your attention. Furtheractionwill be discussedinDay2. Make sure to highlightColumnB(Correct BU),ColumnE (Correct Account) & ColumnG (Correct Dept.), so they are aware of whatcorrections need to be performed. Step 7: Runthe CCW Journal EntryImportin PeopleSoft. The pathis PeopleSoftGeneral LedgerJournalsJournal EntryCCWJournal EntryImport. STOP: CHECK WITH KUSHAN BEFORE RUNNING THE IMPORT. Link to PeopleSoft: https://fnprod.mssql.peoplesoft.clearchannel.com/psp/ps/EMPLOYEE/PSFT_EP/?cmd=logout UserID: JE_SYSTEM_USER Password: Meatloaf
  • 20. 20 ProceduresforMonth-EndClose Day1| ClearChannel rev.091211(sbz) Clickon the ImportJournalsunderthe RunControl ID to start the job. Step 7(a): InformKushanandlethim know the Journal EntryImportis running. Step 7(b): Runthe select babysittingscriptuntil itreturnsthe resultsinthe example forStep6(c). In some instances,Kushanwillbabysitthe script. The babysittingcanbe done fromhome. select CCW_IMPORT_STATUS, COUNT(*) from PS_CCW_JRNL_HDR WITH (NOLOCK) WHERE APPL_JRNL_ID='MBR_AUTO' GROUP BY CCW_IMPORT_STATUS
  • 21. 21 ProceduresforMonth-EndClose Day1| ClearChannel rev.091211(sbz) The script will returnthe followingresultsduringthe babysittingprocess. The Querywill returnthe numberof failedjournals. Eachjournal wil have one or more failedcombos,whichwill be includedin the failedcomboexcel file sendtoJeana. S = Success R = Ready I = InProcess F = Failed Step 7(c): NotifyKushan viaEmail orIM, once the importiscomplete. Youwill see thisisanexample. CCW_IMPORT_STATUS (Nocolumnname) S 6476 F 12