Skip to Content

Introduction:

Requirement to have Additional User-Fields in various Tabs of Equipment, Functional Location or Fleet Masters is very common. Though there is a hassle-free way of having the Z-fields through Class and Characteristic way, it has got its own limitations like unable to become a part of Standard reports.

In this article, the User-Exit way of having these custom fields has been elaborated.  Enhancement ITOB0001 has been demonstrated here. The process will be same for ITOB0003 (Fleet Master).

While trying to achieve this by joining the information pieces available in the forum and outside, the author spent sufficient time to achieve all requirements related to this.

Objective:

At the end of this article we will be able to:

  1. Create our own fields in the Equipment, Functional Location or Fleet Masters
  2. Input values and save these values to the related Database Tables
  3. Edit these values through Tcodes IE02, IL02.
  4. Will have these fields in standard reports like IH08, IH06, IE37.

Here we go (ABAP Workbench)

Step 1 (Preparation of EQUI Table)

Let’s suppose we are intending to have 40char long  field, named PO Number into the Equipment Master.

1st step is to create this Z-field into the include table of EQUI table.

For this run Tcode SE11, Give value CI_EQUI and Go to Change mode. Add a Z-field  in this table say ZZITO_PONO

with component type TXT40 (for 40char long field). Activate table.

ci_equi.JPG

Note:

Here I want to share a vital information with the readers. i.e., as long as I tried this task with field names like ZZPONO etc, it never worked. And there consumed lot of time.  Then at some place I read about the SAP note 594757, which states that without a prefix ZZITO_  to the Custom fields, this task would not be successful.

Next,  we need to add this field ZZITO_PONO, also to the include table CI_EQUI _U  with component type IIND (Char1). Do it in the same way as above (through SE11). Activate table.

CI_EQUI__U.JPG

With this we completed adding our Z-field to the database table EQUI  (through its include tables)

Step 2 (Enhancement – Create Sub-Screen)

Create a project ZPMEQUIP through Tcode CMOD and assign the Enhancement ITOB0001.

cmod.JPG

Now Run Tcode SMOD with value ITOB0001 and click on Test button.

SMOD.JPG

See here, we have 2 Function-exits and 5 Screen exits. Let’s select the first Screen, namely 1000 .  Double click on this and Create a Sub-Screen through the steps there on.

screen layout.jpg

Now Click on Layout Arrow above to go to Screen Painter and Create your Fields here. In our case we are creating One field.

Layout.JPG

As shown in the picture , drag the ‘T’ icon to the screen are to create a Text field and name tis field as ‘PO Number’.

Similarly drag the icon below to create an Input/Output field and Give the Dictionary address to the Input field i.e., EQUI-ZZITO_PONO .

(I hope you recall that this is the field we have created in EQUI table in the step1)

Step3 ( Enhancement – Give Codes in Function Exits)

We  have 2 function Exits, namely

EXIT_SAPLITO0_001

EXIT_SAPLITO0_002

The first Exit imports the Z-field values from the EQUI table to the Equipment Master

The second one exports Z-field values from the Equipment Master to the EQUI table.

Now the codes to be written in the Exits. 


Write following code in the include (ZXTOBU01) of function-exit EXIT_SAPLITO0_001.


TABLES: EQUI.
E_SUBSCREEN_NUMBER =
‘1000’.
I_OBJECT_TYPE =
’02’ .
I_ACTIVITY_TYPE =
‘3’ .

EQUI-ZZITO_PONO = I_DATA_EQUI-ZZITO_PONO.

Write following code in the include (ZXTOBU02) of function-exit EXIT_SAPLITO0_002


E_UPDATE_DATA_EQ-ZZITO_PONO = EQUI-ZZITO_PONO.
E_UPDATE_FLAGS_EQ-ZZITO_PONO =
‘X’.

Step 4 (SPRO  Preparation)

  • Navigate to this section of SPRO.

spro1.JPG

  • Select Screen Group (Equipment) on the right (Profile Standard) and D’Click on the Activity and layout of views on the Right.

spro2.JPG

  • Give value 150 in the line of desired Tab page of Equipment Master.

spro3.JPG

  • Assign this profile (in this case Standard) to the intended Equipment Category, through this setting.

spro4.JPG

