Automate Period Opening in SAP

Applies to:
This document is applicable to organization running SAP Enterprise Release 4.7 & above and limited to R/3 FICO & MM applications. For more information, visit the Enterprise Resource Planning homepage.

Summary
This document details out the procedure for automating the task of period opening & closing for FI, CO & MM periods in SAP R/3. This will eliminate the risk arising out of manual intervention involved for period opening. Steps mentioned in this document may need to be tweaked depending upon requirements of organization. Author: Sanjeev Kumar

Company: Gujarat Gas Company Limited Created on: 23 November 2010

Author Bio
Sanjeev is working as SAP FI-CO consultant at Gujarat Gas Company Limited (BG Group) and has total experience of 6 years. His area of expertise includes FI-CO, FI-AA, FI-CA, CIN, IHC, etc.

SAP COMMUNITY NETWORK © 2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 1

Automate Period Opening in SAP

Table of Contents
Objectives ........................................................................................................................................................... 3 Scope……........................................................................................................................................................... 3 Pre-requisites ...................................................................................................................................................... 4 Automate Period Opening/Closing for Material Management (MMPV) .............................................................. 7 Automate Period Opening/Closing for Financial Accounting (OB52) ............................................................... 11 Automate Period Opening/Closing for Controlling (OKP1) ............................................................................... 14 Annexure........................................................................................................................................................... 18 Related Content ................................................................................................................................................ 20 Disclaimer and Liability Notice .......................................................................................................................... 21

SAP COMMUNITY NETWORK © 2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 2

sap.sdn.sap. This eliminates the risk arises due to manual interventions and helps in smooth functioning of business.7 and above).uac.bpx. who are running on SAP R/3 system (4. CO or MM modules of SAP SAP COMMUNITY NETWORK © 2010 SAP AG SDN .sap.com | UAC .boc.sap. Scope Scope of current document is limited to: 1) Opening of periods for Financial Accounting. Controlling & Material Master 3) Updating Variables to be used in various opening & closing programs 4) Restricting & Allowing business users from/to posting any particular transactions to FI. to automate the process of opening and closing periods for posting at pre-defined time/intervals. Controlling & Material Master 2) Closing of periods for Financial Accounting.Automate Period Opening in SAP Objectives The objective of this document is allow businesses.com | BPX .com 3 .com | BOC .

sap. One needs to update either of these tables with following variables and use the same while creating “Program Variant” for automation of period opening/closing jobs:      RV_ACTUAL_DATE = this represents the current system date RV_ACTUAL_MONTH = this represents the current month as per system date plus 4 days RV_ACTUAL_YEAR = this represents the current year as per system date RV_MONTH_FROM = this represents the month for system date minus 61 days RV_YEAR_FROM = this represents the year for system date minus 61 days SAP COMMUNITY NETWORK © 2010 SAP AG SDN .sdn. The variants need to be manually updated on periodic basis for successfully execution of jobs.com | UAC .Automate Period Opening in SAP Pre-requisites To automate period opening jobs in SAP. This has a risk of failure of jobs at times due to human mistake (not updating variant some time). especially for months & year. One limitation of FI & CO period opening program is that.sap.com | BPX .bpx.uac.boc. To counter this we can make use of SAP tables TVARV/TVARVC.sap. which keeps changing for every period opening job.sap.com 4 . there is no option in standard program to use dynamic date variable for scheduling periodic job. one of the pre-requisite is to have dynamic variables.com | BOC .

com 5 . Click on save button in above screen (can be found out in lower part of screen) to save the step for background job 4.sap.sap.com | BOC .bpx. Press tab from top of screen to define run time and frequency of background job SAP COMMUNITY NETWORK © 2010 SAP AG SDN . 3.sap. Click on tab from the top of screen and give program name “RVSETDAT” in next screen.sap. This program will update current values in above table.Automate Period Opening in SAP There is no need to update the initial values. in table TVARV/TVARVC. One needs to set-up a background job using program “RVSETDAT” for updating above table with current values. For updating the values on monthly basis please following steps: 1.uac.com | UAC .sdn. Go T-code SM36 and give a suitable name to job like “UPDTVARV_STVARV_MLY” 2.boc.com | BPX . Now press F3 or icon from top of screen to go back to initial screen 5. against the variables.

