Quantcast
Channel: SCN : Document List - Enterprise Asset Management (SAP EAM)
Viewing all 842 articles
Browse latest View live

10 Useful Tips on Infoset Queries

$
0
0

Introduction

Often it is seen that. Infoset-query users, stop exploring  at the 1st hurdle and switch to ABAP report programs, for requirements a little bit beyond simple ones. But, it is the author's experience, that we can use this tool (Infoset Query) given to Functional people by SAP,  to reach very close to the ABAP report programs, with features like those discussed in the other document and also some discussed here.

 

In this document the author tried to put together the pieces of his knowledge to present in the form of a document.

 

Tip1

To have a Tcode to your work in Infoset Query.


 

The following screen with report name appears..

 

 

Now you give this report name to your ABAPer and ask him to create a Tcode

OR

You do it yourself through SE93 Tcode, if you have access.

 

Steps for SE93


 

 

 

And Save. Thus your Infoset query will now be working with Tcode ZTCODE

(This applies also to Quick Viewer report SQVI)

 

 

Tip2

Calling Reports from Infoset Query reports.

 

The output of your query contains key fields like Notification no., Equipment No. etc.

It is natural that one wants to go to the Notification screen or the Equipment screen from the output.

 

Do this way.

 

In SQ01


 

 

We get this screen

 

 

Click here on  then on  then select

In the resulting pop-up, specify the Tcode you want to link with the Row in the SQ01 output.

Say IW23 and Save.

 

It is Done.

Now upon D'clicking anywhere on a particular line item in the query output, you are directed to IW23 screen of the notification of the line-item (row).

 

You can have many such report assignments.

Suppose you want to have IW22 also. Then repeat the same steps above to have IW22 Tcode.

 

Now when you D'click (anywhere) on one line-item (row) of the Query output, you will be presented a pop-up menu to select which one you want. i.e.,

Display Notification  or Change Notification. You are taken to the corresponding screen as per your choice.

 

Capture.JPG

Note:

We always need to remember that, after Tcode assigning, the modifications done in SQ02 or SQ01 would be in effect to the Tcode, only after executing SQ01 once.

 

More Details on this subject here: Calling Reports from an Infoset Query

 

Tip3

Make your report colorful with giving different colors in order to group columns

 

In SQ01 Basic ListScreen

 

Here just Drag & Drop the color from Right Tool-Box to the desired field in the Centre portion.

OR

Double click on a field in the Centre, to display field details and color options on the left. Now you select the color.

 

Example of such output.

Capture.JPG

 

 

Tip4

Always have Selection Fields from Infoset (SQ02).

What does this mean and Why?

 

This means

We have options for Selection Screen designing both in SQ02 and in SQ01.  It is advantageous if we declare selection options in Infoset (SQ02),

 

Here is how we do it. (In the Extras area), Go to Selections Tab, Click on Create icon, select Selection Criterion or Parameter like below.

Capture.JPG

And define the Selection field as under.

selcrit.JPG

Observe here the strings written in Extras field.

OBLIGATORY makes this field in the selection screen mandatory.

NO INTERVALS removes the selection range (Removes the To field of the selection criterion)

NO-EXTENSION removes the multiple selection push button

DEFAULT 'M2' provides the M2 value as default in the field.

 

Like-wise you can design a selection screen as shown below by defining fields one after another.

pastedImage_22.png

Note that, we can declare only Standard Selection Fields here. Additional Fields are to be taken into Selection Screen only from SQ01.

 

The disadvantage in having these standard fields into selection screen from SQ01 is, the previously used values reappear as defaults for new running of the report. We need to erase and type our values. Also there is no provision for making a field mandatory.

 

 

 

Tip5

This is to develop queries in Standard Arearather than in Global Area.

 

What is this?

See the option below in SQ02 while creating an Infoset Query.

 

 

 

In the Query Areas above we have two options: Global Area, Standard Area.

When we are working in Development Server (client 200 or 210), we work in Global Area option, which generates a transport request, subsequently this will be transported to QAS and PRD at the end of work.

 

When we select Standard Area as the name indicates, it is client-specific. This means you can directly develop in PRD with this option. To have a Tcode for reports developed so, we need to use the same way explained earlier in this document. But  it is to be noted that, we get the report name from the PRD client where we developed the report, and create a Tcode in Development server (client 210 or 200) and same will be. transported to PRD.  (One time job)

 

The main advantage I always enjoyed here is, the moment some addition/deletion/modifications performed on this repor, it is instantly available in PRD.

(No hassles of transport requests). Only requirement is to run SQ01 once. The Tcode will be giving the changed report.

Also, the testing of the the report work is done in a perfect environment with real-time data.

 

(Working through the Global Area option in Development clients may be having its own advantages, like work back-up , but I never felt such necessity in my environment.If needed we can have a copy report in PRD itself)

 

 

Tip6

In case we do not want a certain category of records in the output, then go to SQ02 --> Extras--> Code tab --> Record Processing section, and

Give a code like the sample given below.

( check viqmel-abckz <> '' .)

 

What does this do?

With this code, the Infoset query does not bring any records where the ABC indicator field is blank.

Like-wise if you give a code like: check crhd-arbpl <> 'xyz123'.

the output will ignore the records with maint. work center value 'xyz123'.

(Note that these are permanent filters, For optional filters either the Selection Screen OR the Filter in the  ALV output display can be used.)

 

 

Tip7

F4 help related

F4 Help is not available in infoset query.

 

Tip8

How to create a radio button in SAP Query SQ01/SQ02.

 

 

Tip9

User defined fields

 

 

Tip10

We know that, the infoset reports work on Table joins in Infoset. In complex cases, where many tables are joined, the correctness of report depends upon the quality of joins we define. Though system suggests some joins, user can define more joins as per his table knowledge. This is what controls the multiplicity of identical rows appearing in the output sometimes.

 

It is seen that in situations where the user is unable to control the duplicate (or multiple) identical rows , the CHECK statement used in Tip6 works conditionally. In other cases this multiplicity becomes one of  the points where one is forced to go for an ABAP report.

 

 

The author has been working in this area since few years. This is an effort to share his knowledge about some very common requirements in this area with the forum. Hope member friends especially those who love Infoset queries, find this useful.

 

Thank you

KJogeswaraRao


PS: This post and all further posts in the area of Infosets have been compiled to this blogInfoset Queries: Collection of important posts


Calling Reports from an Infoset Query

$
0
0

Introduction

The first usual improvisation requirement in self-made Infoset Queries by beginners, is often the requirement of calling other reports from ALV output, just the same way we do in Standard reports.  In ABAP-coded Z Report Programs, there are several techniques of achieving this by syntax like Call Transaction,Submit etc.

 

The very objective of this documentation is to achieve the same. This topic was briefly discussed in the document 10 Useful Tips on Infoset Queries. But, when the author experienced few exceptions in the technique suggested there and found a solution subsequently, he got the idea of having an exclusive document on this topic.

 

This document has assumption that readers have working knowledge in developing Infoset Queries.

 

Here we Start

We have seen earlier, that for enabling Report Calling from the ALV output of an Infoset Query, we need to do these steps in SQ01.

 

 

Click here on   then on then select  TR (Transaction Code) or RT (Report Program),

 

  1. When we select TR we need to put only the Transition code.

     


Example:

IE03 if our ALV lines are having Equipment field and we want Equipment Master display upon clicking on the ALV row.

 

If we have a Maintenance Order Number in the ALV, and we want to have Display Order Screen upon clicking on this row, then we give the Tcode IW33 here.

 

     2.  In the other case, when we want to call List Reports like IW37 , then we need to select RT in the Report type, where we need to give the

          Program  name (in this case RIAFVC20) in the Report field  and the variant name.

 

        

 

So far, it looked very much OK, until I found recently that few field names like EQUNR, MATNR, DOKNR etc, do not exhibit the desired behaviour.


Few cases  where this call report was not working are discussed here.

In one of my Queries, I have Material number (MATNR) in the ALV output, for which I used Report Type TR with Tcode MM03, for the purpose of  Material Master Display. What happened here, was no Material number was passing to the MM03 initial screen, so the display interrupted, In another case, the first attempt display was coming, but the next attempt on different material line in the ALV, the material master display of the first attempt was repeating. Broadly there is a technical problem in passing the Material number.

 

Another such case was with the Tcode CV03N  (Display of DMS Document) , where the DOKNR, DOKAR field values were not passing to the CV03N initial screen.

 

Here is the solution I worked-out, using the QUReport Type of Report Assignment


We are taking the MM03 case

As mentioned above, the report Type QU (Query), in the Report Assignment came to rescue.

This option has 3 fields.

 

First field (User Group):  You know, your User Group.

Second field (Query): We need to develop a simple query for this field.

Third field (Variant): Optional.

 

So, what required was that a simple Infoset query using MARA table (Material Master) to be created.

And this Query name, was given in the field 2 above.

 

Let’s see the steps of creating the simple Query for Report Assignment purpose.


SQ02

We are Creating an Infoset (I named it MM03) with Direct read of table option.

This is because, we use only one table.

 

Select this default option, and Continue.

 

 

With this the Key field MATNR is added to the Field Group folder in the Infoset.

And in the Infoset Code Section, give the following code

untitled2.jpg


  Generate Infoset and do not forget to assign it to your User Group.


SQ01

Create a Query (Say MM03) using the above Infoset.

Note:

This query name is going to be used in the Report Assignment.

 

Go to Basic list screen and Tick the MATNR field in the List fields column.

untitled1.jpg

Save the Query.



Testing.


Here we are examining, the behaviour of 3 cases of Report Assignment)  in the ALV output of an Infoset Query.

 

We know that when multiple Call report assignments are there in the query, then the options appear as a menu as shown above, upon clicking on a row.

 

  • Here the first option in the menu namely Display PM Order, is that where I used report type TR and given Tcode IW33,
  • Second one, namely Report Assignment MM03 is through Report Type QU with Query field value MM03 (created as explained above)
  • Third one was the option which was malfunctioning i.e., Report Type TR and Tcode MM03

 

Now when tested, the first option with TR report-typeworks satisfactorily, without any problem, passing the Order number (AUFNR) correctly everytime.

The third option, again with report type TR works erratically, unable to pass material number (MATNR) correctly.

The second option is our solution to the erratic behaviour of MM03 through TR report type. i.e., through QU report type. This works very correctly like the first case.

 

In the case of Display Equipment (IE03) , the above method would work, with the following code in SQ02.

PARAMETERS:

EQUNR LIKE EQUI-EQUNR.
SET PARAMETER ID 'EQN' FIELD EQUNR.
CALL TRANSACTION 'IE03' AND SKIP FIRST SCREEN.
EXIT.

 

So that is about the Problems and the Solutions

 

As referred in the beginning, another parameter which gave trouble in calling reports through report-type TR was, DOKNR (DMS document number).

I have solved this issue too in a similar manner.  The transaction called was CV03N. The code used in the Infoset is given below.

draw.JPG

 

Note

See the Syntax used  PARAMETER ID  in the syntax used in both the cases above.

The Parameter Id used in MM03 case was, MAT,  and in the CV03N case was CV1  and CV2.

MAT is the Parameter Id for field MATNR, CV1 is for DOKNR and CV2 is for DOKAR.


This parameter-id is the key factor for any Call report to function properly.

 

Where do we get this?

For example for MATNR, place cursor in MATNR field of any screen, and press F1 on key-board. The pop-up has this value.

Similarly for any other field.

 

That’s everything I think, about this document.

 

