Transcript
Page 1: What Are Specifics Concerning the Upload of a File to a ... · 2.1. Description of the Central Scenario Let us assume that you are working as a global sales account manager for a

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 1

What Are Specifics Concerning the

Upload of a File to a Local

Provider?

Applies to

SAP NetWeaver Business Warehouse 7.30 (BW7.30) SP05 with SAP NetWeaver Business Warehouse Accelerator 7.20 (BWA7.20) or HANA 1.0 running as a database for SAP NetWeaver BW 7.3 SP05

Summary

This article describes some specifics concerning the upload of flat files in the BW Workspace Designer. It addresses the Business Analyst in the line of business. As a prerequisite we recommend reading the article ‘What is a BW Workspace?’ and ‘How can Central and Local Provider easily be combined?’ from this article series.

Author: Silvia Bratz

Company: SAP AG

Created: October 2011

Version: 1.0

Author Biography

Silvia Bratz: Development Project Manager, TIP In-Memory Platform BW (SAP AG). Silvia Bratz joined SAP 12 years ago and began working as a technical SAP consultant for Business Intelligence. Today, she is a member of the BWA and Data Management team.

Page 2: What Are Specifics Concerning the Upload of a File to a ... · 2.1. Description of the Central Scenario Let us assume that you are working as a global sales account manager for a

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 2

Table of Contents

1. Introduction ............................................................................................................................................................ 3

2. Scenarios ................................................................................................................................................................. 3

2.1. Description of the Central Scenario ............................................................................................................................ 3

2.2. Description of the Upload Scenarios........................................................................................................................... 3

3. Upload Excel File ...................................................................................................................................................... 4

3.1. Flat File ................................................................................................................................................................... 4

3.2. Start the Application ................................................................................................................................................. 4

3.3. Select File ................................................................................................................................................................ 5

3.4. Change Columns ...................................................................................................................................................... 6

3.5. Confirmation ........................................................................................................................................................... 7

3.6. Analysis of the Excel File ........................................................................................................................................... 7

4. Upload CSV File ...................................................................................................................................................... 11

4.1. CSV File Analysis ..................................................................................................................................................... 11

4.2. CSV Delimiter ......................................................................................................................................................... 15

5. InfoObject Proposal ................................................................................................................................................ 20

6. Representation of Keys ........................................................................................................................................... 21

7. Related Content ..................................................................................................................................................... 22

Copyright............................................................................................................................................................................ 23

Page 3: What Are Specifics Concerning the Upload of a File to a ... · 2.1. Description of the Central Scenario Let us assume that you are working as a global sales account manager for a

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 3

1. Introduction

A BW Workspace is a kind of ‘small sandbox’ which IT defines. IT sets the boundaries, IT sets the amount of resources that a BW Workspace can consume and exposes some of the central data models to the BW Workspace (data of the models and their related semantics). The BW Workspace exposes the central data in a logical fashion only. The data is not copied into the BW Workspace, which means that no data replication is needed. The goal is to enable the Key Business Users to use this functionality in a dedicated and separated environment, which is deeply embedded and integrated in the existing BW landscape. The BW Workspaces bridge the gap between the architected and the departmental data marts. Therefore, Workspaces are integrated, independent and, as the usage of the SAP Business Warehouse Accelerator or HANA is mandatory, they are completely in-memory.

2. Scenarios

2.1. Description of the Central Scenario

Let us assume that you are working as a global sales account manager for a company, selling computer hardware and corresponding accessories. In the central enterprise data warehouse the SAP NetWeaver BW sales data for 2010 and 2011 is provided in InfoCubes with a MultiProvider on top. Additionally, the central SAP NetWeaver BW provides the company’s central ABC Rating information of customers worldwide in an InfoProvider, but you have an own ABC Rating available in a file. You would like to use this file to enrich the central sales data with your local information and report on the merged data. A BW Workspace has been created for your team by the IT department using the BW Workspace maintenance application in the SAP NetWeaver Business Warehouse. Furthermore the IT department provided the SAP NetWeaver Business Client and corresponding roles for access to the BW Workspace Designer.

2.2. Description of the Upload Scenarios

In this article we are only having a look at the application ‘Upload Local Provider’ exclusively with the ‘File’ as a source. We modify the ‘Customer_ABC’ file used in article ‘How can Central and Local Provider easily be combined?’ from this article series and use further new CSV and Excel files to explain some upload specifics.

