Data Processing Using ABAP code in LSMW


Data Processing Using ABAP code in LSMW

Before heading towards where and how we can process data using ABAP code I will explain in brief about data migration steps and where LSMW fits in it. Sounds boring, isn't it!!!
 But will be helpful to those who are new to data migration and LSMW.

Let's start!!!!!

Data Migration
It's a process to transfer data from Legacy System to SAP.

Data Migration Steps
 - Analyze the data to be Migrated
 - Create field mapping for legacy to SAP fields
 - Extract the Legacy data
 - Transform the Legacy data to SAP format
 - Load Transformed data to SAP
 - Validate the Data Loaded

Read Full Story here 

Author:Vijay Sharma
source:sdn. sap. com

SAP : Business Transaction Events (BTE)

Business transaction events:BTE is Customer Enhancements. It defines the standard interface, how the  communication is done to/from external system to SAP.
 
There are two types of interface available

1. Publish & Subscribe interfaces (also called "informing interfaces")
2. Process interfaces (also referred to as "process" in the following)

Publish & Subscribe interfaces:     These will inform you about particular events (such as a document   being entered) in the SAP standard application and make the data    generated as a result available to the external software.
 
Examples of such events in the R/3 System are:
 
-   Master record was created, changed, or blocked
-   Document was entered, parked, changed, or reversed
-   Items were cleared or reset
 
Process interfaces: Process interfaces are used to submit business processes to a different control which cannot be realized with the standard system,  that is process interfaces replace standard processes. It is possible   to connect different external developments to the standard R/3   System. The additional developments are generally carried out using the ABAP/4 Development Workbench.
 
Click here for full story

SAP ECC 6.0: New GL : Cross Company-Code Invoice Posting - Configuration

Configuration Path: IMG-> Financial accounting (New) -> General ledger accounting new -> Business transactions -> Document splitting -> Extended document splitting
1 Define Document splitting Rule
2. Assign business/transaction Variant to rule
3. Define Business transactions variants
There are two entries in customizing for Company Code Clearing lines.
A) One for the Company Code that does not contain leading item and
B) One for the Company Code that includes leading item.  
Click here for the Screens and the posting
Refer OSS Note: 1085921 - Document split
author: Cora Phelan
source: sdn. sap. com

SAP FI: Down Payment - Advance Payment

1. What is "down payment"? 
 
Down payment is the  Received/Paid amount before actual handing  over the Goods .

2. The main contents of the down payment:

(1)  Down payment is processed when the commodity buying and selling is promised, and the amount received/Paid before the commodity is handed over.
(2) The down payment happens in a debt or Credit side before the commodity is handed over .
(3)  after  the commodity is handed over, the down payment happened in debt/Credit could be deducted with  accounts receivable/Payable.
3. In SAP "special G/L indicator" is used for handling the down payment posting. 
 
What is special G/L indicator?  -> For distinguishing the down payment and accounts receivable of the same customer: The "special G/L indicator" is used.
    
In SAP standard , Special G/L indicator : "A" is used for  for Down payment.
 
Customizing: TCODE:FBKP->special G/L button->example: selecting "Acct Type"  :  " D " and "SGL Ind." : "A"->Maintain reconciliation account and special G/L account (the reconciliation account will be replaced by special G/L account when "A" is used for posting down payment line items) , by pressing properties button-> "Special G/L transaction types" could be set.
 
4. standard  scenarios for customer down payment in SAP R/3 system for down payment processing:   
 
(1)  Down Payment Request (T-cd:F-37) with special G/L indicator : "A" -> it is only a note, a line item.
(2) Create down paymet n in F-29 with special G/L indicator : "A" in T-cd:F-29. Within this step, the down payment could be cleared.
(3) Create account reveivable in T-cd:FB70( customer open line items is posted).
(4) Clear the down payment created in step(2)withinv customer open item created in step(3)  in T-cd:F-39.
 
Normally the partial amount in customer Open items is cleared with down payment( down payment amount <= amount in customer open item)
 
