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: 

problems with bapi_requisition_create

Former Member
0 Kudos

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

2 REPLIES 2

Former Member
0 Kudos

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

Former Member
0 Kudos

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