Skip to Content
avatar image
Former Member

BDC failing at the statment "COMMIT WORK" in code

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Jul 13, 2009 at 04:07 PM

    Hi,

    What are the values you are populating in i_opt

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

    Regards,

    Satish

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 13, 2009 at 04:37 PM

    Hi,

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

    regards,

    steven

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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