Application Development and Automation 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: 
Read only

Problem in 'Commit Work'

Former Member
0 Likes
816

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
Read only

former_member186741
Active Contributor
0 Likes
724

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

Read only

Former Member
0 Likes
724

Can you please post the code here?

regards,

Ravi

Read only

0 Likes
724

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.

Read only

0 Likes
724

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

Read only

Former Member
0 Likes
724

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.