The author hopes that this document also will be useful to the members, the way the  other documents by the author, in the series of Infoset-queries.

 

 

Thank you

Jogeswara Rao K

User-Fields in QM and PM/CS Notifications : Screen-Exit QQMA0001

$
0
0

Introduction

One of the very frequently asked questions in this space, is about the subject matter, i.e., How can I add Custom fields to a Notification? A documentation on this subject would be helpful to the forum for ready reference.

 

Objective

This documentation is intended to enable the readers to create the Custom fields in different tabs of Maintenance Notification, update the Noyification Master data Table and also display these fields in IW28 / IW29 output.

 

Let's see how it is done.

 

Part1

Create Custom fields in the Notification Table

The table of our context is QMEL. We need to append our Z-fields to this through the include structure namely CI_QMEL.

The process of creating any custom field starts with creating a Data Element with desired Type and Length or with desired Domain name and with the Field Labels we want to have for the Customer fields. For our Demo, we have created Two Data Elements, namely :

  1. Z_DELAY  - Type DEC Len 3 Dec 1  and Field Label ‘Delay(H)’
  2. Z_REASON - Domain TXT40 and Field Label ‘Reason for Delay’)

 

Now let us create our Customer fields.

Run Tcode SE11 --> give value QMEL in the Database Table field --> Click on Display. Scroll-down to find include tableCI_QMEL. Double click on this,  Go to Change mode and Add Two new fields of our interest as shown in the picture and Activate.

ci_qmel.JPG

 

As seen in the picture, we have created Two Customer-Fields namely ZZDELAY and ZZREASON. It is essential for all Customer fields used in Enhancement purposes to be prefixed with ZZ.

 

Part2

Enhancement and Screen-Exit

1, Create an Enhancement Project say ZPMNOT using Tcode CMOD.

cmod.JPG

 

2. Assign Enhancement QQMA0001 to this project .

cmod_!.JPG

 

3. Click on Components in the picture above to reach this screen.

cmod_2'.JPG

 

4. Activate by clicking on the Activate Icon (shown in picture above)

Now the screen is like this.

cmod_2.JPG

 

As we see here, there are several screen-exits (27) and Two Function-Exits namely EXIT_SAPMIWO0_008 and EXIT_SAPMIWO0_009  in this enhancement.

Double Click on this screen number to create a Sub-Screen for holding our Custom Fields. You’ll get this pop-up.  Press Enter and Continue.

103 create.JPG

 

You’re in the screen below, where you’ll  give a Description,  Select the Subscreen Radio button,  Save and Activate.

subscreen create.JPG

 

Click on Layout Arrow in the Application Toolbar of (See the picture above) to reach the Screen-Painter pop-up window, where we will be creating :

  1. A Box to hold our Z-fields
  2. Text Fields to for Z-field  labels
  3. Input Fields for Z-fields

screen-painter.JPG

 

The input fields should be referred to the Dictionary fields we have just created. (QMEL-ZZDELAY and QMEL-ZZREASON) as shown above.

 

Activate the screen-painter.

 

Part3

Codes to be given in Function-Exits


Go to the following screen

Codes in Exits.jpg

 

Double click on the Function-Exit EXIT_SAPMIWO0_008 and put the following code in the include  ZXQQMU07 .

 

*---------------------------------------------------------------------------------------------

TABLES: QMEL.

MOVE-CORRESPONDING I_VIQMEL TO QMEL.

*---------------------------------------------------------------------------------------------

 

Similarly put the following code in the include  ZXQQMU08   of the Function-Exit EXIT_SAPMIWO0_009.

 

*---------------------------------------------------------------------------------------------

MOVE-CORRESPONDING QMEL TO E_VIQMEL.

*---------------------------------------------------------------------------------------------


Part4

SPRO setting to be done

Navigate to the Overview of Notification Type in SPRO.

spro1.JPG

Select your Notification Type (Here we are doing it in M2) and Enter the Screen Structure for Extended view

spro2.JPG


Give the following settings in the Malfunction Tab (the tab where we want to have our custom fields)

spro.JPG


Almost Done


Let’s see the effect of work done so far.

Create a Maintenance Notification (IW21). You will see the following addition of subscreen area in the Malfunction Start/End  Tab.

IW21.JPG

Enhancement has been added here by the system, in which our Custom fields appear with their labels and the input fields.

 

Now let’s add some values in these fields and Save the Notification.

values in z-field.JPG

 

Run IW22, open the Notification and verify whether the values are updated to table or not. If they are appearing  as you have entered and saved, this means the QMEL table has been updated with these values when Notification was saved.

 

Part5

Let's have these Custom fields in the Notification list reports namely the ALV of Tcode IW28/29 (QM10/QM11 in case of Quality Notifications)

So far we have succeeded in creating our Custom fields and updating the values to the Notification Master data. Next natural requirement of a user would be to have these fields in IW28/29 ALV screen. For this purpose we, need to create an Append Structure in the Structure RIHQMEL_LIST (RQMQMEL1 in case of QM10/QM11 reports), as shown in the picture below. The Tcode is SE11 again for this task. Here we have created an Append Structure named ZDLAY and in this structure we have added both the Custom fields.

rihqmel_list.JPG


Now let's create few more Notifications, with custom fields filled with some values. Now run IW28 with selection parameters to display these Notifications we created. Click on the icon shown , You'd find the Custom fields in the Column-set list, Bring them to Displayed list on the Right hand side.

iw28.JPG

 

Related SAP Note: 370191  (Image of the note is attached herewith for the benefit of the members who can not access OSS)

 

 

Part6

Now if you go to IW23 of any of these Notifications, unlike all other greyed-out fields, the Custom fields will be seen Editable. Though there is no provision to Save the edits here, you’d definitely like to have these fields too in Greyed-out mode.

 

For this we need to write a small code in the PBO (Process Before Output) module of the screen 0103 we have created.  Double click on the Screen number 0103 of the enhancement,

Codes in Exits.jpg

 

Un-comment line MODULE STATUS_103. and D’Click on the STATUS_0103 of the PBO module. Insert the following code between the MODULE, END MODULE lines like this.

------------------------------------------------------------------------------------------------------------------------

MODULE STATUS_0103 OUTPUT.

 

     IF SY-TCODE = 'IW23'.

          LOOP AT SCREEN.

               SCREEN-INPUT = '0'.

               MODIFY SCREEN.

          ENDLOOP.

     ENDIF.


ENDMODULE.

-------------------------------------------------------------------------------------------------------------------------

 

Lastly Rememebr to
Activate the Function GroupXQQM from Tcode SE80. Right click on the Function Group and click on the Activate option

untitled1.jpg

 

...... and thus we reach to the end of this knowledge sharing Documentation.

 

 

Note

1. As this is largely a Technical job, it is recommended to be developed through an experienced ABAPer, especially Part1 which involves Activating the Standard table QMEL.

2. The Environment of Author is ECC 6.0 with no EHPs, hence the document applicability.

 

Expecting this document too would be of use to many members from mainly from EAM and QM spaces.

 

 

 

Thank you

KJogeswaraRao

Transaction Variant

$
0
0

Transaction Variant

Prepared By: Eslam Hosny

 

In This Document we will learn the concept & how to create Transaction and Screen Variants to change screen layouts.

And how to assign those transactions and screens variants to:

  • A Standard Transaction
  • A group of users
  • A new transaction

 

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

Transaction Variants can simplify transaction runs as they allow you to:

  • Pre assign values to fields
  • Hide and change the 'ready for input' status of fields
  • Hide menu functions
  • Hide entire screens

 

A Transaction Variant is made up of a series of screen variants.

Screen variant contains field values and attributes for exactly one screen.


 

Transaction Code -> SHD0

1.jpg

The above Three Tabs in the T Code SHD0:

  • Transaction Variants – > Create Transaction Variants and assign Screen Variants
  • Screen Variants – > Create Screen Variants.
  • Standard Variants -> Used to assign Transaction Variants to standard transaction

                                               Create and assign Variant Groups to specifics users


---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Creating Transaction Variant from a Transaction (Transaction Variant TAB)

  • You can create the Screen Variant first  (Screen Variant TAB)and then create Transaction Variant (Transaction Variant TAB)
  • Or create both at the same time (Transaction Variant TAB) -> Preferred


Our Below Example will be on T Code IW31 (Create Maintenance Order)

1.jpg


  • Once You Pressed Create, The System Will Call The T Code IW31
  • Fill all the required fields  & Any Field you Want Then Press Enter

1.jpg


Once You Pressed Enter, The System Will Call A Configuration Screen That Represents The T Code IW31 In Forms Of Screens with its own Fields

1.jpg

 

  • W.Content: set the value you entered as default
  • Output Only: Dimmed
  • Invisible
  • Required: Mandatory

 

 

In Our Example

1.jpg

 

Then

 

  • Press Enter If you want to change the another available screen In The T Code IW31
  • Press Exit & Save If You Finished

 

Result -> Transaction Variant Created With Its Screen Variants

1.jpg


-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Then You Can Test Your Transaction Variant

1.jpg


1.jpg


----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Using the Transaction Variant You Have Created

  • Assign it to The Standard Transaction
  • Assign it to a group of users
  • Assign it to a new transaction (Variant Transaction)



1- Assign The Transaction Variant To The Standard Transaction (Standard Variants TAB)

If you assign the Transaction Variant to transaction IW31 the changes will affect all the users that use the transaction.

1.jpg


---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


2- Assign The Transaction Variant To A Group Of Users (Standard Variants TAB)


Here We Create a Group (Variant Group)

1.jpg



  • A Transaction Variant Generated Automatic Once You Create The Variant Group
  • Then Assign Users To The Variant Group
  • Set Proposal : To Active The Variant To The user

1.jpg


Then Go To Transaction Variants TAB & Put The Transaction Variant Generated in the previous step With The group & Create it as normal transaction variant or Assign the Screen Variants to it

1.jpg


-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

3- Assign The Variant To A New Transaction (Variant Transaction)

 

You Have Two Options:

A- In T Code SHD0,  Then From Go To Menu -> Create Variant Transaction

B- From T Code SE93


 

We Will Work From T Code SE93

1.jpg


1.jpg


1.jpg


Then Save

 

You Can Now Use Your T Code


-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Note:

 

  • You cannot activate more than one transaction variant to a standard transaction, only one

For example:

If you created two transaction variant from T Code MM01, and you need to assign the two variant to the standard T Code (MM01) -> You cannot, only one can be assigned

 

  • If you created two transaction variants for example from T code MM01, and you assigned one to the T Code MM01 & the other to a user(s)

So all the users will work with first (assigned to the T Code MM01) & The User(s) will work with the variant that is assigned to

 

  • You can assign to a group (User(s)) more than one variant -> but the these variants must be from different T Codes




Getting Started With Configuration Control, CCM2, RCCM2BATCH

$
0
0

Dear EAM community,

 

a new additional documentation for Configuration Control is available under SAP note ‘2106827 - Getting started with
Configuration Control’
.

 

 

The document has the title 'Getting Started With Configuration Control'

 

 

Motivation of the document:

 

  • This document is made to arouse the understanding how Configuration Control is
    working.
  • Basic modeling skills of the data used for Configuration Control should be provided.
  • If available, technical chapters should provide an insight into the coding of the
    application to enable users to adjust the application to their needs.
  • Specific chapters provide information on industry specific enhancements of Configuration
    Control e.g. Aerospace & Defense (IS-ADEC).
  • This document is making use of the Configuration Control functionality since EhP4.
  • This document does not explain the used transactions and the underlying applications
    like LO-VC and the customizing in detail. Explanations are given as far they
    are necessary to understand the basics of configuration control.
  • This document does not make an experienced Configuration Control consultant obsolete
    when you want to introduce Configuration Control at your company!

 