Page 4: What Are Specifics Concerning the Upload of a File to a ... · 2.1. Description of the Central Scenario Let us assume that you are working as a global sales account manager for a

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 4

3. Upload Excel File

3.1. Flat File

The local flat file ‘Customer_ABC’ contains the technical key ‘Customer’ as well as the customer ABC Rating information. Additionally some key figures and units have been attached to the file.

3.2. Start the Application

Page 5: What Are Specifics Concerning the Upload of a File to a ... · 2.1. Description of the Central Scenario Let us assume that you are working as a global sales account manager for a

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 5

3.3. Select File

In this step you browse the file and transfer it.

Confirm with ‘OK’.

The technical name and description of the provider is proposed automatically.

Page 6: What Are Specifics Concerning the Upload of a File to a ... · 2.1. Description of the Central Scenario Let us assume that you are working as a global sales account manager for a

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 6

3.4. Change Columns

Here you can decide on data type options and you can deselect columns.

File Amount, Weight (exact) and Weight (rounded) are key figures and therefore have to be marked as key figures. The system analyzes the key figures and proposes a data type. In our example Weight (rounded) e.g. has been formatted without decimals in MS Excel. Therefore the system chooses integer number as type.

Page 7: What Are Specifics Concerning the Upload of a File to a ... · 2.1. Description of the Central Scenario Let us assume that you are working as a global sales account manager for a

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 7

3.5. Confirmation

A Local Provider has been created. You can display the data directly.

3.6. Analysis of the Excel File

When uploading an MS Excel file the Excel format settings are taken into account when the file is analyzed. The field formats are derived from the first data row of the Excel file.

Page 8: What Are Specifics Concerning the Upload of a File to a ... · 2.1. Description of the Central Scenario Let us assume that you are working as a global sales account manager for a

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 8

When pressing ‘Upload data’ the error occurs:

The following chapters show examples for formatted key figures in Excel:

One decimal place

Page 9: What Are Specifics Concerning the Upload of a File to a ... · 2.1. Description of the Central Scenario Let us assume that you are working as a global sales account manager for a

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 9

Three decimal places are loaded and shown.

No decimals

Page 10: What Are Specifics Concerning the Upload of a File to a ... · 2.1. Description of the Central Scenario Let us assume that you are working as a global sales account manager for a

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 10

Integer number is loaded and shown. Floating Point

Floating point number is loaded and shown

Page 11: What Are Specifics Concerning the Upload of a File to a ... · 2.1. Description of the Central Scenario Let us assume that you are working as a global sales account manager for a

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 11

4. Upload CSV File

4.1. CSV File Analysis

When the file is browsed and transferred, it is imported into memory and analyzed. In step ‘Change Column’ you can change types if necessary e.g. mark columns as key figures or choose different data types. When you press ‘Upload Data’ then, the data is analyzed again.

Due to performance reasons the following intervals are analyzed in the analysis before upload when a csv file is used:

o First data row until row 500 including first row (example: 2-502) o 500 rows in the middle (in case you have a file of 2000 rows e.g. 750-1250) o The last 500 rows

In the uploading step where the full set of data is investigated, it could happen that the determined data type does not match.

The following csv file contains a date column. In row 503, a character value has been entered by chance.

Browse and transfer the file:

Press next:

Page 12: What Are Specifics Concerning the Upload of a File to a ... · 2.1. Description of the Central Scenario Let us assume that you are working as a global sales account manager for a

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 12

Column ‘0DATE’ recognized as type ‘Date’

Column ‘0DATE’ has been recognized as type ‘Date’. Column ‘0AMOUNT DEC’ has to be marked as key figure.

The following error occurs when you press ‘Upload Data’:

Error found in not yet analyzed data in the analysis before upload

The descriptive text of the error message shows the following diagnosis:

Value 'VIP' in file (row 503, column 0DATE) cannot be converted to the predefined data type.

Page 13: What Are Specifics Concerning the Upload of a File to a ... · 2.1. Description of the Central Scenario Let us assume that you are working as a global sales account manager for a

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 13

The system analyzed the file data to establish the column properties (data type, length, characteristic/key figure). Only a certain part of the file was analyzed due to performance reasons. The error described above did not occur in the analyzed part of the file.

