cancel
Showing results for 
Search instead for 
Did you mean: 

Changing & deleting the SNP PDS planned order in APO using BAPI

former_member282968
Contributor
0 Kudos


Hi,

There is a requirement to consolidate the SNP PDS planned order created from CTM in APO. This is to change one of the SNP PDS planned order by adding the quantities of the other planned order , which is to make it into one & delete the other SNP PDS planned order. Can this be done progrmatically using BAPI?. As we know this cant be changed in RRP3 as the SNP-PDS are uneditable.Please help me on this one. As I need the solution to this ASAP.

Is there any BAPI/FM using which SNP PDS planned order can be changed? What is the BAPI for PPDS planned order creation / change?

With thanks & regards,

Naveen

Message was edited by: Naveen Srinivasa

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

You can try below BAPIs:

BAPI_MOSRVAPS_SAVEMULTI3

BAPI_MOSRVAPS_CONFHEADMULTI

BAPI_MOSRVAPS_CREATESNPORDER

/SAPAPO/DM_ORDERHEAD_CHANGE

/SAPAPO/DM_PROD_ORDER_CHANGE

/SAPAPO/DM_ORDER_UPDATE

former_member282968
Contributor
0 Kudos

Hi,

Used BAPI 'BAPI_MOSRVAPS_SAVEMULTI3' (Create or Change In-House Production Orders) to change the planned order in which we are able to change & trigger change pointers as well. But, like how it works in RRP3 for ATP category EE ( it doesn’t allow to change ) BAPI is returning an error message saying

“Order was created with other PPM type (4). Changing not possible”. Though it works for planned orders coming from ECC( for category AJ etc). Requirement is only for changing the SNP PDS planned order created in APO (EE category type), which is not happening using this BAPI.

Debugged and found that it allows to change only when the APO_APPLI is 2 (gc_application_cdps) else it gives the msg "/SAPAPO/PROD 619".

With thanks & regards,

Naveen

former_member282968
Contributor
0 Kudos

I was able to change & delete the SNP planned orders by using the FM " /SAPAPO/OM_ORDER_MODIFY" &   "/SAPAPO/OM_ORDER_DELETE" respectively.

But when the changes are done it doesnt trigger any change pointers.I want to trigger a change pointers programatically .Please help me to identify the FM used to trigger change pointers in APO for SNP planned order.What should be the message type to be used?Or how to update the table /SAPAPO/DMCP which is used for change pointers in APO?


With thanks & regards,

Naveen

Former Member
0 Kudos

Hi Naveen

Reading through all the thread, just curious why the system is creating two planned orders?

When we run CTM run, the system simply takes demands into consideration and creates a receipt ( planned order). Unless the first planned order is firmed and you say not to touch those in CTM parameters, why would the system create a second planned order?

If for example, I have a demand of 100 CAR, the system creates a planned order for 100 CAR. Then you get 50 CAR more in demand , then shouldn't the system simply delete the first planned order and recreate a new planned order with 150 CAR?

Just a second thought if you were chasing the wrong thing....

marianoc
Active Contributor
0 Kudos

Hi Naveen,

This can be done in ABAP. Use FM: /SAPAPO/OM_ORDER_CHANGE' to change the Planned Order.

Kind Regards,

Mariano

former_member282968
Contributor
0 Kudos

Hi Mariano,

I have gone through the description of the FM it says:

This function module is complex and is subject to several technical restrictions. For this reason, you should not use ORDER_CHANGE for extended periods of time.

The recommended alternatives are:

OM_ORDER_CREATEfor creating orders
OM_ORDER_DELETEfor deleting orders
OM_ORDER_MODIFYfor changing existing order components

Have you used these FM any time?.Kindly share more details in case is you have used them.

with thanks & regards,

Naveen

marianoc
Active Contributor
0 Kudos

Hi Naveen,

We use /SAPAPO/OM_ORDER_MODIFY. This FM and the others FM listed by you are commonly used in APO. Check directly in SE37 using where is used and you will get an extensive list of programs that are using these FMs.. There you can get sample codes.

Kind Regards,

Mariano

former_member187488
Active Contributor
0 Kudos

Hello Naveen,

You're right, these FMs are unreleased FMs that intent to change orders in liveCache directly. You must be very familiar with input information to use them. They're not supported by SAP to be used in customizing program.
You can try BAPI_POSRVAPS_GETLIST3 and BAPI_POSRVAPS_SAVEMULTI3.

Best Regards,
Ada

former_member282968
Contributor
0 Kudos

Hi Ada,

I tried the BAPI: "BAPI_POSRVAPS_SAVEMULTI3" mentioned by you but since I am trying to change the SNP PDS planned order it will be of ORDER_TYPE  5. When I pass the ORDER_TYPE  5, it says "Order type 5 is not permitted for business object BUS10502".

May be only option left with me now is to try with the FM & change in the liveCache directly?

With thanks & regards,

Naveen

Former Member
0 Kudos

Hi Naveen,

Please check this link; http://www.erpgreat.com/apo/ctm-planned-orders-consolidation.htm

Thanks, Marius

former_member187488
Active Contributor
0 Kudos

Hi,

If it's SNP order, you should use below BAPIs:

10502                          APS Procurement Order
BAPI_POSRVAPS_CREATESNPORDER   Create or Change Stock Transfers or Purchase Requisitions for SNP

10503                          APS Manufacturing Order
BAPI_MOSRVAPS_CREATESNPORDER   Create or Change orders with SNP PPMs

Best Regards,
Ada