Skip to Content
0
Former Member
Sep 08, 2010 at 02:05 PM

BAPI_POSRVAPS_SAVEMULTI3 to create PReq with multiple items?

910 Views

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