Regards

 

Robert Hügel

Creating new shop paper for PM order

$
0
0

Introduction

I would like to explain how to create new PM order Shop paper for your customers specific needs.

A shop paper is a type of printout of data stored in SAP system (I.E data in PM order). After your user has filled all data in PM order, he can print this data in any style - I.E: like he used to print in his previous data system. Usually shop papers from SAP are customized to become PDF file for print preview / for print.

 

1. First step : Customize new PM order Shop paper

Go to : SPRO -> Plant maintenance and customer Service -> Maintenance and Service Processing -> Maintenance and Service Orders -> Print Control -
> Define Shop Papers, Forms and Output Programs.

 

Choose "Define Shop Papers"

1.jpg

 

SAP already contains 8 Shop papers :Shop paper 2010 , Shop paper 2020 , .... , Shop 2072 . Each Shop paper displays the printed data from PM order little bit differently. I highly recommend to copy 2010 shop paper into new shop paper created. Give a name like Y___ to the new copied shop paper (I gave YBDL because Y represents new shop paper created by me and not by SAP developers, BDL represents the idea behind my shop paper : Delivery printout.

 

Below - Print screen that shows how to copy 2010 to new Shop paper - mark 2010 and press copy button in upper screen menu :

2.jpg

Then you will see the next screen :

3.jpg

You should update "Output program" field with the name of the unique printout program (This program will be written by your Abaper). It will be written by him, only after you write down appropriate characterization document, which explains how to retrieve the necessary data from the D.B in order to print it.

I chose "YRIPRCT00" as the name for the unique program that assemblies my shop paper together.

below you can see a page from my characterization document which was written by me, and submitted to our developers:

1.jpg

You can see that I designed the structure of the shop paper in a word document. Next to each field, which will contain data from the D.B, I have put a number(outlined with yellow background): 1,2, ... 9 .On the following page of the characterization document, I have mentioned from what field in the program the data will be retrieved (In order to know it, you should get familiar working with se38 tcode and breakpoints. Ask your Abaper - it's very important for you to know this technique) :

2.jpg

Back to customization :

 

Recall the 3rd photo from upper part of this post:

You can fill the "Form routine" field with the value "PRINT_PAPER" - it's not crucial.

If you decide that the format of your Shop paper will be PDF, leave the first "Form" field empty. Update value on the lower "Form" field in this screen (your Abaper should send you this value).

 

2. Second step : Define your newly created Shop paper to Order type

 

Go to: SPRO -> Plant maintenance and customer Service -> Maintenance and Service Processing -> Maintenance and Service Orders -> Print Control -
> Define Shop Papers, Forms and Output Programs.

1.jpg

Choose "Define Shop Paper for order type"

 

Then you will see the next screen :

3.jpg

The "selection" column means that if you check it in a specific row, that shop paper will appear automatically as a possible print out, when you choose to print from that order type.

If there isn't a combination: order type + shop paper in this screen, you wont be able to print this shop paper for that order type.

I recommend to erase all SAP shop paper (rows that have * value in first column), define only your shop paper (Y___) to this order type. I recommend to check "Selection" column for it.

 

Hope it helps.

 

Daniel Gontar

Extract Long Text from Notification or Work Order

$
0
0

Because I have seen a lot of opinions regarding the extraction of the long texts from Notifications and Work orders, I suggest a very easy way.

When a long text exist in one Notification, you go to the text editor, GoTo-HEADER, and read the info from there:

Notification data.png

 

Then enter SE37, Function Module READ_TEXT, and execute with the data from the Notification

 

data from notification.png

 

Click on the 2 entries and you'll get the Long text from the Notification.

 

For the Work Order the data that have to be provided in SE37 is:

 

Work order Data.JPG

 

You proceed the same way.

 

I hope this is useful.

 

Best regards,

 

Sorin

SAP APO SAP PM Integration

$
0
0

This document should be used as a reference to understand the SAP APO <> SAP PM Integration which will allow for the maintenance orders to be reflected on the APO Planning Board. The maintenance orders on the APO Planning Board are to request for capacity to be blocked on the production work center for maintenance as well as providing visibility to the maintenance schedule.

 

Requirement:  The Production Planners to have visibility of planned maintenance work against the production resource and the Maintenance Planners to have visibility to the APO planning board so they can schedule the maintenance work based on the availability of the production resource.


Below steps enable the setup required to fulfil the above requirement.

  • Identify the maintenance order types which need to be sent to SAP APO.
  • On the ERP side for SAP PM you need to maintain the Production (PP) Work Center on the Equipment master record (transaction code IE02).
    • The PP Work Center will go in the Work Center field on the Location tab.

        PP_WC.JPG

  • The PM Work Center is in the Main Work Center field on the Organisation tab.

PM_WC.JPG

  • Configure and setup the CIF in SAP APO (CIF is the interface which enables data to be exchanged between SAP APO and SAP ERP system).
    • CIF needs to be setup with the Order Types which are identified to be reflected on the APO Planning Board as well as the System Condition field and any other relevant selection criteria.
    • Note: The way we had it setup was that if the System Condition field was set to '0' (not in operation) by the user then the maintenance order will be displayed on the APO Planning Board. For us setting the system condition field was a manual job.
      You do not want to flood the APO planning board with all maintenance orders hence, the need to manage it through the System Condition field manually and only reflecting those maintenance orders where there is a need for the production equipment to be stopped for maintenance.

 

  • Below screenshots show how the APO Planning Board will look if the System Condition was set to ‘0’ on the maintenance order, then if it was set to ‘1’ and finally, if the system condition was just left blank on the maintenance order.

            APO_DB1.JPG

APO_DB2.JPG

APO_DB3.JPG

 

  • After the setup is complete and the integration between SAP APO and SAP PM is working you need to look at granting display only access to PM planners to the APO planning board through the following two transaction codes:
    • /SAPAPO/RES01 - Resource-Production Resource Display
    • /SAPAPO/CDPS0 - Detailed Scheduling Planning Board

 

The above setup will allow the Production Planners to have visibility to the maintenance schedule as well as the Maintenance Planners to plan maintenance around the Production Planning Schedule.


Fleet management : Steps for monitoring of fuel consumption

$
0
0

Hello to everybody,

 

These are the basic steps for monitoring of consumption in the fleet management using PM (Plant Maintenance) module.

 

It is not very common to use these functionality, so I think that this guide will be useful.

 

You can follow these points:

 

 

1- Units of measurement - CUNI transaction

 


Imagen 1.png

 

A) Choose dimensions

 

SURFACE: Consumption / Activity : i.e. : Liters / 100 km

SURINV: Activity / Consumption: i.e. : Km / liter

VOLFLO: Volumetric caudal : i.e. Liters / Hour

 

 

B) Once you have chosen your dimension, let's créate the unit:

 

CUNI -2.jpg

 

Inside convesion area, conversión is done between entry unit and exit unit, in terms of:

 

  • Simple formula: (if numerator and denominator is enough):

      

        N * Unit in T006 table = Z * IS (International System of Units) unit

 

        i.e. : 100 *  centimeters = 1 * meter

 

                 1 * hour = 3600 * seconds (as the example above)

 

 

  • Complete formula :

      valor in IS unit = (Z/N) * 10 **E (T006 valor unit) + K

 

      i.e.

      Kelvin              Fahrenheit

      273,15 = (5/9) *10 **0 * 32 + 255,3722

 

 

2- Fleet management customizing


These are the customizing points:

 

SPRO VEHICULOS.jpg

 

The interesting points are:

 

- Define Special Measurement Positions for Fleet Objects

 

spro 1.jpg

 

We select the group units, depending on whether the unit belongs to SURFACE, SURINV or VOLFLO.

 

 

- Define Calculation Method for Fleet Consumption Values

 

spro 2.jpg

 

We add the unit in the corresponding calculation method.

 

 

 

3- Fleet master data

 

A) The first point is to create characteristics in CT04 transaction for Distance, Fuel and Time

 

i.e. TIme:

carac_ct04.JPG

 

B) The second one is to add the counters at the vehicle in IE02: Distance, Fuel and TIme

 

contadores vehiculo.JPG

 

In vehicle master data (View. "Vehicle technology"), define the calculation method for the monitoring of consumption.

 

i.e. : 1 (Usage volumen / distance)

 

vehiculo datos maestros.JPG 

 

C) In IFCU transaction, we créate measurement documents for the previous vehicle

 

ifcu_1.JPG

 

After various measurement documents created, we can see consumption information. The easiest way to reach this information is through vehicle master data in IE02:

 

Button "Measuring points / Counters"

 

vehiculo 2.jpg

 

Click with the mouse on the counter you want to see the infor related and click in button "MeasDocuments"

 

vehiculo 3.jpg

You will see these screen

 

vehiculo 4.jpg

 

Execute the report and will show all the measurements related to these vehicle:

 

vehiculo 5.jpg

 

Also you can see an evolution graph with the button "Measurement Document Graphic" (Ctrl+Shift + F9)

 

vehiculo 6.jpg

 

Moreover, you can see more info at the vehicle master data in IE02 at the calculator button:
:

 

vehiculo 7.jpg

 

vehiculo 8.JPG

SAP RDS Asset Analytics KPI’s for Enterprise Asset Management

$
0
0

The purpose of this document is to provide an insight in to the SAP RDS Asset Analytics KPI’s. The document supplements a previous document on ‘Asset Analytics for Enterprise Asset Management’ posted by Peter Huyen which is available on SCN, a direct link to the document is provided below.

 

As a pre-requisite to understand the SAP Rapid Deployment Solutions Asset Analytics I recommend reading the following:

 

  Asset_Analytics_KPI.jpg

 

Note:

  • Due to SAP Copyright Infringement I will not be attaching any documents. For those of you who have access to the SAP Service Marketplace you should be able to access the relevant documents through the URLs provided above.
  • For the commonly used standard SAP Reports please check Standard SAP Plant Maintenance Reports

 

The SAP RDS Asset Analytics solution offers a range of predefined KPI's, these KPI’s have been categorised as:

 

  • Maintainability
  • Reliability
  • Availability
  • Supplies
  • Sustainability

 

As part of the SAP RDS Asset Analytics solution there are 31 predefined KPIs, which are listed below.

 

Perspective

Objectives

KPI ID

KPI Name

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Maintainability

 

 

 

 

 

 

 

 

Improve

Productivity

RDS_EAM_001

Total Person-Hour Capacity Available for

Maintenance

RDS_EAM_002

Capacity for Preventive Maintenance

RDS_EAM_003

Capacity for Predictive Maintenance

RDS_EAM_004

Capacity for Breakdown Maintenance

RDS_EAM_005

Percentage of Work Orders for Preventive

Maintenance

RDS_EAM_006

Percentage of Work Orders for Predictive

Maintenance

RDS_EAM_007

Percentage of Work Orders for Breakdown

Maintenance

RDS_EAM_008

Percentage of Work Orders for Emergency

Requirements

RDS_EAM_009

Percentage of Work Orders for Critical Assets

RDS_EAM_010

Percentage of Capacity used for Performing

Maintenance Tasks


Improve

Effectiveness

RDS_EAM_011

Percentage of Work Orders Resulting from

Condition Monitoring

RDS_EAM_012

Backlog of Activities

