We have added search box. Key in SAP issue keyword to search
TopBottom

Announcement: wanna exchange links? contact me at sapchatroom@gmail.com.

Re: [sap-hr] Delimit Old Record and Create New Record Using hr_infotype_operation

Posted by Admin at
Share this post:
Ma.gnolia DiggIt! Del.icio.us Yahoo Furl Technorati Reddit

Reply from devasandeep on Mar 18 at 11:49 PM
Dear Srinivas,

Use Time constraint class, system will automatically delimit the previous
records.

Regards
Sandeep

---------------Original Message---------------
From: srini
Sent: Thursday, March 15, 2012 10:51 AM
Subject: Delimit Old Record and Create New Record Using hr_infotype_operation

Hi ,

I am working on inbound interface for HR module. I am getting the .txt file from application server(chnage data) and i need update the infotypes with file data.

I am uploading the data using FM HR_infotype_operation.

the scenario is i need to delimit the previous record and create the new record valide from date( when we are updated ) enddate is 31/12/9999.

EX : 11/03/1976 12/31/9999 fernando robert fernando Single

Result should be :

11/03/1976 14/03/2012 fernando robert fernando Single

15/03/2012 31/12/9999 rahim robert rahim married

I am using the code like this.

select single * from pa0002 into CORRESPONDING FIELDS OF WA_INFY_P0002 where pernr = WA_MOD-EMP_ID.

CLEAR : RETURN.

call function 'BAPI_EMPLOYEE_ENQUEUE'

EXPORTING

number = WA_MOD-EMP_ID

IMPORTING

return = RETURN.

IF RETURN-NUMBER IS INITIAL.

WA_INFY_p0002-PERNR = WA_MOD-EMP_ID.

WA_INFY_p0002-NACHN = WA_MOD-last_name.

WA_INFY_p0002-NACH2 = WA_MOD-middle_name.

WA_INFY_p0002-VORNA = WA_MOD-first_name.

WA_INFY_p0002-FAMST = WA_MOD-MARR_STATUS.

WA_INFY_p0002-FAMDT = WA_MOD-MARR_DATE.

CALL FUNCTION 'HR_INFOTYPE_OPERATION'

EXPORTING

INFTY = '0002'

NUMBER = WA_INFY_P0002-PERNR

VALIDITYEND = '99991231'

VALIDITYBEGIN = SY-DATUM

RECORD = WA_INFY_P0002

OPERATION = 'INS'

DIALOG_MODE = '1'

IMPORTING

RETURN = RETURN

KEY = PERSONALDATAKEY.

COMMIT WORK.

I am able to modify, but I need delimit and create the new record.

please help me .

Thanks,

Srinivas.

 
Reply to this email to post your response.
 
__.____._
Manage Settings | Unsubscribe | Create FAQ | Send Feedback
  
Copyright © 2012 Toolbox.com and message author.
Toolbox.com 4343 N. Scottsdale Road Suite 280, Scottsdale, AZ 85251
devasandeep  
SAP HR Consultant
 
Mark as helpful
View this online
Ask a new question
 
In the Spotlight
Toolbox.com for iPhone & Android: Ask Questions & Get Answers Anywhere. Download the Free App

_.____.__

0 comments:

Post a Comment

T r a n s l a t e to your language