Also the system has investigated that with this value ‘String’ would be the correct data type.

The following procedure is proposed:

Use data type 'String' for column '0DATE' or change the value in the file and load the file again.

Furthermore you can use the function ‘Propose Type’. First select the column and then press ‘Propose Type’. The system analyzes all values of the column and sets the properties. Afterwards choose ‘Upload Data’ again.

System decides for ‘String’

Uploaded File with type ‘String’ for field 0DATE

Page 14: What Are Specifics Concerning the Upload of a File to a ... · 2.1. Description of the Central Scenario Let us assume that you are working as a global sales account manager for a

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 14

Please be aware that it might have been better to correct the original file and load the date column with data type ‘Date’. The data, when loaded as ‘String’ and therefore is internally displayed/saved in the external format:

This means that if you e.g. want to join this Local Provider with a BW Central Provider on basis of field ‘0DATE’, this will not be possible as the data in BW is loaded with data type ‘Date’.

When the data is corrected and loaded with type ‘Date’, it is displayed like this and can be joined with another field containing data type ‘Date’ as is typically the case with BW InfoCubes:

If the character value would have been entered e.g. in one of the first 500 rows, the proposal for the data type would have been string instead of date.

TT.MM.JJJJ

JJJJMMTT

Page 15: What Are Specifics Concerning the Upload of a File to a ... · 2.1. Description of the Central Scenario Let us assume that you are working as a global sales account manager for a

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 15

4.2. CSV Delimiter

When you upload a CSV file you can choose a delimiter.

In case a special character (e.g. the chosen CSV separator) is used inside a data field the whole data field has to be enclosed with a delimiter sign. When the delimiter sign itself is included in the data, it has to be doubled in the data field.

The following file example illustrates the usage of a delimiter. The delimiter always has to be used before and after the expression. It is not necessary to set it everywhere. It is only necessary to set it where needed for the expression. Sometimes it is set automatically for every field e.g. with MS Excel when you ‘save as’ CSV file.

In case your CSV file is big and does not use any delimiter at all, it is recommended to remove the default value ‘ ” ’for delimiter in the upload screen for better upload performance.

Screenshot of CSV File

Page 16: What Are Specifics Concerning the Upload of a File to a ... · 2.1. Description of the Central Scenario Let us assume that you are working as a global sales account manager for a

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 16

Transfer File; Delimiter ‘ “ ’

Edit Columns

(1) Display Data - Fields: Field1;Field2;Field3;Field4;Field5;Field6;Field7;Field8;Field9;Field10;

Delimiter

Page 17: What Are Specifics Concerning the Upload of a File to a ... · 2.1. Description of the Central Scenario Let us assume that you are working as a global sales account manager for a

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 17

(2) Display Data - Numbers (Integer): ;2;3;4;5;6;7;8;9;10;

(3) Display Data - Numbers (Decimals): ;"2,123";"3,123";"4,123";"5,123";"6,123";"7,123";"8,123";"9,123";"10,123";

(4) Display Data - Fields with double quotes ;"b""b";"c""c";"d""d";"e""e";"f""f";"g""g";"h""h";"i""i";"j""j";

(5) Display Data - Fields with separator and double quotes ;"""b"";b";"""c"";c";"""d"";d";"""e"";e";"""f"";f";"""g"";g";"""h"";h";"""i"";i";"""j"";j";

Page 18: What Are Specifics Concerning the Upload of a File to a ... · 2.1. Description of the Central Scenario Let us assume that you are working as a global sales account manager for a

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 18

