Skip to Content
author's profile photo Former Member
Former Member

problems with bapi_requisition_create

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 03, 2007 at 05: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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 04, 2007 at 07: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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.