03-21-2006 5:55 AM
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
03-21-2006 6:09 AM
Sorry Rahul but your problem is not clear. Is it working in DEBUG but not when run ordinarily?
03-21-2006 6:10 AM
03-21-2006 6:21 AM
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.
03-21-2006 6:26 AM
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
03-21-2006 6:20 AM