P. 1
Setup Matrix APO

Setup Matrix APO

|Views: 765|Likes:
Published by Babusaheb Thackeray

More info:

Published by: Babusaheb Thackeray on Feb 16, 2012
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

11/15/2013

pdf

text

original

Determine Setup ID in APO by Characteristic Values

Applies to:
APO 7.0 and ERP 6.0 For more information, visit the Supply Chain Management homepage.

Summary
Learn how to change the setup id of APO activities with object dependencies based on characteristic values. The setup id is used to control PP/DS sequence optimization of activities in APO planned or production orders. Author: Dr. Frank Horlacher

Company: SAP AG Created on: 29 May 2009

Author Bio
Dr. Frank Horlacher of ISM PI IBU Mill Solution Management WDF has 9 years experience in SAP APO development and solution management in supply chain management production planning, detailed scheduling, manufacturing execution and sequencing system integration. Area of Expertise:SAP APO Modules: DP, SNP, PP/DS, ATP, CIF; SAP ERP Modules: SD, MM, PP, FI-CO

SAP COMMUNITY NETWORK © 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 1

Determine Setup ID in APO by Characteristic Values

Table of Contents
Introduction .........................................................................................................................................................3 Prerequisites.......................................................................................................................................................3 Create Reference Characteristic in ERP ............................................................................................................4 Add Reference Characteristic to Variant Class of Material in ERP ....................................................................6 Map Object Characteristics in APO ....................................................................................................................7 Transfer Characteristic and Class to APO..........................................................................................................8 Check Reference Characteristic in APO ............................................................................................................9 Create Function Module in ERP .......................................................................................................................10 Create Variant Function in ERP .......................................................................................................................13 Create Function Module in APO .......................................................................................................................15 Create Variant Function in APO .......................................................................................................................18 Create Object Dependency in ERP ..................................................................................................................22 Assign to Operation of Routing in ERP ............................................................................................................24 Resend PDS to APO from ERP........................................................................................................................25 Order Creation ..................................................................................................................................................27 Setup Optimization ...........................................................................................................................................28 Related Content................................................................................................................................................33 Copyright...........................................................................................................................................................34

SAP COMMUNITY NETWORK © 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 2

Determine Setup ID in APO by Characteristic Values

Introduction
I will guide through a step by step procedure how to configure the characteristic depedent determination of the setup id in the SAP ERP and APO system. As a result the APO PP/DS module will create planned orders with operations (activities) with setup ids according to the rules you defined in object dependencies based on characteristic values of the output node of the planned order.

Prerequisites
As a prerequisite you need have created setup groups in the ERP system and transferred them to APO. You can maintain the setup groups in APO with transaction /SAPAPO/CDPSC6 - Production Planning -> Setup Group/Setup Matrix -> Maintain Setup Groups.

SAP COMMUNITY NETWORK © 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 3

sap.com 4 .sap.sap.boc.bpx.com | BPX .sdn.Classification System -> Master Data -> Characteristics With the reference characteristic you overrule the master data settings. SAP COMMUNITY NETWORK © 2009 SAP AG SDN .com | BOC .Determine Setup ID in APO by Characteristic Values Create Reference Characteristic in ERP The first step is to create a reference characteristic in the ERP system. Transaction CT04 . In our case we overrule the setup group in the PDS.

There you enter the reference to the master data table and field.sdn.com 5 .com | BOC .boc. You can check the fields in APO by using the ABAP dictionary with transaction SE11 and look to structures beginning with /SAPAPO/CULL_CFG… SAP COMMUNITY NETWORK © 2009 SAP AG SDN .bpx. Above that you also need to check the referenceable fields in the APO PDS because not all ERP master data fields exist in APO. the routing and put the cursor in the field you want to overrule and press the F1 button there you can see the table and the field the particular screen field is representing.sap.sap.g.com | BPX .sap. Please read note 610873.Determine Setup ID in APO by Characteristic Values The most important setting is done in the Additional data tab of the characteristic maintenance. Now you might ask: how do I know which field to enter here. A good idea is to consult the SAP help for object dependencies where you can find the referenceable fields or you go to the master data object itself e.