RDS_EAM_013

Completion Rate

RDS_EAM_014

Schedule Adherence

 

 

 

Improve

Efficiency

RDS_EAM_015

Notification Response Time

RDS_EAM_017

Maintenance Cost as Percentage of Replacement

Value

RDS_EAM_018

Budget Utilization

RDS_EAM_019

Number of Work Orders per Clock Hour

RDS_EAM_020

Number of Notifications per Clock Hour

Improve

Accuracy

RDS_EAM_016

Maintenance Rework

 

Reliability

 

Reduce

Failures

RDS_EAM_021

Mean Time Between Failure (MTBF)

RDS_EAM_022

Mean Time To Repair (MTTR)

RDS_EAM_023

Mean Time Between Repair (MTBR)

Availability

Improve Assets’

Availability

RDS_EAM_024

Technical Availability of Assets

RDS_EAM_025

Operational Availability of Assets

 

 

Supplies

Manage Stock

outs of

Spare Parts

RDS_EAM_026

Number of Stock Outages

RDS_EAM_027

Orders Delayed Due to Stock Outages

Manage

Subcontracts’

Work

RDS_EAM_029

Subcontracted Work as a Percentage of Total

Work

 

 

 

Sustainability

Manage

Safety

RDS_EAM_030

Maintenance Request to Correct Safety Incidents

RDS_EAM_031

Maintenance Request to Correct Incidents Due to

Reported Injuries

Improve

Environment

Compliance

RDS_EAM_032

Maintenance Request to Correct Incidents related

to Environmental Compliance

 

The source for the above information is:

 

  • Slide 30 and 31 of the Asset Analytics presentation by Hemant Rathod – SAP Labs LLC - URL provided in the pre-requisite reading section above.
  • The Asset Analytics ‘KPI’s Detail Information’ document available on SAP Service Marketplace - URL provided in the pre-requisite reading section above.

 

Note: You will see a gap in the KPI numbering, this is due to RDS_EAM_028 missing from the list – I did not see RDS_EAM_028 in the ‘KPI’s Detail Information’ Excel document on SAP Service Marketplace.

 

The below section provides a high-level description of each of the KPI’s listed above. I hope the information provided in this document along with references to other sources will provide you with sufficient understanding of the SAP RDS Asset Analytics KPI’s.

 

Note: Please contact me if you have any feedback or can help 'fine tune' the KPI descriptions and / or provide formula / formulae for calculating the KPI's.

 

  • RDS_EAM_001  - Total Person-Hour Capacity Available for Maintenance

This measure indicates the total internal as well as external capacity available to perform / execute maintenance tasks.

 

  • RDS_EAM_002  - Capacity for Preventive Maintenance

The measure provides visibility to the capacity of maintenance work which is executed as preventive maintenance and indicates maturity of planning.

 

  • RDS_EAM_003  - Capacity for Predictive Maintenance

The measure provides visibility to the capacity of maintenance work which is executed as predictive maintenance (Condition Based Maintenance). Typically, there could be multiple variants of it: based on planned man hours, available man hours, actual man hours.

 

  • RDS_EAM_004  - Capacity for Breakdown Maintenance

The measure provides visibility to the capacity of maintenance work which is executed as breakdown maintenance. Typically, there could be multiple variants of it: based on planned man hours, available man hours, actual man hours

 

  • RDS_EAM_005  - Percentage of Work Orders for Preventive Maintenance

This measure reflects the percentage of work orders created (completed) in the system as a result of preventive maintenance. The percentage of preventive maintenance orders created will exclude canceled orders as well as orders with the deletion flag. Preventive maintenance can typically be identified through the use of order type or maintenance activity type or planning indicators to understand preventive work from total work.

 

  • RDS_EAM_006  - Percentage of Work Orders for Predictive Maintenance

This measure reflects the percentage of work orders created (completed) in the system as a result of predictive maintenance (Condition Based Maintenance). Predictive maintenance can typically be identified through the use of order type or maintenance activity type or planning indicators to understand predictive work from total work.

 

  • RDS_EAM_007  - Percentage of Work Orders for Breakdown Maintenance

This measure reflects the percentage of work orders created (completed) in the system as a result of a breakdown. Breakdown maintenance can typically be identified through the use of order type or maintenance activity type or planning indicators to understand breakdown work from total work.

 

  • RDS_EAM_008  - Percentage of Work Orders for Emergency Requirements

The measure provides visibility on the percentage of maintenance orders created as a result of an emergency work or after event recordings.

 

  • RDS_EAM_009  - Percentage of Work Orders for Critical Assets

The KPI will indicate the percentage of orders raised against critical plant assets. The measure will be based on identifying orders based on equipment criticality assignment, the ABC indicator for technical objects on maintenance orders.

 

  • RDS_EAM_010  - Percentage of Capacity used for Performing Maintenance Tasks

The measure will identify the percentage capacity being utilized to perform actual maintenance work from the total available maintenance capacity. This assumes all maintenance time including maintenance performed by external resources is confirmed in the system. If time for external resources is not confirmed then the KPI will not reflect a true picture of the capacity used for performing maintenance tasks.

 

  • RDS_EAM_011  - Percentage of Work Orders Resulting from Condition Monitoring

The KPI will provide visibility in understanding the percentage of maintenance orders created as follow-up maintenance post the inspection task. This can be managed through a maintenance order with a specific notification type that can identify 'follow on of condition monitoring‘. This could be enhanced by using maintenance activity type, planning indicator, and order type.

 

  • RDS_EAM_012  - Backlog of Activities

Backlog is the volume of work which remains outstanding for maintenance activities. The measure will reflect the number of orders in released status but not completed.  All maintenance orders which are not technically completed are part of the backlog.

 

  • RDS_EAM_013  - Completion Rate

The measure reflects the percentage of maintenance orders completed by the latest allowed finish date out of the total number of maintenance orders created in the system. Maintenance compliance monitors whether the work is being completed on time (which is determined through consistent risk assessment).

 

  • RDS_EAM_014  - Schedule Adherence

The measure shows the number of maintenance orders which were scheduled and have been confirmed to have started and finished (completed) within the scheduled period. The measure reflects the number of maintenance orders being completed on time within the planning bucket.

 

  • RDS_EAM_015  - Notification Response Time

The measure provides visibility on the time it takes to respond to a notification created by the operations team.

 

  • RDS_EAM_016  - Maintenance Rework

The measure helps identify the number of times an asset fails in the same mode in quick succession after maintenance was performed and completed. For example, the same damage code on the same technical object within 7 days is seen as maintenance rework.

 

  • RDS_EAM_017  - Maintenance Cost as Percentage of Replacement Value

The measure provides visibility of the cost to maintain an asset. It helps determine how cost effective the asset is.

 

  • RDS_EAM_018  - Budget Utilization

The measure shows the approved maintenance budget and how it is being utilized.

 

  • RDS_EAM_019  - Number of Work Orders per Clock Hour

The measure provides visibility on the number of maintenance orders created per hour.

 

  • RDS_EAM_020  - Number of Notifications per Clock Hour

The measure provides visibility on the number of maintenance notifications created per hour. Operators / users of assets regularly create notifications to report breakdown or malfunction. To ensure maintenance team can respond to such maintenance requests with little or no impact on production the KPI helps in identifying when the maintenance planner may be required most within a day.

 

  • RDS_EAM_021 - Mean Time Between Failure (MTBF)

Mean Time Between Failure (MTBF) is a measure of equipment reliability. The MTBF of an equipment is calculated from the total equipment downtime in a specific period reviewed divided by the number of failures in that period. MTBF is an equipment specific measure which is used to identify opportunities to improve equipment reliability.

 

  • RDS_EAM_022 - Mean Time To Repair (MTTR)

Mean Time To Repair (MTTR) is a measure of efficiency of the diagnostic, procurement, maintenance preparation, scheduling, repair and re-instatement process. The MTTR is calculated from the total equipment repair time in a specific period divided by the number of repairs in that period. MTTR is an equipment specific measure and is used to set continuous improvement targets.

 

  • RDS_EAM_023 - Mean Time Between Repair (MTBR)

Mean Time Between Repair (MTBR) is a measure of the average time between repair for component, equipment or units. The calculation is based on total uptime between repair divided by the number of repairs over a period of time.

 

  • RDS_EAM_024  - Technical Availability of Assets

The technical availability of an asset is a measure reflecting the number of hours an asset is available or how many hours this machine can be kept working in a period

 

  • RDS_EAM_025  - Operational Availability of Assets

The operational availability of an asset is a measure which shows the number of hours the asset is operational. The operational availability is calculated by taking the maintenance activities and / or downtime of the asset from the total operational available capacity of the asset.

 

  • RDS_EAM_026  - Number of Stock Outages

This measure will provide visibility on the number of orders for which there was a material shortage / material out of stock.

 

  • RDS_EAM_027  - Orders Delayed Due to Stock Outages

The measure will provide an understanding on the number of maintenance orders which were delayed due to material stock shortage. The calculation is based on the basic finish date of the order which if not adhered to reflects a delay in maintenance. The measure will exclude and not evaluate the maintenance orders where the basic finish date is not maintained.

 

  • RDS_EAM_029  - Subcontracted Work as a Percentage of Total Work

The measure provides visibility on the number of external resource man hours procured to perform maintenance tasks.

 

  • RDS_EAM_030  - Maintenance Request to Correct Safety Incidents

The measure can help identify the number of times a safety incident was recorded and the action taken after the root cause analysis to perform maintenance to an asset to prevent a future incident.

 

  • RDS_EAM_031  - Maintenance Request to Correct Incidents Due to Reported Injuries

The measure can help identify the number of times an injury was recorded which resulted in the root cause analysis and led to maintenance being performed on an asset to prevent future incidents.

 

  • RDS_EAM_032  - Maintenance Request to Correct Incidents related to Environmental Compliance

The measure can help identify the number of times an environment related incident was recorded.

 

I hope you find the document useful and that it can be used as a basis to understand the SAP RDS Asset Analysis KPI's. As mentioned above, if you have any feedback or can help update the document with additional detail on the KPI's including formula / formulae used to calculate the KPI' then please feel free to contact me.

IWO10018: User Fields in Maintenance Order

$
0
0

Introduction

One of the very frequently asked questions in this space, is about the subject matter, i.e., How can I add Custom fields to my Maintenance Order? In the recent months the author had replied 3 times to discussions related to this topic. It is thought that this topic if documented would be helping many.

 

Objective

This documentation is intended to enable the readers to create the Custom fields in the Maintenance Order, update the Order Master data Table and also display these fields in IW38 Order list output.

 

Let's Start

 

 

Part1

Create Custom fields in the Order Table

The table of our context is AUFK. We need to append our Z-fields to this through the include structure namely CI_AUFK.

 

The process of creating any custom field starts with creating a Data Element with desired Type and Length or with desired Domain name and with the Field Labels we want to have for the Customer fields. For our Demo, we have created Two Data Elements, namely :

1. ZCUSTFLD1 (Domain CHAR12 and Field Label ‘Customer Field 1’)

2. ZCUSTFLD2 (Domain CHAR40 and Field Label ‘Customer Field 2’)

 

 

Now let us create our Customer fields Run Tcode SE11 --> give value AUFK in the Database Table field -->Click on Display. Scroll-down to find include table CI_AUFK. Double click on this, Go to Change mode and Add 2 new fields of our interest as shown in the picture and Activate.

1.JPG

 

