Professional Documents
Culture Documents
Custom Infotype Creation - Tips and Tricks With Radio Buttons and Check Boxes
Custom Infotype Creation - Tips and Tricks With Radio Buttons and Check Boxes
Custom Infotype Creation - Tips and Tricks With Radio Buttons and Check Boxes
Applies to:
SAP HR ECC 5.0 onwards
Summary
This tutorial explains – how to create a custom infotype and how to put graphical input entries like check
boxes and radio buttons in an infotype. Normally when you create an infotype with graphical entries like
check boxes and radio buttons, it lets you create them but when you open the infotype in PA30, those
graphical fields become grayed or inactive permanently. This tutorial explains how to make these fields
functional. It also explains a bit about how you can make certain text fields active or inactive depending upon
checkbox or radio button clicks.
Author Bio
Ribhu Ahuja is currently working as a SAP HR ABAP consultant for TCS since last year.
© 2007 SAP AG 1
Custom Infotype Creation – Tips and Tricks with Radio Buttons and Check Boxes
Table of Contents
Custom Infotype creation, tips and tricks......................................................................................... 3
Adding a new field to the infotype: ............................................................................................. 11
Changing the look and feel of the infotype:................................................................................ 14
Related Content............................................................................................................................. 20
Disclaimer and Liability Notice....................................................................................................... 21
© 2007 SAP AG 2
Custom Infotype Creation – Tips and Tricks with Radio Buttons and Check Boxes
© 2007 SAP AG 3
Custom Infotype Creation – Tips and Tricks with Radio Buttons and Check Boxes
In the above figure, I have put 3 fields as types – char 1. I will convert these fields, check boxes or radio
buttons later. It is to be noted that you have to put all the fields which you want to make input enabled in the
PS structure. It will be explained in detail at a later stage. Now we have to give the enhancement type of the
PS Structure.
© 2007 SAP AG 4
Custom Infotype Creation – Tips and Tricks with Radio Buttons and Check Boxes
© 2007 SAP AG 5
Custom Infotype Creation – Tips and Tricks with Radio Buttons and Check Boxes
• Click on ‘New Entries’ Button. You see the ‘Details of added entries’ Screen.
• Enter your Infotype number and short text.
• Here we have to set different Infotype Characteristics as per the requirement. (Better open another
session with some standard Infotype’s infotype characteristics screen and use as the reference to fill
yours).
© 2007 SAP AG 6
Custom Infotype Creation – Tips and Tricks with Radio Buttons and Check Boxes
• Save your entries. Click on the back button to go to the initial screen of PM01.
• Click on ‘Technical Attributes’. Infotype list screen appears.
• Click on ‘Change’ (pencil) button. It gives you a warning. Click on the green tick mark.
• Click on ‘Position’ button and browse to your infotype. In our case it would be 9005.
© 2007 SAP AG 7
Custom Infotype Creation – Tips and Tricks with Radio Buttons and Check Boxes
© 2007 SAP AG 8
Custom Infotype Creation – Tips and Tricks with Radio Buttons and Check Boxes
• Give your subtype field as subtype field if you want to keep subtypes in this infotype.
• Save and come back to PM01 initial screen.
• Now the Infotype is created and ready to use and is in its basic form.
To see how infotype looks in its basic form, go to PA30, enter a personal number and give infotype
number as 9005.
© 2007 SAP AG 9
Custom Infotype Creation – Tips and Tricks with Radio Buttons and Check Boxes
Click on the - create button. Notice how the infotype looks in its basic form. Notice that the fields
contain the description text from the PS Structure’s short description.
Now, you would be adding a new field to the infotype and also changing the look and feel of the infotype.
© 2007 SAP AG 10
Custom Infotype Creation – Tips and Tricks with Radio Buttons and Check Boxes
Go to PM01 and give the infotype number as 9005. Choose the PS Structure radio button. Now add a new
field – say employer as shown.
Check and activate the structure again. When you activate the PS structure, it will give you some warnings:
© 2007 SAP AG 11
Custom Infotype Creation – Tips and Tricks with Radio Buttons and Check Boxes
The warnings state that we have to define the enhancement categories of P9005 and PA9005. The infotype
generally contains 2 structures and 1 database table. The structures for our infotype are PS9005 and P9005.
PS structure is for the account of creating input fields in the dialogue program of infotype and P structure –
P9005 contains entries in infotype at runtime. This P structure is created by the system itself while
generating the objects of an infotype. The database table for our infotype is PA table – PA9005. This table
contains all the ‘time stamped’ entries of the infotype. When you save the infotype entry, it gets stored in the
PA table. This table is also created by the system itself while generating the objects of an infotype. The
enhancement categories of the P structure and PA table are to be given.
Open transaction SE11 in a separate window. Open the structure P9005 in the change mode and click on
Extras Æ Enhancement category. Choose ‘Can be enhanced’ (character type or numeric) and click on copy
(green tick mark).Check and activate the structure. Now, in the same way, give the enhancement category of
the table – PA9005. Choose ‘Can be enhanced’ (character type or numeric) and click on copy (green tick
mark). Notice that the system allows you to open the structure P9005 and table PA9005 in the change mode.
It is the case since it is the custom infotype. Now again activate the PS structure. This time, it will not give
any warnings. Now click on back. On the PM01 screen, the system gives a warning:
© 2007 SAP AG 12
Custom Infotype Creation – Tips and Tricks with Radio Buttons and Check Boxes
Since you added a new field, or there was a structure change for PS9005, you have to generate the objects
again. Click on the button. It will give you some 5-6 warnings. Click on green
tick mark on every warning. The system then populates the following screen.
Click on Yes for this one and few more messages that appear thereafter. Now the infotype is ready with the
added field which can be checked in PA30.
© 2007 SAP AG 13
Custom Infotype Creation – Tips and Tricks with Radio Buttons and Check Boxes
Now you want to make the third field – ‘Educated or not’ a check box and ‘male’ n ‘female’ fields as radio
buttons so that only one of these can be selected. You just can’t go in the module pool and create a new
radio button or check box on the screen. If you do so, and activate the program, the check box or radio
button will be inactive or grayed in PA30. Hence you have to ‘convert’ a particular single character field into
the radio button or check box.
Go to PM01 and give 9005 as the infotype number. Choose the ‘Screen’ radio button and click on
button. It takes you to the module pool dialogue screen 2000 of infotype 9005.
© 2007 SAP AG 14
Custom Infotype Creation – Tips and Tricks with Radio Buttons and Check Boxes
Click on the change button. Now you are in the flow logic of the program. Click on button. It
takes you to the screen layout of the infotype.
Change the text description of the fields you want to change and delete the text fields for the entries for
which you want to make a check box or radio button as shown.
© 2007 SAP AG 15
Custom Infotype Creation – Tips and Tricks with Radio Buttons and Check Boxes
Now right click on the first field (educated?) of the three which you can convert to a checkbox, and choose
convert Æ checkbox Æ left button.
This would convert the input field to the check box. Now double click on the check box and give the Text
description as ‘Educated?’.
© 2007 SAP AG 16
Custom Infotype Creation – Tips and Tricks with Radio Buttons and Check Boxes
Don’t forget to give a Function Code to this check box if you want to perform any action when user clicks this
check box e.g. disabling a particular field when the check box is unchecked and enabling the same if the
check box is checked. You can write the code for the same in the pbo module.
Now you will convert the second and third fields to radio buttons. Here too, give the FctCode if you want to
perform any action when user clicks the radio button. In case of radio buttons, FctCode is necessary. If you
don’t do so, and activate the screen, you will see both the radio buttons selected in PA30, infotype 9005 and
will not be able to deselect any one of them.
After both the input boxes are converted to radio buttons, give their text description by double clicking each
of them.
© 2007 SAP AG 17
Custom Infotype Creation – Tips and Tricks with Radio Buttons and Check Boxes
Now, define the radio button group of both the radio buttons by dragging a boundary around both the radio
buttons – left click any where on the screen and drag the mouse so both the radio buttons are in the in that
box. Now right click and choose Radio Button Group Æ Define.
Save and activate the screen and the entire program. Your infotype is now ready with check box and radio
button fields. Check the same in PA30.
© 2007 SAP AG 18
Custom Infotype Creation – Tips and Tricks with Radio Buttons and Check Boxes
© 2007 SAP AG 19
Custom Infotype Creation – Tips and Tricks with Radio Buttons and Check Boxes
Related Content
www.sap-img.com
www.erpgenie.com
www.sdn.sap.com
© 2007 SAP AG 20
Custom Infotype Creation – Tips and Tricks with Radio Buttons and Check Boxes
© 2007 SAP AG 21