sap.Classification System -> Master Data -> Classes Do not forget to enter the organizational area for APO integration in the new line. SAP COMMUNITY NETWORK © 2009 SAP AG SDN .com 6 .sap. Transaction: CL02 .sap.bpx.Determine Setup ID in APO by Characteristic Values Add Reference Characteristic to Variant Class of Material in ERP Add the newly created characteristic to the variant class of the material.boc.com | BOC .sdn.com | BPX .

com | BPX .sap.boc.Determine Setup ID in APO by Characteristic Values Map Object Characteristics in APO Prior to activating the integration model to APO for characteristics and classes you need to map the object characteristics from ERP structures to APO structures because the data model is different.sdn.com | BOC .com 7 .bpx.sap. Advanced Planning and Optimization → Master Data → Classification and Configuration → Map Object Characteristics SAP COMMUNITY NETWORK © 2009 SAP AG SDN . You do that in the customizing of APO.sap.

com | BPX . Transactions: CFM1 .Determine Setup ID in APO by Characteristic Values Transfer Characteristic and Class to APO You transfer the reference characteristic and the variant class to APO by changing and activating your APO integration model for characteristics and classes in ERP.sap.sap.Integration Model -> Create CFM2 .boc.bpx.sdn.sap.Integration Model -> Activate SAP COMMUNITY NETWORK © 2009 SAP AG SDN .com | BOC .com 8 .

com | BOC .Master Data -> Classification System -> Characteristics SAP COMMUNITY NETWORK © 2009 SAP AG SDN .com 9 .bpx.com | BPX .sap.boc.Determine Setup ID in APO by Characteristic Values Check Reference Characteristic in APO You can now see the new reference characteristic in APO.sap. Transaction: CT04 . The characteristic should have the correct APO reference table and field we defined before in the mapping.sdn.sap.

SAP COMMUNITY NETWORK © 2009 SAP AG SDN .bpx.sap.com | BOC . Transaction: SE80 .sap. The function module needs the default parameters for variant function modules.Determine Setup ID in APO by Characteristic Values Create Function Module in ERP We now create a function module with which we want to change the setup group from the master data PDS to the new value.com | BPX . We need a function module to be used in a variant function we use later in the object dependency.sap.sdn.Tools -> ABAP Workbench -> Overview -> Object Navigator The function module needs to be created in ERP and APO because of the correct syntax check in both systems although in this example we only need it in APO for execution.boc.com 10 .

bpx.boc.sap.com | BOC .sap.sdn.com | BPX .com 11 .Determine Setup ID in APO by Characteristic Values SAP COMMUNITY NETWORK © 2009 SAP AG SDN .sap.

Determine Setup ID in APO by Characteristic Values This is the interface and the empty code of the function module: FUNCTION Z_MMF_SETUP_GROUP.sap.com | BPX . You do not need to add any source code to the function module in the ERP system as the function module is used in APO PDS explosion.com | BOC .sap.bpx. SAP COMMUNITY NETWORK © 2009 SAP AG SDN .boc.sap. *"---------------------------------------------------------------------*"*"Local Interface: *" IMPORTING *" VALUE(GLOBALS) LIKE CUOV_00 STRUCTURE CUOV_00 *" TABLES *" MATCH STRUCTURE CUOV_01 *" QUERY STRUCTURE CUOV_01 *" EXCEPTIONS *" FAIL *" INTERNAL_ERROR *"---------------------------------------------------------------------ENDFUNCTION.com 12 .sdn.

