Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

regarding infotype 586

Former Member
0 Kudos

hi experts,

i have an assignment for infotype 586 ,i need to upload the data for '586'

infotype '586' from excel sheet ,shall i go for BDC or is there any standard

BAPI existing for this if yes plz let me know....

thnx in advance.

4 REPLIES 4

Former Member
0 Kudos

0 Kudos

dear prabhu,

kindly explain the given below concepts as this is not working or may b i m not understanding....

data : loop_itc(11) value 'IA586-ITC01',

loop_pin(11) value 'IA586-PIN01',

loop_ain(11) value 'IA586-AIN01',

index(2) type p value 1,

unpacked_index(2).

field-symbols: <itc>, <pin> , <ain>.

loop at p586.

unpack index to unpacked_index.

loop_itc+09(2) = unpacked_index.

loop_pin+09(2) = unpacked_index.

loop_ain+09(2) = unpacked_index.

assign (loop_itc) to <itc>.

assign (loop_pin) to <pin>.

assign (loop_ain) to <ain>.

<itc> = p586-icode.

<pin> = p586-pinvt.

<ain> = p586-ainvt.

add 1 to index.

endloop.

Former Member
0 Kudos

Hi rajat,

1. We can also use one standard FM

'HR_INFOTYPE_OPERATION'

2. This can be used not only for infotype 0586,

but for other infotypes as well.

3. this is the full coding.

4. just copy paste in new program.

3. U can change the pernr and amount values as per requirement.

(this is just an example for infotype 0008)

4.



Report abc.



*----------------- Data
DATA : P0015 LIKE P0015.
DATA : RETURN LIKE BAPIRETURN1.
DATA : KEY LIKE BAPIPAKEY.
DATA : RETURNE LIKE BAPIRETURN1 .

*------------- Values (Change as per Requirement)

P0015-PERNR = '1'.
P0015-BEGDA = '2061101'.
P0015-ENDDA = '2061101'.
P0015-LGART = '3075'.
P0015-PREAS = '01'.
P0015-WAERS = 'INR'.
P0015-BETRG = '2500'.


*----- First Enqu

CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
EXPORTING
NUMBER = p0015-pernr
IMPORTING
RETURN = RETURNE.


*------------- Update

CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
INFTY = '0015'
NUMBER = P0015-PERNR
SUBTYPE = P0015-SUBTY
OBJECTID = P0015-OBJPS
LOCKINDICATOR = P0015-SPRPS
VALIDITYEND = P0015-ENDDA
VALIDITYBEGIN = P0015-BEGDA
RECORDNUMBER = P0015-SEQNR
RECORD = P0015
OPERATION = 'INS'
TCLAS = 'A'
DIALOG_MODE = '0'
IMPORTING
RETURN = RETURN
KEY = KEY.

IF RETURN IS NOT INITIAL.
WRITE 😕 'Error Occurred'.
ENDIF.

*--------- Dequeue
CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
EXPORTING
NUMBER = P0015-PERNR
.

regards,

amit m.

Former Member
0 Kudos

solved by own