com | BOC .uac.boc.sap.sap.com 6 .sap. Select check box “Periodic Job” and click on background job 8.bpx.com | UAC . Select save button on every screen to exit the process of background job setting and saving the job.Automate Period Opening in SAP 6.sap.com | BPX . The job defined in above steps will update current values in table TVARV/TVARVC on periodic basis SAP COMMUNITY NETWORK © 2010 SAP AG SDN .sdn. Click on tab to define run time of background job tab to define the frequency of 7. which will run at define time & frequency (as defined in step 6 & 7) 9.

com | BOC . due to human omission.uac. Go to t-code “MMPV” and save your variant by including desired selections SAP COMMUNITY NETWORK © 2010 SAP AG SDN .sap.Automate Period Opening in SAP Automate Period Opening/Closing for Material Management (MMPV) To allow creation of goods receipt. To open material master period T-code “MMPV” is used in front end. This manual process runs the risk of not opening next period.sdn.com 7 .sap. current period and previous period.com | BPX . At any point of time only two periods can be kept open for material master viz.boc. MM invoice posting or for any kind of material posting. Through the use of program “RMMMPERI” the process of opening material master period can be automated for a given/all set of company codes.sap. goods issue. and jeopardizing the business for some time as no material posting can be carried out in system. Following steps should be used to set up variants and set a background job for automatic execution of program at periodic intervals: 1.sap. posting period for material master records has to be open. This requires someone to manually run this transaction on last day of month for opening next posting period (at the same time period one before the previous period closed for posting).com | UAC .bpx.

bpx. Select save button from top of screen to save the variant and give a suitable name to your variant 3. Now click on save button from top of screen to save the variant. this variant will be used while setting up background job 8.sdn. Program “RMMMPERI” uses the period from selected date to open that particular period for material master 7.sap. “Name of Variable” and select option as per requirement 5.com 8 . go to column “Selection Variable” and select “D: Dynamic date calculation” from drop-down selections (by pressing F4 key on keyboard) 4.e.sap.boc. Now Go T-code SM36 and give a suitable name to job like “MMPCLOSE_MMPV_MLY” SAP COMMUNITY NETWORK © 2010 SAP AG SDN .com | BOC . In “Date” row of above screen.Automate Period Opening in SAP 2.com | UAC .sap. At Step 3 we can also select “T: Table Variable from TVARVC” and select variable “RV_ACTUAL_DATE” at step 4 6.com | BPX . Now go to last column i.sap.uac.

Now press F3 or 12. “RMMMPERI” & “PERIOD_OPEN-MM” respectively in next screen 10.com | UAC .sdn.com | BOC .Automate Period Opening in SAP 9.com | BPX .sap.bpx. Press icon from top of screen to go back to initial screen tab from top of screen to define run time and frequency of background job SAP COMMUNITY NETWORK © 2010 SAP AG SDN . Click on tab from the top of screen and give program name & variant viz.sap.sap.com 9 .sap.uac.boc. Click on save button in above screen (can be found out in lower part of screen) to save the step for background job 11.

com | BOC . which will run at define time & frequency (as defined in step 12 & 13) SAP COMMUNITY NETWORK © 2010 SAP AG SDN .uac.Automate Period Opening in SAP 13.boc.sap.sap.bpx.com 10 .com | UAC . Select check box “Periodic Job” and click on background job tab to define the frequency of 15. Select save button on every screen to exit the process of background job setting and saving the job.com | BPX .sap. Click on tab to define run time of background job 14.sap.sdn.