sap.sdn. The variant function can be called in the object dependency.com | BOC .sap.Variant Configuration -> Tools -> Function -> Create SAP COMMUNITY NETWORK © 2009 SAP AG SDN .com | BPX .com 13 .sap.Determine Setup ID in APO by Characteristic Values Create Variant Function in ERP We now create the variant function which wraps the function module we created in the last step. Transaction: CU65 .boc.bpx.

sap.com 14 .bpx.Determine Setup ID in APO by Characteristic Values In this example I created a variant function which changes the setup group based on the steel grade of the planned order output.boc.sdn. SAP COMMUNITY NETWORK © 2009 SAP AG SDN .com | BPX .com | BOC .sap.sap.

Transaction: SE80 . This is the example ABAP code I used: FUNCTION z_mmf_setup_group.sap. TYPE /sapapo/loc_locno_rstr. /sapapo/cdps_setup_group.sap.boc.bpx.com | BPX . Repeat the parameter definition of the function module interface as described in step Create Function Module in ERP. /sapapo/cdps_setup_id. TYPE /sapapo/loc_locno_rtab. cuov_01. this time with implemented source code. /sapapo/cdps_setup_item. * * * * * Location lv_location Location structure ls_location TYPE /sapapo/locno. /sapapo/cdps_setup_id. TYPE /sapapo/locid.Determine Setup ID in APO by Characteristic Values Create Function Module in APO To execute the object dependency in the PDS explosion in APO PP/DS we also need to create the function module in the APO.sdn.com 15 .sap. TYPE /sapapo/locid_tab.Tools -> ABAP Workbench -> Overview -> Object Navigator The function module needs to have exactly the same name as in ERP. Location table lt_location Location ID table lt_locid Location ID ls_locid READ TABLE query WITH KEY varnam = 'MM_IGRADE' SAP COMMUNITY NETWORK © 2009 SAP AG SDN .com | BOC . *"---------------------------------------------------------------------*"*"Local Interface: *" IMPORTING *" VALUE(GLOBALS) LIKE CUOV_00 STRUCTURE CUOV_00 *" TABLES *" MATCH STRUCTURE CUOV_01 *" QUERY STRUCTURE CUOV_01 *" EXCEPTIONS *" FAIL *" INTERNAL_ERROR *"---------------------------------------------------------------------DATA: lv_apo_group_id lv_apo_item_id lv_setup_group lv_setup_item ls_cuov_01 lv_setup_id TYPE TYPE TYPE TYPE TYPE TYPE /sapapo/cdps_setup_id.

ENDIF. * get location id CALL FUNCTION '/SAPAPO/DM_LOCID_GET' EXPORTING i_locno_rtab = lt_location = lt_locid IMPORTING e_locid_tab EXCEPTIONS no_location = 1 not_qualified = 2 OTHERS = 3.sap. lv_location = 'M113'. lv_setup_group = 'MM_HR3'.com | BPX .com | BOC . lv_setup_group = 'MM_HR4'.bpx. CHECK sy-subrc = 0.sap.sap.sdn. * fill location structure ls_location-sign = 'I'. ls_location-low = lv_location. lv_setup_group = 'MM_HR6'. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.Determine Setup ID in APO by Characteristic Values INTO ls_cuov_01. ENDIF. EXCEPTIONS not_found OTHERS CALL FUNCTION '/SAPAPO/DM_SETUP_IDS_GET' EXPORTING i_setup_id = lv_setup_id SAP COMMUNITY NETWORK © 2009 SAP AG SDN . ENDIF.com 16 . IF ls_cuov_01-atwrt = '3'. ls_location-option = 'EQ'.boc. APPEND ls_location TO lt_location. READ TABLE lt_locid INTO ls_locid INDEX 1. CALL FUNCTION '/SAPAPO/DM_SETUP_ID_READ' EXPORTING i_locid = ls_locid i_setup_group = lv_setup_group i_setup_item = lv_setup_item IMPORTING e_setup_id = lv_setup_id = 1 = 2. lv_setup_group = 'MM_HR5'. ENDIF. IF ls_cuov_01-atwrt = '5'. IF ls_cuov_01-atwrt = '6'. IF sy-subrc = 0. IF ls_cuov_01-atwrt = '4'. IF sy-subrc <> 0. ENDIF.

