BDC failing at the statment "COMMIT WORK" in code
I am working on benefits (COBRA) and I had to create a BDC for transaction HRBENUSCOB02(COBRA letter generation). Everything is fine except it hits code COMMIT WORK(this is SAP code). The program does not go any further after COMMIT WORK but if I run the transaction by itself it works fine! Does BDC does not work with steament "COMMIT WORK"? Is this because it is asynchronous? This is my sample BDC code:
perform bdc_dynpro using 'RPUCOB02' '1000'.
perform bdc_field using 'BDC_CURSOR'
perform bdc_field using 'BDC_OKCODE'
perform bdc_field using 'PNPPERNR-LOW'
'305968'.......................................more code, I just didn't eant to paste the whole code
l_opt-DISMODE = 'N'.
CALL TRANSACTION 'HRBENUSCOB02' USING bdcdata OPTIONS FROM l_opt.
Please give me any feedback or information if anyone has any ideas.