cancel
Showing results for 
Search instead for 
Did you mean: 

Change demand quantity with /SAPAPO/RRP_LC_ORDER_CHANGE

emanuel_sanchez
Participant
0 Kudos

Hello Gurus!!

Sorry for the long post, hope someone can help. If you need any more information to understand the issue just let me know. I'm new to ABAP APO and I have a custom program with an ALV output. This is showing a pegging report. Column Demand quantity is editable.

Let's say user wants to change first record quantity and instead of 11, He enters 50. Upon hitting the save button, the updated demand numbers the user entered, will overwrite the original demand numbers the planning run had suggested.

then when checking in /n/sapapo/rrp3, quantity in the first record should be the one user entered in example above (50).

how to save that quantity in the planning run?

I'm trying to use FM /SAPAPO/RRP_LC_ORDER_CHANGE to save it in liveCache but it is not working and it is not returning any messages.

is this update based on category and availability date? What parameters should be filled? or is there another way to update this quantity?

I'm using the following logic. (I added the new quantity in lt_inputs table and lt_operations table)

1 - I get the sim session with  /SAPAPO/RRP_SIMSESSION_CREATE

2 - I get order data with /SAPAPO/OM_ORDER_GET_DATA based on order id

3 - using the following parameters for FM (Do I need to use  /SAPAPO/RRP_EXPLODE before using the change function? )


CALL FUNCTION '/SAPAPO/RRP_LC_ORDER_CHANGE'

              EXPORTING

                is_order       = ls_orders

                iv_method      = 'C'

                is_ordkey      = ls_orderkey

                it_operations  = lt_operations

                it_activities  = gt_activities

*                it_outputs     = lt_outputs

                it_inputs      = lt_inputs

                iv_application = l_appl

                iv_end_date    = l_endti

                iv_flush       = 'X'

              IMPORTING

                et_changed_orders = lt_changed_orders

              EXCEPTIONS

                error_in_opr   = 1

                invalid_params = 2

                OTHERS         = 3.

4 - executing  /SAPAPO/RRP_FLUSH_ORDERS

5 - executing  /SAPAPO/RRP_COMMIT

Basically I need to know how to update demand quantity with custom program and see changes reflected in /n/sapapo/rrp3

Thanks in advance and regards!!!

Emanuel.

Accepted Solutions (1)

Accepted Solutions (1)

rupesh_brahmankar3
Active Contributor
0 Kudos

Hello Emanuel,

FM   /SAPAPO/RRP_LC_ORDER_CHANGE if you do not need PDS explosion

and FM   /SAPAPO/OM_ORDER_CHANGE which calls the LiveCache where you can change an order

Heuristics with their own strategy settings may only use these settings in planning.

Manual interface enhancement of the module /SAPAPO/RRP_SCHED_CONTROL_SET is required to change scheduling and date.

Best Regards,

R.Brahmankar

emanuel_sanchez
Participant
0 Kudos

Hi Brahmankar,

I see that /SAPAPO/RRP_LC_ORDER_CHANGE is already using /SAPAPO/OM_ORDER_CHANGE. I'm not an APO expert so I'm not sure if parameters I'm using are correct.

Is PDS explosion mandatory?

Thanks for your reply.

Regards!

Emanuel

rupesh_brahmankar3
Active Contributor
0 Kudos

Hello Emanuel,


You should explode the source of supply (PDS) as with an interactive change in quantity of a planned or production order whose BOM quantity also changed. So a new explosion should be carried out.


Best Regards,

R.Brahmankar

Answers (1)

Answers (1)

former_member187488
Active Contributor
0 Kudos

Hi,

Using those unreleased FM is not recommended. It is not supported by SAP if you encounter any problem or inconsistency.
If the order is forecast (planned independent requirement), you can use BAPI BAPI_PIRSRVAPS_SAVEMULTI. If it's other category, you can use corresponding BAPIs.

BR, Ada