2008 Aug 11 4:38 AM
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.
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.
2008 Aug 11 5:10 AM
Hi ,
check this sample program
https://www.sdn.sap.com/irj/sdn/wiki?path=/pages/viewpage.action&pageid=13160
regards
Prabhu
2008 Aug 12 4:52 AM
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.
2008 Aug 11 7:05 AM
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.
2008 Aug 13 4:18 AM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |