Вы находитесь на странице: 1из 16

Uploading Business Partner Data using LSMW

Posted by Mahesh Sardesai in SAP S/4HANA on Mar 10, 2016 3:30:49 AM


inShare351
Tweet

You want to mass migrate Business Partner data from your existing system to S/4HANA
1511. This
blog explains how to import data from tab delimited text files residing on FrontEnd
computer (PC)
using transaction code LSMW - Direct Input method together with a custom program
provided.

Please note that the LSMW tool is to be used for creating and updating Business
Partner data
directly in S/4HANA system with New Implementation. It is not intended to be used
for ECC to
S/4HANA conversion.

1. DOWNLOAD AND EXTRACT FILES:

Download file BP.ZIP and extract into a dedicated folder ( e.g. C:\TEMP\BP) on the
FrontEnd
Computer (PC). Each Excel file listed below corresponds to different Master data
segments of the
Business Partner Object as input parameters of function module
RFC_CVI_EI_INBOUND_MAIN::

01_CVIS_BP_GENERAL.xlsx

02_CVIS_BP_ROLES.xlsx

03_CVIS_BP_INDUSTRY.xlsx

04_CVIS_BP_IDENT_NUMBERS.xlsx

05_CVIS_BP_BANK_DETAILS.xlsx

06_CVIS_BP_TAX_NUMBER.xlsx

07_CVIS_BP_TAX_NUMBER_COMMON.xlsx

08_CVIS_BP_ADDRESS.xlsx

09_CVIS_BP_ADDRESS_USAGE.xlsx

10_CVIS_BP_ADDRESS_TELENO.xlsx

11_CVIS_BP_ADDRESS_FAXNO.xlsx

12_CVIS_BP_ADDRESS_EMAIL.xlsx
13_CVIS_BP_ADDRESS_URL.xlsx

14_CVIS_BP_RELATION.xlsx

15_CVIS_CUSTOMER_GENERAL.xlsx

16_CVIS_CUSTOMER_COMPANY.xlsx

17_CVIS_CUSTOMER_SALES.xlsx

18_CVIS_CUSTOMER_COMP_DUNNING.xlsx

19_CVIS_CUSTOMER_SALES_FUNC.xlsx

20_CVIS_CUSTOMER_TAX_INDICATOR.xlsx

21_CVIS_CUSTOMER_GENERAL_VAT.xlsx

22_CVIS_SUPPLIER_GENERAL.xlsx

23_CVIS_SUPPLIER_COMPANY.xlsx

24_CVIS_SUPPLIER_COMPANY_WTAX.xlsx

25_CVIS_SUPPLIER_PURCHASING.xlsx

26_CVIS_SUPPLIER_GENERAL_VAT.xlsx

2. CREATE STRUCTURES IN S/4HANA SYSTEM:

You can use program in BP.ZIP (file ZLSMW_STRUCTURES.TXT) to create structures.


Activate the
structures.

Alternatively you can manually create structures (SE11) according to specifications


in provided
Excel files as described below. Choose a transportable package in customer
namespace and put
this into new transport request.

