In the very early stages of implementation, several years ago, standard reports and processes were not satisfying the needs of customers. To fulfill the process needs, I started exploring use of User Exits ( as mentioned in several blogs ). Like-wise for missing fields in standard reports, I opted for Queries and begun to learn this. One of such very early custom reports has been discussed here where I had to make a Z version of IW28.
The Specifics of the need
The need arose, when management wanted to compare the Preventive maintenance hours spent on a critical machine with the Breakdown Hrs for certain period of operation. We have in IW28 the Breakdown Hrs only , field AUSZT (usually M2 notifications), but not any field giving this duration for M3 Notifications i.e., Preventive Hours. I remember this triggered my Technical journey.
Built a Query based on Infoset using tables VIQMEL and CRHD as shown below (CRHD table is required in case we want Main Work Center in the output, otherwise VIQMEL alone is sufficient.
An o field MntHr (Prevetive maint Hrs) was created in Extras and the following code was given in the code section.
You might have understood that we maintained the Start/end Details of M3 Notifications in the Required Start/End Date/time fields ans we wanted the duration of these time stanps.
And, we designed this report with the field we computed Mnt(Hr) and the standard field BDn(Hr) adjacent to each.
So this task has been fulfilled. The Tcode given was ZIW28,
Then after sometime, we taught customers, how to use the Create Notification menu in the Action Box of a Notification, which in return given rise to another such report requirement. User wanted a report where both Extended Notification (QMNUM) and the Reference (Parent) Notifications (QWRNUM) are available. Though these two fields are part of VIQMEL table, the standard IW28 is not having this Reference Notification number (QWRNUM) field.
So with a similar Infoset as that of first case, I created a report required which as under. (In this case there is no need of Additional fields & calculations). Here is the report.
The first report was very significant for analysis of maintenance functions and so it is very much called (hyper linked) by several other custom reports.
This post is just to share about another common SAP situation, where Infoset queries came to rescue. Forgot to tell you that I named the 2nd report (Tcode) as ZIW28A.
Jogeswara Rao K