(5) Clearing the account receivable in F-28(clearing the left part amount in customer open line items)
 
For example:
(1)For down payment request, no transaction is happened, so no really document with debit/credit lines generated. 
(2) creatr down payment    :                     Bank ¥10,000  / down payment  ¥10,000  
(3) create customer open line item :      account Reveivable ¥15,000  / Revenue  ¥15,000 
(4) clear down payment     :                       Down payment ¥10,000 / Receivcable ¥10,000
(5) clear the customer open line item :  Bank ¥5,000 /  Receivable   ¥5,000

SAP :EC-CS Data Upload Methods

Introduction to Consolidation (EC-CS):
Consolidation (ECCS) is a part of FI sub-module which is used for consolidation  of various company codes to extract the final financial position of the companies as a whole.

The consolidation is done mostly at 3 levels:
1.Statutory Consolidation - This is the consolidation carried out based on the company as the primary unit (Consolidation unit)
2.Profit Centre Consolidation - This is the consolidation carried out based on the profit centre as the primary unit (Consolidation unit)
3.Business Area Consolidation - This is the consolidation carried out based on the Business Area as the primary unit (Consolidation unit)
4. User Defined - This is done as per the requirement of the business, where it requires any other consolidation.
Data Collection in Consolidation: The data collection plays a crucial role in the consolidation process, basically consolidation units are grouped in to Consolidation groups depending up on the requirement of reporting to the business. The feed for the reports come from the data that is provided in various forms to consolidation.

Data Collection methods:

The data that is used in consolidation is not directly posted in to ECCS module; the data is extracted based up on the consolidation dimension or method used say statutory consolidation dimension, profit centre consolidation dimension or any other dimension as configured in the system.

The various methods of data collection are:-

1. Online data entry
2. Flexible upload
3. Real time update
4. Periodic extract
5. Rollup
6. Offline data entry
 
 
1.Online data Entry : Using the data monitor, you enter financial data online which was reported by those consolidation units for which you specified this data transfer method. You enter the data in data entry layouts. Data entry layouts are used for entering reported financial data both online in the SAP System and offline on the basis of MS ACCESS. You can use various layouts, depending on the type of data to be entered and the level of detail involved.
2.Flexible Upload: Option for importing both the master data (consolidation units and groups, chart of accounts, etc.) and the reported data from a text file.
 
