Sei sulla pagina 1di 14

Exploring Data Sources Part 2

Applies to:
SAP BW 3.x & SAP BI Net Weaver 2004s. For more information, visit the EDW homepage.

Summary
This document will give the reader the details of options available while creating a DataSource. This basically explores the field tab in the data source. Author: Company: Created on: Vikram Srivastava Infosys Technologies Limited 20 September 2010

Author Bio
Vikram Srivastava is working as a Technology Analyst with Infosys Technologies Limited. He has got a rick experience on various BW Implementation/Support Projects in both SAP BW 3.5 and SAP BW 7.0.

SAP COMMUNITY NETWORK 2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 1

Exploring Data Sources Part 2

Table of Contents
Introduction ......................................................................................................................................................... 3 Field name ...................................................................................................................................................... 3 Short description ............................................................................................................................................. 3 Field Will Be Transferred (Transfer Structure) ................................................................................................ 4 InfoObject Template for Field of Data Source ................................................................................................ 4 Data type ......................................................................................................................................................... 5 Length (No. of Characters) ............................................................................................................................. 5 Number of Decimal Places ............................................................................................................................. 5 Output Length ................................................................................................................................................. 6 Lowercase letters allowed/not allowed ........................................................................................................... 6 Key Field ......................................................................................................................................................... 6 Conversion Routine......................................................................................................................................... 7 Data Input Format (Internal/External) ............................................................................................................. 7
Trusted Internal Format ............................................................................................................................................... 8 Check for Internal Format ............................................................................................................................................ 8 Data Has External Format............................................................................................................................................ 8

Conversion Routine in Source System (Outside of BW) ................................................................................ 9 Name of Referenced Currency Field / Unit Field ............................................................................................ 9 Selection ....................................................................................................................................................... 10
Selection Options ....................................................................................................................................................... 11 Field Type (Enhanced Selection Type) ...................................................................................................................... 12

Related Content ................................................................................................................................................ 13 Disclaimer and Liability Notice .......................................................................................................................... 14

SAP COMMUNITY NETWORK 2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 2

Exploring Data Sources Part 2

Introduction
In this article we will be exploring the various options available while creating a data source. While doing the development we tend to use only the simple and basic options though SAP has equipped us with even more options.

Here we will be exploring each of the columns in the fields tab of the data source. Field name

The first field is the field name. As we know that data source is a structure and PSA is the table associated with it. The name of the field in this structure/PSA table is signified by the field name. Short description

The field short description holds the description of the objects mentioned in the field. This can hold a maximum of 20 Characters.

SAP COMMUNITY NETWORK 2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 3

Exploring Data Sources Part 2

Field Will Be Transferred (Transfer Structure)

If we set this indicator for a field from the field list, or if this indicator is set, the field is really transferred upon request or a push. InfoObject Template for Field of Data Source

The template InfoObject is the InfoObject on which the Data Source field is technically based. It can only be used for DataSources that are defined in BI, for example for file DataSources or for Web service DataSources. Definition: DataSources from SAP source systems (replicating source systems) normally define the technical properties of the Data Source fields completely decoupled from BI entities. It therefore is not advisable to base a Data Source field of a replicated Data Source on an InfoObject. Use: If we enter the name of the template InfoObject, system offers to copy the technical properties of the entered InfoObject to the corresponding field of the DataSource.
Note: that this assignment is not dynamic. There is no check if the properties are identical, neither in a subsequent change to the technical property of the InfoObject nor in a subsequent change to the properties of the DataSource field

Dependencies: When we create a transformation, a proposal for the assignment of the DataSource field to a field of the target object is generated from the template InfoObject. The proposal is based on the identical names of the InfoObjects.

SAP COMMUNITY NETWORK 2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 4

Exploring Data Sources Part 2

Data type

The data type describes the data format to the user interface. If a table or structure field, or a data element is being used in ABAP programs, then the data type is converted into a format used by the ABAP processor. When creating a table on the database, the data type for a table field is converted into a corresponding data format for the database system being used. Length (No. of Characters)

It displays the number of valid positions of a field without editing characters (e.g. commas or points). Dependencies: Some data classes have a fixed length. For example, the data class CLNT (client) always has three places. If we enter an invalid length for such a data class, the system will give us a warning and then correct the error automatically. String data types (STRING, RAWSTRING) possess an unlimited length. However, we can specify a length in the dictionary (at least 256 char.). This length is taken as basis for optimizations when string fields are written to the database. From a certain length onwards, there are no further optimizations possible. Therefore, the length specification can be omitted (length 0). If length 0 is specified in the dictionary, no optimization is carried out during the storage on the database and an unlimited length is assumed. Number of Decimal Places

It specifies the number of decimal places allowed.Decimal places is only meaningful for the data types CURR, DEC, FLTP and QUAN.

SAP COMMUNITY NETWORK 2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 5

Exploring Data Sources Part 2

Output Length

It specifies the maximum field length including editing characters (e.g. commas or periods) for inputting and outputting values. This value is computed automatically from the specifications for the data type, number of places and possibly the number of decimal places. It can be overwritten. Lowercase letters allowed/not allowed

If this flag is set, upper case and lower case are distinguished when we enter values with screen masks. Otherwise all the letters entered will be converted to upper case when we enter values with a screen mask. This mechanism is in effect for all the fields referring to this domain. Key Field

