cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_POSRVAPS_SAVEMULTI3 to create PReq with multiple items?

Former Member
0 Kudos

Dear Colleagues, Hoping for your help with the below mentioned problem.

Objective:

-


We want to consolidate multiple Purchase requisitions into one PReq with multiple line items.

We're trying to test BAPI_POSRVAPS_SAVEMULTI3 using SE37 test functionality. Weu2019ve have not created any program yet. We are trying to create a single PReq with multiple items to do a basic test.

Expected result is:

1. It should allow to create SNP purchase requisition with multiple line items/ schedule lines.

2. It should automatically pick the next available order number from internal order number range defined in APO.

3. It should automatically increment the u2018Current numberu2019 (i.e NR status) in the internal order number range of APO.

4. We do not want to send this consolidated PReq to R/3 immediately. However we might send the PO to R/3 (once the PR has been converted to PO.)

Is this possible to do with this BAPI? Our test results are detailed below.

CASE 1: USING INTERNAL ORDER NUMBER option

-


This looks like the correct way to do it. But there are many issues.

Problem:

1. Everytime we run it with Internal order number test data, it creates with the same order number 000000000000. Although the GUID id different, internal order number is same.

2. It does not automatically pick up the next available order number from APO internal order number range.

3. It does not automatically increment the order number with subsequent runs.

4. Even if we enter the same RECEIPTS-ORDER_NUMBER with different ITEM_NUMBER and SCHED_LINE, the new PReq created has a different GUID. => We are unable to create a PReq with multiple items using this option.

5. Creates PPDS order, we want SNP. (We can see through BAPI_POSRVAPS_GETLIST3, that the application is SNP. This is also visible in RRP3 transaction.)

Import parameters for this option that we are providing:

LOGICAL_SYSTEM = local APO development system

ORDER_TYPE = 1 (it doesn't seem to matter, system always created order with type 8, irrespective of what we enter here)

EXT_NUMBER_ASSIGNMENT = blank

COMMIT_CONTROL = E

PLNG_VERSION = 000

NO_CREATE = blank

PLANNING_MODE_USAGE = 0

EVENT_CONTROL = blank

Table Parameters:

RECEIPTS-ORDER_NUMBER = TEST ( Why does it ask for this with internal order number? It gives error if we leave this blank. )

RECEIPTS-ITEM_NUMBER = 000001

RECEIPTS-SCHED_LINE = 0001

other RECEIPTS fields entered = PRODUCT, LOCATION, LOCTYPE, VENDOR, UNITOFMEAS, UNITOFMEAS_ISO, QUANTITY, DELIVERY_DATE, CONF_QUANTO, ORDER_QUANTITY, QUANTITY_REDUCED, TTYPE

FIXED (blank),

ATPCAT = AG,

PROC_TYPE = 0,

RECEIPTS_X-ORDERID, SCHEDID, ORDER_NUMBER, ITEM_N, SCHED_LINE = blank.

RECEIPTS_X-PRODUCT, LOCATION, LOCTYPE, VENDOR, UNITOFMEAS, UNITOFMEAS_ISO, QUANTITY, DELIVERY_DATE, FIXED, ATPCAT, ORDER_QUANTITY, QUANTITY_REDUCED, TTYPE = X

CASE 2: USING EXTERNAL ORDER NUMBER

-


Which doesn't seem like correct way but we still tested for completeness

Pros: It allows us to create multiple line items with same order number (ORDERID GUID is same)

Cons:

1. It does not automatically pick internal order number or update the NR Status (Current number) in the APO internal order number range. We are using u2018external order numberu2019 so this is not a fault in system. But not helpful for our case.

2. The Logical systems shows as the external system we manually enter which might create problems later.

Import parameters for this option that we are providing:

LOGICAL_SYSTEM = local R/3 development system (it doesn't accept APO system which is understandable)

ORDER_TYPE = blank or 1 (if we leave blank, it created of default type 2 and fixes the order even if RECEIPTS-FIXED = blank, Is this fixing normal? )

EXT_NUMBER_ASSIGNMENT = X

COMMIT_CONTROL = E

PLNG_VERSION = 000

NO_CREATE = blank

PLANNING_MODE_USAGE = 0

EVENT_CONTROL = blank

Table Parameters:

RECEIPTS-ORDER_NUMBER = we pick the next free number from APO internal number range config and feed it here

all other fields are same as described above for internal number range.

RECEIPTS_X fields = same as described above for internal number range.

MULTIPLE LINE ITEMS:

-


When I re-execute this BAPI for external order number, keeping RECEIPTS-ORDER_NUMBER same, but changing ITEM_NUMBER & SCHED_LINE to 000002 and 0002, it creates a new line item for existing order. This is what we want but with internal number range functionality.

If we re-execute using the same order number keeping, EXT_NUMBER_ASSIGNMENT = blank (meaning internal order number), it creates an entirely new order GUID with same order number 000000000000 for each new order created.

Edited by: Rimjhim Jain on Sep 8, 2010 4:08 PM

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member623533
Discoverer
0 Kudos

Please pass 'EXT_NUMBER_ASSIGNMENT' parameter as ' ' in the BAPI parameters. It will create purchase req with internal numbers.

Former Member
0 Kudos

MY KEY QUESTIONS ARE:

-


1. How can I make it automatically pick up the internal order number from number range, instead of using 000000000000 everytime?

2. How can I make it create SNP application orders instead of PPDS?

3. How can I make it automatically increment current number in APO internal order number range?

4. How can I make it create new items for existing order, using EXT_NUMBER_ASSIGNMENT = blank?

Former Member
0 Kudos

Hi All,

The above issues are resolved.

Problem 1 and 2 were related. It was not picking internal number ranges because these ranges were only defined for SNP and the BAPI was creating order of PPDS application type by default. Hence it was not assigning any order number.

I managed to change the type to SNP by feeding EXTENSION_IN import parameter with relevant structure. This resolved the internal order number issue.

I also managed to create multiple items by taking original create order GUID and adding another item to it.

However it has created a new issue. As soon as the PReq with multiple item is created, it vanishes from RRP7. It is correctly visible in Planning book and also in RRP3, but not in RRP7. Alsoi n RRP3 the conversion indicator is grayed out. Thus we cannot set the conversion indicator!

The same happens if I create PO with multiple item. It's not visible in RRP7.

If you've encountered this problem before then please let me know the solution.

Regards,

Rimjhim

Edited by: Rimjhim Jain on Sep 14, 2010 4:39 PM

Edited by: Rimjhim Jain on Sep 14, 2010 4:41 PM

Former Member
0 Kudos

Hi everyone,

For the benfit of all, SAP has replied that APO does not support PReqs with multiple items. It is not possible to change PReqs with multiple items in APO and SAP recommends only single item PReqs to be used in APO.

Regards,

Rimjhim

Former Member
0 Kudos

Hi Rimjhim,

I find your post really helpful as I am also experiencing the same problem as you had before. The problem I am facing now is that the orders created by BAPI_POSRVAPS_SAVEMULTI3 are PPDS by default. Can you kindly share to me what are the relevant fields in your help structure that you've used in the extension_in parameter of the BAPI?

Many thanks!

Kristan