How to Automate MM Period Opening in SAP Like a Pro (Without Breaking a Sweat)

Ever found yourself scrambling on the first day of the month to open MM periods manually? Yeah, you're not alone. It’s one of those admin tasks that’s easy to forget, but costly if you do. The good news? You can totally automate it with SM36 and the RMMMPERI program in SAP. Let’s break it down in plain English, as if I’m walking you through it over a coffee.

First, Why Automate MM Period Openings?

Here’s the thing, opening MM (Materials Management) periods is one of those recurring tasks that nobody enjoys but everyone depends on. If you miss it, your procurement and inventory transactions grind to a halt. Automation ensures:
  • Periods open on time, every time.
  • No manual effort or last-minute scrambles.
  • Smooth transitions aligned with your financial or operational calendar.
Whether you’re managing a global SAP system or just tired of babysitting period changes, automation is the sanity-saving move.

What You’re Actually Automating: RMMMPERI

Behind the scenes, the transaction MMPV runs a program called RMMMPERI. This program does the heavy lifting, opening the next MM period in your SAP system. Now, RMMMPERI can take either:
  • A specific date, or
  • A period/year combo.
But when you give it a date, it figures out the period automatically. That’s our automation sweet spot.

Step-by-Step: Automating MMPV Using SM36

Step 1: Create a Smart Variant for RMMMPERI

Let’s start with the foundation, the variant. 
  1. Go to SE38 and enter RMMMPERI.
  2. Click on Variants > Create.
  3. For the Date field, enable Selection Variable.
  4. Hit the Selection Variables button and set it to use “Current Date” (SY-DATUM).
  5. Save it with a name like Z_AUTO_MM_OPEN.
That’s it. You’ve now created a reusable variant that always uses the system date, no maintenance needed.

Step 2: Set Up a Recurring Background Job in SM36

Now let’s automate the run. 
  1. Go to SM36 and create a new job, maybe call it Z_MM_PERIOD_OPEN.
  2. Add a Step
    • Program: RMMMPERI
    • Variant: Z_AUTO_MM_OPEN
  3. Define the Job Start Condition
    • No fiscal year variant? Just schedule it monthly, on the first day.
    • Using fiscal year variant? Create a custom calendar where only the first day of each posting period is marked as a working day.
Save and activate. Boom. You’ve got a hands-free MM period opener.

Want More Control? Try the ABAP Daily Checker Hack

If you’re in a dynamic environment or want extra control, you can write a lightweight ABAP program to run daily. What it does:
  • Checks if the MM period has changed.
  • If yes, it triggers RMMMPERI.
Sample logic (pseudocode-style):
IF current_period <> last_opened_period.
  SUBMIT RMMMPERI WITH date = sy-datum.
ENDIF.
Why go this route?
  • No need to mess with calendars.
  • Useful for companies with irregular fiscal periods.
  • Gives you proactive control over timing.

Bonus Tips from the Trenches

  • Add job logs & alerts: Make sure the background job logs everything and sends an email if it fails.
  • Transport everything: Don’t forget to include your variant and job config in your transport requests.
  • Run it in DEV first: Always test in development to make sure everything triggers cleanly.

Wrapping It Up: Set It and Forget It

Automating MM period openings isn’t just smart, it’s essential. With just a few clicks in SM36 and a properly configured RMMMPERI variant, you can turn a risky manual task into a reliable background process. Here’s what you get:
  • No missed period changes.
  • No manual interventions.
  • Full alignment with your posting calendar.
Whether you're managing a single plant or a multi-company global setup, this approach saves time, reduces risk, and keeps your MM processes running like clockwork. 

MM Related:

Get help for your SAP MM problems
SAP MM Forums - Do you have a SAP MM Question?

SAP Material Management Books
SAP MM Books - Certification, Interview Questions and Configuration

SAP Materials Management Tips
SAP MM Configuration Tips and Materials Management Discussion Forum

Best regards,
SAP Basis, ABAP Programming and Other IMG Stuff
http://www.erpgreat.com

All the site contents are Copyright © www.erpgreat.com and the content authors. All rights reserved.
All product names are trademarks of their respective companies.  The site www.erpgreat.com is in no way affiliated with SAP AG. 
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk. 
 The content on this site may not be reproduced or redistributed without the express written permission of 
www.erpgreat.com or the content authors.