Using transaction SE11 generate the following structures with “CHAR” data types
copying the exact
parameter name and data type length in the “Z” structure. Name the “Z” structures
as defined in the
following table:
SAP DELIVERED Z STRUCTURE
CVIS_BP_ADDRESS ZZCVIS_BP_ADDRESS
CVIS_BP_ADDRESS_EMAIL ZZCVIS_BP_ADDRESS_EMAIL
CVIS_BP_ADDRESS_FAXNO ZZCVIS_BP_ADDRESS_FAXNO
CVIS_BP_ADDRESS_TELENO ZZCVIS_BP_ADDRESS_TELENO
CVIS_BP_ADDRESS_URL ZZCVIS_BP_ADDRESS_URL
CVIS_BP_ADDRESS_USAGE ZZCVIS_BP_ADDRESS_USAGE
CVIS_BP_BANK_DETAILS ZZCVIS_BP_BANK_DETAILS
CVIS_BP_GENERAL ZZCVIS_BP_GENERAL
CVIS_BP_IDENT_NUMBERS ZZCVIS_BP_IDENT_NUMBERS
CVIS_BP_INDUSTRY ZZCVIS_BP_INDUSTRY
CVIS_BP_RELATION ZZCVIS_BP_RELATION
CVIS_BP_ROLE ZZCVIS_BP_ROLE
CVIS_BP_TAX_NUMBER ZZCVIS_BP_TAX_NUMBER
CVIS_BP_TAX_NUMBER_COMMON ZZCVIS_BP_TAX_NUMBER_COMMON
CVIS_CUSTOMER_COMP_DUNNING ZZCVIS_CUSTOMER_COMP_DUNN
CVIS_CUSTOMER_COMPANY ZZCVIS_CUSTOMER_COMPANY
CVIS_CUSTOMER_GENERAL ZZCVIS_CUSTOMER_GENERAL
CVIS_CUSTOMER_GENERAL_VAT ZZCVIS_CUSTOMER_GENERAL_VAT
CVIS_CUSTOMER_SALES ZZCVIS_CUSTOMER_SALES
CVIS_CUSTOMER_SALES_FUNC ZZCVIS_CUSTOMER_SALES_FUNC
CVIS_CUSTOMER_TAX_INDICATOR ZZCVIS_CUSTOMER_TAX_IND
CVIS_SUPPLIER_COMPANY_WTAX ZZCVIS_SUPPLIER_COMP_WTAX
CVIS_SUPPLIER_COMPANY ZZCVIS_SUPPLIER_COMPANY
CVIS_SUPPLIER_GENERAL ZZCVIS_SUPPLIER_GENERAL
CVIS_SUPPLIER_GENERAL_VAT ZZCVIS_SUPPLIER_GENERAL_VAT
CVIS_SUPPLIER_PURCHASING ZZCVIS_SUPPLIER_PURCHASING

For example, structure CVIS_BP_ROLE will match ZZCVIS_BP_ROLE component names as


shown below.
Make sure that you set all data types to “CHAR” in the “ZZ” structures and add
component STYPE to all
structures as the first component in the structure. Activate the Structures.

3. CREATE REPORT PROGRAM IN S/4HANA SYSTEM:

Using LSMW Program source code provided in BP.ZIP (file ZLSMWDSPRG_CVI.TXT), create
a program
(SE38). Create a transportable package in customer namespace, adding to above
transport request.
Remember to add the text elements specified in the LSMW Program text elements file.
Activate the program.
You do not need to execute the program, it will be run by LSMW.
4. MAINTAIN LSMW CUSTOMIZING TABLES:

Using transaction code SM30, maintain tables SXDA0, SXDA1, and SXDA2 as below:

Add following entry for Business Partner in table SXDA0.

DXOBJ 9900
DX obj. short text Business Partner
DX type D
Object type BUS1006

Add following entry in table SXDA1.

DXOBJ 9900
SUBDX 0000
DXPRG ZLSMWDSPRG_CVI
DXPTY D
FILENAME ZLSMWCVIBPOUT

If you have problems to maintain entries in table SXDA1 check the following
note:2192586 - Table
maintenance dialog of SXDA1 dumps.

Please use SE16 SXDA1 and then /h to edit table in debug mode to add record.

Create following entries in table SXDA2:

Data
trans
fer DX Parent
Mandator Minimu Maximu
obje Object Hierarch segment y
m m
ct Subcat. Item + Import Structure y level ?
segment number number Active

9900 0 1 General ZZCVIS_BP_GENERAL 1 X X


1 1 X

9900 0 2 Role ZZCVIS_BP_ROLE 1


0 0 X

9900 0 3 Industry ZZCVIS_BP_INDUSTRY 1


0 0 X

ZZCVIS_BP_IDENT_NUMBE
9900 0 4 Ident_Numbers RS 1
0 0 X

ZZCVIS_BP_BANK_DETAIL
9900 0 5 Bank_Details S 1
0 0 X

9900 0 6 Tax_Number ZZCVIS_BP_TAX_NUMBER 1


0 0 X

