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: 

Problem in 'Commit Work'

Former Member
0 Kudos

Dear friends,

I am modifying one custom program which is designed for creating Purchase Requisition from SRM Shopping cart. this program is using standard BAPI. after it creates a PR. we are updating custom fields in table EBAN using FM 'ME_UPDATE_REQUISITION'.

Here, the desired values are getting updated in table if i execute the program. If i run the program in debug mode, FM updates the values in EBAN. I am not able to find the reson and the solution for this. Need Help

thnaks

Rahul

5 REPLIES 5

former_member186741
Active Contributor
0 Kudos

Sorry Rahul but your problem is not clear. Is it working in DEBUG but not when run ordinarily?

Former Member
0 Kudos

Can you please post the code here?

regards,

Ravi

0 Kudos

Hi Ravi,

The code is as follows.

DATA: leban LIKE ueban OCCURS 0 WITH HEADER LINE.

LOOP AT leban.

leban-zzsrmmark = 'X'.

leban-eprofile = space.

leban-kz = 'U'.

MODIFY leban TRANSPORTING eprofile zzsrmmark kz.

CLEAR leban.

ENDLOOP.

CALL FUNCTION 'ME_UPDATE_REQUISITION'

TABLES

xeban = leban

xebkn = pe_t_xebkn

yeban = leban

yebkn = pe_t_yebkn.

COMMIT WORK.

  • COMMIT WORK AND WAIT.

  • CALL FUNCTION 'DB_COMMIT'.

It is strange but true, When i run the program in debug mode it updates the value in custom fields of EBAN, when i execute the program ordinarily it doesn't update the values.

0 Kudos

Rahul,

Looks like ME_UPDATE_REQUISITION is a standard funciton, how can it update the custom table, unless there is a user exit being trigger inside that.

If that is the case, can you post the code of the user exit here? Looks like you are fetching some data regarding the requisition and that is not updated in the DB yet, becuase of which the custom table one is also failing. Please post the code.

Regards,

Ravi

Former Member
0 Kudos

Hi,

I think you need to replace commit with racommit some thing like that.

On this we have so many threads look at them.

check out this links.......

Thanks.

If this helps you reward with points.