cancel
Showing results for 
Search instead for 
Did you mean: 

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

former_member184119
Active Contributor
0 Kudos

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

Edited by: saslove sap on May 5, 2009 12:20 PM

Accepted Solutions (1)

Accepted Solutions (1)

former_member226519
Active Contributor
0 Kudos

you could:

LOOP AT P0001 WHERE WERKS IN select-option for relevant pers.areas

that will provide all time slots (from P0001-BEGDA to P0001-ENDDA) the person is in a specified country.

loop at all P0006 within the timeslot and do your changings.

ask the personnel admin department what to do if the BEGDA/ENDDA of infotype 0001 and 0006 do not match.

ENDLOOP.

Answers (1)

Answers (1)

former_member226519
Active Contributor
0 Kudos

you have to specify

TABLES: PERNR.

INFOTYPES: 0001, 0006.

after START_OF_SELECTION I miss GET PERNR in your coding.

GET PERNR will provide all infotype records 0001 and 0006 for the personnel numbers.

you will have difficulties if a person changed the country (split in infotype 0001) without changing the address (no split in infotype 0006).

former_member184119
Active Contributor
0 Kudos

Thanks alot Volker what care need to be taken if that person is not changing the adress and changing the personnel area?

how could we identify this please let me know your valuable inputs..

Regards

sas