2007 Jul 09 6:49 AM
hi experts,
sorry i m going to ask a typical question i m working on hr-abap ,i have developed a module pool in which the database table is updating with some data,what i want that after updation i want to store that data in a infotype,,so plz tell me how to create infotype and how to store the data into it from a database table...thnx in advance.i know it is a configuration part but rt nw my company doesnt have hr consultant.....plz help me.
2007 Jul 09 6:55 AM
Hi
<b>Creating an Infotype</b>
Using the TCODE PM01 you can create an Infotype. As per SAP standard you can use only 9000 series. The below procedure explains you how to create an Infotype.
1.Go the transaction PM01 and give the Infotype Number lets say 9999 and press button. It will ask you a messaging window,
2.Press create button to continue further. It will take you to create the structure.
3.Give the components and SAVE & ACTIVATE the structure and come back.
An Infotype attributes window will appear; you create a new entry with the Infotype No and give the appropriate description.
and give the data and press ENTER key. The Technical data will appear automatically, here you have to maintain the Single screen as 2000 and List screen as 3000 and then SAVE the info and press BACK button, you will reach the main screen.
After that using the Menu option Infotype
4.Generate the structure, dialog module and include.
Click the button from application tool bar to check the Infotype attributes. Select the 9999 Infotype and check the data.
If every thing is error free, you can use the Infotype using PA30 transaction.
5.Use the Create button you can create New Entries for the Infotype.
You can view the entries in table PA9999 using the TCODE SE11/SE16.
Validating Code in Module pool: - If you want to validate the user inputs,
You need to write the validate code procedure in the module program MPXXXX00 screen 2000 (here XXXX is user Infotype, in our case 9999).
In PAI.
MODULE P9999.
*
MODULE HIDDEN_DATA.
FIELD P9909-PRATE MODULE PRATE. Create a module routines.
In PBO
MODULE PRE_INPUT_CHECKS.
----
input-checks: *
----
insert check modules here:
...
CHAIN.
FIELD P9909-PRATE MODULE PRATE.
ENDCHAIN.
Double click on PRATE it will ask you the include name, SELECT the include MP999930 from the input window.
&----
*& Module PRATE OUTPUT
&----
text
----
MODULE prate OUTPUT.
IF NOT p9909-prate IS INITIAL.
PERFORM check_prate.
ENDIF.
ENDMODULE. " PRATE9 OUTPUT
Again check_prate subroutine, write down the below code in MP999940 include.
&----
*& Form check_prate
&----
*
----
FORM check_prate .
CLEAR zprate_t.
SELECT SINGLE * FROM zprate_t WHERE prate = p9909-prate.
IF sy-subrc > 0.
CLEAR zprate_t.
MESSAGE e016(rp) WITH 'Entry does not exist in ZPRATE_T table'.
ENDIF.
ENDFORM. " check_prate
After that check the module, if it is error free then ACTIVATE the same. You can check the Infotype validations using the PA30 transaction.
Regards
Raj
2007 Jul 09 6:53 AM
2007 Jul 09 6:55 AM
Hi
<b>Creating an Infotype</b>
Using the TCODE PM01 you can create an Infotype. As per SAP standard you can use only 9000 series. The below procedure explains you how to create an Infotype.
1.Go the transaction PM01 and give the Infotype Number lets say 9999 and press button. It will ask you a messaging window,
2.Press create button to continue further. It will take you to create the structure.
3.Give the components and SAVE & ACTIVATE the structure and come back.
An Infotype attributes window will appear; you create a new entry with the Infotype No and give the appropriate description.
and give the data and press ENTER key. The Technical data will appear automatically, here you have to maintain the Single screen as 2000 and List screen as 3000 and then SAVE the info and press BACK button, you will reach the main screen.
After that using the Menu option Infotype
4.Generate the structure, dialog module and include.
Click the button from application tool bar to check the Infotype attributes. Select the 9999 Infotype and check the data.
If every thing is error free, you can use the Infotype using PA30 transaction.
5.Use the Create button you can create New Entries for the Infotype.
You can view the entries in table PA9999 using the TCODE SE11/SE16.
Validating Code in Module pool: - If you want to validate the user inputs,
You need to write the validate code procedure in the module program MPXXXX00 screen 2000 (here XXXX is user Infotype, in our case 9999).
In PAI.
MODULE P9999.
*
MODULE HIDDEN_DATA.
FIELD P9909-PRATE MODULE PRATE. Create a module routines.
In PBO
MODULE PRE_INPUT_CHECKS.
----
input-checks: *
----
insert check modules here:
...
CHAIN.
FIELD P9909-PRATE MODULE PRATE.
ENDCHAIN.
Double click on PRATE it will ask you the include name, SELECT the include MP999930 from the input window.
&----
*& Module PRATE OUTPUT
&----
text
----
MODULE prate OUTPUT.
IF NOT p9909-prate IS INITIAL.
PERFORM check_prate.
ENDIF.
ENDMODULE. " PRATE9 OUTPUT
Again check_prate subroutine, write down the below code in MP999940 include.
&----
*& Form check_prate
&----
*
----
FORM check_prate .
CLEAR zprate_t.
SELECT SINGLE * FROM zprate_t WHERE prate = p9909-prate.
IF sy-subrc > 0.
CLEAR zprate_t.
MESSAGE e016(rp) WITH 'Entry does not exist in ZPRATE_T table'.
ENDIF.
ENDFORM. " check_prate
After that check the module, if it is error free then ACTIVATE the same. You can check the Infotype validations using the PA30 transaction.
Regards
Raj
2007 Jul 09 6:58 AM
<b>Creating a New Infotype</b>
<b>Step 1</b>
Execute transaction PM01 (If you get a message saying the infotype can not be enhanced, try tranasction PPCI).
<b>Step 2</b>
Select create IT tab and enter new infotype number into selection box.
<b>Step 3</b>
Press the create ALL button (left of infotype no.). You will get a dialog box asking to confirm, press the create button.
<b>Step 4</b>
You will now be presented with the standard structure creation screen (SE11) where you need toenter the fields of the new infotype. I have entered some examples but you can put anything in here.
<b>Step 5</b>
Once you have entered the fields press save and then activate, before pressing the back button.You will now be presented with the following screen, where you will need to make a new entry or your created infotype (i.e. 9010).
<b>Step 6</b>
The next step is to fill in the infotype attributes, these will initially be blank and you will need to fill them in similar to the following, depending on your requirements. Then press save.
<b>Step 7</b>
Your infotype is now created and can be accessed and populated in the usual way using
i.e. using transactions such as PA20 and PA30.
<b>Step 8</b>
If you look at the structure of your new infotype in transaction SE11 it will look similar to the following:
<b>please see the linl for screen shots of how to create an infotype</b> .
<a href="http://">http://www.sapdevelopment.co.uk/hr/hr_infotypes2.htm</a>
reward points if it is usefull.....
Girish
2007 Jul 09 12:32 PM