Enhancing LO DataSources - Step by Step PDF
Enhancing LO DataSources - Step by Step PDF
Applies to:
SAP BI, NW2004s Business Intelligence.
Summary
This article explains step by step procedure to enhance LO DataSource. It is explained by enhancing
standard DataSource 0Customer_attr (Customer) by adding a couple of Z fields. Though it explains steps for
master data DataSource enhancement same can be applied for transaction data DataSources as well. I
coupled the process with screen shots to make it more users friendly.
Author: Vikash Agrawal
Company: Wipro Technologies
Created on: 27th November 2006
Author Bio
Vikash Agrawal is a Certified SAP BI Consultant with Wipro Technologies. He has extensive cross
functional experience and has been with end to end SAP implementations, upgrades, and BI - Portal
Integration projects across manufacturing domain. He has also worked in the area of distribution of finished
goods as well as remodeling of Distribution Supply Chain.
© 2006 SAP AG 1
Enhancing LO DataSource – Step by Step
Table of Contents
Create a Table of Contents in Microsoft Word. To change, right-click on the TOC and select Update Field.
Applies to: ........................................................................................................................................ 1
Summary.......................................................................................................................................... 1
Author Bio ........................................................................................................................................ 1
Overview .......................................................................................................................................... 3
Appending the Structure .................................................................................................................. 4
Filling up the Appended Structure ................................................................................................... 9
Wrtie ABAP Code....................................................................................................................... 12
Regenerate & Check the Customized Objects .............................................................................. 16
Related Content............................................................................................................................. 18
Disclaimer and Liability Notice....................................................................................................... 19
© 2006 SAP AG 2
Enhancing LO DataSource – Step by Step
Overview
Purpose of this exercise is to enhance LO DataSource, Customer_Attr one to be specific. I needed to add
following field to Customer_Attr DataSource. One need to start from recognizing the fields / components type
and then look for the table from where data could be picked up to fill up these fields.
© 2006 SAP AG 3
Enhancing LO DataSource – Step by Step
• Logon to BW
o Go to Source systems.
o Choose R/3 Source System (where your DataSource resides) - Right Click & go to
“Customizing for Extractors”.
© 2006 SAP AG 4
Enhancing LO DataSource – Step by Step
© 2006 SAP AG 5
Enhancing LO DataSource – Step by Step
• Click on DataSource
© 2006 SAP AG 6
Enhancing LO DataSource – Step by Step
• Double Click on appended structure – ZBIW_KNA1_S1 (or your chosen one) & add the fields ( which
you wish to add to DataSource)
• Check, save & activate - It will append this to Extract Structure of DataSource.
© 2006 SAP AG 7
Enhancing LO DataSource – Step by Step
• Go Back
• Now Click on Extract Structure – BIW_KNA1_S (in my case), check out the appended field below
append structure.
© 2006 SAP AG 8
Enhancing LO DataSource – Step by Step
o Go to T Code – CMOD
o Choose the project – Which you are using for Master Data Enhancement. Project
“ZSDBWNEW” in my case. ( you need to create project in case you are doing enhancement
on this BW system for the first time)
o Click on Change
© 2006 SAP AG 9
Enhancing LO DataSource – Step by Step
• Press Continue – In case it prompts for some confirmation like “Enhancement project already active”
etc.
o Enhancement – RSAP0001
o Click on Components.
© 2006 SAP AG 10
Enhancing LO DataSource – Step by Step
© 2006 SAP AG 11
Enhancing LO DataSource – Step by Step
• We need to write ABAP Code to fill up Appended Fields in “0Customer_Attr” through the Include
mentioned here i.e. include zxrsau02.
• Double Clicking on this will take to ABAP Editor to put in the code.
• Go to Change Mode.
• Make Sure Tables KNVV, BIW_KNVV_S, KNKK, KNA1, KNVP ( these are table from which I need to
extract values of appended fields) are declared at the very start of the code.
© 2006 SAP AG 12
Enhancing LO DataSource – Step by Step
when '0CUSTOMER_ATTR'.
clear i_counter.
loop at i_t_data into l_biw_kna1_s.
* Selection of Payer against “Sold to” of Customer
select * from knvp
where kunnr = l_biw_kna1_s-kunnr
and VKORG = l_biw_kna1_s-vkorg
and VTWEG = l_biw_ kna1_s-vtweg
and SPART = l_biw_kna1_s-spart
and parvw = 'RG' .
if sy-subrc eq 0.
l_biw_kna1_s-zz1payer = knvp-kunn2.
Else
l_biw_kna1_s-zz1payer = l_biw_kna1_s-kunnr.
Endif
if sy-subrc eq 0.
l_biw_kna1_s-zz1pcc_area = knkk-kkber.
endif.
if sy-subrc eq 0.
l_biw_kna1_s-ZZ1pind_cd2 = kna1-bran2.
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2006 SAP AG 13
Enhancing LO DataSource – Step by Step
endif.
if sy-subrc eq 0.
l_biw_kna1_s-zz1pterm = knvv-zterm.
l_biw_kna1_s-zz1pcustgrp = knvv-kdgrp.
endif.
• Do the “Check” before Save, if no errors are found the Save & Activate”.
• Go Back.
© 2006 SAP AG 14
Enhancing LO DataSource – Step by Step
• Go Back and then Activate. (Keep activating while going back on every step).
• Come Out.
© 2006 SAP AG 15
Enhancing LO DataSource – Step by Step
• Scroll down & Go to Fields starting with ZZ & make sure these are not HIDE (remove the sign from
HIDE check box).
© 2006 SAP AG 16
Enhancing LO DataSource – Step by Step
© 2006 SAP AG 17
Enhancing LO DataSource – Step by Step
• Go back
Related Content
• SAP Network Blog: Extract Checker https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3094
• SAP Network Blog: LOGISTIC COCKPIT - WHEN YOU NEED MORE - First option: enhance it!
https://weblogs.sdn.sap.com/pub/wlg/1262
• SAP Network Blog: How to retain deltas when you change LO extractor in Production system
https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3785
• SAP Network Blog: Custom fields and BW extractors: Making a mixed marriage work!
https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1591
© 2006 SAP AG 18
Enhancing LO DataSource – Step by Step
© 2006 SAP AG 19