If this indicator is set a specific field can be specified as a key field while extracting the data to the PSA.

SAP COMMUNITY NETWORK 2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 6

Exploring Data Sources Part 2

Conversion Routine

Conversion takes place when converting the contents of a screen field from display format to SAP-internal format and vice versa and when outputting with the ABAP statement WRITE, depending on the data type of the field. If standard conversion is not suitable, it can be overridden by specifying a conversion routine in the underlying domain. A conversion routine is identified by its five-place name and is stored as a group of two function modules. The function modules have a fixed naming convention. The following function modules are assigned to conversion routine xxxxx: CONVERSION_EXIT_xxxxx_INPUT CONVERSION_EXIT_xxxxx_OUTPUT The INPUT module performs the conversion from display format to internal format. The OUTPUT module performs the conversion from internal format to display format. If a screen field refers to a domain with a conversion routine, this conversion routine is executed automatically each time an entry is made in this screen field or when values are displayed with this screen field. Data Input Format (Internal/External)

This specifies the format of the data in the source.


Note: Source data that is transferred as text can differ from the internal, SAP character representation, that is, the internal format. This field specifies whether the data is supplied in an internal or external format.

SAP COMMUNITY NETWORK 2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 7

Exploring Data Sources Part 2

Possible Options

Example: Where z is a digit and v a sign, then a number with two decimal places can be represented in text as zzzz.zzv (internal, SAP representation), or, for example, vz.zzz,zz (a possible external representation). The number could also be binary coded. This final possibility is not, however, taken into consideration here. Trusted Internal Format Definition: The data source returns the secure internal format for the field. Use: Only choose this option when we are very sure that the data source returns the data in the internal format for this field. If this is the case, no checks and conversions are performed. If the source does not return an internal format, there could be data inconsistencies or errors in the loading process. Example: A date field is always returned with data in format yyyymmdd. Check for Internal Format Definition: The data from the source should be available in internal format, but this should be checked before being passed on to the transformation. Use: Choose this option to ensure data conformity. Example: The source should return the format yyyymmdd for a date field, but this is not secure. Data Has External Format Definition: The data is delivered in external format. It should be converted to an internal format before being passed on to the transformation. Use: Choose this option when we know that the data is not in internal format. Example: The data for a date field have the format dd.mm.yyyy. It should be converted to the intenral format yyyymmdd.

SAP COMMUNITY NETWORK 2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 8

Exploring Data Sources Part 2

Conversion Routine in Source System (Outside of BW)

This specified the conversion routine if any exists in the source system for that particular field. Name of Referenced Currency Field / Unit Field

This specifies the name of the referenced currency or unit field, or fixed currency or unit. Use We can specify the name of the assigned currency or unit field here. This field must be available in the same structure and must be of type CUKY or UNIT. If the field has a fixed currency or unit, we can directly enter the currency or unit key enclosed in apostrophes. Dependencies We only need to enter a reference field or a fixed currency if the amount field is delivered in an external format. The value for quantity (data type QUAN) is used for informational purposes only and is not evaluated at runtime. Example Field Name AMOUNT AMOUNT AMOUNT AMOUNT QUANTITY QUANTITY QUANTITY Data Type CURR CURR CURR DEC QUAN QUAN QUAN Format External Internal External External External External Internal Currency/Unit Field CURRENCY CURRENCY 'JPY' 'JPY' UNIT 'ST' UNIT Valid/Invalid Valid Informational Valid Invalid Informational Informational Informational

SAP COMMUNITY NETWORK 2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 9

Exploring Data Sources Part 2

Selection

Use If we select Selection, we can determine selections for this field in the InfoPackages that are used for loading to the PSA. Dependencies The selectable fields are also available in the data transfer process for filtering. For DataSources from the SAP source system, the selectability is determined in the source system. No Selection Possible X M Selection Possible Selection Required

SAP COMMUNITY NETWORK 2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 10

Exploring Data Sources Part 2

Selection Options

The Selection options that can be processed for a DataSource field.


Note 1: The selection options defined here must be supported by the extractor.

Note 2:If no other selection options are used for a DataSource field other than 'EQ' and 'BT', no further definition is required. The value of the selection options can remain as the default setting '0'.

The selection option combinations are encoded into a binary string using the following schema and are saved as decimal figures: Selection option EQ BT CP GT GE LT LE NE NB NP 2^0 2^1 2^2 2^3 2^4 2^5 2^6 2^7 2^8 2^9 exponent (binary string)

Each character in the resulting binary string describes whether the corresponding selection option is allowed or not. That is: 1-allowed 0-not allowed For example: Selection options EQ and CP can be used to select in a field. The binary string is then: 0000000101

SAP COMMUNITY NETWORK 2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 11

Exploring Data Sources Part 2

The corresponding decimal value that sis saved as the DataSource definition is: 1*2^0 + 1*2^2 = 5

Field Type (Enhanced Selection Type)

In this field we can select or see whether a field is time or language dependent.

SAP COMMUNITY NETWORK 2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 12

Exploring Data Sources Part 2

Related Content
www.help.sap.com www.sdn.sap.com www.service.sap.com

SAP COMMUNITY NETWORK 2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 13

Exploring Data Sources Part 2

Disclaimer and Liability Notice


This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade. SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk. SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document.

SAP COMMUNITY NETWORK 2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 14

Potrebbero piacerti anche