Skip to Content
0
May 05, 2009 at 07:52 AM

What is the best process for conversion moving district data to city data?

18 Views

Hi ALL,

I Need to write one conversion which will move the district field data into city field data in infotype 6..

It need to apply for only one Specific country which can be identified by Employee Personnel Area..and it should be apply for all active , Terminated employee as well...

What is the best process so that i can catpure all the data records of employees of the Specific country?

my approacH is..

LDB: PNP.

Start-of-selection.

RP_PROVIDE_FROM_LAST P0001 space pn-begda pn-endda.

check p0001-weks = '5200'.

rp_provide_from_last p0006 space pn-begda pn-endda.

Loop at p0006.

move p0006 to T_p0006.

if ort01 is not initial

Move P0006-ORT01 TO T_P0006-ORT02.

endif.

CALL FUNCTION 'HR_INFOTYPE_OPERATION'

EXPORTING

infty = '0006'

subtype = P0006-subty

  • objectid = P_record-objps

number = p0006-pernr "employeenumber

validityend = validityend

validitybegin = validitybegin

record = T_p0006.

recordnumber = p_record-SEQNR

operation = 'MOD'

nocommit = nocommit

dialog_mode = '0'

IMPORTING

return = return_struct

key = personaldatakey

EXCEPTIONS

OTHERS = 0.

Endloop.

Is this using Loop is fine? or Using PROVIDE * from p0006 between PN-BEGDA AND PN-ENDDA

ENDPROVIDE is fine?

Is my code is accurate...Bapi_employee enque bapiemployee_deque i will add apart from that is this code is fine for my requirement or any additional need to take care to capture all the employee data ?

Regards

sas