As seen in the picture, we have created Two Customer-Fields namely ZZCUSTFLD1 and ZZCUSTFLD2. It is essential for all Customer fields used in Enhancement purposes to be prefixed with ZZActivate the Structure.

 

 

 

Part2

Enhancement and Screen-Exit


1, Create an Enhancement Project say ZPMORDER using Tcode CMOD.

2.JPG

 

2. Assign Enhancement IWO0018 to this project.

3.JPG

 

3. Click on Components in the picture above to reach this screen.

4.JPG

 

4. Activate by clicking on the Activate Icon (shown in picture above)

5.JPG

 

As we see here, there is One screen-exit (screen 0900) and Two Function-Exits namely EXIT_SAPLCOIH_018 and EXIT_SAPLCOIH_019 in this enhancement. Double Click on this screen number to create a Sub-Screen for holding our Custom Fields. You’ll get this pop-up. Press Enter and Continue.

6.JPG

 

You’re in the screen below, where you’ll give a Description, Select the Subscreen Radio button, Save and Activate.

7.JPG

 

Click on LayoutArrow in the Application Toolbar of (See the picture above) to reach the Screen-Painter pop-up window, where we will be creating :

1. A Box to hold our Z-fields

2. Text Fields to for Z-field labels

3. Input Fields for Z-fields

8.JPG

The input fields should be referred to the Dictionary fields we have just created. (AUFK-ZZCUSTFLD1 and AUFK-ZZCUSTFLD2)

See the picture.

9.JPG


Activate.


 

 

Part3

 

1. Declare table AUFK

Declare table AUFK in the top include LXWOCTOP of Function group XWOC by Clicking on and creating the include ZXWOCTOP .

ZXWOCTOP.JPG

 

 

2. Codes to be given in Function-Exits


Go to the following screen of the User-exit

14.JPG

 

 

Double click on the Function-Exit EXIT_SAPLCOIH_018 and put the following code in the include ZXWOCU15.

 

*---------------------------------------------------------------------------------------------

MOVE-CORRESPONDING COCI_AUFK_IMP TO AUFK.

*---------------------------------------------------------------------------------------------

 

 

Similarly put the following code in the include ZXWOCU16  of the Function-Exit EXIT_SAPLCOIH_019.

 

*---------------------------------------------------------------------------------------------

MOVE-CORRESPONDING AUFK TO COCI_AUFK_EXP.

*---------------------------------------------------------------------------------------------



Now let’s see the effect of work done so far.

Create a Maintenance Order (IW31). You will see an Additional Tab named Enhancement has been added here by the system, in which our Custom fields appear with their labels and the input fields.

10.JPG

 

Now let’s add some values in these fields and Save the Order.

11.JPG

 

Run IW32, open the Order and verify whether the values are updated to table or not. If they are appearing in the Enhancement tab as you have entered and saved, this means the AUFK table has been updated with these values when Order was saved.

 

 

Part4

Let's have these Custom fields in the Order list output namely the ALV of Tcode IW38

So far we have succeeded in creating our Custom fields and updating the values to the Order Master data. Next natural requirement of a user would be to have these fields in IW38 ALV screen. For this purpose we, need to create an Append Structure in the Structure RIHAUFK_LIST, as shown in the picture below. The

Tcode is SE11 again for this task. Here we have created an Append Structure named ZCUSTFLD and in this structure we have added both the Custom fields.

12.JPG

 

Now let's create one more Order, fill the custom fields with some values and Save. The second order is to have ALV output in IW38. (Because single Order in the output takes to IW33 screen instead of ALV screen). Now run IW38 with selection parameters to display these 2 orders we created. Click on the icon shown , You'd find the Custom fields in the Column-set list, Bring them to Displayed list on the Right hand side.

13.JPG

 

 

Almost Done

 

Now if you go to IW33, unlike all other greyed-out fields, the Custom fields in Enhancement Tab will be seen Editable. Though there is no provision to Save the edits here, you’d definitely like to have these fields too in Greyed-out mode.

 

For this we need to write a small code in the PBO (Process Before Output) module of the screen 0900 we have created.  Double click on the Screen number 0900 of the enhancement,

14.JPG

 

 

Now you are in the Flow Logic Tab ,

15.JPG

 

Un-comment line MODULE STATUS_900. and D’Click on the STATUS_0900 of the PBO module. Insert the following code between the MODULE, END MODULE lines like this.

------------------------------------------------------------------------------------------------------------------------

MODULE STATUS_0900 OUTPUT.

 

     IF SY-TCODE = 'IW33'.

          LOOP AT SCREEN.

               SCREEN-INPUT = '0'.

               MODIFY SCREEN.

          ENDLOOP.

     ENDIF.


ENDMODULE.

-------------------------------------------------------------------------------------------------------------------------



Lastly Do not Forget to
Activate the Function GroupXWOC from Tcode SE80. Right click on the Function Group and click on the Activate option

16.jpg

 

...... and thus we reach to the end of this knowledge sharing Documentation.

 

 

Note

1. As this is largely a Technical job, it is recommended to be developed through an experienced ABAPer, especially Part1 which involves Activating the Standard table AUFK.

2. The Environment of Author is ECC 6.0 with no EHPs, hence the document applicability.

 

Expecting this document too would be of use to many of the members,

 

 

Thank you

KJogeswaraRao

User-fields in Catalog Tabs of Notifications - QQMA0008,10,11 and 12

$
0
0

Introduction

Recently I went through a Query, where the subject information was sought. i.e., How to have additional fields for Tasks ?. In fact SAP has provided the facility to have additional fields for line items of all Catalog tabs, namely Item, Cause, Task and Activity. The concerned enhancements are as under.

 

EnhancementDescription
QQMA0008QM/PM/SM  User Subscreen for Additional Data on Notif. Item
QQMA0010QM/PM/SM  User Subscreen for Additional Data on Cause
QQMA0011QM/PM/SM  User Subscreen for Additional Data on Task
QQMA0012QM/PM/SM  User Subscreen for Additional Data on Activity

 

.The SPRO setting to have these Subscreen fields is very simple as shown below.

m2 spro.JPG


Objective

This documentation is intended to enable the readers to create the Custom fields for the line items of different Catalog Tabs of Maintenance Notification.

 

For Demo we are taking  the Tasks Catalog.



Part1

Create Custom fields in the Notification Table

The tables we need to append with our Z fields are as under:

For Item Catalog -- Table QMFE

For Cause Catalog -- Table QMUR

For Tasks Catalog -- Table QMSM

For Activities Catalog -- Table QMMA


The process of creating any custom field starts with creating a Data Element with desired Type and Length or with a Domain name and with the Field Labels we want to have for the Customer fields. For our Demo, we have created 2 Data Elements, namely :

  1. Z_DELAY  - Type DEC Len 3 Dec 1  and Field Label ‘Delay(H)
  2. Z_REASON - Domain TXT40 and Field Label ‘Reason for Delay’)


Because we are understanding this implementation through Tasks Catalog, the table of our context is QMSM. We need to append our Z-fields to this through the Append structure in this Table. So I created an append Structure ZQMSM and assigned my Z fields as under..

append.JPG

 

As seen in the picture, we have created Two Customer-Fields namely ZZDELAY and ZZREASON. It is essential for all Customer fields used in Enhancement purposes to be prefixed with ZZ.

 

Part2

Enhancement and Screen-Exit

Run Tcode SMOD., Give value QQMA0011 and click on Test.  Here you will see number of screen-exits as under, provided for this purpose. Let's create the screen-0410 shown below. Also 2 Function Exits are provided for the purpose of Data Export to Table and Import to Notification. (Activate the Exit if found in Deactivated condition)

Capture1.jpg

Refer to document User-Fields in QM and PM/CS Notifications : Screen-Exit QQMA0001 Part2 step4 onwardsfor details of creating a sub-screen. Remember that  your present table QMSM in place of the QMEL table of that document.

 

So we have created a sub-screen (screen no.410) with like this.

sp.JPG

 

The input fields should be referred to the Dictionary fields we have just created. (QMSM-ZZDELAY and QMSM-ZZREASON) as shown above.

Activate the screen-painter.

 

Part3

Codes to be given in Function-Exits


Go to the following screen through SMOD.

Capture.JPG

Double click on the Function-Exit  EXIT_SAPMIWO0_015  and put the following code in the include   ZXQQMU14 .

 

*---------------------------------------------------------------------------------------------

TABLES: QMSM.

MOVE-CORRESPONDING I_VIQMSM TO QMSM.

*---------------------------------------------------------------------------------------------

 

Similarly put the following code in the include  ZXQQMU14   of the Function-Exit  EXIT_SAPMIWO0_016.

 

*---------------------------------------------------------------------------------------------

MOVE-CORRESPONDING QMSM TO E_VIQMSM.

*---------------------------------------------------------------------------------------------

 

Part4

SPRO setting to be done

Navigate to the Overview of Notification Type in SPRO.

spro1.JPG

Select your Notification Type (Here we are doing it in M2) and Enter the Screen Structure for Extended view

spro2.JPG


Give the screen number we have created (0410) in the Tasks Screen Area as shown below.

y.JPG



All Done


Let’s see the effect of work done so far.

