10-09-2007 2:11 PM
When creating a new employee record using PA40, the PERNR gets generated as soon as Infotype 0000 is updated. How do we capture the new PERNR, if a BDC recording of PA40 fails midway during the process
I would appreciate and reward any valuable ideas!
10-09-2007 2:16 PM
create a session for error messages....and u can go to sm35 and check what has ahppened.....if not use format_message and display what has happened as report output....in case of BDC fail......!!!!!
it will be like....
call transaction 'PA40' using it_bdctab
mode 'N'
update 'S'
messages into it_bdcmsgcoll.
if sy-subrc <> 0.
*--store the pernr for which bdc failed......here!!!
call function 'bdc_open_group'
.....
call function 'bdc_insert'
call function format_message
....
call function 'bdc_close_group'
*---check error and try to rectify it.....
Regards
Vasu
10-09-2007 2:24 PM
Hi,
You can get the message using messtab in call transaction then pass the same to session method for error entries. then process the same using session method
Regards
Shiva