Application Development 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: 

BDC failing at the statment "COMMIT WORK" in code

Former Member
0 Kudos

All,

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'

'PNPPERNR-LOW'.

perform bdc_field using 'BDC_OKCODE'

'=ONLI'.

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.

Thanks.

Mithun

4 REPLIES 4

Former Member
0 Kudos

Hi,

What are the values you are populating in i_opt

Are you passing the value for l_opt-updmode = 'A' ?

Regards,

Satish

0 Kudos

I am not passing any value in updmode! Should I pass a value "A" to it?

Thanks.

Mithun

Former Member
0 Kudos

Hi,

Please pass value 'E' to l_opt-DISMODE, you may get the error in bdc screen.

regards,

steven

0 Kudos

Thanks everyone for the time. Actually, I was doing trial and error and resolved this issue. There is one parameter "RACOMMIT", and I set it to TRUE and it worked!

l_opt-RACOMMIT = 'X'.

Thanks.

Mithun