Application Development and Automation 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: 
Read only

URGENT/ Table Control BDC

Former Member
0 Likes
659

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.

5 REPLIES 5
Read only

Former Member
0 Likes
633

Hi,

Instead of BDC,try with the BAPIs 'BAPI_ABSENCE_CREATE' and 'BAPI_ABSENCE_DELETE' to maintain the absence data.

Regards,

NagaRaju.

Read only

0 Likes
633

hi nagaraju sir ,

can u plz. send me the complete code that how we do this by using BAPI ?

regards saurabh .

Read only

0 Likes
633

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.

Read only

Former Member
0 Likes
633

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.

Read only

0 Likes
633

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 .