Tax_Num_Com ZZCVIS_BP_TAX_NUMBER_
9900 0 7 mon COMMON 1
0 0 X

9900 0 8 Address ZZCVIS_BP_ADDRESS 1


0 0 X

ZZCVIS_BP_ADDRESS_US
9900 0 9 Address_Usage AGE 1
0 0 X

ZZCVIS_BP_ADDRESS_TEL
9900 0 10 Address_Teleno ENO 1
0 0 X
ZZCVIS_BP_ADDRESS_FAX
9900 0 11 Address_Faxno NO 1
0 0 X

ZZCVIS_BP_ADDRESS_EM
9900 0 12 Address_Email AIL 1
0 0 X

ZZCVIS_BP_ADDRESS_UR
9900 0 13 Adress_Url L 1
0 0 X

9900 0 14 Relation ZZCVIS_BP_RELATION 1


0 0 X

9900 0 15 Cust_General ZZCVIS_CUSTOMER_GENE 1


0 0 X
RAL

ZZCVIS_CUSTOMER_COMP
9900 0 16 Cust_Company ANY 1
0 0 X

ZZCVIS_CUSTOMER_SALE
9900 0 17 Cust_Sales S 1
0 0 X

Cust_Comp_Du ZZCVIS_CUSTOMER_COM
9900 0 18 nn P_DUNN 1
0 0 X

Cust_Sales_Fu ZZCVIS_CUSTOMER_SALE
9900 0 19 nc S_FUNC 1
0 0 X

ZZCVIS_CUSTOMER_TAX_I
9900 0 20 Cust_Tax_Ind ND 1
0 0 X

Cust_General_ ZZCVIS_CUSTOMER_GENE
9900 0 21 Va RAL_VAT 1
0 0 X

ZZCVIS_SUPPLIER_GENER
9900 0 22 Supp_General AL 1
0 0 X

ZZCVIS_SUPPLIER_COMPA
9900 0 23 Supp_Company NY 1
0 0 X

Supp_Company ZZCVIS_SUPPLIER_COMP_
9900 0 24 _T WTAX 1
0 0 X

Supp_Purchasi ZZCVIS_SUPPLIER_PURCH
9900 0 25 ng ASING 1
0 0 X

Supp_General_ ZZCVIS_SUPPLIER_GENER
9900 0 26 Va AL_VAT 1
0 0 X

5. CONFIGURE BUSINESS PARTNERS:

Configure Business Partners in your S/4HANA 1511 system according to the Best
Practices Building Block
Configuration Guide "J61_S4HANAX_BB_ConfigGuide_EN_XX.docx". This guide is also
included in the
BP.ZIP file.
6. UPLOAD LSMW PROJECT FILE:
Using transaction LSMW -> Extras -> Import Projects upload LSMW Project File
LSMW_S4H_ZLSMWCVI_BP.TXT

At the screen below please click on Import button.

7. PREPARE DATA FIELDS FOR UPLOAD:

Open all Excel Files (Templates), rows 1-4 give you description of fields. After
you input all your legacy
business partner data into rows 5 onwards in each file, remove rows 2,3,4 and
export the file as a tab-delimited
text file, retaining the file name but saving to extension .TXT.

In the resulting upload text file, row 1 must contain the field names and row 2 and
above contain the data.
(Note: since certain fields such as address may have a comma in the field, we do
not recommend .CSV files.).
Place the upload text files into the same folder (C:\TEMP\BP).

8. ASSIGN INPUT FILES:

Assign input files to LSMW data structure only if your PC upload path is not
C:\TEMP\BP). As shown below
execute step “Specify Files” in your LSMW Project, and switch into change mode
(Ctrl+F1).
For each file, click on the file name to open the “File on FrontEnd: Maintain
Properties”. Click the drop down
button of the File field, and select your input file, navigating to the
pertaining upload directory of your FrontEnd
PC. The other settings should remain as follows -:

 File Contents: Data for One Source Structure (Table)


 Delimiter: Separator Tabulator
 File Structure: Field Names at Start of File
 File Type: With Record End Indicator (Text File)
 Code Page: Code Page ASCII

