Message type: E = Error
Message class:  ES - ABAP Workbench: Repository Information System 
Message number: 118
Message text: Program can only be executed in the background!
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 ES118 ("Program can only be executed in the background") typically occurs when a program or report is designed to run only in the background processing mode, rather than in the foreground. This is often the case for programs that require significant processing time or that need to handle large volumes of data without user interaction.
Cause:
Program Design: The program is explicitly designed to run in the background. This is often indicated in the program's attributes or settings.
Transaction Code: The transaction code used to execute the program may not support foreground execution.
User Permissions: The user may not have the necessary permissions to execute the program in the foreground.
System Configuration: Certain system configurations may restrict the execution of specific programs to background processing only.
Solution:
Run in Background: The simplest solution is to execute the program in the background. You can do this by:
Using the transaction code SM37 to monitor background Get instant SAP help. Sign up for our Free Essentials Plan.
Get instant SAP help. Sign up for our Free Essentials Plan. 
ES117 Programs with syntax errors were not analyzed
What causes this issue?  When analyzing one or more programs, syntax errors were detected. The analysis was therefore terminated.System Response  The ...
ES115 Perform in the background if no selection criteria are specified
What causes this issue?  No selection criteria were entered on the selection screen.System Response  The system attempted to select all unused objects...
ES119 Place cursor on a field
Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...
ES120 &1 &2 not found in selected search area
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.