com | BPX .sap.uac. Through the use of program RFPERIOD_OPEN/RFPERIOD_CLOSE the process of FI period opening/closing respectively can be automated for a given set of company codes. Following steps should be used to set up variants and set a background job for automatic execution of program at periodic intervals: 1. due to human omission.). Vendors.boc. and open/close periods for all/specific account types.sap.com | BOC .com | UAC . and jeopardizing the business for some time as no posting can be carried out in system. Materials. etc. This also runs the risk of not opening next period. execute program “RFPERIOD_OPEN/RFPERIOD_CLOSE” and save your variant by including desired selections 2.sdn.Automate Period Opening in SAP Automate Period Opening/Closing for Financial Accounting (OB52) To allow any posting in Financial Accounting in a particular period. But this transaction needs to be executed manually.sap. Transaction code “OB52” is used to open/close periods for financial accounting. Go to t-code “SE38” . such period should be open for types for accounts (Assets.sap. GL Accounts. Customers.bpx. Select save button from top of screen to save the variant and give a suitable name to your variant SAP COMMUNITY NETWORK © 2010 SAP AG SDN .com 11 . at periodic intervals.

bpx.boc. for leading & non-leading ledgers 7.sap.Automate Period Opening in SAP 3.com | BPX .com 12 . For each selected row of above screen.sap.uac. “RFPERIOD_OPEN” & “PERIOD_OPEN” respectively in next screen SAP COMMUNITY NETWORK © 2010 SAP AG SDN .e.sap.sap.sdn. this variant will be used while setting up background job 6. Now click on save button from top of screen to save the variant. Now go to last column i. Step 1 to 5 needs to be repeated for each Account Type for which period opening is required. Now Go T-code SM36 and give a suitable name to job like “FIPOPEN_0L_OB52_MLY” 8. go to column “Selection Variable” and select “T: Table Variable from TVARVC” from drop-down selections (by pressing F4 key on keyboard) 4.com | BOC . Click on tab from the top of screen and give program name and variant viz. “Name of Variable” and select option as per requirement 5.com | UAC .

Press 12.com | UAC .Automate Period Opening in SAP 9. Click on icon from top of screen to go back to initial screen tab from top of screen to define run time and frequency of background job tab to define run time of background job 13. e.boc.com 13 . which will run at define time & frequency (as defined in step 12 & 13) 15.com | BPX .bpx.sap. “Monthly” tab to define the frequency of 14.sdn.sap.uac. Select check box “Periodic Job” and click on background job.com | BOC .sap.sap. Now press F3 or 11. Click on save button in above screen (can be found out in lower part of screen) to save the step for background job 10. Select save button on every screen to exit the process of background job setting and saving the job.g. Step 1 to 14 needs to repeated for setting a background job for closing of FI periods through the used of program “RFPERIOD_CLOSE” SAP COMMUNITY NETWORK © 2010 SAP AG SDN .

sap. Transaction code “OKP1” is used to open/close periods for financial accounting. Following steps should be used to set up variants and set a background job for automatic execution of program at periodic intervals: 1.Automate Period Opening in SAP Automate Period Opening/Closing for Controlling (OKP1) Controlling module of SAP is used for management reporting & analysis and for that to take place all postings show flow from FI to CO.sap. due to human omission.sap. and jeopardizing the business for some time as no posting can be carried out in system. Go to t-code “SE38” . purely for management reporting and helping the management in decision making. But this transaction needs to be executed manually. This also runs the risk of not opening next period.com | BPX . and open/close periods for all/specific CO business transactions.boc. at periodic intervals. To allow any posting to (in) controlling. In the above there is option of include one or multiple business transaction(s) for processing 3.com 14 . Through the use of program RKCOOKP1 the process of CO period opening/closing respectively can be automated for a given controlling area.sdn.com | BOC . execute program “RKCOOKP1” and save your variant by including desired selections Click on this button include multiple transaction 2. There are many posting which happen only in CO. Select to open CO period and to close CO period SAP COMMUNITY NETWORK © 2010 SAP AG SDN .uac. in a particular period. such period should be open for types CO Business Transactions (Annexure-1).bpx.sap.com | UAC .

this variant will be used while setting up background job SAP COMMUNITY NETWORK © 2010 SAP AG SDN . go to column “Selection Variable” and select “T: Table Variable from TVARVC” from drop-down selections (by pressing F4 key on keyboard) 6.com 15 .sap. Now go to last column i.com | UAC .e.boc. For each selected row of above screen.com | BOC .bpx. Now click on save button from top of screen to save the variant.uac. Select save button from top of screen to save the variant and give a suitable name to your variant 5.Automate Period Opening in SAP 4.sap.sap.com | BPX . “Name of Variable” and select option as per requirement 7.sdn.sap.

Now press F3 or 12.sap.com 16 .boc.sdn.Automate Period Opening in SAP 8.sap.com | BPX .sap.sap. Click on tab from the top of screen and give program name and variant viz. “RKCOOKP1” & “CO_POPEN” respectively in next screen 10.bpx.uac.com | UAC .com | BOC . Press icon from top of screen to go back to initial screen tab from top of screen to define run time and frequency of background job SAP COMMUNITY NETWORK © 2010 SAP AG SDN . Now Go T-code SM36 and give a suitable name to job like “COOPEN_OKP1_MLY” 9. Click on save button in above screen (can be found out in lower part of screen) to save the step for background job 11.

Select save button on every screen to exit the process of background job setting and saving the job.sap.g.com | BOC .sap. e. Click on tab to define run time of background job 14.com | BPX . Select check box “Periodic Job” and click on background job.sap.boc.com 17 .sdn. “Monthly” tab to define the frequency of 15.uac.bpx.com | UAC . which will run at define time & frequency (as defined in step 13 & 14) SAP COMMUNITY NETWORK © 2010 SAP AG SDN .Automate Period Opening in SAP 13.sap.

KF Actual cost center split Actual price calculation Assessment to CO-PA COPA: TOP-DOWN: Actuals Variance calculation Actual overhead (periodic) Interest calculation (actual) PRC: Activity Backflush Actual Periodic Repostings Actual inverse activity alloc.com | BPX .Automate Period Opening in SAP Annexure A. LIS transfer: Actual stat.sap. Actual Overhead Assessment Actual Overhead Distribution Actual activity allocation Revaluation at actual price Actual template allocation Predistribution of fixed costs Actual non-alloc.com | BOC .sap.boc. Actual cost distrib.uac. activities SAP COMMUNITY NETWORK © 2010 SAP AG SDN .bpx.sap.com | UAC . WIP/results analysis Manual WIP/results analysis Manual cost allocation Actual cost center accrual Down payment Transfer price allocation Actual settlement PS Incoming Ord: Auto Determ.sdn.com 18 .sap. cost obj. Controlling Business Transactions Business Transaction COIN CPPA JVIU JVIV KABG KABM KAMV KAZI KAZO KFPI KOAO KOR1 KPIV KRAT KSI0 KSII KSPA KTDA KVAR KZPI KZRI PNV1 RKIB RKIL RKIU RKIV RKL RKLN RKLT RKLX RKN Description CO Through-postings from FI ABC Actual process assessment JV Actual assessment JV Actual distribution Automat.

com | BPX . B.bpx. adjust.uac.sap.com | BOC . Assess.: Act.per.sap. Segment adjust. distrib.sap.: Act.sdn.repost.com 19 .com | UAC .Automate Period Opening in SAP RKS RKU1 RKU2 RKU3 RKWD RRIB RRIU RRIV Enter statistical key figures Repost costs Repost revenue Repost CO line items Target=actual acty allocation Seg.boc. Types of Accounts in Financial Accounting Account Types + A C D G K M S V Short Description Valid for all account types Assets CO-PA: Profitability Analysis Customers Special Purpose Ledger Vendors Materials G/L accounts Contract accounts SAP COMMUNITY NETWORK © 2010 SAP AG SDN . Segment adjust.: Act.sap.

sdn.sap.sap. visit the Enterprise Resource Planning homepage SAP COMMUNITY NETWORK © 2010 SAP AG SDN .sap.com 20 .uac.boc.com | UAC .com | BPX .com | BOC .Automate Period Opening in SAP Related Content Note 665042 .bpx.Report RVSETDAT MM Period Closing Month End Procedure For more information.sap.

sap.uac. including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP.sdn. code or methods suggested in this document. SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample. or seek to hold.com | BPX . SAP will not be held liable for any damages caused by using or misusing the information.boc.sap.com | UAC . You agree that you will not hold. and anyone using these methods does so at his/her own risk.sap.Automate Period Opening in SAP Disclaimer and Liability Notice This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP.sap. Changes made based on this information are not supported and can be overwritten during an upgrade. SAP responsible or liable with respect to the content of this document.com 21 .com | BOC . SAP COMMUNITY NETWORK © 2010 SAP AG SDN .bpx.

Sign up to vote on this title
UsefulNot useful