ls_cuov_01-varnam = 'MM_PLPO_RFGRP'. * also fill atwrt due to error in code in standard ls_cuov_01-atwrt = ls_cuov_01-atflv = ls_cuov_01-atfor = APPEND ls_cuov_01 ENDIF. You can also use a z-table to store the information of steel grade and setup group.com 17 . The code which interprets the object dependencies for setup in APO also wants to know the character value even if the setup id is a numeric value.Determine Setup ID in APO by Characteristic Values IMPORTING e_setup_group_id = lv_apo_group_id e_setup_item_id = lv_apo_item_id EXCEPTIONS not_found OTHERS = 1 = 2. 'NUM'. lv_setup_group. In APO the setup group is only for display the real value for scheduling is represented by the setup id which is only known internally.bpx. ENDFUNCTION.com | BPX .boc. The steel grades are predefined values from the configuration. The setup groups are defined in a setup matrix in the master data. CLEAR ls_cuov_01. As you probably do not know the GUID of the location I included a function module to get the LOCID from the location name.sdn.sap. SAP COMMUNITY NETWORK © 2009 SAP AG SDN . What do I do in the code? First I wrote down the if-clause what should happen with the setup group for what steel grade. The function module to read the setup ids which are used in scheduling in the end needs to know the location id.sap. But there is a trick you absolutely need to follow because of the different formats of setup group and setup id in APO and ERP. lv_apo_group_id. In the end you set the reference characteristic value in the match table.com | BOC . So the line ls_cuov_01-atwrt = lv_setup_group.sap. TO match. is very important to make the change work.

bpx.sap.com | BPX .com 18 .sap. But it is the same transaction code as in the ERP. The transaction for that might not be found in the tree of the SAP Menu. SAP COMMUNITY NETWORK © 2009 SAP AG SDN .Create Function When you create the variant function the system wants to have a status. In APO there are no default status for variant functions.Determine Setup ID in APO by Characteristic Values Create Variant Function in APO After we finished the function module we can now create the variant function in APO. So you need to create them in customizing.com | BOC . Just press yes and maintain the entry in the customizing table.sdn. CU65 .sap. If you press F4 value help on the status field when creating the function the system asks you to create a status.boc.

Determine Setup ID in APO by Characteristic Values At least maintain the “released” status.com | BOC .com | BPX .com 19 .sap. SAP COMMUNITY NETWORK © 2009 SAP AG SDN .sap.bpx.boc.sap.sdn.

Determine Setup ID in APO by Characteristic Values Then you can go on creating the variant function with the characteristics.sap.com | BPX .sap.com 20 . SAP COMMUNITY NETWORK © 2009 SAP AG SDN .bpx.com | BOC .sap.sdn.boc.

com | BPX .com 21 .boc.sap.bpx.sap.sap.sdn.Determine Setup ID in APO by Characteristic Values SAP COMMUNITY NETWORK © 2009 SAP AG SDN .com | BOC .

com 22 .com | BOC .Modeling Environment for Variant Configuration for easier maintenance of object dependencies.sap.boc.sdn.com | BPX .bpx.sap.Determine Setup ID in APO by Characteristic Values Create Object Dependency in ERP The next step is to create the object dependency in ERP and assign it to the operation of the routing. I use the transaction PMEVC .sap. SAP COMMUNITY NETWORK © 2009 SAP AG SDN .

sap.sap. This is the sample code for the dependency: FUNCTION Z_MMF_SETUP_GROUP (MM_IGRADE =$PARENT. SAP COMMUNITY NETWORK © 2009 SAP AG SDN .MM_IGRADE.sap.com | BPX .com 23 .sdn.bpx.boc.MM_PLPO_RFGRP) We define here that the steel grade of the parent node influences the reference characteristic of the activity in APO.Determine Setup ID in APO by Characteristic Values The dependency group must be SAPAPOACT to integrate the object dependency to the APO activity. MM_PLPO_RFGRP =$SELF.com | BOC .

