07-03-2007 6:04 PM
Hi,
I am using BAPI_REQUISITION_CREATE to create new purchase requisition with services. Everything is OK as long as I create one PR. When go into sequential processing and try to create several (actually 2 is enough ) PRs I get and error message concerning lacking cost assignment in a service position. Obviously this message is wrong. What I discovered is that when I go into this BAPI for the second time (not having left the program) the function module still carries package numbers from previous run - and this is what causes the error. Still I do not know how to go around this. Did any of you come across this problem? Thanks for any help.
Greg
07-03-2007 6:25 PM
Hello,
Welcome to SDN.
I think ur code will be like this.
loop at itab.
call BAPI
endloop.
" U refesh all the internal table which u r passing it to BAPI at the beginning or at the end of the loop
VAsanth
07-04-2007 8:07 AM
I am already doing this. This is not the problem. Some function group inside the BAPI is keeping the values after first run (generated in the first run). If I remove those values in debug mode everything is OK.
Greg