Message type: E = Error
Message class:  HRPAYAT_MBGM - Messages for mBGM Functionality 
Message number: 402
Message text: The posting period can either be set or emptied.
Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of messages in the SAP system have a message text, however this is frequently insufficient to comprehend or resolve the problem.
To make things easier, more detailed information is frequently added to describe the issue, how to fix it, and the necessary steps or configuration modifications.
Unfortunately, there isn't any extra information in this error notice.
First, use our AnswerBot below to get a possible cause and solution (requires a premium subscription).
Also, review the in-depth Common Questions & Answers listed below; you could discover a solution there or be able to connect with others who have faced similar challenges.
You can also try searching the SAP support portal (support.sap.com) but you need a special user ID to access it. It is possible that an SAP support note exists that provides additional details about the mistake or even steps for fixing it.
The SAP error message HRPAYAT_MBGM402 typically occurs in the context of payroll processing when there is an issue with the posting period settings. This error indicates that the posting period for a payroll run is either not set or is incorrectly configured, which prevents the payroll from being processed correctly.
Cause: Incorrect Posting Period: The posting period for the payroll run may not be defined in the system, or it may be set to a period that is not valid for the current payroll processing.
Configuration Issues: There may be issues in the configuration of the payroll schema or the related infotypes that manage the posting periods. Authorization Issues: The user may not have the necessary authorizations to change or set the posting period. System Settings: The system settings for the payroll area or the company code may not be aligned with the expected posting periods.
Solution: Check Posting Period Settings: Navigate to the relevant configuration settings in
 Get instant SAP help. Sign up for our Free Essentials Plan.
Get instant SAP help. Sign up for our Free Essentials Plan. 
HRPAYAT_MBGM401 Difference EUR &2 between RT and mBGM larger than tolerance value
Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...
HRPAYAT_MBGM400 **400-449: Messages for Posting Transfer
Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...
HRPAYAT_MBGM403 Only mBGMs with 410 and 411 are valuated in a productive posting run.
Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...
HRPAYAT_MBGM404 Live posting run not performed successfully
Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...
Click on this link to search all SAP messages.