2007 Dec 26 4:26 AM
Hi all ,
i m making BDC for PA61 for maintaining the absence data .
but problem is that if there is already record exists then it removes the data and updated new data , but i dont want that it remove old data , i want it'll save in next line , can anybody tell me what should i do ? how i'll count exist data and how i'll find next blank row to insert new data ? its urgent ..
regards .
saurabh.
Hi all ,
i m making BDC for PA61 for maintaining the absence data .
but problem is that if there is already record exists then it removes the data and updated new data , but i dont want that it remove old data , i want it'll save in next line , can anybody tell me what should i do ? how i'll count exist data and how i'll find next blank row to insert new data ? its urgent ..
regards .
saurabh.
2007 Dec 26 4:40 AM
Hi,
Instead of BDC,try with the BAPIs 'BAPI_ABSENCE_CREATE' and 'BAPI_ABSENCE_DELETE' to maintain the absence data.
Regards,
NagaRaju.
2007 Dec 26 4:48 AM
hi nagaraju sir ,
can u plz. send me the complete code that how we do this by using BAPI ?
regards saurabh .
2007 Dec 26 4:55 AM
hi,
you can build the code something like this:
LOOP AT it_absence.
CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
EXPORTING
number = it_absence-pernr
IMPORTING
RETURN =
.
CALL FUNCTION 'BAPI_ABSENCE_CREATE'
EXPORTING
employeenumber = it_absence-pernr
validitybegin = it_absence-begda
validityend = it_absence-endda
start = it_absence-beguz
end = it_absence-enduz
absencetype = it_absence-awart
ABSENCEHOURS =
NOCOMMIT =
IMPORTING
return = it_return
EMPLOYEENUMBER =
SUBTYPE =
OBJECTID =
LOCKINDICATOR =
VALIDITYBEGIN =
VALIDITYEND =
RECORDNUMBER =
****here capture the success/error message****
CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
EXPORTING
number = absence-pernr
IMPORTING
RETURN =
.
ENDLOOP.
regards,
NagaRaju.
2007 Dec 26 4:46 AM
hai surbh u have done one mistkae..
when recording for bdc table control press page down after u entering the data ok thats solves ur porblem..dont for get to reward points if usefull..that might encourage others..
regards
satish
C.G.
2007 Dec 26 4:55 AM
dear satis sir,
i did page down , but problem is that if there is allready data exist in first row,second row then it deleted all and inserted
new data , i dont want that it delete old data ,i want i insert data in next row , can u plz help me ? its urgent ..
ans will be rewarded ...
regards saurabh .
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |