Editor Update: This article originally published in 2012. If you are looking for ways to enhance order processing for your SAP Solution click here OMS+ Simple Order Management for SAP and check out DataXstream’s OMS+ Solution.
Creating Custom Views, Events, and Controlling the Visibility of Data Elements
In my previous two posts in this series, I discussed how to control field level help information and how to influence the look, feel and flow of the end user experience. In this entry, I will discuss some of the LOM capabilities for controlling what happens behind the scenes to manage technical events as well as screen content. For example, during transaction processing the system locks table entries to prevent other users from updating data while you are processing it. As in many technical endeavors, good housekeeping and cleaning up after yourself is always appreciated. To quote Roger Manifold, “Good manners don’t cost nothing”.
The enhancement framework concept is used to create custom views, handling of those custom views and dynamically controlling the visibility of different elements within Lean Order Management.
The FPM (Floor Plan Manager) with the Web Dynpro application interface provides you with methods to allow the application to participate in all FPM events that happen during the entire lifetime of the application.
Within the package ERP_SLS_LO_OIF, the main Web Dynpro component is LO_OIF_MAIN_COMP. Open this Web Dynpro application using transaction code SE80. The first step is to create an enhancement by clicking the enhance button or CTRL+F4 key.
Provide the enhancement name and click the check mark icon to continue.
Now using this enhancement you can add custom code, views, methods, etc. to the Web Dynpro component.
For enhancing the component controller methods, double click on component controller and go to the methods tabs. Here you are provided Pre-exit, Post-exit and Overwrite. Click on Pre-exit / Post-exit / Overwrite as per your need and you will be provided with the enhancement method.
Some of the important methods are:
AFTER COMMIT: You can perform cleanup activities such as releasing database locks, releasing other resources, and triggering an event for processing after a successful commit.
AFTER PROCESS EVENT: It can be used for handling transactional events for example SAVE or CHECK. Moreover, it can be used to collect messages which are not handled inside UIBBs and to forward them to the FPM message handler. Here we can intercept the FPM events and write your own code. The IO_EVENT in the parameter provides you with the event.
Code Snippet of Post Exit: The following code snippet is used for calling a custom pop up window.
Code Snippet of Post Exit: The following code snippet is used for controlling the visibility of a button.
OVERRIDE_EVENT_OIF: In this method you can cancel events, select a variant, adjust events, read the configuration at runtime, and changing the configuration at runtime. Since in certain cases UI elements are part of configuration, this method can be used to control the visibility of screen elements.
Code Snippet of Post Exit: The following code snippet is used for controlling the visibility of a configured tab.
There are many more methods available which can be enhanced as needed by your project.
Using the same enhancement custom views can created.
After, you are given an option to create a view which can be embedded in window created by same enhancement.
Within this view you can design the UI elements.
You can write your code in the custom methods and generated methods.
Depending on your needs, this view can be called inside other Web Dynpro components.
LOM provides a straightforward way to customize sales order processing. It can be enhanced with much less effort than the standard SAPGUI transaction VA01. Some very powerful enhancements can be done in conjunction with the floor plan manager configuration and the enhancement framework for Web Dynpro ABAP. Using these capabilities allows you to positively impact a business process that is touched by many end users in an organization. For example sales order management, which involves customer service representatives, store associates and sales personnel.
Ensuring business transaction process flow and content matches their needs allows them to concentrate on making more sales rather than spending time figuring how the system works.
Comments and suggestions for improvement are welcome and more blogs will be covering deeper aspects of enhancements in Lean Order Management.
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. Changes made based on this information might not be supported and can be overwritten during an upgrade.
DataXstream will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk.
DataXstream offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by DataXstream. You agree that you will not hold, or seek to hold, DataXstream responsible or liable with respect to the content of this document.