com | BOC .Determine Setup ID in APO by Characteristic Values Assign to Operation of Routing in ERP The object dependency needs to be assigned to the operation of the routing with the resource for setup optimization later on in APO.boc.com | BPX .sap.bpx.sap. You can navigate to the object maintenance for the routing out of the PMEVC .sap. SAP COMMUNITY NETWORK © 2009 SAP AG SDN .com 24 .Modeling Environment for Variant Configuration transaction via the menu.sdn.

Production Data Structure (PDS) -> Display Production Data Structures SAP COMMUNITY NETWORK © 2009 SAP AG SDN .boc. Check PDS in APO Let’s check if the transfer has worked and the dependency can be seen in the APO PDS. Transaction: /SAPAPO/CURTO_SIMU .Transfer Production Data Structure (PDS).sdn.sap.sap.sap.bpx.Determine Setup ID in APO by Characteristic Values Resend PDS to APO from ERP Now that changed the routing in ERP we want to update the PDS in APO with transaction CURTO_CREATE .com 25 .com | BPX .com | BOC .

sap.Determine Setup ID in APO by Characteristic Values The procedure is indeed on the right activity and you can also see the default setup group of the PDS as defined in the master data.bpx. SAP COMMUNITY NETWORK © 2009 SAP AG SDN .sdn.com | BPX .sap.sap.com 26 .com | BOC .boc. This is the value we want to change based on different characteristic values of the output node in the order.

Production Planning -> Interactive Production Planning -> Product View. And indeed the setup group was changed to the expected value for the operation. In characteristic value assignment I use a steel grade which should result in a different setup group from the default setting in the PDS.com 27 .sap.bpx.boc.sdn.com | BPX .Determine Setup ID in APO by Characteristic Values Order Creation Now that we created all the master data let’s look at the order creation if our settings take effect. I simply create an order in the /SAPAPO/RRP3 .sap.com | BOC .sap. SAP COMMUNITY NETWORK © 2009 SAP AG SDN .

sap.Determine Setup ID in APO by Characteristic Values Setup Optimization After order creation we use the PP/DS Optimizer to schedule the operations with setup groups in a sequence according to the setup matrix we defined and entered in the resource master.boc.com 28 .sap.Production Planning -> Setup Group/Setup Matrix -> Maintain Setup Matrix /SAPAPO/RES01 .bpx.com | BPX .Master Data -> Resource -> Resource SAP COMMUNITY NETWORK © 2009 SAP AG SDN .com | BOC .sdn.sap. Transactions: /SAPAPO/CDPSC7 .

boc.com | BOC .com | BPX .Determine Setup ID in APO by Characteristic Values Assign setup matrix to the resource.sdn.sap. SAP COMMUNITY NETWORK © 2009 SAP AG SDN .sap.bpx.sap.com 29 .

sdn.sap.com | BPX .com 30 .com | BOC .bpx.Determine Setup ID in APO by Characteristic Values After the planning run the operations are scheduled infinitely to the resource with no particular sequence. SAP COMMUNITY NETWORK © 2009 SAP AG SDN .sap.boc.sap.

com | BOC .sap.sdn.bpx.boc.sap.com 31 .Determine Setup ID in APO by Characteristic Values The next step is the finite scheduling with the PP/DS Optimizer.sap.com | BPX . SAP COMMUNITY NETWORK © 2009 SAP AG SDN . Setup costs need to have weights in the basic settings to make the optimizer create a sequence with low setup costs according to the rules defined in the setup matrix.