(6) Display Data - Double quotes ;"""";"""";"""";"""";"""";"""";"""";"""";"""";

(7) Display Data - Separators ;";";";";";";";";"; ";";";";";";";";";

(8) Display Data - Separator in double quotes ;""";""";""";""";""";""";""";""";""";""";""";""";""";""";""";""";""";""";

(9) Display Data - More than 10 fields (11) ;bbb;ccc;ddd;eee;fff;ggg;hhh;iii;jjj;kk

When values are entered in columns without header these columns are cut off.

No field11 for ‘kk’; only 10 column headers

Page 19: What Are Specifics Concerning the Upload of a File to a ... · 2.1. Description of the Central Scenario Let us assume that you are working as a global sales account manager for a

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 19

(10) Display Data - Missing fields b,d,f,h,j ;;ccc;;eee;;ggg;;iii;;

(11) Display Data - Missing fields c, e, g,i ;bbb; ;ddd; ;fff; ;hhh; ;jjj;

(12) Display Data – First field missing ;First field missing;ccc;ddd;eee;fff;ggg;hhh;iii;jjj;

(13) Display Data – Last field missing ;bbb;ccc;ddd;eee;fff;ggg;hhh;iii;;

Page 20: What Are Specifics Concerning the Upload of a File to a ... · 2.1. Description of the Central Scenario Let us assume that you are working as a global sales account manager for a

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 20

5. InfoObject Proposal

When uploading a file it is possible to select type ‘InfoObject’. Let us upload the same file of ‘chapter 3.1.’ again. This time, for column ‘Customer’, we choose type ‘InfoObject’.

You can select one out of two different search helps. With the ‘Search Help for InfoObjects’ you can search via names. The ‘Search Help for InfoObjects in Mapping Proposal’ proposes suitable hits. Possible objects are derived from all available InfoObjects in the BW Workspace.

The following InfoObjects have been derived as suitable according to ‘data type’ and ‘length’:

There are two different strategies which are used to derive a suitable InfoObject:

o Data type and length o Texts

The uploaded Local Provider ‘Customer_ABC_SDN’ now can e.g. be used to be joined with MultiProvider ‘Sales Total *ZTE11WSOA+’ on basis of the join field ‘Customer (TE11WSCUS)’.

Page 21: What Are Specifics Concerning the Upload of a File to a ... · 2.1. Description of the Central Scenario Let us assume that you are working as a global sales account manager for a

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 21

6. Representation of Keys

In a BW Workspace you would like to combine Central and Local Providers on field level with the help of the BW Workspace Designer.

It is not suitable to link fields on basis of texts as they are language dependent. Also the external key cannot be used as this can be dependent on your user settings, e.g. external representation for date ‘2011-12-24’ or ‘24.12.2011’.

Therefore only the internal format is suitable to be used to succeed in mapping fields when modeling a CompositeProvider (with e.g. 20111224 as internal format for the date field). In this context also alpha-conversion has to be considered.

This has to be taken into account when Local Providers are uploaded which are used to combine in a new data model.

The ‘data display’ of the ’Upload of Local Provider’ in the BW Workspace Designer always displays the internal representation.

Page 22: What Are Specifics Concerning the Upload of a File to a ... · 2.1. Description of the Central Scenario Let us assume that you are working as a global sales account manager for a

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 22

7. Related Content

http://www.sdn.sap.com/irj/sdn/bwa

http://www.sdn.sap.com/irj/sdn/edw

The help.sap.com Link to the BW Workspaces will be updated here when available!

Page 23: What Are Specifics Concerning the Upload of a File to a ... · 2.1. Description of the Central Scenario Let us assume that you are working as a global sales account manager for a

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 23

Copyright

© Copyright 2011 SAP AG. All rights reserved.

No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice.

Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.

Microsoft, Windows, Excel, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation.

IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, System z, System z10, System z9, z10, z9, iSeries, pSeries, xSeries, zSeries, eServer, z/VM, z/OS, i5/OS, S/390, OS/390, OS/400, AS/400, S/390 Parallel Enterprise Server, PowerVM, Power Architecture, POWER6+, POWER6, POWER5+, POWER5, POWER, OpenPower, PowerPC, BatchPipes, BladeCenter, System Storage, GPFS, HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex, MVS/ESA, AIX, Intelligent Miner, WebSphere, Netfinity, Tivoli and Informix are trademarks or registered trademarks of IBM Corporation.

Linux is the registered trademark of Linus Torvalds in the U.S. and other countries.

Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered trademarks of Adobe Systems Incorporated in the United States and/or other countries.

Oracle is a registered trademark of Oracle Corporation.

UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.

Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc.

HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®, World Wide Web Consortium, Massachusetts Institute of Technology.

Java is a registered trademark of Sun Microsystems, Inc.

JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape.

SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP Business ByDesign, 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.

Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Business Objects S.A. in the United States and in other countries. Business Objects is an SAP company.

All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies (‘SAP Group’) for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. 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, if any. Nothing herein should be construed as constituting an additional warranty.