Data Migration Of Production Orders

作者:郑德鼎 约 6 分钟阅读 更新日期:2024-02-22 2 年前更新 标签:PP, 生产
目录

Former Member

Posted onDecember 6, 2012 6 minute read

Data Migration Of Production Orders

FollowRSS feedLike

2 Likes 4,072 Views 1 Comment

DATA MIGRATION OF Production ORDERS

1.          Requirements

1.1             OVERVIEW

This artifact enables us to reuse attached program for successful data migration of Transactional data – production orders from SAP to SAP

1.2                 FUNCTIONALITY – PRODUCTION orders

A production order defines which material is to be processed, at which location, at what time and how much work is required. It also defines which resources/components are to be used and how the order costs are to be settled. As soon as a planned order or other request is generated from material requirements planning, the information is passed on to shop floor control; the order-relevant data is also added to ensure complete order processing. Production orders are used to control production within a company and also to control cost accounting.

1.3                 BUSINESS scenario

There would be a need of migration of production orders as a part of Transactional data migration @ cut off period. We may argue that if we run MRP in new system for the created sales order or planned independent requirements, we will generate planned orders which can be converted to production orders  or manual creation of orders

However, there might be interface or third party system which is used for Business planning need old order details which is unavoidable.  Under this Business scenario, Data migration of production order becomes critical object

Scenario 1 – No change in Master data – BOM OR ROUTING

Under this scenario , we need to Migrate first Master data required for creation of production order first such as work center,cost center,BOM,ROUTING ,PRODCUTION VERSION and of course Material master .

Once Master data has been done without any error, we may list out open production orders which needs to be migrated which will be in creation, release or under WIP. This is based on client Business requirement.

Now, we can use standard BAPI program to extract open orders based of filter criteria followed by Transformation (Mapping) and final upload. LSMW recording using SAP standard BAPI program developed in this artefact can be reused.

Scenario 2 : Changes done inside  production order BOM OR routing

Practically, in real time condition, Business users may change BOM or routing inside production orders which are used due to manufacturing requirement. This cannot be avoided as SAP PP system itself will allow this.

Ie)  Changes done in BOM or Routing inside released order to accommodate real time conditions . Changes are specific to order and not Master data.

Example

Let us say we have below material x having PV as 0001 , Alt Bom – 01, routing group counter – 01 and  PV – 0002 ,alt bom 02,routing group counter – 02

1.    Order no 1  : ( PV – 0001)

Once order is released, Business person changes below data inside order such as

Added a component in BOM and assigned to operation x

Changed UOM

No changes in routing

2.    Order No 2  : ( PV – 0002)

Once order is released, Business person changes below data inside order such as

Changing in process time , move time

Changing a alternative work centre

Adding a new operation for say rework

Deleting a operation which is not needed

No changes in BOM

I have provided both examples of BOM OR ROUTING change each. It may happen both change in order no 3.

Challenges of Business scenario

Scenario 1 – No change in Master data – BOM OR ROUTING

Since this scenario calls for no changes in order level Master data, it is simple and easy. We can use reuse Program

Scenario 2 : Changes done inside  production order BOM OR routing

Since this scenario need changes made in order to be reflected in migrated orders, we need a separate migration strategy as below

Extract changes done @ order level in BOM & routing

Create Master data in new system with changed BOM, routing, PV

Migrate orders using above master data as scenario 1

Limitation

Scenario 2 is applicable only if Production order uses PV only once. Multiple orders using same PV need a strategy to create new PV with Mapping

1.4                 IMPLEMENTATIONS

In General, Production order data migration from SAP to SAP system involves 4 main steps such as

Extraction

Transformation

Loading

Reconciliation

Our Reusable artifact will cover only first step which means Extraction of Transaction data from source system. Last 3 steps involves only activity and not any logic while doing Data Migration

As these steps are client specific, customized ones , we are  limiting to Extraction logic alone which is  the most crux part in data  migration . Rest of the steps can be achieved as below based on client requirement

Transformation of data  ie) Mapping can be done on Extracted data if needed

Loading is just a simple LSMW recording which can be developed by Technical Team

Reconciliation is a Functional validation of created orders .This will be achieved by downloading production order  Tables of source and Target system and  do validation by Business

