cancel
Showing results for 
Search instead for 
Did you mean: 

Creating purchase requisitions with BAPI_POSRVAPS_SAVEMULTI3

Former Member
0 Kudos

Dear all,


I'm in desperate need of help with creating PRs via BAPI.


We're currently trying to create purchase requisitions by using BAPI_POSRVAPS_SAVEMULTI3 ("SaveMultiple2"). The transaction is between the purchasing plant and production plant. The PRs need to have both receipts and requirements so that they're linked with Sales Orders and get sent to the corresponding source locations (production plants) as PReqRels.


So far, we've:

1. Created the PRs as SNP orders (EXTENSION_IN table)
2. Configured settings via SE37 to fill in the "source location" in the PR (LOCATION in the REQUIREMENTS table)


The problem is that the BAPI PRs mentioned above lack requirements, and because of this PReqRels don't show up in the planning book of the production plant. We need the PRs to have issue elements as well, not just receipt elements.


Is it not possible to create purchase requisitions that generate the same document flow as when created manually? Are there any particular settings we need to look at?


If you know a way to get around this problem or happen to know anything about BAPIs and PRs, please help me out, it'd be great.
I'm also new to this forum so if there's any piece of information missing in this post, please let me know.


Thank you.


Regards,
Saki

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I contacted customer support and there was a note to fix this problem ( if any of you are experiencing similar problems try note 1753329). This thread is now closed.

Answers (2)

Answers (2)

peter_casper
Contributor
0 Kudos

Dear Saki,

thanks for closing the loop / thread. Next time you can check upfront via SAP's ANST tool (SAP Automated Search Tool) if there are some relevant bugfixes / notes for your mentioned problem. This helps to exclude already known bugs right from the start.

Check out the following SCN article in case you don't know ANST yet:

Cheers, Peter

peter_casper
Contributor
0 Kudos

Dear Saki,

I am not sure if I understand you right but the mentioned BAPI is capable of creating the receipts but as well the requirements "part" of a PR. Please check out the BAPI capabilities in more detail.

  CALL FUNCTION 'BAPI_POSRVAPS_SAVEMULTI3'

    EXPORTING

      logical_system        = iv_logic_sys

      order_type            = '2'

      ext_number_assignment = ''

      plng_version          = '000'

      no_create             = 'X'

    TABLES

      receipts              = it_receipts

      receipts_x            = it_receipts_x

     requirements         = it_reqs

      requirements_x        = it_reqs_x

    [...]

The following OSS note might help you in case you try to create subcontracting orders.

  • Subcontracting PR can only be created w/ this modification note:

https://launchpad.support.sap.com/#/notes/1236563

regards, Peter

Former Member
0 Kudos

Thank you for the reply, Peter. Yes you've understood me correctly.

Yes, I'm fully aware that the BAPI I mentioned should be able to create the requirements elements as well, but I can't seem to get it to work right. Only the receipts show up.

If you know anything about what to do with the internal tables, could you be so kind as to give me some advice? (I will reward points to anyone who can provide clues)

Currently we're testing with the below settings for the REQUIREMENTS table (REQUIREMENTS_X is also filled out correspondingly)

After reading notes, instructions and the like I'm guessing the required fields are filled out properly...is there anything missing?

Thanks in advance.

Saki

 

ORDID00000000000000000000000000000000
SCHEDID
ORDER_NUMBER
ITEM_N000010
SCHE0000
PRODUCTAAAAAAAAAA
LOCATION1401
LOCT1001
STOR
BATCH
S
SPEC_STOCK_KEY
SPEC_STOCK_EXP
UNIPCE
UNIPCE
QUANTITY2000.000
REQUIREMENT_DATE2016/5/13  19:00:00
ATBH
QUANTITY_REDUCED2,000.00
I
SPEC_STOCK

LOGICAL_SY