ITOB0001, ITOB0003 : User-Fields in Equipment, Functional Location, Fleet Masters
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:
- Create our own fields in the Equipment, Functional Location or Fleet Masters
- Input values and save these values to the related Database Tables
- Edit these values through Tcodes IE02, IL02.
- 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.
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.
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.
Now Run Tcode SMOD with value ITOB0001 and click on Test button.
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.
Now Click on Layout Arrow above to go to Screen Painter and Create your Fields here. In our case we are creating One field.
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.
- Select Screen Group (Equipment) on the right (Profile Standard) and D’Click on the Activity and layout of views on the Right.
- Give value 150 in the line of desired Tab page of Equipment Master.
- Assign this profile (in this case Standard) to the intended Equipment Category, through this setting.
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.
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) ,
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
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.
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.
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
Hi Jog,
Thanks for your effort. we will see some more blogs from you.
Regards,
Gurunath Kumar D
Hi Gurunath,
Sure.
Thanks you
Hi Jogeswara ,
Thank you for sharing this IMP Doc it's really helpful.
Hi Ronak,
Glad this document is helpful to you.
Jogeswara Rao K
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
Hi Serge,
See this picture. Long-ago I'd created these customer fields in BOM Header tab page.
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
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
I too feel !
Thank you Serge for talking to me.
Jogeswara Rao K
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
Thanks again Gary
Jogeswara Rao K
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?
Changing the Tab Name:
Config setting in the 'Icons and texts of views'.
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.
Hope this answers your query.
Yes it answered my question, thank you very much.
Hi...
very good effort... With your instructions..i managed to add fields in EQUZ (time-dependent fields)...Thanks
Hi Panagiotis,
Such feedbacks give real satisfaction.
Thank you & Regards
Jogeswara Rao K
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.
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.
Hi,
Thanks for sharing, the subject matter knowledge. Brilliant work.
Regards,
Muhammad
Thank you Muhammad Ali Asim for the review and encouraging words
Dear Rao,
Please share if you have any material related to Cross-Application Time Sheet (CATS).
Regards
M A
Soryy Muhammed, I do not have any. In fact I haven't any exposure.
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
No, You should have created a package for this (SE21). For example my package is ZPM. Or Create it as Local object. (Package $TMP)
Thanks it worked now
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.
These simple and hand-holding things are either self-learning or taught by a person around.
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
Hello Hemalatha,
Best of luck
KJogeswaraRao
It worked ...Thank you very much.
Regards,
Hema
Dear Jogeswara,
Very helpful for beginners. Keep up the good work.
BR
Varun
Thank you very much Varun
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 ?
Hello Jogeswara, thank you very much for this helpful and instructve work!
Martin
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.
Try by selecting the Data type radio button, as shown here
OR
Go to EQUI table display
KJogeswaraRao
Thank you very much !
CI_EQUI structure does not exist, create?
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.
Yes
I passed through EQUI (ok i and not L)
look:
double click I get this:
now ? YES or NO ? 🙂 Tnk
Yes Create now
Thanks, I had some doubts ..
Hello, sorry to bother you, but following the instructions, I get a DUMP when I try to view an equipment.
where am I doing wrong?
Thanks again for the great information.
Thank you Jeff !
Great Information shared, very useful.... Thanks again...
-Vishal
Thank you Vishal
Dear Sir,
Once again Thanks a lot for sharing the documents.Hats off and kudos to you.
Regards.
Swapnil
Thank you Swapnil,
Some documentation already available in this area which can be extended to the areas mentioned by you. User Status in SAP
Beyond this, let me see how can I contribute more on this topic.
Regards
KJogeswaraRao
Thanks Jogeshwara Rao,
Great information, very helpful.
Regards,
Shivaji K
Thank you Shivaji !
Thanks a lot Jogeswara Rao K, very useful document. Exactly what I need at this time, a kind of "save my skin" document.
Regards.
Carlos Araujo
Very happy
to know this Carlos !
KJogeswaraRao
Thanks Jogeshwara Rao,
Really nice information. I have already done it but I was stuck in linking it to standard reports. This document solved it...
Very Glad to learn this Prashant ! Thank you for communicating. It is heartening to know that some work of mine helped a member.
KJogeswaraRao
Simply super
Thank you Prasad
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.
Thanks & Regards,
Kiran
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
So there is lot of scope for you in the document, to correct yourself and reach to intended results.