Create a Maintenance Notification (IW21). Go to Catalogs & Codes  tab --> Give some item details in the Object Part & Damage  tab --> Go to Tasks tab fill a line item --> Select this line --> Click on the Lens icon in the left bottom (shown in the picture.

tasks_1.JPG

 

We see this in the pop-up

tasks_2.JPG

 

Success, Our user fields are appearing and ready for inputs. We get these user fields for all line items we have in this tab (Taks). Procedure is same for other Catalogs. Only Tables and Exits change as detailed in the beginning.

 

Test it

Create an M2 Notification, Give values to these User fields and Save. Now run IW22  go to the the User-fields pop-up and verify. The values you've put while creating the Notification will be seen there. Means the values are now a part of the QMSM table database.

 

These Screen-Exit documents are relevant to Quality Notification also.

 

Note

1. As this is largely a Technical job, it is recommended to be developed through an experienced ABAPer,

2. The Environment of Author is ECC 6.0 with no EHPs, hence the document applicability.

 

Hope this document too is helpful to many of our members.

 

Related posts by the author:

IWO10018: User Fields in Maintenance Order

ITOB0001, ITOB0003 : User-Fields in Equipment, Functional Location, Fleet Masters

User-Fields in QM and PM/CS Notifications : Screen-Exit QQMA0001



Thank you

KJogeswaraRao

Catalogs & Codes: An Important Knowledge Piece

$
0
0

Foreword

The author believes that the tip given in this document  simplifies and drastically cuts down the amount of data upload to QS41 transaction, In fact this tip should be made use of invariably by every-one who designs the Catalogs & Codes to the Equipments. 


What is it?

An addition of character ‘&’ at the end of Code Group Description helps the Code-text (kurztext) to be very short, but while using the Code-texts  are prefixed by Code Group Texts giving full meaning.

 

This is being explained through Screen-captures in the following example .

 

QS41:

 

1.Object part Code Group ‘MOTOR

  Description : ‘MOTOR &

1.JPG

Codes

1.JPG

 

 

 

 

 

 

 

2a. Damage Code Group:  ‘SHFT

Description :  ‘SHAFT&’

 

1.JPG

 

Codes

1.JPG

 

 

 

 

 

 

2b. Damage Code Group:  ‘FNDN

Description :  FOUNDATION &

 

1.JPG

 

Codes

  1.JPG

 

 

 

 

 

 

 

OQN6:

3. Catalog Profile

1.JPG

 

 

 

 

 

 

 

The result in IW21 / IW22

1.JPG

 

 

Note:

1. The above explanation is applicable for all Catalogs (B,C,2,5, A &  others).

2. Because this is a change in Description field, it is applicable to the Code Groups created and used earlier. Accordingly, the Code-Texts will  be modified in all History Notifications.

 

 

Hope members find this article useful.

Thank you

KJogeswaraRao

10 Useful Tips on Infoset Queries

$
0
0

Introduction

Often it is seen that. Infoset-query users, stop exploring  at the 1st hurdle and switch to ABAP report programs, for requirements a little bit beyond simple ones. But, it is the author's experience, that we can use this tool (Infoset Query) given to Functional people by SAP,  to reach very close to the ABAP report programs, with features like those discussed in the other document and also some discussed here.

 

In this document the author tried to put together the pieces of his knowledge to present in the form of a document.

 

Tip1

To have a Tcode to your work in Infoset Query.


 

The following screen with report name appears..

 

 

Now you give this report name to your ABAPer and ask him to create a Tcode

OR

You do it yourself through SE93 Tcode, if you have access.

 

Steps for SE93


 

 

 

And Save. Thus your Infoset query will now be working with Tcode ZTCODE

(This applies also to Quick Viewer report SQVI)

 

 

Tip2

Calling Reports from Infoset Query reports.

 

The output of your query contains key fields like Notification no., Equipment No. etc.

It is natural that one wants to go to the Notification screen or the Equipment screen from the output.

 

Do this way.

 

In SQ01


 

 

We get this screen

 

 

Click here on  then on  then select

In the resulting pop-up, specify the Tcode you want to link with the Row in the SQ01 output.

Say IW23 and Save.

 

It is Done.

Now upon D'clicking anywhere on a particular line item in the query output, you are directed to IW23 screen of the notification of the line-item (row).

 

You can have many such report assignments.

Suppose you want to have IW22 also. Then repeat the same steps above to have IW22 Tcode.

 

Now when you D'click (anywhere) on one line-item (row) of the Query output, you will be presented a pop-up menu to select which one you want. i.e.,

Display Notification  or Change Notification. You are taken to the corresponding screen as per your choice.

 

Capture.JPG

Note:

We always need to remember that, after Tcode assigning, the modifications done in SQ02 or SQ01 would be in effect to the Tcode, only after executing SQ01 once.

 

More Details on this subject here: Calling Reports from an Infoset Query

 

Tip3

Make your report colorful with giving different colors in order to group columns

 

In SQ01 Basic ListScreen

 

Here just Drag & Drop the color from Right Tool-Box to the desired field in the Centre portion.

OR

Double click on a field in the Centre, to display field details and color options on the left. Now you select the color.

 

Example of such output.

Capture.JPG

 

 

Tip4

Always have Selection Fields from Infoset (SQ02).

What does this mean and Why?

 

This means

We have options for Selection Screen designing both in SQ02 and in SQ01.  It is advantageous if we declare selection options in Infoset (SQ02),

 

Here is how we do it. (In the Extras area), Go to Selections Tab, Click on Create icon, select Selection Criterion or Parameter like below.

Capture.JPG

And define the Selection field as under.

selcrit.JPG

Observe here the strings written in Extras field.

OBLIGATORY makes this field in the selection screen mandatory.

NO INTERVALS removes the selection range (Removes the To field of the selection criterion)

NO-EXTENSION removes the multiple selection push button

DEFAULT 'M2' provides the M2 value as default in the field.

 

Like-wise you can design a selection screen as shown below by defining fields one after another.

pastedImage_22.png

Note that, we can declare only Standard Selection Fields here. Additional Fields are to be taken into Selection Screen only from SQ01.

 

The disadvantage in having these standard fields into selection screen from SQ01 is, the previously used values reappear as defaults for new running of the report. We need to erase and type our values. Also there is no provision for making a field mandatory.

 

 

 

Tip5

This is to develop queries in Standard Arearather than in Global Area.

 

What is this?

See the option below in SQ02 while creating an Infoset Query.

 

 

 

In the Query Areas above we have two options: Global Area, Standard Area.

When we are working in Development Server (client 200 or 210), we work in Global Area option, which generates a transport request, subsequently this will be transported to QAS and PRD at the end of work.

 

When we select Standard Area as the name indicates, it is client-specific. This means you can directly develop in PRD with this option. To have a Tcode for reports developed so, we need to use the same way explained earlier in this document. But  it is to be noted that, we get the report name from the PRD client where we developed the report, and create a Tcode in Development server (client 210 or 200) and same will be. transported to PRD.  (One time job)

 

The main advantage I always enjoyed here is, the moment some addition/deletion/modifications performed on this repor, it is instantly available in PRD.

(No hassles of transport requests). Only requirement is to run SQ01 once. The Tcode will be giving the changed report.

Also, the testing of the the report work is done in a perfect environment with real-time data.

 

(Working through the Global Area option in Development clients may be having its own advantages, like work back-up , but I never felt such necessity in my environment.If needed we can have a copy report in PRD itself)

 

 

Tip6

In case we do not want a certain category of records in the output, then go to SQ02 --> Extras--> Code tab --> Record Processing section, and

Give a code like the sample given below.

( check viqmel-abckz <> '' .)

 

What does this do?

With this code, the Infoset query does not bring any records where the ABC indicator field is blank.

Like-wise if you give a code like: check crhd-arbpl <> 'xyz123'.

the output will ignore the records with maint. work center value 'xyz123'.

(Note that these are permanent filters, For optional filters either the Selection Screen OR the Filter in the  ALV output display can be used.)

 

 

Tip7

F4 help related

F4 Help is not available in infoset query.

 

Tip8

How to create a radio button in SAP Query SQ01/SQ02.

 

 

Tip9

User defined fields

 

 

Tip10

We know that, the infoset reports work on Table joins in Infoset. In complex cases, where many tables are joined, the correctness of report depends upon the quality of joins we define. Though system suggests some joins, user can define more joins as per his table knowledge. This is what controls the multiplicity of identical rows appearing in the output sometimes.

 

It is seen that in situations where the user is unable to control the duplicate (or multiple) identical rows , the CHECK statement used in Tip6 works conditionally. In other cases this multiplicity becomes one of  the points where one is forced to go for an ABAP report.

 

 

The author has been working in this area since few years. This is an effort to share his knowledge about some very common requirements in this area with the forum. Hope member friends especially those who love Infoset queries, find this useful.

 

Thank you

KJogeswaraRao


PS: This post and all further posts in the area of Infosets have been compiled to this blogInfoset Queries: Collection of important posts

Calling Reports from an Infoset Query

$
0
0

Introduction

The first usual improvisation requirement in self-made Infoset Queries by beginners, is often the requirement of calling other reports from ALV output, just the same way we do in Standard reports.  In ABAP-coded Z Report Programs, there are several techniques of achieving this by syntax like Call Transaction,Submit etc.

 

The very objective of this documentation is to achieve the same. This topic was briefly discussed in the document 10 Useful Tips on Infoset Queries. But, when the author experienced few exceptions in the technique suggested there and found a solution subsequently, he got the idea of having an exclusive document on this topic.

 

This document has assumption that readers have working knowledge in developing Infoset Queries.

 

Here we Start

We have seen earlier, that for enabling Report Calling from the ALV output of an Infoset Query, we need to do these steps in SQ01.

 

 

Click here on   then on then select  TR (Transaction Code) or RT (Report Program),

 

  1. When we select TR we need to put only the Transition code.

     


Example:

IE03 if our ALV lines are having Equipment field and we want Equipment Master display upon clicking on the ALV row.

 

If we have a Maintenance Order Number in the ALV, and we want to have Display Order Screen upon clicking on this row, then we give the Tcode IW33 here.

 

     2.  In the other case, when we want to call List Reports like IW37 , then we need to select RT in the Report type, where we need to give the

          Program  name (in this case RIAFVC20) in the Report field  and the variant name.

 

        

 

So far, it looked very much OK, until I found recently that few field names like EQUNR, MATNR, DOKNR etc, do not exhibit the desired behaviour.


Few cases  where this call report was not working are discussed here.

In one of my Queries, I have Material number (MATNR) in the ALV output, for which I used Report Type TR with Tcode MM03, for the purpose of  Material Master Display. What happened here, was no Material number was passing to the MM03 initial screen, so the display interrupted, In another case, the first attempt display was coming, but the next attempt on different material line in the ALV, the material master display of the first attempt was repeating. Broadly there is a technical problem in passing the Material number.

 

Another such case was with the Tcode CV03N  (Display of DMS Document) , where the DOKNR, DOKAR field values were not passing to the CV03N initial screen.

 

Here is the solution I worked-out, using the QUReport Type of Report Assignment


We are taking the MM03 case

As mentioned above, the report Type QU (Query), in the Report Assignment came to rescue.

This option has 3 fields.

 

First field (User Group):  You know, your User Group.

Second field (Query): We need to develop a simple query for this field.

Third field (Variant): Optional.

 

So, what required was that a simple Infoset query using MARA table (Material Master) to be created.

And this Query name, was given in the field 2 above.

 

Let’s see the steps of creating the simple Query for Report Assignment purpose.


SQ02

We are Creating an Infoset (I named it MM03) with Direct read of table option.

This is because, we use only one table.

 

Select this default option, and Continue.

 

 

With this the Key field MATNR is added to the Field Group folder in the Infoset.

And in the Infoset Code Section, give the following code

untitled2.jpg


  Generate Infoset and do not forget to assign it to your User Group.


SQ01

Create a Query (Say MM03) using the above Infoset.

Note:

This query name is going to be used in the Report Assignment.

 

Go to Basic list screen and Tick the MATNR field in the List fields column.

untitled1.jpg

Save the Query.



Testing.


Here we are examining, the behaviour of 3 cases of Report Assignment)  in the ALV output of an Infoset Query.

 

We know that when multiple Call report assignments are there in the query, then the options appear as a menu as shown above, upon clicking on a row.

 

  • Here the first option in the menu namely Display PM Order, is that where I used report type TR and given Tcode IW33,
  • Second one, namely Report Assignment MM03 is through Report Type QU with Query field value MM03 (created as explained above)
  • Third one was the option which was malfunctioning i.e., Report Type TR and Tcode MM03

 

Now when tested, the first option with TR report-typeworks satisfactorily, without any problem, passing the Order number (AUFNR) correctly everytime.

The third option, again with report type TR works erratically, unable to pass material number (MATNR) correctly.

The second option is our solution to the erratic behaviour of MM03 through TR report type. i.e., through QU report type. This works very correctly like the first case.

 

In the case of Display Equipment (IE03) , the above method would work, with the following code in SQ02.

PARAMETERS:

EQUNR LIKE EQUI-EQUNR.
SET PARAMETER ID 'EQN' FIELD EQUNR.
CALL TRANSACTION 'IE03' AND SKIP FIRST SCREEN.
EXIT.

 

So that is about the Problems and the Solutions

 

As referred in the beginning, another parameter which gave trouble in calling reports through report-type TR was, DOKNR (DMS document number).

I have solved this issue too in a similar manner.  The transaction called was CV03N. The code used in the Infoset is given below.

draw.JPG

 

Note

See the Syntax used  PARAMETER ID  in the syntax used in both the cases above.

The Parameter Id used in MM03 case was, MAT,  and in the CV03N case was CV1  and CV2.

MAT is the Parameter Id for field MATNR, CV1 is for DOKNR and CV2 is for DOKAR.


This parameter-id is the key factor for any Call report to function properly.

 

