Ansicht
Dokumentation

APO_PPS_BADI_OPT - Change Planning Data Before Optimization

APO_PPS_BADI_OPT - Change Planning Data Before Optimization

CPI1466 during Backup   General Material Data  
This documentation is copyright by SAP AG.
SAP E-Book

This Business Add-In (BAdI) is used in the component, SCM-APO-PPS.

You can use the Business Add-In /SAPAPO/CDPS_OPTDATA (user changes to optimization data) to change the planning data from the optimizer as required.

At the start of the optimization run, the optimizer downloads the planning data from the SAP liveCache and uploads it to the liveCache again on completion of the optimization run. You can use this BAdI to change the planning data after the download and before the start of the optimization run.

Uses

To largest number of uses of this BAdI are available by using the method SET_AFTER_DATA_DOWNLOAD. This method can be called after the data collection process. The planning data can be changed in the following ways before the optimization run:

  • Changing the pegging structure
Should you require a special pegging result for an optimization process, it may be necessary to change the pegging amounts of the receipt and requirement elements using a heuristic. Until now, it was only possible to start this heuristic along with the optimization in a background job. This made it possible to start the optimizer without this job and therefore without the special heuristic. If you use this BAdI, it is not possible to start the optimizer without heuristics.
  • Changing order priorities
It may be necessary, to change the priorities for the optimization run only but not in the system. You can use this BAdI to change the priorities after downloading the planning data from the SAP liveCache.
  • Changing requirements and deliveries data
It may be necessary to consider extra buffer for a material in the optimization run depending on the current planning situation. It may also be necessary to separate the buffer from the current planning situation, such as the pegging situation. You can use this BAdI to simulate this buffer by changing the data of purchase requisitions, forecasts or sales orders.
This data is only changed in the optimization data and not in the system data. This avoids any falsification of the actual planning situation.
Some complex scenarios cannot be processed in one planning step. Therefore, it may be necessary to reset constraints and restart a new optimization run to take any reset constraints into account. You can use this BAdI to execute such a reset after downloading the planning data.
  • Influence the Optimization Result per Pegging Area
You can use the table ET_PEGID_AVAILDATE to influence the optimization result in two ways:
  • You can define your own replenishment lead time for components produced in-house and components procured externally. Optimization then takes this user-defined replenishment lead time into account as the planned delivery time or in-house production time for missing components for which the system has not created any receipt elements. In this way the system avoids a situation where superordinate orders are scheduled too early. As a prerequisite, you must have set the Consider Planned Delivery Time indicator in the Optimization Profile.

  • It is possible to exclude certain pegging relationships from the optimization problem. To do so, a setting must be made for the pegging area. Once this setting has been made it is no longer necessary to exclude each individual pegging relationship from the table ET_PEG_INFO.

  • Change the Planned Delivery Times
You can use the table ET_BANF_SCHED_TIME to change the planned delivery times per purchase requisition. Optimization then uses the planned delivery times defined by the user. As a prerequisite the Consider Planned Delivery Time indicator in the Optimization Profile must have been set.

Note
The BAdI does not execute any consistency checks of the user-specific changes. This means that every one who implements the BAdI is responsible for ensuring the consistency of the changed data.

The BAdI provides the following methods:

  • SET_BEFORE_DATA_DOWNLOAD
    Accessed before the data collection process.
  • SET_AFTER_DATA_DOWNLOAD
    Accessed after the data collection process.
  • SET_AFTER_DATA_UPLOAD
    Accessed after recording the data in the liveCache.
  • SET_BEFORE_DATA_UPLOAD
    Accessed before recording the data in the liveCache.

After you have called the IMG activity, proceed as follows:

  1. In the following dialog box, enter in the field "Implementation" a name for the BAdI implementation and choose Copy.
If implementations have already been created for the BAdI, a dialog box with the existing implementations will be displayed. In this dialog box, choose Create.
  1. In the corresponding field, enter a short text for implementation .
  2. In the tab Propertiesenter filter properties - if this is a filter-dependent BAdI.
  3. Choose the tab Interface.
The name of the implementing class is generated by the system based on the name of your impmlementation. You can change the name.
If the BAdI is a menu exit, the tab FCodes also appears.Enter a function here and, if necessary, additional data.
  1. Save your entries and assign a package.
  2. Position the cursor on a method. Call up the Class Builder by double-clicking it.
  3. Between the statements method <Interface-Name>~<Name of Method>. and endmethod, enter the coding you request for the implementation.
  4. Save and activate your coding, and navigate back to the screen Change Implementation.
  5. Save on the screen Change Implementation.
Note: You can first create an implementation for the BAdI and then activate this later on. In this case, close the processing function at this time.
  1. Choose Activate.
When the application program is executed, the coding you have created will be run.






CL_GUI_FRONTEND_SERVICES - Frontend Services   BAL Application Log Documentation  
This documentation is copyright by SAP AG.

Length: 7852 Date: 20240524 Time: 014930     sap01-206 ( 130 ms )