3.Real time Update: The data entry method that is used  in real time update is to update the consolidation with a document, when ever a posting is done in to FI or Sales invoice, i.e., when ever a document is posted in to SAP, the configuration is done in such a way that the document will even generate a consolidation document.
4.Periodic Extract:  The data entry method that is used here is a on line data method, we decide in advance what data method we are going to input in to the consolidation unit, say either cumulative or periodically, if we use cumulative method we update the total cumulative postings as one document for a particular posting date and if we use periodically all the totals of a period is uploaded to a consolidation unit.
5.Rollup : The data entry method we use in Rollup method is to collect the data periodically say monthly by running the data monitor & consolidation monitor and pull the data to consolidation, this method is particularly used in profit centre consolidation, were we use the rollup monthly and once at year end to accumulate the data which is existing in various units (profit centre's) and pull the balances of totals to consolidation process.
 
6.Offline Data Entry: Decentralized data entry and processing of individual financial data is possible with MS Access. Master data are downloaded from a central R/3 system. After creation of the reported data, it is uploaded with a special method of the flexible upload.
 
Conclusion: The data entry method plays a crucial role in consolidation, as the data that we process to get final reports at the consolidation are extracted from already posted balances in FI (company code & business area) & Co (profit centre), the data is statistical data which is pulled and accumulated in the sub- ledger where from we configure the system to pull final financial reports.
 
author: Satish Puram
source: SAP Community Network

SAP ECC 6.0: Asset & NEW GL Integration

From the AC210 course you will see that  the new entities within New general ledger accouning such as the profit center/segment cannot be directly assigned to assets in asset master data. Therefore it has to be derived from cost center or order that is linked to asset. This is maintained in the time-dependent data of the asset.
 
 
Click here for full story.
 
 
author: Cora Phelan
source: sdn. sap. com

SAP : Using USER EXIT For FI SUBSTITUTION

Substitutions can be used for validating data at the time of entry in SAP system. This wiki can be used for creating custom user exits so that one can set his validations & conditions. User exits are user defined FORM routines that are used to calculate/replace values with in a substitution .I have shown demo for FI but same steps with some minor modifications can be used for other areas too.
What are substitutions?
Whenever a data is entered in a system, validations are invoked to check  its integrity .Once validations are done, one can substitute the entered value with some other value. This gives you the opportunity of having the system validate values that are to be substituted. A substitution value can be numeric or a string. The system first performs some validations and then substitutions.
Transactions used for substitutions are :                   
GGB1 :  Substitutions  maintenance.                                                                                                                                
OBBH :  Activation of FI substitutions.
Substitutions can be performed using three ways:
1.Constant values.
2.Field -Field assignment.
3.User exits.

Steps for creating user exits for substitutions....click here for fully story

Author: Rajneesh
Source: sdn. sap. com

SAP : Cash Flow Reports : Direct / Indirect Method Config Settings

TCODE' for the Cash Flow Reports are as below :

S_ALR_87012271       Cash Flow (Direct Method)
S_ALR_87012272       Cash Flow (Indirect Method) Variant 1

S_ALR_87012273       Cash Flow (Indirect Method) Variant 2
 
Below are the details of the Form' used in the above reports:
 
Form 0SAPRATIO-04 Cash flow (Direct Method)
Form 0SAPRATIO-03 Cash flow (Indirect Method) variant 1
Form 0SAPRATIO-01 Cash flow (Indirect Method) variant 2
 
Use the TCODE: FSI6 to view the above form.
 
Above given Forms used in the below given reports
 
Report 0SAPRATIO-04 Cash flow (Direct Method)
Report 0SAPRATIO-03 Cash flow (Indirect Method) variant 1
Report 0SAPRATIO-01 Cash flow (Indirect Method) variant 2
 
Use the TCODE: FSI3 to view the above reports.
 
You should know what format you would like to see in the cash flow statement.
 
You should use the FS items accordingly copy the standard forms and changed according to your format. You should be conversant enough to do basic report painter.
 
Go to the Form 0SAPRATIO-01
 
Go to the form menu > click on change.
Go to edit menu, select general data selection / gen.data select .
There you assign your financial statement version (FSV) and confirm.
Then come to the form double click on each row and assign your respective financial statement version item and confirm.
And you change the rows as per your requirements.
Save the form.
Execute the report change the INT to your own Chart of Account.
 
Also make sure in the form you have assigned the FS items from your Financial Statement Version (OB58).
FS items are nothing but nodes in your FSV.
 
Use TCODE: FF7A for Cash Position reporting. You must activate Cash Management first, Go to TCODE: FDFD in configuration and activate the company code for cash management.

Understanding Results Analysis for WIP

Introduction and Configuration Guide

Work in process (WIP) inventory forms a part of the working capital or current assets of a firm appearing in their balance sheet. Work in process or progress  are  partially completed goods, parts, or subassemblies that are no longer part of the raw materials inventory and not yet part of the finished products inventory. Fundamental Principle of International Accounting Standard 2 states that Inventories are required to be stated at the lower of cost and net realisable value (NRV).  
 
The guidance on measurement of cost of inventories is that, cost should include all:

 a)     costs of purchase (including taxes, transport, and handling) net of trade discounts received
 b)     costs of conversion (including fixed and variable manufacturing overheads) and
 c)     other costs incurred in bringing the inventories to their present location and condition

