01-28-2008 3:09 PM
Hi,
I created infotype 2002. The record was locked. I unlocked the record using HR_INFOTYPE_GETDETAIL function. The record 2002 was unlocked but the quota deduction in infotype 2007 was not updated. Normally when I use PA30 transaction when I unlock IT2002 record the quota deduction in infotype 2007 is increased.
I attached a short report which I used to unlock the record.
DATA : RETURN LIKE BAPIRETURN1,
NOCOMMIT TYPE BAPI_STAND-NO_COMMIT,
p2002 like p2002 occurs 0 with header line,
p2007 like p2007 occurs 0 with header line.
CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
EXPORTING
NUMBER = '50400095'
IMPORTING
RETURN = RETURN
.
if return-type ne 'E' and return-type ne 'A'.
CALL FUNCTION 'HR_INFOTYPE_GETDETAIL'
EXPORTING
INFTY = '2002'
NUMBER = '50400095'
SUBTYPE = '9117'
OBJECTID = OBJECTID
LOCKINDICATOR = 'X'
VALIDITYEND = '20080122'
VALIDITYBEGIN = '20080122'
RECORDNUMBER = RECORDNUMBER
TCLAS = 'A'
IMPORTING
RETURN = RETURN
RECORD = P2002
EXCEPTIONS
OTHERS = 0.
read table p2002 index 1.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
INFTY = '2002'
NUMBER = p2002-pernr
SUBTYPE = p2002-subty
OBJECTID = p2002-objps
LOCKINDICATOR = p2002-sprps
VALIDITYEND = p2002-begda
VALIDITYBEGIN = p2002-endda
RECORDNUMBER = p2002-seqnr
RECORD = P2002
secondary_record = p2007
DIALOG_MODE = '1'
OPERATION = 'EDQ'
NOCOMMIT = ''
IMPORTING
RETURN = RETURN
EXCEPTIONS
OTHERS = 0.
endif.
CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
EXPORTING
NUMBER = '50400095'
IMPORTING
RETURN = RETURN
.
Do you know why the quota deduction in infotype 2007 is not updated when I use this function?
01-28-2008 3:11 PM
Hi James, this might help u.
Steps to create a HR Infotype:
1) Go to Transaction PM01.
2) Enter the custom Infotype number which you want to create (Should be a 4 digit number, start with 9).
3) Select the 'Employee Infotype' radio button.
4) Select the 'PS Structure Infotype'.
5) Click on Create... A separate table maintenance window appears...
6) Create a PS structure with all the fields you want on the Infotype
7) Save and Activate the PS structure
😎 Go back to the initial screen of PM01.
9) Click on 'All' push button. It takes a few moments.
10) Click on 'Technical Characteristics'. Infotype list screen appears
11) Click on 'Change'(pencil) button
12) Select your Infotype and click on 'Detail' (magnifying glass) button
13) Give 'T591A' as subtype table
14) Give 'T591S' as subtype txt tab
15) Give your subtype field as subtype field
16) Save and come back to PM01 initial screen
17) Click on 'Infotype Characteristics' ... Infotype list screen appears
18) Click on 'Change' (pencil) button
19) Click on 'New Entries'
20) Enter your Infotype number and short text
21) 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)
22) Save your entries.
23) Now the Infotype is created and ready to use.
24) If you want to change the layout of the Infotype as per your requirement...
25) In the PM01 initial screen...Select 'Screen' radio button and give 2000 as the screen name, then click on edit.
26) In the next screen.. Select 'Layout Editor' and click 'Change'.
27) Screen default layout appears...here you can design/modify the screen..change the attributes of the fields..etc.
28) Save and activate. (Don't forget to 'Activate at every level)
Subtype Creation :
Transaction PM01 Goto Subtype Characteristics. Click on Append and then subtype. Enter the name and description of subtype on screen.
Then goto technical Characteristics and maintain the details of subtype there. I.e name of subtype i.e. component name defined in PSnnnn. Subtype table is T591A.
Subty.text tab is T591S and time const tab is T591A.
See:
http://help.sap.com/saphelp_46c/helpdata/en/4f/d5268a575e11d189270000e8322f96/content.htm
HR related site:
http://www.sapdevelopment.co.uk/hr/hrhome.htm
Enhancement of Infotype
Check the following
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAXX/PYINT_INFOTYP.pdf
kindly reward if found helpful.
cheers,
Hema.