Skip to main content

Applying Error Message to Selection Screen without Changing Screen

Problem: Need to set an error message programmatically for selection screen field without changing screen. Example: if selection screen contains plant field. We have to make this field mandatory without using obligatory statement. Error message will be shown at the time clicking on execute button but the screen should not be changed.

Solution: An error message needs to be set with apropriate logic. But the message type should be 'S' and message should be displayed like 'E'. Then 'LEAVE LIST-PROCESSING' statement needs to be implemented which will return to selection screen as soon as the error is shown.

ABAP Code Example:

  IF s_plant IS INITIAL. "Where s_plant is an input field parameters
    MESSAGE 'Please enter plant' TYPE 'S' DISPLAY LIKE 'E'.
    LEAVE LIST-PROCESSING.
  ENDIF.
'

Comments

Popular posts from this blog

Adding New Input Fields to SAP Confirmations Screen (CO11N/COR6N) Without Coding

It is possible to add additional input fields in the SAP production order confirmation screen without coding. We can do this just adding fields to a structure which is included in AFRU table (Confirmation table). Process Steps Step 1:   Go to below customizing path. SIMG > Production > Shop Floor Control > Operations > Confirmation > Single Screen Entry > Define Single Screen Entry for Confirming Production Order Step 2:  Double click on the standard profile. Add "Customer Specific Fields of CI_AFRU" in the detail area. Step 3:  Go to default tab. Select an option from the "Customer Specific Fields" area. Then click on save button. Step 4:  Go to transaction code "SE11". Select database table and put "AFRU" and click on change button. Step 5:  Go to the include marked in the screenshot and double click on the data element of the include. Step 6:  Double click on "CI_AFRU". Step 7:  Click on "Yes" in the pop u...

Creating a Search Help and Assigning it to Another Table in SE11

In SAP ABAP, a search help is a feature that provides a user interface for searching and selecting data values from a list. A search help is essentially a dialog box that displays a list of possible values for a particular field or selection criterion. Once a search help is defined and assigned to a data element or domain, it can be used in various SAP applications, such as data entry screens, reports, and dialog programs. To use a search help in a program or report, you can call the function module "F4_HELP" or "F4IF_INT_TABLE_VALUE_REQUEST" to display the search help dialog box and retrieve the selected values. You can also customize the search help behavior and appearance using various parameters and options. There are two types of search help available in SAP ABAP: elementary search help and collective search help. Elementary search help is used to display a list of possible values for a single input field. It is used when the user needs to select a single valu...

Transporting Data Migration Cockpit Project between Clients

SAP Data Migration Cockpit (DMC) is a tool provided by SAP to assist in the process of migrating data from legacy systems or external sources into an SAP system. The DMC offers a user-friendly interface for designing, executing, and monitoring data migration activities. Steps to Transport Data Migration Cockpit Project There are two ways to transport data migration cockpit project between clients. They are Export/import method Transport request generation method Export/Import Method Process steps for export/import method are Exporting the Project Go to transaction code "LTMOM" Then go to "Go to>Export/Import Project". If this functionality is not available in this t-code, go to transaction code "SE38" and run the report "/LTB/MC_PROJ_Q2P" Select the "Export Project" radio button and provide "Mass Transfer ID". Then click on execute. Show the location on your PC and click on save. Project will be exported. Importing the Proj...