9. PERFORM INITIAL UPLOAD:

For the creation of new Business Partner records proceed according to standard
LSMW process i.e., Read
Data, Display Read Data, Convert Data, Display Converted Data and Start Direct
Input Program. At the last
step of Start Direct Input Program, please enter Physical filename as
"ZLSMWCVI_BP_ZLSMWCVI_BP_ZLSMWCVI_BP.lsmw.conv"
For each BP, the following input data has to be prepared:

A. 01_CVIS_BP_GENERAL.xlsx file

a. Column C BPARTNERGUID field: blank

b. Column F OBJECT_TASK field: Enter “I” (for Insert)

B. All input files

a. Column A RUN_ID field: Enter the BP number for reference across


multiple input files.

C. Single entry for each BP in the following files:

a. 01_CVIS_BP_GENERAL.xlsx (Mandatory)

b. 15_CVIS_CUSTOMER_GENERAL.xlsx (Optional)

c. 22_CVIS_SUPPLIER_GENERAL.xlsx (Optional)

D. Other required master data files

a. Multiple entries are allowed for each BP in all other files based on
the business requirements.

E. Not relevant files:

For the data files not applicable to the business, save the blank file with
only the title row into its
corresponding txt file without any data.
10. PERFORMING DELTA UPLOADS:

Function module, RFC_CVI_EI_INBOUND_MAIN, called in LSMW BP upload tool only allows


changes to
existing data in 01_CVIS_BP_GENERAL.xlsx. Besides BP General Data, Customer General
Data and
Supplier General Data views, additional entries could be added to the existing BP,
e.g. telephone numbers,
new sales area customer SD data, additional addresses, bank accounts, etc.

For the update of existing Business Partners with changed and/or additional data
records proceed as follows:

A. 01_CVIS_BP_GENERAL.xlsx file

a. Column C, fieldname BPARTNERGUID: Enter the BP GUID which can be


extracted from BUT000
table fieldname BUT000-PARTNER_GUID.

b. Column F fieldname OBJECT_TASK: Enter “U” (for Update).

c. Make necessary data changes in this file.

B. Prepare other input files to add more data views to the existing BP.

NOTE: Files 15_CVIS_CUSTOMER_GENERAL.xlsx and 22_CVIS_SUPPLIER_GENERAL.xlsx can


only be
uploaded once and cannot be changed by this LSMW tool. The value of the field
OBJECT_TASK in these 2
files is ignored by LSMW program.

ADDITIONAL INFORMATION:

If a BP is to be created under internal number range, the BPARTNERGUID filed has to


be filled with an unique
sequential number in 1_CVIS_BP_GENERAL.TXT file

As LSMW tool cannot cover all the Business Partner Data structure requirements,
please consider using:

1. function module CVI_EI_INBOUND_MAIN or

2. Webservices
-BusinessPartnerSUITEBulkReplicateRequest

-BusinessPartnerRelationshipSUITEBulkReplicateRequest
3. Use this LSMW tool to upload most of the BP data first, then create a new LSMW
project to upload the
remaining BP data.

Also, please refer to note 2287723 - LSMW in SAP S/4HANA on-premise edition

DATA SERVICES - Data Integrator

SAP S/4HANA customers have access to a basic Data Integrator license key that comes
with the underlying
SAP HANA license (HANA REAB or HANA Enterprise). This key code applied to SAP Data
Services provides
full ETL functionalities (Extract, Transform, Load). Thus, it replaces a mapping
and load tool like LSMW with
the Rapid Data Migration content. With this basic data load functionality of SAP
Data Services and together
with the Rapid Data Migration content, legacy data can be loaded into SAP S/4HANA
(on premise) including
data validation but without further Data Quality (de-duplication, data cleansing)
and reporting capabilities. For
this use case with the aforementioned functionality, SAP Data Services is free of
charge and there is no
additional cost.

For Asset Management data import workarounds, please refer:note 2208321 - FAQ for
legacy data transfer in
SAP_FIN 720 and subsequent

Thank you

Вам также может понравиться