ABAP Development

Application Log Enhancements in Project Manufacturing Management and Optimization (PMMO)

Introduction

The Business Application Log (BAL) is a tool widely used by many applications. It offers nice functionality for enhancements and adaptation.

For the PMMO application we made extensive use of these capabilities.

Transaction SLG1

This is the standard transaction for displaying application logs.

Initial Screen of Transaction SLG1

For the PMMO application, the following objects are available:

  • PMMO_PEG – Pegging
  • PMMO_DISTR – Distribution
  • PMMO_MIG – Migration
  • PMMO_MM – PMMO to MM-IM Interface
Output of SLG1

We can see a few issues with the output right away:

  • List sorted in ascending order by date
  • Very limited information in the details (really only the message text)

Transaction PMMO_PEGLOG

With the application log for pegging (transaction PMMO_PEGLOG) we tried to enhance the application log to make it easier to find and resolve problems from a pegging run.

The selection screen of the transaction is identical to SLG1, except that the application object (PMMO_PEG) is already pre-set.

The output does look quite different:

PMMO_PEGLOG output
  • The logs are sorted in descending order by date
  • The navigation tree for each log is subdivided by
    • Low Level Material Code (LLC)
    • Material Number
    • Plant Code
    • Ownership Work Breakdown Structure (WBS) Element
    • Replenishment Element
  • Messages in the Log have context information (whenever possible)
    • Low Level Code
    • Material Number
    • Plant Code
    • Account Assignment Grouping WBS Element
    • Ownership Grouping WBS Element
    • Replenishment Element
    • Flag that message is caused by a problem with the next higher replenishment element

Configurable Navigation Tree

The structure of the tree in the overview can be changed:

Configure Tree Display
Default Tree Structure

The default structure for the tree has the Low Level Code at Hierarchy Level 2 (Level 1 is reserved for the Date, Time and User ID at the header level), the plant code and material number at level 3, the Ownership WBS at level 4 and the Replenishment Element at level 5.

Rearrange the Tree Levels

Let’s exchange the Low Level Code and Ownership WBS positions.

Tree with new Hierarchy Structure

The structure you prefer for the tree display will be saved in your user specific settings. The next time you start transaction PMMO_PEGLOG the system will remember your last configuration and apply it automatically to the display.

Object Navigation

Most of the context specific information in the message display is navigation enabled via hotspot click.
The only exceptions are the plant code and low level code. No object navigation is supported for these objects.

Context Information with Navigation Capabilities
Navigate to WBS Element
Pop Up to decide on Navigation Target
Transaction CJ20N

Application Log Statistics

If a log contains a lot of messages it might be difficult to get a good handle on what really happened during a pegging run. In this case it will help to take a look at the log statistics.

Button to trigger Log Statistics
Message Statistics Output

Here you have the log in a condensed format with counts for how often a particular message occurred.

Notice that a similar display to this can also be achieved in the application log itself by selecting the
delivered layout 1SAP_MSG_COUNT.

Layout selection in PMMO_PEGLOG
Layout Selection
Applied Layout
Expanded Message Section

Transaction PMMO_DISLOG

Similar enhancements as described for the pegging log have been made for the distribution log but not as extensive. The distribution log does not have a navigation tree and the context information is
limited to the Account Assignment Grouping WBS Element and the Replenishment Element.

Initial Screen of Transaction PMMO_DISLOG
Output of PMMO_DISLOG Transaction

Navigation to the replenishment element or the grouping WBS element is possible via hotspot click.

Transaction PMMO_MIGLOG

The migration log is also enhanced compared to SLG1 but not as much as the pegging and distribution logs.

Initial Screen of Transaction PMMO_MIGLOG
Output of the Migration Log

The Process Area field refers to the objects that are part of the migration (and are listed on the selection screen of the migration report).

The Line Number Field refers to the line number of the input dataset that is responsible for a particular message.

Initial Screen of the Migration Report – Transaction PMMO_MIGRATION

Log for MM-IM (Inventory Management) Integration

There is no separate transaction for the MM-IM integration log. The display is via transaction SLG1.

Initial Screen of Transaction SLG1
Log Output for MM-IM Integration

Performance Hint

If the pegging and distribution logs contain many messages then it can take a long time for the log results to display, especially if you select a big time span (e.g. one year).

Initial Screen of SLG1 and/or PMMO_PEGLOG

To speed up the retrieval of the logs select the option Format Only Header Data from Database, instead of the default setting ‘Format Completely from Database’.

Warning: If you run the pegging log display with the speed up option then there won’t be a navigation tree for the pegging messages. The navigation tree can only be built if all message information is retrieved from the database.