Archives mensuelles : décembre 2014

How to read order details from the liveCache with FM /SAPAPO/OM_ORDER_GET_DATA

http://scn.sap.com/docs/DOC-54254

How to read order details from the liveCache with FM /SAPAPO/OM_ORDER_GET_DATA

Very often when analyzing issues in APO I find it useful to read order details from the liveCache.

We can see from the order data stored in the liveCache when it was created, whether it was already transferred to ECC, what is the net processing times (in seconds) of the modes of the activities and, of course, compare all that information to the interactive screens we use all the time, be it Master Data (like PDS display) or application-specific (like Product View or a Planning Book).

One way to do this is by executing Function Module /SAPAPO/OM_ORDER_GET_DATA, as described below:

1) Get the OrderID number of the order.

 

At the Product View, execute ok-code GT_IO and then copy the value of the field Internal Order corresponding to the order you want to get the details on:

1_orderid.jpg

2_orderid.jpg

 

Another way would be to open the Order View (/SAPAPO/RRP2) for the order, then enable the debugger with ok-code /h and press enter twice to open the debugger. Then, copy the orderid from field GT_ORDERS[1]-ORDERID

3_orderid.jpg

4_orderid.jpg

 

2) Get the GUID of the Planning Version
(you can skip this step if you are reading order data from the Active Version / Planning Version 000).  

 

This can be done in transaction /SAPAPO/OM16. There, specify the name of the Model and the name of the Planning Version and execute. Then, copy the value of field Guid of Planning Vers.

5_plngversionguid.jpg

6_guidofplanningversion.jpg

 

3) Execute in transaction SE37 the Function Module /SAPAPO/OM_ORDER_GET_DATA.

At the selection screen of the transaction, specify the Function Module and click in Test/Execute button (F8)

7_functionmodule.jpg

 

On Test Function Module screen, set the indicator Uppercase/Lowercase

8_uppercaselowercase.jpg

 

In the Details View of Import Parameter IS_GEN_PARAMS, specify the GUID of the Planning Version (always 000 for the Active version)

9_is_gen_params.jpg

10_simversion.jpg

 

Press Back button. Then, in the Details View of IT_ORDER, specify the OrderID

11_it_orders.jpg

12_it_orders.jpg

 

Press back button and then execute the Function Module. Then, click on Save button in the popup and check the results:

13_execute.jpg

14_save.jpg

15_results.jpg

 

4) Analyze the data

 

  • You can check, for example, the date and time this order was created in APO, in export parameter ET_ORDERS, field CREATION_TIME (all dates are displayed in UTC, exactly as stored in the liveCache).
  • If you are in a scenario with alternative sequences, you can see in ET_MODES, field PROC_TIME, what is the net processing time of that mode, in seconds.
  • You can see the time-continuous and the bucket capacity requirement for each of the modes in ET_CAP_REQS.
  • In the example above, you can see this order was not sent over to ECC yet as ET_ORDMAPS is empty.
  • If there are activity relationships in the order, they will be shown in ET_INTERN_CONSTRAINTS.
  • Many other informations can be checked, if required, and then compared to the values displayed in interactive transaction (like the /SAPAPO/RRP3 or /SAPAPO/SDP94).

Ouvrir une période MM (pour les mouvements de stocks) MMPV

Transaction MMPV

Code société 

Période à ouvrir

Contrôler et déplacer

Autoriser qtés négatives dans période précédente

Autoriser valeurs négatives dans période précédente

 

Attention, n’avance que d’une seule période à la fois. Il faut la lancer plusieurs fois pour avancer de plusieurs mois.

Tips and techniques to smoothly and seamlessly transfer data between SAP APO and SAP ERP, leveraging the core interface (CIF)

Master Data Exits — SAP APO

Business Add-Ins (BAdIs) and customer exits

  • Exist for each publication type
  • Can be used to interrupt the program flow during the sending phase of direct and periodic sending

