ABAP-HR:Infotype
Hi,
I am working with ABAP-HR.
In Personal Administration, while defining Infotypes , they say 'each infotype requirs at least 2 structures and atleast 1 internal table'.
Will any body please help me to get the idea.
Thanks in advance.
Anirban Bhattacharjee
hi
Each infotype has two structures and One associated table.
PSnnnn - this structure contains all of the infotype data fields.
Pnnnn - this structure contains infotype key fields and all the data fields from the structure PSnnnn.
Here nnnn is the infotype number.
PAnnnn PBnnnn etc are actual database tables hoilding the data.
In ABAP-HR Infotype are grouped in INfoGroups. They have Screens associated with it. And a user has to fill those screens and it is possible that user might chane a value many times before actually saving it.
So these structures acts as a temporary storage for thise values.
Hope this wil help.
Reward if useful.
Sumit Agarwal
Similar Messages
-
Hr abap custom infotype updatation
hiii frnds,
i creatred custom inotype 9910 and i enterded some data for this infotype in pa30 when i click on the save it is noty saving in the pa9910 table...... can any one send sample code to save the data into tableDid you read [Developing an Infotype in Personnel Administration|http://help.sap.com/printdocu/core/print46c/en/data/pdf/PAXX/PYINT_INFOTYP.pdf] (or more recent documentation) and a guide like [Steps to Customize infotypes|http://wiki.sdn.sap.com/wiki/display/ABAP/StepstoCustomize+infotypes]
Regards,
Raymond -
HR ABAP: table/infotype relationships
Hi.
I'm experienced in doing ABAP programming for all the rest of the modules, but with ABAP HR, I am new and doing one for the first time. I need your help regarding how to find tables/infotypes and relationships to each other.
Specific work example/scenario:
From selection criteria of requisition information, I am supposed to have an output report with application and candidacy information.
1.) How can I relate Infotype 5125 with info type 5132 and 5102?
I am more comfortable with select statements hence I prefer explanation using the transparent tables HRP5125, HRP5132, etc.
2.) How can I make use of the table HRP1001 to establish relationships between different tables/infotypes of HR?
Also, kindly send any links and documents that can give an at-a-glance summary of what I can use when doing ABAP for HR for the first time.
Thanks for your help and expertise and may God bless us all!
CelesteMore exactly look at tables
- [HRP1000 |https://www.sdn.sap.com/irj/sdn/advancedsearch?query=hrp1000+&cat=sdn_all]: org. units, positions, etc.
- [HRP1001|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=hrp1001&adv=false&sortby=cm_rnd_rankvalue] : links between org. units, positions, etc.
Look at this thread Tables for ORG model and FM [RH_STRUC_GET|https://www.sdn.sap.com/irj/sdn/advancedsearch?query=rh_struc_get&cat=sdn_all]
Regards -
HR ABAP : Custom Infotype updations
Hi All,
I am new to HR ABAP. Actually, I want to update the custom infotype 3 fields as per my user inputs. I am fetching the data from the PA table acoording to sy-datum falling in the begda, enda limitations. now I am changing the field with new values in the work area. And pass with the following data to the FM.
But I am getting the error 'No data stored for 9008 in the selected period'. I had seen prvious therads, but could not get how they solved the issue.
Please provide the inpus for the following code. I had also passed the validity start and end.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = '9008'
number = pernr
SUBTYPE =
OBJECTID =
LOCKINDICATOR =
VALIDITYEND =
VALIDITYBEGIN =
RECORDNUMBER =
record = wa_pa9008
operation = 'MOD'
TCLAS = 'A'
DIALOG_MODE = '0'
NOCOMMIT =
VIEW_IDENTIFIER =
SECONDARY_RECORD =
IMPORTING
return = l_bapireturn
key = bapipakey_tab
Regards,
Brijesh PatelHi Remi,
I have done the same thing. Please see the code. data is also available in the database. But the output is the error message. Please give some inputs on this.
***Updation of the PA9003 Infoty pe with the LTA amount and Medical Amount
SELECT SINGLE endda
begda
FROM pa0001
INTO (endda, begda)
WHERE pernr EQ pernr
AND endda GE sy-datum
AND begda LE sy-datum.
SELECT SINGLE *
FROM pa9003
INTO lwa_pa9003
WHERE pernr EQ pernr
AND endda >= sy-datum
AND begda <= sy-datum.
wa_pa9003 = lwa_pa9003.
wa_pa9003-zzallw = zzallw.
wa_pa9003-zzlta = zzlta.
wa_pa9003-zzmed = zzmed.
ADD 1 TO wa_pa9003-seqnr.
***Locking the object
CALL FUNCTION 'ENQUEUE_EPPRELE'
EXPORTING
pernr = pernr
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = '9003'
number = pernr
subtype = wa_pa9003-subty
objectid = wa_pa9003-objps
lockindicator = wa_pa9003-sprps
validityend = wa_pa9003-endda
validitybegin = wa_pa9003-begda
recordnumber = wa_pa9003-seqnr
record = wa_pa9003
operation = 'MOD'
TCLAS = 'A'
DIALOG_MODE = '0'
nocommit = space
VIEW_IDENTIFIER =
SECONDARY_RECORD =
IMPORTING
return = l_bapireturn
key = bapipakey_tab
***Unlocking the object
CALL FUNCTION 'DEQUEUE_EPPRELE'
EXPORTING
pernr = pernr.
Regards,
Brijesh Patel -
HR ABAP : Read Infotype.
Hi,
I have small query regarding HR abap infotype.
Take example of infotye PA0001. From this infotype I require to retrieve all PERNR which are effective on today (say 22nd Nov 2006).
Is there any standard Function Module or micro available?
Thanks,
Sunil Bhavsarhmmm sunil but functions also use select statements somewhere deep down to get the data you want. only difference is that there are more checks involved which are not when you do select straight away (like authorisation for infotype 0001 can already be included in the function)
It is only from a programming point of view always advisable to use functions or bapis to retrieve or alter information if the are around so you are certain that when you upgrade that the functions keep on working while you're own code might not because of changes in the system
I don't see a faster way to make the select
select pernr from pa0001 into corresponding fields of table i_pernr
where... (see above example).
it always help to look in se11 at pa0001 to see which fields are indexed. if you can you can optimize you're code by adding keyfields to you're where statement to minimize you're selection.
i'm not behind sap now but if the company is for instance a keyfield you can do
select pernr from pa0001 into corresponding fields of table i_pernr
where company = 'companycode'
Message was edited by:
A. de Smidt -
ABAP HR infotype use and retrival
Hi,
I am new to abap hr.In hr module we are using provide statement for retriving data.
My doubt is
1. why we are using provide instead of select?
2. Why we are using structure instead of direct tr table?
3. Why we are using infotype in hr and what is the use?
4. why we are retriving data using infotype in report instead of using tr.table using select?
5. What we have to specify if i want to retrive data from infotype?
6. We have to declare table/structure/infotype for retriving data?
7. And why we are specifying mode in declaration what is it mean?
if anybody knows tell me/send me the materials please.
Thanks,
Regards,
Nandha..Hi Nandha,
The statements PROVIDE and ENDPROVIDE define a loop through a statement block. In this loop, any number of internal tables itab1 itab2 ... are processed together. A single table can appear several times. For every table itab you must specify a FIELDS clause. After FIELDS you must specify the character * for all components or a list comp1 comp2 ... for specific components of the relevant table. The names of the components comp1 comp2 ... can only be specified directly.
To be able to process internal tables using PROVIDE, all tables itab1 itab2 ... must be fully typed index tables and contain two special columns that have the same data type (d, i, n, or t) for all relevant tables. For every table you must specify the names intliml1 intliml2 ... and intlimu1 intlimu2 ... of these columns using the addition BOUNDS.
Eg:
PROVIDE FIELDS {*|{comp1 comp2 ...}}
FROM itab1 INTO wa1 VALID flag1
BOUNDS intliml1 AND intlimu1
[WHERE log_exp1]
FIELDS {*|{comp1 comp2 ...}}
FROM itab2 INTO wa2 VALID flag2
BOUNDS intliml2 AND intlimu2
[WHERE log_exp2]
BETWEEN extliml AND extlimu
[INCLUDING GAPS].
ENDPROVIDE. -
Hi,
I need to develop some custom applications using WDA in ESS for displaying and updating the employee;s infotype records (IT0581, IT0591) and I am new to WD ABAP.
I have completed the beginners tutorials available in sdn and planning to use service call functionality available with WD ABAP in order to display and uppdate infotype records. For this, we are developing some custom RFC;s display data of IT0581, IT0591. Can anybody guide me how to do this ?
Is there any documentation available for same ? What are the best practises or approaches to keep in mind while developing the content for ESS using WDA?
Regards,
Anil KumarHi Buddy
You are wrongly passing the parameters. Pass the parameters like this
data : ls_pa0006 TYPE pa0006.
data : ls_p0006 TYPE p0006.
DATA : IT_PA0006 TYPE PA0006 OCCURS 0 WITH HEADER LIN
DATA : RETURN LIKE BAPIRETURN1.
DATA : ERROR_TAB LIKE RETURN OCCURS 0 .
SELECT * FROM PA0006 INTO CORRESPONDING FIELDS OF TABLE IT_PA0006
WHERE ENDDA = '99991231' AND PERNR = PERNR .
SORT IT_PA0006 BY SUBTY.
LOOP AT IT_PA0006.
IF IT_PA0006-SUBTY = '1' .
move-corresponding it_pa0006 to ls_pa0006.
ls_pa0006-name2 = co.
ls_pa0006-stras = STREET1.
ls_pa0006-LOCAT = STREET2.
ls_pa0006-PSTLZ = POSTALCODE.
ls_pa0006-ORT01 = CITY.
ls_pa0006-ORT02 = REGION.
ls_pa0006-TELNR = TELEPHONENUMBER.
move-corresponding ls_pa0006 to ls_p0006.
ls_P0006-INFTY = '0006'.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
INFTY = '0006'
NUMBER = PERNR
SUBTYPE = '1'
VALIDITYEND = IT_PA0006-ENDDA
VALIDITYBEGIN = IT_PA0006-BEGDA
RECORD = ls_p0006
OPERATION = 'MOD'
TCLAS = 'A'
IMPORTING
RETURN = RETURN.
I think OPERATION = DIS will not be the correct here. Change operation to insert that is correct. Cehck this code it will work.
Regards
vijay -
How do everyone,
I have searched the site but can't find any appropiate answers to my question.
I want to write some ABAP code to replicate the creation of infotype 0015 subtype 3988
mobile adjustments. I can write the code to directly insert the records into the database
but I was wondering if there are any rules that I should know about. Also, are there any
standard FM's that I might be able to use.
Many thanks
AndyHi
I've created several infotypes with a Table Control and it is always the same story. You have to create a custom Z table to store the Table Control data (if you can have unlimited records), so in the PSXXXX structure you need to add a TABNR field to link the PAXXXX table and the Z one, just like the type table OM infotypes.
Then in your code you have to control every possible operation, INS, MOD, DEL... and update the Z table accordingly (the standard code won't do that)
If your TC fields appear in display mode, take a look at the Groups 1 and 3 in your fields, the must be set with the usual values for a PA infotype.
If you have more questions, just ask,
Regards -
HR-ABAP-regarding infotype 0041-dates specifications
Hi All,
Can any body help in this problem that.
I am retrieving one particular date from infotype 0041 by passing the date type U9.
I want to know from which dardt(date type field in PA0041) i.e., dar01 or dar02 or dar03- - - - dar12, the date is coming .
Pls let me know urgently this.
Andvance thanks for all of your efforts.
Thanks&Regards,
Jeevakala.Hello,
The option i have implememted for a similar scenario is as follows
data: v_darxx like p0041-dar01,
v_datxx like p0041-dat01.
select single * from pa0041 into int_pa0041 after passing key fields
do 12 times
varying v_darxx from i_it41-dar01 next i_it41-dar02
varying v_datxx from i_it41-dat01 next i_it41-dat02.
if v_darxx = 'U9' and v_datxx gt v_dat.
"You have your required date
endif.
enddo
the same has been discussed in the following link,
Reading dates from infotype 41
Hope the suggestions gave you some idea
Reward if helpful
Regards
Byju -
HR ABAP : Custom Infotype updations through FM HR_INFOTYPE_OPERATION
Hi All,
Actually, I want to update the custom infotype 3 fields as per my user inputs. I am fetching the data from the PA table acoording to sy-datum falling in the begda, enda limitations. now I am changing the field with new values in the work area. And pass with the following data to the FM.
But I am getting the error 'No data stored for 9008 in the selected period', eventhough it is already having a data in the database table. I had seen prvious therads, but could not get how they solved the issue.
Please provide the inpus for the following code.
( I had also passed the validity start and end from the database entry. at this moment it gets dumped at the statement
assign record to <record> casting type (tabname). "XDP UniCode
where tabname is proposed from t777d-ppnnn. which is a structure and having a value as P9008. If i change the value at debug point to PA9008. it works fine. is there anything extra i need to do to solve this issue? )
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = '9008'
number = pernr
"SUBTYPE =
"OBJECTID =
"LOCKINDICATOR =
"VALIDITYEND =
"VALIDITYBEGIN =
"RECORDNUMBER =
record = wa_pa9008
operation = 'MOD'
"TCLAS = 'A'
"DIALOG_MODE = '0'
"NOCOMMIT =
"VIEW_IDENTIFIER =
"SECONDARY_RECORD =
IMPORTING
return = l_bapireturn
key = bapipakey_tab
Regards,
Brijesh PatelHi,
Check this code once
Read Infotype9004 Record for the personnel No
CALL FUNCTION 'HR_READ_INFOTYPE'
EXPORTING
tclas = A
pernr = pernr
infty = 9004
IMPORTING
subrc = v_subrc
TABLES
infty_tab = it_pa9004
EXCEPTIONS
infty_not_found = 1
OTHERS = 2.
Read it_pa9004 into wa_pa9004 with some condition.
if sy-subrc eq 0.
Lock the employee for processing infotype 9004
CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'
EXPORTING
number = wa_pa9004-pernr.
v_begda = wa_9004-begda.
v_endda = wa_9004-endda.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = c_9004
number = wa_9004-pernr
subtype = c_0001
validityend = v_endda
validitybegin = v_begda
record = wa_9004
operation = c_mod
tclas = c_a
dialog_mode = c_0
dialog_mode = '2'
IMPORTING
return = wa_return.
CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'
EXPORTING
number = wa_pa9004-pernr.
endif.
reward the points if it is helpful.
Regards,
Srilatha -
SAP HR : ABAP Query / Infotype enhancement / Field in Q0168 & not in P0168
Hi all,
There is a field in the structure Q0168-CSTDT, the field can be seen in the PA20/30 screen under the costs tab.
This field is not there in the P0168 structure.
The requirement is to add this to the ABAP Query.
What steps should be taken ? Do we need ABAP coding ?
Thanks
RahulHi,
Use Fm : HR_BEN_GET_KEY_DATE to get the Benefit Cost Calculation Date ..
Look at include MP016840 for the same.
Look for F1 on the field in pa20/pa30 , you'll get an idea on how this field is calculated.
Regards,
Srini. -
RE:ABAP HR infotype 2001 document number
Hello All,
When we save a record in infotype 2001 (Absence) in Pa30 it creates internally a document number.I wanted to know is there any Tcode where we can see this document number? I know the BAPI name but i want the tcode where we can see the document number. Please help me regarding this.
Thanks and Regards.
Salish.Hi,
The document number generated for each record would get stored in the database table PA2001 under the field AWREF for that record.
Hope this helps.
Thanks,
Harini
Edited by: Harini Gopinath on Oct 20, 2009 6:17 PM -
DOubt ABAP HCM infotype 2001.
Hi Gurus.
I'm started a process in SAP portal to change pernr in infotype 2001 ,but it don´t worked (but is showed message ok ).
In my rfc is called the 'HR_INFOTYPE_OPERATION' .
I need understand ,why don´t worked.
maybe could have any MP... program with wrong logic?
what the programs MP to infotype 2001?
You have any suggest for solution this case? thanks.Thanks for Reply Jozef.
I guess I did not explain properly.
I'm working with a HCM portal and I have a problem when I go to change the data for the time bank employee.
If I change the field action (in my language is "acão") then it does not change and back to the value it was before.
Then in debug it pass by 'HR_INFOTYPE_OPERATION' .
I need undesrtand why don´t change de action of bank employee.
I think could be a MP... program with z code like exit , but i need know how find it
inside standard code of 'HR_INFOTYPE_OPERATION'.
The parameters of HR_INFOTYPE_OPERATION' :
infty = 2001
number = 00029381
subtype = 0599
validityend = 20140801
validitybegin = 20140801
objectid = space
lockindicator = space
recordnumber = space
record - with structure with data
operation = MOD -
HR ABAP - update infotype 1001
Hi,
I am trying to update position of external person using function RH_UPDATE_INFTY_1001_EXT but it doesn't update neither it does give any error.
Below is my code:
hold_HSU_1001 like p1001.
loop at hold_HSU_1001.
case hold_HSU_1001-sclas.
when 'U'.
hold_HSU_1001-sobid = ZHAPEXTP-OT_LOCATN.
when 'S'.
hold_HSU_1001-sobid = ZHAPEXTP-OT_POSITN.
endcase.
modify hold_HSU_1001 transporting sobid.
endloop.
call function 'RH_UPDATE_INFTY'
exporting vtask = 'S'
tables innnn = hold_HSU_1001
exceptions ERROR_DURING_UPDATE = 1
NO_AUTHORIZATION = 2
REPID_FORM_INITIAL = 3
CORR_EXIT = 4.
key parameters of hold_HSU_1001 is
hold_HSU_1001-otype = 'H' (external person)
hold_HSU_1001-OBJID = '50000123'
hold_HSU_1001-plvar = 'ab'
hold_HSU_1001-rsign = 'B'
hold_HSU_1001-relat = '008'
hold_HSU_1001-istat = '1' (active)
hold_HSU_1001-slcas = 'S' (positon)
hold_HSU_1001-sobid = '5000465' (which is to be updated).
Not sure why sobid doesn't get updated. if anyone can help it would be great.
thank you
SuganyaHi,
I tried to pass that missing parameters also...Still it doesn't update.
i also tried RH_UPDATE_INFTY and RH_RELATION_MAINTAIN.
Thank you
Suganya -
hi ,
here we r suffering with the problem that when we want to enter data for NON-METRO FOR City Category it always shows fill all required fileds.
in V_T7INR9 view is there any need to maintain value for NON-METRO .
i will be very greateful plz help in it.
thnx in advance.Check out this code:
*& Report ZTEST3
REPORT ztest3.
TYPES:
BEGIN OF x_employee,
id TYPE n LENGTH 10,
name TYPE c LENGTH 20,
group TYPE c LENGTH 4,
END OF x_employee,
BEGIN OF x_emp_sal,
id TYPE n LENGTH 10,
salary TYPE p LENGTH 16 DECIMALS 2,
END OF x_emp_sal,
BEGIN OF x_final,
group TYPE c LENGTH 4,
id TYPE n LENGTH 10,
name TYPE c LENGTH 20,
salary TYPE p LENGTH 16 DECIMALS 2,
END OF x_final.
DATA:
i_employee TYPE STANDARD TABLE OF x_employee INITIAL SIZE 0,
i_final TYPE STANDARD TABLE OF x_final INITIAL SIZE 0,
i_salary TYPE STANDARD TABLE OF x_emp_sal INITIAL SIZE 0,
wa_employee TYPE x_employee,
wa_salary TYPE x_emp_sal,
wa_final TYPE x_final,
wa_final_temp TYPE x_final.
DEFINE append_employee.
wa_employee-id = &1.
wa_employee-name = &2.
wa_employee-group = &3.
append wa_employee to i_employee.
END-OF-DEFINITION.
DEFINE append_salary.
wa_salary-id = &1.
wa_salary-salary = &2.
append wa_salary to i_salary.
END-OF-DEFINITION.
append_employee:
1 'John' 'ENG',
2 'Mary' 'ENG',
3 'Pooja' 'IT',
4 'Payal' 'IT',
5 'Sourav' 'IT'.
append_salary:
1 '111.00',
2 '1111.00',
3 '11111.00',
4 '111111.00',
5 '1111111.00'.
LOOP AT i_employee INTO wa_employee.
READ TABLE i_salary INTO wa_salary
WITH KEY id = wa_employee-id.
IF sy-subrc = 0.
wa_final-id = wa_employee-id.
wa_final-name = wa_employee-name.
wa_final-group = wa_employee-group.
wa_final-salary = wa_salary-salary.
APPEND wa_final TO i_final.
ENDIF.
ENDLOOP.
SORT i_final BY group.
LOOP AT i_final INTO wa_final_temp.
wa_final = wa_final_temp.
AT END OF group.
SUM.
WRITE: /1 wa_final_temp-group, 5 wa_final_temp-salary.
ENDAT.
ENDLOOP.
output will be:
ENG 1.222,00
IT 1.233.333,00
Edited by: Sourav Bhaduri on Sep 24, 2008 1:44 AM
Maybe you are looking for
-
Generic Object Services (GOS) Question
I'm using "GOSAddObjects" to store documents but I wanted to know where/how SAP stores these document. I can't seem to find if they are saved in a table or where they go. Any help would be great. David
-
The file should be in XML-DATA-TEMPLATE format
Hi, When I am trying to upload the Data Definition file in XML publisher with EBS 11.5.10.2, I got "The uploaded file GLPAYBDXDO.xml is invalid. The file should be in XML-DATA-TEMPLATE format". I have tried changing the file name to different names i
-
Updating a remote web application
Hi all. We are developing a web application in team. We develop on Windows, but the web application runs under unix/linux. The unix machine has an Admin server and a Managed server (same machine). The
-
Printing on two sides on HP1102w
Formerly, when I gave the order for two-sided printing, the printer would start, and a screen would pop up telling me to withdraw the paper and replace it below, and then the printer would print the second sides. Now, it begins to print, the same scr
-
GUI ID not created in CRMM_BUT_CUSTNO
All, Here is the situation. On our sales web shop, a consumer registers and place an order. When they register, based on the id, in crm it should create a bp and order number at the same time and the business partner should also flow to R/3 In our si