SELECTION SCREEN

The following Selection Screen is applicable for both the scenarios (1 & 2).

Flow of the Program

The Program extracts data required for creating the BOM, Routing and Production Versions to create the Production Order from the source server in 6 files and puts them on the application server of the destination server.

There are two set of tables

1.    Master tables which contain the master data.

2.    Transaction tables which contain Transaction level data.

If there are any changes done at the transaction level, these tables will contain the changed data else they will contain the master data as such.

Note: In this program, we hit the transaction tables only in both the scenarios. This is because the transaction tables contain the master data as such if no changes are done at transaction level else the latest updated data in case of changes done at transaction level.

Algorithm

1.    Select data from table AFPO for all the production orders and materials given in the selection screen.

2.    For each record extracted from AFPO, use the BAPI “CO2H_PROD_ORDER_READ” and get all the Operations.

3.    Select data from table RESB for all production orders given in the selection screen.

4.    For each record extracted from RESB, select data from tables AFKO, CAUFV and STKO.

5.    For each record extracted from STKO, select data from tables MAST and STAS.

6.    For each record extracted from STAS, select data from table STPO.

7.    Select data from table AFKO for each operation extracted using the BAPI “CO2H_PROD_ORDER_READ”.

8.    For each record extracted in Step7, select data from table AFVC.

9.    For each record extracted from AFVC, select data from tables CRHD, PLMK, PLKO, AFVV and AFVU.

10. For each record extracted from PLKO, select data from tables MAPL, PLFL and PLAS.

11. Extract the long text using function module “READ_TEXT”.

12. Concatenate all the above extracted data and put them in a format that is ready to be directly uploaded in the form of files to the application server of the destination server.

13. Upload all the extracted and formatted data into the application server of the destination server using the function module “Z_RFC_TRANSFER_APPL_SERV_LSMW”.

Alert Moderator

Assigned tags

ABAP Development

abap

abap objects

code exchange

report

View more...

Related Blog Posts

Adding ad-hoc notes to production orders, purchase orders, etc. and reading them

By Former Member, Dec 03, 2014

Thoughts on Material Data Migration

By Ralf Wenzel, Sep 27, 2015

Creating Multiple batches for a Production order

By umar jawid ahmed syed, Feb 06, 2014

Related Questions

Need Suggestion

By Deepak arya, Nov 04, 2015

Data Migration

By Former Member, May 28, 2016

Production order Data Migration

By Former Member, Dec 31, 2007

1 Comment

You must be Logged on to comment or reply to a post.

Former Member

December 11, 2012 at 9:59 am

Hi Felix,

Thanks a lot for this wonderful document. I was facing the same scenario with mass migration of production orders and this helped me solve the issue. Highly appreciate your contribution.

Best Regards,

Santhosh

Like(0)

Hi Selva,

There are several ways of migrating Work In Progress production orders. I believe identification of WIP orders are quite crucial. l would like to mention below points. My first advice is, try to minimize the number of WIP orders by completing whatever possible orders or reverse the one or two goods issues and confirmations if possible and make a note to perform same once you create the new production order. It will replicate your real time production order status in new system.

Secondly, identify partial confirmation of operations and let the business decide to complete them fully or reverse the partial quantity confirmations as the quantity is picking from header data of production order and you can't have partial quantities for operations. Meantime, check the goods issues as well. If it's partial, pls make sure to complete or reverse the partial quantity as you get dependent requirements for full quantity of production order.

Thirdly, once the WIP production orders are recognized and approved by business to migrate come-up with a naming convention to identify them in new system. For example, a prefix or suffix for the same order number with activation of external numbering for production order type.

And finally, you need to make sure that inventory whether all the assemblies are moved to new system with the same status they were in legacy system. In particular with the status of inventory such as unrestricted, quality or blocked.

Hope this clears.

郑德鼎

关于作者:郑德鼎

企业信息化与 SAP 技术顾问,长期专注 SAP ABAP、FI/CO、MM、SD 等模块的技术分享与实战经验总结。查看更多介绍

来源说明:本文内容由「Data Migration Of Production Orders.docx」整理生成,仅用于内部技术分享与学习交流。