cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with create deployment order with BAPI_POSRVAPS_SAVEMULTI3

0 Kudos

Hi Experts,

We are trying to create deployment orders with BAPI_POSRVAPS_SAVEMULTI3. The following are the input:

LOGICAL_SYSTEM RR1CLNT010

ORDER_TYPE 2

EXT_NUMBER_ASSIGNMENT

COMMIT_CONTROL E

PLNG_VERSION 000

NO_CREATE

PLANNING_MODE_USAGE 0

EVENT_CONTROL 1

And for receipts and requirement, we put ATP category as EG and EF.

But it return error 'Events are supported only for Purchase Requisitions'. For u2018EGu2019 and 'EF', I can see it is category typ '2'.

Does this BAPI able to create deployment STR or it can only create SNP STR?

Thanks.

best regards,

Wenyan

Accepted Solutions (1)

Accepted Solutions (1)

former_member187488
Active Contributor
0 Kudos

Hi Wenyan,

In the BAPI, the following code should be responsible for the error message:

* -> check: event_control is only available for purchase requisition
  if event_control = gc_apo_bapi_create_event and order_type <> gc_requisition.
*   -> error message
    _apo_bapi_message_add_itab0 gc_error gc_apo_bapi_msgclass '342'
    return.
    lv_error = gc_true.
  endif.

The relevant constants are:

* -> constants for event control
CONSTANTS:
  gc_apo_bapi_no_event TYPE bapi10503eventcontrol VALUE space,   "collect but no direct sending
  gc_apo_bapi_create_event TYPE bapi10503eventcontrol VALUE '1',     "collect + send event
  gc_apo_bapi_no_event_collect TYPE bapi10503eventcontrol VALUE '2'. " no collect and no sending

*--> External Order types
CONSTANTS:
*  Bestand
 gc_stock              TYPE /sapapo/r3obj VALUE '0',
*  Bestellanforderung
 gc_requisition        TYPE /sapapo/r3obj VALUE '1',
*  Bestellung
 gc_purchase_order     TYPE /sapapo/r3obj VALUE '2',

As you can see, if you want to create an order other than SNP purchase requistion, you cannot set the control_event as '1'.

Best Regards,

Ada

0 Kudos

Thanks Ada.

But if we set 'event control' to either 0 or 2, there will still be error message 'Category EG is not defined as category type 1 or R/3 object'. This is what we cannot change.

wilian_segatto
Employee
Employee
0 Kudos

I checked the issue in your system and discussed the problem with our development colleagues.

The BAPI BAPI_POSRVAPS_SAVEMULTI3 can be used to "Create and Change External Procurement Orders/Items/Schedule Lines".

The ATP category EB refers to "SNP Release for Stock Transfer Requisition" and has ATP Category Type '2'. Creating orders with, e.g. ATP Category EA, Type 1 (SNP Purchase Requisition) would work, but not with EB, Type 2 would not.

In standard it's not possible to create Deployment Orders with BAPI_POSRVAPS_SAVEMULTI3 and you will always get the reported error.

I am sorry for not having better news...

Will

Answers (0)