After this SPRO setting, you will be able to see your Z-Field at the bottom of the Organization Tab page  of that particular Equipment Category. Verify by running IE02 / IE03 transactions.

ie02.JPG

Try by inputting a value, Save and rerun IE02 and verify your value is stored or not.

In fact, the part of Step3 above ( coding in the Exits ) did not work as long as I did not come across the above referred SAP note. After using the prefix ZZITO_ to the Z-field these codes started working. values inserting.

Almost done

Now if you go to IE03, unlike all other greyed-out fields, your Z-field will be seen Editable. Though there is no provision to save the edits here, you’d definitely like to have this too in Greyed-out mode.

For this we need to write a small code in the PBO (Process Before Output) module of the screen 1000 we have created.

Double click on the Screen number 1000 of the enhancement, (you are in the Flow Logic Tab) ,

Capture.JPG

D’Click on the STATUS_1000 of the PBO module. and insert this code between the MODULE, END MODULE lines like this


MODULE STATUS_1000 OUTPUT.
IF SY-TCODE = ‘IE03’.
LOOP AT SCREEN.
SCREEN-INPUT = ‘0’
.
MODIFY
SCREEN.
ENDLOOP.
ENDIF.

ENDMODULE. 

Related discussion:

Configure field selection for equipment user-fields

Lastly Do not Forget to

Activate the Function Group  XTOB  from  Tcode SE80.  Right click on the Function Group and click on the Activate option

/wp-content/uploads/2014/04/se80_439574.jpg

Now the Last Step.

Step 5 (Have this Z-field in the Standard Report , in this case IE05, IH08)

To have our Z-field in IH08 output, first we need to know the structure of this report output.

For this click on any cell in the ALV screen and press F1 key.

f1help.JPG

Here click on the Technical Information icon. The resulting pop-up will show you the Structure against field name Table. Here the Structure is RIHEQUI_LIST .

Now through SE11 go to the above Structure, Click on an Append Structure on the Application toolbar and Create an Append structure having this field. Activate table.

rihequi_list.JPG

Now Run IH08 and see in the output list in the Column Set (the list not displayed). You should find this field PO Number.

Often you do not find this. It is time to clear ALV buffer through program BALVBUFDEL.

For this run Tcode SE38 give the above program and hit Execute.

Now run IH08 again and verify, your field is there.

Note:

This work is with a larger objective in mind to avoid re-inventing the wheel after sometime and at the same time providing the Total Solution about this task at one place.  This work involves Appending structures and Activation of Tables, which should be done by experienced ABPAers only.

Also this work can be extended to Functional Location Masters with the same enhancement used above and to the Fleet Masters with enhancement ITOB0003.

..and I feel it is important to mention the version I experienced all these and documented, it is ECC6.0 no EHPs.

Hope members find this useful.

Thank you

Jogeswara Rao K

To report this post you need to login first.

58 Comments