Where do we get this?

For example for MATNR, place cursor in MATNR field of any screen, and press F1 on key-board. The pop-up has this value.

Similarly for any other field.

 

That’s everything I think, about this document.

 

The author hopes that this document also will be useful to the members, the way the  other documents by the author, in the series of Infoset-queries.

 

 

Thank you

Jogeswara Rao K


User-Fields in QM and PM/CS Notifications : Screen-Exit QQMA0001

$
0
0

Introduction

One of the very frequently asked questions in this space, is about the subject matter, i.e., How can I add Custom fields to a Notification? A documentation on this subject would be helpful to the forum for ready reference.

 

Objective

This documentation is intended to enable the readers to create the Custom fields in different tabs of Maintenance Notification, update the Noyification Master data Table and also display these fields in IW28 / IW29 output.

 

Let's see how it is done.

 

Part1

Create Custom fields in the Notification Table

The table of our context is QMEL. We need to append our Z-fields to this through the include structure namely CI_QMEL.

The process of creating any custom field starts with creating a Data Element with desired Type and Length or with desired Domain name and with the Field Labels we want to have for the Customer fields. For our Demo, we have created Two Data Elements, namely :

  1. Z_DELAY  - Type DEC Len 3 Dec 1  and Field Label ‘Delay(H)’
  2. Z_REASON - Domain TXT40 and Field Label ‘Reason for Delay’)

 

Now let us create our Customer fields.

Run Tcode SE11 --> give value QMEL in the Database Table field --> Click on Display. Scroll-down to find include tableCI_QMEL. Double click on this,  Go to Change mode and Add Two new fields of our interest as shown in the picture and Activate.

ci_qmel.JPG

 

As seen in the picture, we have created Two Customer-Fields namely ZZDELAY and ZZREASON. It is essential for all Customer fields used in Enhancement purposes to be prefixed with ZZ.

 

Part2

Enhancement and Screen-Exit

1, Create an Enhancement Project say ZPMNOT using Tcode CMOD.

cmod.JPG

 

2. Assign Enhancement QQMA0001 to this project .

cmod_!.JPG

 

3. Click on Components in the picture above to reach this screen.

cmod_2'.JPG

 

4. Activate by clicking on the Activate Icon (shown in picture above)

Now the screen is like this.

cmod_2.JPG

 

As we see here, there are several screen-exits (27) and Two Function-Exits namely EXIT_SAPMIWO0_008 and EXIT_SAPMIWO0_009  in this enhancement.

Double Click on this screen number to create a Sub-Screen for holding our Custom Fields. You’ll get this pop-up.  Press Enter and Continue.

103 create.JPG

 

You’re in the screen below, where you’ll  give a Description,  Select the Subscreen Radio button,  Save and Activate.

subscreen create.JPG

 

Click on Layout Arrow in the Application Toolbar of (See the picture above) to reach the Screen-Painter pop-up window, where we will be creating :

  1. A Box to hold our Z-fields
  2. Text Fields to for Z-field  labels
  3. Input Fields for Z-fields

screen-painter.JPG

 

The input fields should be referred to the Dictionary fields we have just created. (QMEL-ZZDELAY and QMEL-ZZREASON) as shown above.

 

Activate the screen-painter.

 

Part3

Codes to be given in Function-Exits


Go to the following screen

Codes in Exits.jpg

 

Double click on the Function-Exit EXIT_SAPMIWO0_008 and put the following code in the include  ZXQQMU07 .

 

*---------------------------------------------------------------------------------------------

TABLES: QMEL.

MOVE-CORRESPONDING I_VIQMEL TO QMEL.

*---------------------------------------------------------------------------------------------

 

Similarly put the following code in the include  ZXQQMU08   of the Function-Exit EXIT_SAPMIWO0_009.

 

*---------------------------------------------------------------------------------------------

MOVE-CORRESPONDING QMEL TO E_VIQMEL.

*---------------------------------------------------------------------------------------------


Part4

SPRO setting to be done

Navigate to the Overview of Notification Type in SPRO.

spro1.JPG

Select your Notification Type (Here we are doing it in M2) and Enter the Screen Structure for Extended view

spro2.JPG


Give the following settings in the Malfunction Tab (the tab where we want to have our custom fields)

spro.JPG


Almost Done


Let’s see the effect of work done so far.

Create a Maintenance Notification (IW21). You will see the following addition of subscreen area in the Malfunction Start/End  Tab.

IW21.JPG

Enhancement has been added here by the system, in which our Custom fields appear with their labels and the input fields.

 

Now let’s add some values in these fields and Save the Notification.

values in z-field.JPG

 

Run IW22, open the Notification and verify whether the values are updated to table or not. If they are appearing  as you have entered and saved, this means the QMEL table has been updated with these values when Notification was saved.

 

Part5

Let's have these Custom fields in the Notification list reports namely the ALV of Tcode IW28/29 (QM10/QM11 in case of Quality Notifications)

So far we have succeeded in creating our Custom fields and updating the values to the Notification Master data. Next natural requirement of a user would be to have these fields in IW28/29 ALV screen. For this purpose we, need to create an Append Structure in the Structure RIHQMEL_LIST (RQMQMEL1 in case of QM10/QM11 reports), as shown in the picture below. The Tcode is SE11 again for this task. Here we have created an Append Structure named ZDLAY and in this structure we have added both the Custom fields.

rihqmel_list.JPG


Now let's create few more Notifications, with custom fields filled with some values. Now run IW28 with selection parameters to display these Notifications we created. Click on the icon shown , You'd find the Custom fields in the Column-set list, Bring them to Displayed list on the Right hand side.

iw28.JPG

 

Related SAP Note: 370191  (Image of the note is attached herewith for the benefit of the members who can not access OSS)

 

 

Part6

Now if you go to IW23 of any of these Notifications, unlike all other greyed-out fields, the Custom fields will be seen Editable. Though there is no provision to Save the edits here, you’d definitely like to have these fields too in Greyed-out mode.

 

For this we need to write a small code in the PBO (Process Before Output) module of the screen 0103 we have created.  Double click on the Screen number 0103 of the enhancement,

Codes in Exits.jpg

 

Un-comment line MODULE STATUS_103. and D’Click on the STATUS_0103 of the PBO module. Insert the following code between the MODULE, END MODULE lines like this.

------------------------------------------------------------------------------------------------------------------------

MODULE STATUS_0103 OUTPUT.

 

     IF SY-TCODE = 'IW23'.

          LOOP AT SCREEN.

               SCREEN-INPUT = '0'.

               MODIFY SCREEN.

          ENDLOOP.

     ENDIF.


ENDMODULE.

-------------------------------------------------------------------------------------------------------------------------

 

Lastly Rememebr to
Activate the Function GroupXQQM from Tcode SE80. Right click on the Function Group and click on the Activate option

untitled1.jpg

 

...... and thus we reach to the end of this knowledge sharing Documentation.

 

 

Note

1. As this is largely a Technical job, it is recommended to be developed through an experienced ABAPer, especially Part1 which involves Activating the Standard table QMEL.

2. The Environment of Author is ECC 6.0 with no EHPs, hence the document applicability.

 

Expecting this document too would be of use to many members from mainly from EAM and QM spaces.

 

 

 

Thank you

KJogeswaraRao

Useful Customisation tip for Notification Types

$
0
0

Introduction & Objective:

A client wants that Notification Tabs should appear selectively for Create (IW21), Change(IW22) and Display(IW23) views. For example,  he does not want to provide Catalog & Codes tab (10/Tab10) during Create Notification (IW21).

 

Once we know the configuration point in SPRO, where to do this, this requirement looks simpler. But, more work is involved here. This document, elaborates the same.

 

The SPRO configuration path for this:

1.jpg

 

During Tab Additions, the key field which produces the desired effect, is theActivity Cat.

2.jpg

 

 

Please note that the ‘H – Add’ means Create and relates to IW21 screen.  Similarly 'V – Change'  and  'A – Display'  options relate to IW22 and IW23 screens respectively.

 

Now suppose a Notification type has the requirement for 3 main pages viz.,

10/Tab01– Notification 1

10/Tab07  -  Dates

10/Tab10– Catalogs & Codes

 

We know that 10/Tab10 will have sub tabs declared 20/Tab01, 02, 03, 04.

 

The following is the Tab strip Overviewin the SPRO, where no special conditions are required. Here we see the Activity Cat.field is blank.

 

In this Configuration, all tabs will be visible in all stages (IW21, IW22, IW23)

3.jpg

 

 

Now let's see, the Configuration as per our clients requirement, where Catalogs & Codes Tab not to be seen in 'Create' phase.

4.jpg

 

What we see here is for one simple condition, a number of line items added into the 'Tab strip Overview'.

This is because,

When we specify a value V in Activty Cat. Of 10/Tab10 (desiring to have this tab in change mode), all other tabs in change mode disappear. (10/Tab01, 10/Tab10).

So to restore them as per our requirement, we need to repeat these Tabs with different values of Activity Cat. (H, V, Aas the case may be) .

 

In Detail:

  1. We want the Header Tab (10/Tab01) in all modes Create, Change, Display (IW21, IW22, IW23) modes. So we need to create this entry 3 times with values H, VandA.
  2. We want the Dates Tab (10/Tab07) in Change and Display (IW22, IW23) modes only, so we had this 2 times with values V and A
  3. Like-wise we want the Catalogs & Codes Tab (10/Tab10) also in Change and Display (IW22, IW23) modes only, so we had this 2 times with values V and A.
  4. Here note that all the sub tabs (20/Tab01,02,03,04) of Catalogs & Codes Tab, had also to be created 2 times with values V and A to match with their Parent tab (10/Tab10).

 

 

Now let's see the resulting screens:

 

Create Notification (IW21)

5.jpg

 

 

Change Notification (IW22)

6.jpg

 

 

Display Notification (IW23)
7.jpg

(We know that Catalogs & Codes tab would appear in Display i.e., IW23, only when it has some content in its inside tabs.)

Like-wise we can customize deeply in this area as per need.

 

The Author recently was replying in detail, about the topic discussed here in an SCN thread, and felt that  forum will be benefited if this is documented .

 

 

Thank you

KJogeswaraRao

Multi Structures BOM upload from one file

$
0
0

Background


In addition to the  IBIP tool for which was introduces    here

Here now an example how to upload BOM to SAP with multi structures like sub-items or/and long text using excel generating flat files , the following approach can be alternative to LSMW for this usage .


This solution provide excel spreadsheet generates flat files that can be uploaded to Standard Batch Input program for creating BOM with or without long texts ,This can save development of designated ABAP programs which writes data to a sequential file in the format required by the ABAP programs (RCSBI010 ,RCSBI040)



This spreadsheet support transactions :


  • IB01 for equipment BOMs


  • CS01 for material BOMs


  • IB11 for functional location BOMs


  • CS51 for standard BOMs


  • CV11 for document structures



How to do it  (see exemple video for CS01 transaction)


step 1 : Download the BOM tool here


Step 2 : Enables Macros in the Excel menu


Step 3 : Create  template using structures (BGR00,BICSK,BICSP..)  - choose just the relevant fields .


2015-04-17_100035.jpg

2015-04-17_100132.jpg

2015-04-17_100227.jpg


Step 4 : Fill the BOM header and items data and press Execute in the Excel ribbon button

2015-04-17_100307.jpg

2015-04-17_100343.jpg


Step 6 : Upload the flat file generated at step 3 to the application server with transaction CG3Z
              the target file name is : BOM CREATE , the source file is the flat file that was genarated in step 4.