Master data exits

  • Inbound processing: Location — APOCF001 EXIT_/SAPAPO/SAPLCIF_LOC_001
  • Inbound processing: Resource — APOCF008  EXIT_/SAPAPO/SAPLCIF_RES_001
  • Inbound processing: Products — APOCF005   EXIT_/SAPAPO/SAPLCIF_PROD_001
  • Inbound processing: PPM — APOCF012   EXIT_/SAPAPO/SAPLCIF_PPM_001
  • BAdI: PPDS PDS — /SAPAPO/CURTO_CREATE
  • BAdI: SNP PDS — /SAPAPO/CURTO_SNP
  • Inbound processing: Source of supply — APOCF032EXIT_/SAPAPO/SAPLCIF_TPSRC_001

Transaction Data Exits — SAP APO

  • Inbound processing: Stock — APOCF011 EXIT_/SAPAPO/SAPLCIF_STOCK_001
  • Inbound processing: Production orders and planned orders — APOCF004 EXIT_/SAPAPO/SAPLCIF_ORD_001
  • Outbound processing: Production orders and planned orders — APOCF013 EXIT_/SAPAPO/SAPLCIF_ORD_002 (before send user exit)
  • Inbound processing: Purchase order documents — APOCF006 EXIT_/SAPAPO/SAPLCIF_PU_001
  • Inbound processing: Sales and distribution document — APOCF010 EXIT_/SAPAPO/SAPLCIF_SLS_001

SAP R/3 Exits

Customer exits in SAP R/3 for the publication types:

  • CIFORD03: Change Order Data
    • To change orders that are transferred from SAP APO to SAP R/3 in R/3 inbound queue
  • CIFORD01: Change Object Type and Order Data
    • To change order data that is transferred from SAP APO to SAP R/3 and is already in SAP R/3 format in R/3 inbound queue
  • PPAPO002: Influence Order Data after the Transfer from SAP APO
    • To influence the data that was transferred from SAP APO to SAP R/3 for a manufacturing order before it is transferred to the SAP R/3 manufacturing order
  • PPAPO008: Override Order Type for Planned Order Conversi on
    • To manually influence the order type of a manufacturing order generated by conversion from SAP APO (customer exit EXIT_SAPLCOXT_002)
  • PPAPO004: Re-Explode BOMs for Planned Order Conversion
    • To force the re-explosion of a BOM (customer exit EXIT_SAPLCOXT_001)
  • PPAPO009: Add Components and Items
    • To run own checks when components are added to a manufacturing order from SAP APO
  • PPAPO007: Override Checkbox Fields for Manufacturing Orders, SAP APO ® SAP R/3
    • To override checkbox fields for manufacturing orders on transfer from SAP APO to SAP R/3
  • Material master — CIFMAT01  EXIT_SAPLCMAT_001
    • To add new fields in the material master that are in SAP APO but not in SAP R/3 (for SAP R/3 to be the material master system of record, this user exit is necessary to add the new fields)
  • PDS transfer — CUSLNTRTO_ADDIN_SAP
    • To influence values and change fields on the PDS that are transferred to SAP APO from SAP R/3
  • CIFPUR01 (enhancement for the transmission of customer-specific purchase order fields)
    • To change purchasing data from purchase requisitions, POs, scheduling agreement schedule lines (OLTP scheduling agreement), and confirmations/shipping notifications (for SAP APO and OLTP scheduling agreements)
  • CIFPUR02 (enhancement PO interface — inbound)
    • To change PO data from SAP APO before a purchase req, scheduling agreement schedule line, or a PO is created in the OLTP system

Additional Exits

Customer exits for orders and manufacturing orders in SAP APO

  • APOCF020 — User-specific fields in the order interface (after posting in SAP liveCache or to the database)
  • APOCFPIP — Publication of in-house production orders (planned orders, manufacturing orders)

BAdIs

  • /SAPAPO/CL_EX_CIF_IP — Comparison of APO data and CIF data
    • To control if and when the activity dates planned in SAP APO should be rescheduled, or if a change to the order quantity in SAP R/3 leads to a proportional change to receipt and requirement quantities