Monday, February 22, 2010

How to Create a Infotype

In general we use T-code PM01 to create Personnel administration infotypes and PPCI to create OM info types.

let us start with a simple example.

If suppose Your company has decided to create a new dress code policy. This policy will be strictly enforced, so your company needs to ensure that everyone has read the new guidelines. Printing the new policy and mailing this out to the employees in order to receive a signed signature back from them is far too costly and cumbersome. A decision has been made to create a custom infotype. You have been tasked with creating the new infotype.

Steps to Creating a Custom Personnel Administration Infotype.

1. Go to transaction PM01 - Create Infotype.
There are six tabs on the transaction PM01’s screen. These are:
· Create Infotype
· Copy Infotype
· Enhance Infotype
· Enhance List Screen
· Delete Infotype
· Action Menu


2. Make certain you are on the create infotype tab.
3. To begin, you need to choose an infotype number from the customer name range. For our example, we will use the infotype number 9990.
4. Ensure that you have the radio button for Employee Data selected.

Note:- here we have three radio buttons available 1.Employee data 2.Applicant data 3.B0th. if we go with employee data then this info type is only ment for employee and table PA9990 will be created, if it is applicant data then this info type is for only applicant and table PB9990 will be created if it is both it is for bothPA9990 and PB9990 will be created
5. Start the create infotype process by defining the components of the infotype. Make sure the radio button for the PS Structure is selected.
6. Select the Create All button to have the system create the module pool (the program with the code to process the infotype), the interface screen, the customizing table entries, and the data dictionary objects for your infotype automatically. (NOTE: the sequence of these steps follows a slightly different path than in the standard SAP Help files)
Data Dictionary Entries
7. You will receive a notice stating that the PS9990 Data Dictionary Object does not exist and you will be asked if you wish to continue. Select yes.
8. R/3 will branch you to the data dictionary.Define the PS9990 structure. A structure consists of a list of components and component types. The component is referred to in screens and programs. The component type determines the attributes of the component, such as whether it is a numeric or character field and the length of the field. Type in the name DRESS_CODE_POL for the component and XFELD as the component type. The short text name should be “Dress code policy” for the PS9990 structure.

9. Define the PS9990 structure. A structure consists of a list of components and component types. The component is referred to in screens and programs. The component type determines the attributes of the component, such as whether it is a numeric or character field and the length of the field. Type in the name DRESS_CODE_POL for the component and XFELD as the component type. The short text name should be “Dress code policy” for the PS9990 structure.

10. Now save and activate the new PS9990 structure. Since you used the PM01 transaction instead of going directly to the data dictionary to create the PS9990 structure, the system builds the top level structure P9990, including both PSHDR and PS9990, for you. The database table PA9990 is automatically built using the definition of P9990.

Infotype Customizing Settings.

11. Carefully hit the green back arrow once (and only once). You will automatically be taken to a view of table T582A – Infotype attributes (Customizing). Here you will give your infotype characteristics that control the way the infotype is processed. If you need to access the customizing table later, you may go to transaction SM30, enter the view name V_T852A, and maintain the customizing settings there.

a. Select “New Entries”.
b. Enter your infotype number 9990 and the Short Text Name “Dress Code Policy”.
c. Make the Time Constraint a 2 since the employee is not required to have this infotype maintained, but if they do maintain this, they can only have one valid record at any given time. (See Time Constraint inset for an explanation of Time Constraints)
d. You will not have subtypes for the infotype, so you may leave the fields relevant to subtypes blank.
e. Check the Access Auth checkbox, which indicates to use the current date for authorization checks.
f. Check the Text checkbox, which allows text to be maintained on the infotype via the transaction PA30 – Maintain Text functionality, via transaction PA30 with the menu path – EDIT>Maintain Text.
g. Place a 3 in the Select with Start field, which indicates if a date is entered in PA30 in the “Period” section, records valid on the date specified are displayed.
h. Enter a 5 into the Select w/end field, which means that the records valid any time within the entered period are displayed.
i. For Select w/o date field, enter a 2, which means records valid for the system date are displayed when no dates have been entered in PA30.
j. The Create w/o start field should be a 3. This field controls what defaults into the start data field during a create process. A 3 indicates the system CPU date will be used.
k. Create w/o end should be a 1. This field controls what defaults into the end date field during a create. A 1 indicates 12/31/9999 will be used.
l. For Screen Header, you should enter the standard screen header 01. This determines the header style displayed on the infotype screen.
m. Do not enter anything into the Retroactive Accounting Trigger section as this infotype would not trigger any retroactivity functionality for payroll or time.
n. In the Technical Data section, place screen number 2000 in for the Single Screen field’s value and a List Screen value of 3000. These are the standard screens numbers that will be generated by PM01.
o. The Dialog Module will be RP_9990. The Structure will be P9990 and the Database table will be PA9990.

*Please note if you are uncertain as to what the field values mean, simply place your cursor into an R/3 field and hit your F1 key for help or F4 for possible field entry values. You can also accomplish the same result by clicking the right mouse button and selecting help or possible entries.

Screen Painter
12. You should now be on transaction PM01 – Create Infotype.
13. Select the Screen radio button and type in 2000 for the screen number.
14. Hit the Edit button.
15. Now you will be taken to the Screen Painter: Initial Screen. PM01 builds a screen based on the fields in the infotype, but you will then refine the screen manually.
16. Select Layout Editor for the MP999000 Screen 2000 and then edit.

17. You will need to remove the Checkbox field/attribute from your screen as it was inserted in the screen just as regular field, and then draw your own checkbox. To do the delete, highlight the word Checkbox (text field) the input field and push the delete button. Select the checkbox Icon to draw a new box (if you do not have the graphical editor turned on, simply select the following path: Edit -> Create Element -> Checkbox.) Enter in the name of the checkbox field, which is P9990-DRESS_CODE_POL. Enter “I agree to the dress code policy” as the text for the checkbox. Double click on the field to access its attributes and make certain that “From dict.” Is checked and your group1 number is 006.

18. Now test your screen by clicking on the Test icon or menu path Screen>Test.
19. If you are happy with your screen, save the screen and activate it.
20.Green arrow back to the PM01 Transaction Screen
Program
21. PM01 uses P9990 to automatically generate MP999000, the module pool program for the infotype. For this example you will not need to change the module pool program to add edits or special processing.
22. You will not need to change the menu or toolbar. We will use the SAP standard menu and toolbar from transaction PA30 – Maintain Master Data.
Testing
23. Go to transaction PA30 – Maintain Master Data.
24. Enter a personnel number of an employee and then type in the infotype 9990 into the direct selection of an infotype field.Hit the create icon (upper left hand corner of the Maintain Master Data screen.)

No comments:

Post a Comment