2015-04-17_100508.jpg

Step 7 : Run Transaction OS41 , Fill Logical File name : CS_BI_BOM_CRATE


2015-04-17_100612.jpg


Step 8 : See the program log and check SAP  in transaction CS02




2015-04-17_100643.jpg

    lets check in transaction CS02 that the BOM was created correctly

2015-04-17_100710.jpg


Examples( see attached )


Exemple 1 : program RCSBI010 -  (Create BOMs using Batch Input) Standard Batch Input program for creating BOM (Bill of material)


Exemple 2 : program RCSBI040 -  (Create BOMs using Batch Input) Standard Batch Input program for creating BOM (Bill of material) with long text


Comments are welcome


Best Regards

Ziv.

User-Exits IEQM0001, IEQM0002: Additional checks in IH01 Structure

$
0
0

Introduction

Like useful Enhancements  belonging to various packages in the area of Plant Maintenance discussed so far , we have  Enhancements in Package IEQM also, out of which the first two namely, IEQM0001 and IEQM0002 controls the Equipment Structure (IH01) as per the customer need. Through these Enhancements we Qualifyan Equipment to be under a Functional Location (IEQM0001)  or under a Superior Equipment (IEQM0002). The logics to be written in the respective Includes (ZXEQMU03,  ZXEQMU01) are quite similar.

 

Objective

This document helps readers in knowing how to use these enhancements to maintain a Quality Asset Structure. As a demo, we will see here the use of IEQM0002 enhancement which defines the Qualification of an Equipment to be as Sub-Equipment to a particular Equipment in a hierarchy. The same will be applicable to implement enhancementIEQM0001also. The environment I have selected here is a Fleet Structure where the Earth Moving Equipments  (Dumper, Excavator etc) are mapped as Superior Equipment and the Tyres as Sub-Equipments. Hence, this document can be read in continuation with a previous document with the same Fleet Background namely, Measurement Reading Transfer – A useful functionality.

 

Let's understand how it is done.

We have so far seen where to write our logics in User-Exits. These basic were discussed in previous Documents like User Exit 'QQMA0014',  In a similar way we need to give the logic in the incluse related to our User-Exit. The include is ZXEQMU01.


There are 2 parts in implementing

1. List out your specifications required to qualify an equipment to be sub-equipment in a structure, like......

 

'If the type of a superior equipment and sub-equipment belong to Fleet, if Position for sub-equipment is vacant, then only system should allow the Sub-equipment to install under the Superior Equipment'.


Demo Situation

Consider  a Dumper which has 6 Wheels. We then coded the wheel positions of Dumper as

 

Wheel Position
Code
Front LeftFL
Front RightFR
Rear Left InsideRLI
Rear Left OutsideRLO
Rear Right InsideRRI
Rear Right OutsideRRO

 

(Similarly, an Excavator can have 4 Wheels coded as FL, FR, RL and RR)

 

See this demo structure.

ih01.JPG

Here a Dumper  D-153 is taken for Demo. This vehicle has 6 Tyres installed in the 6 wheel positions. And each Tyre has been specified the position where it is installed in its Masterdata like this.

1.JPG


Now suppose I have written the logic required to satisfy all my conditions in the include. Let's now see how this logic works.

 

1. First I have dismantled one Tyre having the position say RRO, and tried to put one AVLB Tyre under D-153  with position with some other value.

See What error I get,

vacant.JPG

 

2. Similarly without Dismantling any of the 6-Tyres, when I tried to install another wheel, I get this message.

more tan 6.JPG

 

3. Like-wise, when by mistake, I put a value in the Position field other than the 6 codes, i get this message.

validation.JPG

 

These are just few examples, for which the logic to be given in the include I have attached herewith. There will be several such possibilities you can configure with similar syntax, like for:

- Matching the Superior Equipment and Sub-Equipments Category (EQTYP)    and several such.

 

Important:

When we give a code in an enhancement, it applies to all types of Equipments. So we should start any such code by specifying condition such as 'If the Equipment is a Fleet Equipment' etc. Observe the first line in the code attached, this specifies the same and isolates the present code from other Equipment Categories.

 

Note:

In a similar way we can define the Functional Location and Equipment relation using the enhancement IEQM0001.  Also as I said above a document which connects to the present topic is Measurement Reading Transfer – A useful functionality

 

In the code attached EQART (Type of Technical Object) field-name is used to identify the vehicle (Dumper, Excavator etc). for this purpose we maintain these values in the Tyre Master data like:

2.JPG

 

So.....

this is another effort of Knowledge sharing in Enhancement area, the idea of which arose when the author recently seen a discussion regarding Fleet Structure.

Hope members would be benefited.

 

 

 

Thank you

Jogeswara Rao K

Automatic Tasklist transfer to PM Orders: User Exits IWO10020,21

$
0
0

Introduction


Subject matter is one of the FAQs where there has been a frequent and clear replies from forum to use the Enhancement, i.e., user-exit IWO10020 - Maintenance order: Automatically include task list. I was one among the members who received this reply but could not utilize because there existed no further info on 'How?' . The 'How to use this user-exit' has remained a big ? for me since then (quite long period). I know it is still an unresolved issue to many. Whenever I remembered about this issue, I searched forum vigorously but no where concrete solutions found. Due to this  I always avoided to reply to other members, advising to use this exit for automatic including of tasklist, becuase I was unaware of complete solution. I always tried to give the code to be used in user-exits during replies in discussions. Also I documented these solutions for ready reference.

 

The time for documenting the solution for the subject matter has finally arrived, because I recently found the key to use user-exit IWO10020 which automatically transfers Tasklist while creating Order through IW31.

 

 

So to start with, first let's see, what we achieve at the end of this document.

 

1. I prepared an Equipment Tasklist (IA01) like below for Equipment 53330333.

ia01.JPG


2. I run IW31 entered Order type and Equipment number

iw31.JPG

 

3. Pressed keyboard Enter button

iw31_1.JPG

 

What I found here in Create Order screen is the entire Equipment tasklist has been automatically copied to the Operations tab. Isn't this of a great convenience?


Similarly I created a Functional location tasklist (IA11) for a Functional location AEP-CCWE  as under.

ia11.JPG

 

then I run IW31.

iw31_2.JPG


and I see all the operations of the F/L tasklist are copied to my Order.

iw31_fl.JPG


Note:

In both cases you notice that the Tasklist Short text became the Order Short text.

 

I am sure members would agree that this feature has got a great significance in creating PM Orders due to the convenience of having automatic operations. I need not specially mention that the Components details of the tasklist will also be transferred to Order alongwith the operations.

 

So now let's see how to do it?

 

We already talked about the user-exit which is responsible for this. It is IWO10020.  But the thing is this has been an half information.  The other half of the info in this regard is we need to use another user-exit namely IWO20001 - User exit to pass routing to order alongwith the above to achieve this result.

 

Having revealed this, it is now simple task for me to tell the readers about further-how by simply giving the codes to be written in these user-exits.

 

Code to be put in the include ZXWO1U06 (user-exit IWO10020)


IF CAUFVD_IMP-AUART = 'ZM03'.   PERFORM FCODE_PLSU(SAPLCOIH).  "This form calls User Exit IWO20001
 ENDIF.


The 01. and 03. lines above restrict the use of this feature to Order type 'ZM03'. (Means Automatic tasklist feature  applicable to this Order type only)



Code to be put in the include ZXWOCU03 (user-exit IWO20001)


 TYPES: BEGIN OF TY_SELTAB,       LV_PLNTY TYPE EAPL-PLNTY,       LV_PLNNR TYPE EAPL-PLNNR,       LV_PLNAL TYPE EAPL-PLNAL,   END OF TY_SELTAB.
 DATA: IT_SELTAB TYPE TABLE OF TY_SELTAB,       WA_SELTAB LIKE LINE OF IT_SELTAB.
 IF CAUFVD_IMP-EQUNR IS NOT INITIAL.   SELECT PLNTY PLNNR PLNAL FROM EAPL INTO TABLE IT_SELTAB WHERE EQUNR = CAUFVD_IMP-EQUNR.
 ELSEIF CAUFVD_IMP-EQUNR IS INITIAL AND CAUFVD_IMP-TPLNR IS NOT INITIAL.   SELECT PLNTY PLNNR PLNAL FROM TAPL INTO TABLE IT_SELTAB WHERE TPLNR = CAUFVD_IMP-TPLNR.
 ELSE.
 ENDIF.  SEL_TAB[] = IT_SELTAB[].

 

The job is done.

 

 

And... that was about Automatic Tasklist while creating Order directly. Let's now look into another user-exit namely IWO10021 - Automatic task list transfer when creating order from notif. As the name indicates, this is the enhancement which is supposed to give us above convenience while creating Order from a Notification. Let's see what to do to have this.

 

Put this code in the include ZXWO1U07 (user-exit IWO10021)


IF CAUFVD_IMP-AUART = 'ZM03'.   TYPES: BEGIN OF TY_SELTAB,         LV_PLNTY TYPE EAPL-PLNTY,         LV_PLNNR TYPE EAPL-PLNNR,         LV_PLNAL TYPE EAPL-PLNAL,     END OF TY_SELTAB.   DATA: IT_SELTAB TYPE TABLE OF TY_SELTAB,         WA_SELTAB LIKE LINE OF IT_SELTAB.   IF CAUFVD_IMP-EQUNR IS NOT INITIAL.     SELECT PLNTY PLNNR PLNAL FROM EAPL INTO TABLE IT_SELTAB WHERE EQUNR = CAUFVD_IMP-EQUNR.   ELSEIF CAUFVD_IMP-EQUNR IS INITIAL AND CAUFVD_IMP-TPLNR IS NOT INITIAL.     SELECT PLNTY PLNNR PLNAL FROM TAPL INTO TABLE IT_SELTAB WHERE TPLNR = CAUFVD_IMP-TPLNR.   ELSE.   ENDIF.   SEL_TAB[] = IT_SELTAB[].  ENDIF.

 

After this, when you create an Order of type ZM03, from the Create Order icon of a Notification     the Equipment tasklist OR the Functional location tasklist will be copied to operations tab automatically.

 

 

To be Remembered.

1. Configuration settings

Path: Maintenance and Service Orders > Functions ans Settings for Order Types > Default values for Tasklist Data and Profile Assignments

spro2.JPG

 

The above setting suppresses the tasklist pop-ups and copies entrie tasklist to the Order. (Ideal for this application). Due to some reason if some wants the tasklist operation pop-up before copying, then Tick  the 1st checkbox i.e., OprSelection.



2. Order personal Default values  settings


Inside Order: Extras > Settings > Default values...

Here in Control tab have this setting

 

It is observed that Operation selection pop-up can be triggered from the above setting (by tick marking the Operation select.) without going for SPRO settings as explained earlier in Point1.

 

3. Use of General Maintenance Tasklists

You can use GM Taklists also in this process, but you need to develop logic to relate a tasklist to some field value of the Equipment or F/Locn master. This logic will be replacing the code I provided in the includes ZXWOCU03andZXWO1U07.


4. Enhancements to be listed in a Project

This is a reminder point for use of any user-exit, that it is a pre-condition that the above discussed user-exits are required to be assigned to a project created through CMOD.

 

That's all friends on this topic. Hope this information will be useful to many. I document knowledge mainly for one purpose. That is to prevent losing important knowledge pieces due to memory erosion.

 

 

Thank you

KJogeswaraRao

Viewing all 842 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>