g. 3.com | BOC .bpx. and 6. The setup optimization works in parallel with block scheduling. The coloring can be done in the customizing of the graphical planning board. Here other constraints exist which prevent the scheduling next to the other green operation. The sequence is also from a low number to the higher number e.boc.com 32 .com | BPX . In the screenshot you can see that the operations have different colors according to the setup group.sdn.sap. The operations with the same setup group are scheduled next to each other. The only exception is the first green operation. SAP COMMUNITY NETWORK © 2009 SAP AG SDN .sap.sap. 4.Determine Setup ID in APO by Characteristic Values After the optimization we can see the finite schedule on the resource. 5.

boc.sap.htm SAP COMMUNITY NETWORK © 2009 SAP AG SDN .bpx.com | BPX .com/bp_primarysteel1500/Steel_China/html/index.sdn.com 33 .sap.sap.sap.sap.sap.com | BOC .com/irj/scn/weblogs?blog=/pub/wlg/12519 Product Definition in the Primary Metals Industry https://www.sdn.sdn.com/irj/scn/weblogs?blog=/pub/wlg/6888 SAP Best Practices for Primary Steel http://help.Determine Setup ID in APO by Characteristic Values Related Content The Importance of Batches for Metals Companies https://www.

XHTML and W3C are trademarks or registered trademarks of W3C®.sap. in the United States and in other countries. VideoFrame.Determine Setup ID in APO by Characteristic Values Copyright © Copyright 2009 SAP AG. z/VM. BladeCenter. XML. zSeries. GPFS. System z.sap. SAP. iSeries. R/3. MVS/ESA. Intelligent Miner. Outlook. MetaFrame. OS/400. POWER6. POWER5. SAP COMMUNITY NETWORK © 2009 SAP AG SDN . BusinessObjects. and MultiWin are trademarks or registered trademarks of Citrix Systems. These materials are subject to change without notice. POWER5+. Inc. System z10. OS/390. Tivoli and Informix are trademarks or registered trademarks of IBM Corporation. AS/400. IBM. POWER. Netfinity. and Motif are registered trademarks of the Open Group. HTML. and SAP Group shall not be liable for errors or omissions with respect to the materials. Power Architecture.com | BPX . used under license for technology invented and implemented by Netscape. UNIX. Crystal Reports. The information contained herein may be changed without prior notice. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. xSeries. Java is a registered trademark of Sun Microsystems. Citrix. All rights reserved. and other countries. Web Intelligence. SAP Business ByDesign. OpenPower. Duet.A. Oracle is a registered trademark of Oracle Corporation. Acrobat. WebSphere.boc. System p.bpx. Inc. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only. S/390 Parallel Enterprise Server.com | BOC . DB2. PowerVM. Excel. WinFrame. the Adobe logo. and PowerPoint are registered trademarks of Microsoft Corporation. DB2 Universal Database.com 34 . Microsoft. OSF/1. POWER6+. World Wide Web Consortium. Nothing herein should be construed as constituting an additional warranty. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.sdn. System p5. Redbooks. ICA. System i5. if any. Parallel Sysplex. All other product and service names mentioned are the trademarks of their respective companies.sap. Inc. S/390. System i. JavaScript is a registered trademark of Sun Microsystems. Xcelsius. National product specifications may vary. Program Neighborhood. Business Objects is an SAP company. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services. Windows. PostScript. z/OS. without representation or warranty of any kind. BatchPipes. Adobe. AIX. z9. Data contained in this document serves informational purposes only. PowerPC. System x. HACMP. X/Open. System z9. System Storage. i5/OS.S. Massachusetts Institute of Technology. and other Business Objects products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Business Objects S. ByDesign. RETAIN. PartnerEdge. eServer. RACF. Crystal Decisions. OS/2. DB2 Connect. Business Objects and the Business Objects logo. z10. SAP NetWeaver. Linux is the registered trademark of Linus Torvalds in the U. pSeries. and Reader are either trademarks or registered trademarks of Adobe Systems Incorporated in the United States and/or other countries.. and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->