You must be Logged on to comment or reply to a post.

  1. Serge Deslandes

    Hi Jogeswara,

    Very good work. I have a question, is it possible to add this process, in the header BOM ? With the exit PCSD0003 and STKO table, add a screen and put it, in a BOM profile, as for equipement? or it’s only  possible to have  the tab customer  “Customer Field” ( Sorry i don’t have access customizing for this moment, the reason to this question)

    thanks

    serge

    (0) 
    1. K Jogeswara Rao Post author

      Hi Serge,

      See this picture. Long-ago I’d created these customer fields in BOM Header tab page.

      Capture.JPG

      I did not remember whether I did any configuration settings here. Some do not need configuration settings like the Exit IWO10018 does not need any such. Rest of the procedure same. you can try and see. You need to include the fields in CI_STKO include table or create an Append Structure in STKO table.

       

       

      Jogeswara Rao K

      (0) 
      1. Serge Deslandes

        Tkanks for your reply.

        I already did.  If i find a way, with the custo, to add this tab, directly in tab header, i’ll say you

        I’m afraid not possible.

        serge

        (0) 
  2. Gary Bracegirdle

    Nice and simple step by step process for us non-ABAPer’s to undestand the technical side as well as the functional side.

     

    Keep up the good work!!

     

    Gary B

    (0) 
  3. Andre Afonso

    Hi, how can i change the tab name like in your print, “Zfield”, and is it possible to change the area name “User Data” to “Zdata” for example?

    (0) 
    1. K Jogeswara Rao Post author

      Changing the Tab Name:

      Config setting in the ‘Icons and texts of views’.

      Z-fields.JPG


      Changing the Sub-screen Area Name

      User data is system given and can not be changed. Yet if you want to have custom heading to the Subscreen Area, you can insert the present fields into a BOX and give it a name. Then this looks like given in the picture.

       

      Both the above have been shown in the picture here.

      Capture.JPG

       

      Hope this answers your query.

      (0) 
  4. Sweta Pal

    Thanks Jogeswara,

     

    But in Maintenance Contract i want to see List of equipment. here you given solution for include PO in equipment. this will not give pop up for information window like warranty give. user want at the time of notification creation information should come like equipment is under warranty.

    (0) 
    1. K Jogeswara Rao Post author

      PO number is only an illustration for Z field. It is not Production Order nor Purchase Order. To make it like such Order, your ABAPer needs to explore in deep the PAI and PBO parts of the screen exit, and write long codes there.

      This document describes the methods to have extra fields. These extra fields can be different for different members. Depending upon what field you want and how you want to use it, the logic develops which will be put in the PAI and PBO.

      (0) 
  5. Mohammed Iqbal

    Hi Joeswara Roa,

    Very Nice docment again…i was trying it myself and got stuck in step 2 how do i assign the enhancement

    Create a project ZPMEQUIP through Tcode CMOD and assign the Enhancement ITOB0001.

    When saving it is asking me to mention the Package .

    Whether you mean package is same is as Enhancement .


    Regards

    Zafar

    (0) 
    1. K Jogeswara Rao Post author

      No, You should have created a package for this (SE21). For example my package is ZPM. Or Create it as Local object. (Package $TMP)

      (0) 
  6. Mohammed Iqbal

    Hi ,

    Sory got stuck again at step 2.

    is there a additional step to create sub screen as mentioned “See here, we have 2 Function-exits and 5 Screen exits. Let’s select the first Screen, namely 1000 .  Double click on this and Create a Sub-Screen through the steps there on.”

    because while clciking on scen painter the T icon is not getting dragged.

    (0) 
  7. Hemalatha Chandrasekar

    Hi Jogeswar,

     

         The above document was very helpful. Can you please let me know the SPRO settings for Functional location ? Since i have to create a new custom tab for Functional location.

     

    Thanks,

    Hema

    (0) 
  8. yewhong chan

    From the above explanation, the custom field is added into standard alv report. Is there any way to include the field in selection-option for the standard report as well ?

    (0) 
  9. Fiorenzo Di Marco

    hello Jogeswara ,

    thanks for your work

    if you can help me, I have a problem,  you say:

    For this run Tcode SE11, Give value CI_EQUI and Go to Change mode.

    I do not have CI_EQUI in SE11!

    where am I wrong?

    I am in ECC6

    thanks for your cooperation.

    (0) 
    1. K Jogeswara Rao Post author

      Try by selecting the Data type radio button, as shown hereCapture.JPG

       

      OR

      Go to  EQUI table display

       

       

      and here Double click on CI_EQUI include

      Capture1.JPG

       

       

      KJogeswaraRao

      (0) 
    1. K Jogeswara Rao Post author

      Whether it is Typo, It is not L after C, it is I (eye).
      Try by going through EQUI table and locate CI_EQUI include as shown in picture. You should have it. If you do not have, discuss with BASIS.

      (0) 
  10. Kiran Kerudi

    Hi Jogeswara Rao,

     

    Can you please help me on how to carry out the same operation on IL01 ? I was not able to save the value of these two fields.

     

    I already have two Z-Fields added.. below is the screenshot.

    D1.JPG

    Thanks & Regards,

    Kiran

    (0) 
    1. K Jogeswara Rao Post author

      You should follow what was written in the document carefully and apply it to your requirement. Otherwise it will be come a tutorial of countless posts. Clearly you did not follow

      • The step where CI_EQUI was used for adding Z fields (You should have used CI_IFLOT in your case).
      • The step where it was told to use ZZITO_ as prefix to you Z-fields.

       

      So there is lot of scope for you in the document, to correct yourself and reach to  intended results.

      (0) 

Comments are closed.