With SAP, the raw materials gets transferred to finished goods via production orders or process order. In this process, typically, the production order is created to which raw materials are issued, all activities performed in the process are charged along with any overheads that is apporopriate the production order.  Production is ongoing, and it is quite natural that at month end, we end up with some open production orders. SAP in its product costing functionality, provides the feature to calculate the value of WIP. This will be derived based on the careful definition of Line IDs in line with the cost components. The WIP shall be the total debits cost in the order as reduced by the credits for goods receipt.
Key elements of WIP Results Analysis Configuration.
 
Step 1         Define Results Analysis Key OKG1.

Here you just give a name, four letter key with its description.

Step 2         Create cost elements of type 31 the following minimum

Valuated Actual cost, say for eg. 990001.
Calculated Costs, say 990002.
WIP account 990003
WIP Reserve 990004
WIP Reserve 990005
 
Step 3         Define RA version, OKG9, Enable Transfer to Financial Accounting (checkbox)

Under extended control, you may enable checkboxes relating to  
- Generate line items 
- Assignment/RAkey 
Update/RAkeyEnter the cutoff period for actual RA/WIP, the effective date before which any WIP data if existed, will not be     altered.

Step 4         In OKGC, define the valuation method for WIP.

Here, you specify that WIP calculation mode is one when the order has the staus REL.

The calculated WIP shall be cancelled when the order status changes to DLV or TECO. You maintain this data for CO area, RA version and RA key combination.

Step 5        SPRO>Controlling>Product Cost Controlling>Cost Object Controlling>Product cost by order>Period End Closing>Work in process>Define Line IDs.

The line IDs are similar to cost component, that you create during cost estimates like a) 010 for Material b) 020 for Labor and c) 030 for Overhead to say the least.

Besides these, create one more line ID say 999 for the Settled Cost, which appear as credit when you make a goods receipt.
                 
Create additional WIP type 31 cost elements and their corresponding Reserve account for the above#### WIP Material 990006

WIP Material Reserve 990007
WIP Labor 990008
WIP Labor Reserve 990009
WIP Overhead 990010
WIP Overhead Reserve 990011  

Step 6        Now you assign the source cost elements OKGB, that are expected in the production order to various line ID as created above.

You maintain this data for CO area, RA version and RA key combination.  You use masking when you mention which cost element to be assigned to various IDs. You can also direct various cost element, if it comes with a combination of particular cost center and activity type  to a particular Line ID. If you need to keep it simple, just enter +++++++ for cost centers, activity types and Business processes. Cost elements can be masked as follows; for eg. All cost primray cost elements for materials, if they start from 210001 to 219999, the you can mask them like 00021+++++.   Give the line ID in the column Required to Capitailze.
 
Step 7       Define the update. OKGA You maintain this data for CO area, RA version and RA key combination.

Here you specify which line IDs are to be grouped under which cost elements and their reserve account. You connect the cost elements created in step 5 to the line IDs. The category for the line IDs for material, labor and overhead shall be K, that stand for cost. The line ID 999 settled cost shall be maintained as category A,  (settled cost). When you assign A, you won't have to maintain any cost elements for WIP and reserve creation.
 
Step 8       Define posting rules for WIP calculation OKG8

You do this for Controlling area, company code, RA version. Maintain this for RA category WIPR (WIP cost, Required to be capitalized) and RUCR (Reserve for unrealized cost).  You maintain the P& L account (changes to stock)  and the balance sheet (WIP)account.These G/L accounts are posted in Financial Accounting.
 
Step 9        Ensure number range assignment for the WIP transactions under appropriate head OKG6:
 
KABG Automat. WIP/results analysis
KABM Manual WIP/results analysis
KSWP Prim. Target Cost Calc. (WIP)
KSWS Sec. Target Cost Calc. (WIP)
 
Period end WIP calculation Process
The process of running WIP is the t-code KKAX for individual order processing  and KKAO for collective order processing. The system debits the WIP account and credits Inventory Change account. This entire WIP is reversed and a new entry is passed the following month. When the order is fully delivered no additional WIP entries are passed.
Note: The RA Key shall be entered in the production order, under the control tab. This can be defaulted through order type.
 
author: Sridhar Vasudevan
source: sdn.sap.com