You are on page 1of 20

Start of Content Area Procedure documentationUploading Hierarchies from Flat Files Locate the document in its SAP Library

structure Prerequisites If you want to load InfoObjects in the form of hierarchies, you have to activate the indicator with hierarchies for each of the relevant InfoObjects in the InfoObject maintenance. If necessary, you need to specify whether the whole hierarchy or the hierarchy structure is to be time-dependent, whether the hierarchy can contain intervals, whether additional node attributes are allowed (only when loading using a PSA), and which characteristics are allowed. Procedure ... 1. Defining the source system from which you want to load data:

Choose Source System Tree Root (Source System) Context menu (Right Mouse Button) Create. For a flat file, choose: File System, Manual Metadata; Data via File Interface. 2. Defining the InfoSource for which you want to load data:

Optional: Choose InfoSource Tree Root (InfoSources) Context Menu (Right Mouse Button) Create Application Component. Choose InfoSource Tree Your Application Component Context Menu (Right Mouse Button) Create InfoSource Direct Update Choose an InfoObject from the proposal list, and specify a name and a description. 3. Assigning the source system to the InfoSource

Choose InfoSource tree Your Application Component One of your InfoSources Context Menu (Right Mouse Button) Assign Source System. You are taken automatically to the transfer structure maintenance. The system automatically generates DataSources for the three different data types to which you can load data. Attributes Texts Hierarchies (if the InfoObject has access to hierarchies)

The system automatically generates the transfer structure, the transfer rules, and the communication structure (for attributes and texts). 4. Maintaining the transfer structure / transfer rules

Choose the DataSource to be able to upload hierarchies. Idoc transfer method: The system automatically generates a proposal for the DataSource and the transfer structure. This consists of an entry for the InfoObject, for which hierarchies are loaded. With this transfer method, during loading, the structure is converted to the structure of the PSA, which affects performance. PSA transfer method: The transfer methods and the communication structure are also generated here. 5. Maintaining the hierarchy:

Choose Hierarchy Maintenance, and specify a technical name and a description of the hierarchy. PSA Transfer Method: You have the option here to set the Remove Leaf Value and Node InfoObjects indicator. As a result, characteristic values are not transferred into the hierarchy fields NODENAME, LEAFFROM and LEAFTO as is normally the case, but in their own transfer structure fields. This option allows you to load characteristic values having a length greater than 32 characters. Note Characteristic values with a length > 32 can be loaded into the PSA, but they cannot be updated in characteristics that have a length >32. The node names for pure text nodes remain restricted to 32 characters in the hierarchy (0HIER_NODE characteristic). The system automatically generates a table with the following hierarchy format (for sorted hierarchies without removed leaf values and node InfoObjects): Description

Field Name

Length

Type Node ID

NODEID

NUMC InfoObject name

INFOOBJECT

30

CHAR Node name

NODENAME

32

CHAR Catalog ID

LINK

CHAR Parent node

PARENTID

NUMC First subnode

CHILDID

NUMC Next adjacent node

NEXTID

NUMC Language key

LANGU

CHAR Description - short

TXTSH

20

CHAR Description - medium

TXTMD

40

CHAR Description- long

TXTLG

60

CHAR Note The system transfers the settings for the intervals and for time-dependency from the InfoObject maintenance. Depending on which settings you have defined in the InfoObject maintenance, further table fields can be generated from the system. The valid from and valid to field is filled if you select Total Hierarchy Time-dependent in the InfoObject maintenance. The time-dependent indicator is activated if you select the Hierarchy Nodes Time-dependent option in the InfoObject maintenance. 6. Note Depending on which settings you defined in the InfoObject maintenance, additional fields can be generated from the system. Also note the detailed description for Structure of a Flat Hierarchy File for Loading via an IDoc and for Structure of a Flat Hierarchy File for Loading via a PSA. Further Steps: Maintaining InfoPackages Result You have uploaded the hierarchy data for the corresponding characteristic. Save your entries.

End of Content Area

Start of Content Area Procedure documentationUploading Hierarchies from Flat Files Locate the document in its SAP Library structure Prerequisites If you want to load InfoObjects in the form of hierarchies, you have to activate the indicator with hierarchies for each of the relevant InfoObjects in the InfoObject maintenance. If necessary, you need to specify whether the whole hierarchy or the hierarchy structure is to be time-dependent, whether the hierarchy can contain intervals, whether additional node attributes are allowed (only when loading using a PSA), and which characteristics are allowed. Procedure ... 1. Defining the source system from which you want to load data:

Choose Source System Tree Root (Source System) Context menu (Right Mouse Button) Create. For a flat file, choose: File System, Manual Metadata; Data via File Interface. 2. Defining the InfoSource for which you want to load data:

Optional: Choose InfoSource Tree Root (InfoSources) Context Menu (Right Mouse Button) Create Application Component. Choose InfoSource Tree Your Application Component Context Menu (Right Mouse Button) Create InfoSource Direct Update Choose an InfoObject from the proposal list, and specify a name and a description. 3. Assigning the source system to the InfoSource

Choose InfoSource tree Your Application Component One of your InfoSources Context Menu (Right Mouse Button) Assign Source System. You are taken automatically to the transfer structure maintenance. The system automatically generates DataSources for the three different data types to which you can load data. Attributes Texts Hierarchies (if the InfoObject has access to hierarchies)

The system automatically generates the transfer structure, the transfer rules, and the communication structure (for attributes and texts). 4. Maintaining the transfer structure / transfer rules

Choose the DataSource to be able to upload hierarchies. Idoc transfer method: The system automatically generates a proposal for the DataSource and the transfer structure. This consists of an entry for the InfoObject, for which hierarchies are loaded. With this transfer method, during loading, the structure is converted to the structure of the PSA, which affects performance. PSA transfer method: The transfer methods and the communication structure are also generated here. 5. Maintaining the hierarchy:

Choose Hierarchy Maintenance, and specify a technical name and a description of the hierarchy. PSA Transfer Method: You have the option here to set the Remove Leaf Value and Node InfoObjects indicator. As a result, characteristic values are not transferred into the hierarchy fields

NODENAME, LEAFFROM and LEAFTO as is normally the case, but in their own transfer structure fields. This option allows you to load characteristic values having a length greater than 32 characters. Note Characteristic values with a length > 32 can be loaded into the PSA, but they cannot be updated in characteristics that have a length >32. The node names for pure text nodes remain restricted to 32 characters in the hierarchy (0HIER_NODE characteristic). The system automatically generates a table with the following hierarchy format (for sorted hierarchies without removed leaf values and node InfoObjects): Description

Field Name

Length

Type Node ID

NODEID

NUMC InfoObject name

INFOOBJECT

30

CHAR Node name

NODENAME

32

CHAR Catalog ID

LINK

CHAR Parent node

PARENTID

NUMC First subnode

CHILDID

NUMC Next adjacent node

NEXTID

NUMC Language key

LANGU

CHAR Description - short

TXTSH

20

CHAR Description - medium

TXTMD

40

CHAR Description- long

TXTLG

60

CHAR Note The system transfers the settings for the intervals and for time-dependency from the InfoObject maintenance. Depending on which settings you have defined in the InfoObject maintenance, further table fields can be generated from the system. The valid from and valid to field is filled if you select Total Hierarchy Time-dependent in the InfoObject maintenance. The time-dependent indicator is activated if you select the Hierarchy Nodes Time-dependent option in the InfoObject maintenance.

6. Note

Save your entries.

Depending on which settings you defined in the InfoObject maintenance, additional fields can be generated from the system. Also note the detailed description for Structure of a Flat Hierarchy File for Loading via an IDoc and for Structure of a Flat Hierarchy File for Loading via a PSA. Further Steps: Maintaining InfoPackages Result You have uploaded the hierarchy data for the corresponding characteristic.

End of Content Area

Entering content frame Procedure documentation Loading Hierarchies Locate the document in its SAP Library structure Use You can load hierarchies from different source systems: From an SAP system

Since the metadata is already delivered, you can directly load the standard hierarchies from an SAP system. From an external system (BAPI, file)

If you want to load hierarchies from an external system, you have to first maintain the metadata for this hierarchy. Note Furthermore, you can load hierarchies using the data mart interface from another BW system. See Hierarchies and Using the Data Mart Interface. Prerequisites In the InfoObject maintenance, the indicator With Hierarchies is set for the hierarchy basic characteristic, meaning that the characteristic can have hierarchies. If you load a hierarchy, you have to have selected the permitted characteristics in the InfoObject maintenance. See Tab Page: Hierarchy in the InfoObject maintenance. To load hierarchies from external systems, you have to edit the metadata in the transfer structure maintenance. See Uploading Hierarchies from Flat Files Procedure ...

1.

Select the InfoSource tree under Modeling in the Administrator Workbench.

2. Select the InfoSource (with direct update) for the InfoObject, to which you want to load the hierarchy. 3. Chose Assign DataSource from the context menu. This takes you to the Assign Source System dialog window. 4. Select the source system from which the hierarchy is to be loaded. You get to the InfoSource maintenance. If the DataSource only supports the transfer method IDoc, then only the transfer structure is displayed (tab page DataSource/Transfer Structure). If the DataSource also supports transfer method PSA, you can maintain the transfer rules (tab page Transfer Rules). 5. Save your entries and go back. You arrive at the InfoSource tree for the Administrator Workbench. 6. Choose Create InfoPackage from the context menu (see Maintaining InfoPackages). You arrive at the Create InfoPackage dialog window. 7. Enter the description for the InfoPackage. Select the DataSource (data element Hierarchies) you want and confirm. 8. On the Tab Page: Hierarchy Selection, select the hierarchy that you want to load into your BW system Specify if the hierarchy needs to be automatically activated after loading or needs to be noted for activation. Select an update method (Full Update, Subtree-Insert, Subtree Update). Note For more information, see Loading as Subtrees If you want to load a hierarchy from an external system with BAPI functionality, make BAPIspecific restrictions, if necessary. 9. 10. 11. 12. If you want to load a hierarchy from a flat file, maintain the Tab Page: External Data. Maintain the Tab Page: Processing Maintain the Tab Page: Updating To schedule the InfoPackage, you have the following options:

(Manually) in the scheduler, see Scheduling InfoPackages

(Automatically) using a process chain (see Loading Hierarchies Using a Process Chain) Note When you upload hierarchies, the system carries out a consistency check, making sure that the hierarchy structure is correct. Error messages are logged in the Monitor. You can get technical details about the error and its type and way of removal in the long text for the respective message. Result The hierarchy structure and the node texts or intervals are loaded. The structure information and the hierarchy texts are stored in the BW system. You can edit the hierarchy. In order to be able to use the hierarchy in report, the hierarchy has to be activated. As long as you have not selected the respective indicator for Loading Hierarchyand Note for Activation or Activate in the InfoPackage, you can also activate the hierarchy later (see Editing Hierarchies). If there are aggregates for a hierarchy and the hierarchy is noted for activation, it is activated after the next change run.

Leaving content frame

Entering content frame Procedure documentation Loading Hierarchies Locate the document in its SAP Library structure Use You can load hierarchies from different source systems: From an SAP system

Since the metadata is already delivered, you can directly load the standard hierarchies from an SAP system. From an external system (BAPI, file)

If you want to load hierarchies from an external system, you have to first maintain the metadata for this hierarchy. Note Furthermore, you can load hierarchies using the data mart interface from another BW system. See Hierarchies and Using the Data Mart Interface. Prerequisites In the InfoObject maintenance, the indicator With Hierarchies is set for the hierarchy basic characteristic, meaning that the characteristic can have hierarchies. If you load a hierarchy, you have to have selected the permitted characteristics in the InfoObject maintenance. See Tab Page: Hierarchy in the InfoObject maintenance.

To load hierarchies from external systems, you have to edit the metadata in the transfer structure maintenance. See Uploading Hierarchies from Flat Files Procedure ... 1. Select the InfoSource tree under Modeling in the Administrator Workbench.

2. Select the InfoSource (with direct update) for the InfoObject, to which you want to load the hierarchy. 3. Chose Assign DataSource from the context menu. This takes you to the Assign Source System dialog window. 4. Select the source system from which the hierarchy is to be loaded. You get to the InfoSource maintenance. If the DataSource only supports the transfer method IDoc, then only the transfer structure is displayed (tab page DataSource/Transfer Structure). If the DataSource also supports transfer method PSA, you can maintain the transfer rules (tab page Transfer Rules). 5. Save your entries and go back. You arrive at the InfoSource tree for the Administrator Workbench. 6. Choose Create InfoPackage from the context menu (see Maintaining InfoPackages). You arrive at the Create InfoPackage dialog window. 7. Enter the description for the InfoPackage. Select the DataSource (data element Hierarchies) you want and confirm. 8. On the Tab Page: Hierarchy Selection, select the hierarchy that you want to load into your BW system Specify if the hierarchy needs to be automatically activated after loading or needs to be noted for activation. Select an update method (Full Update, Subtree-Insert, Subtree Update). Note For more information, see Loading as Subtrees If you want to load a hierarchy from an external system with BAPI functionality, make BAPIspecific restrictions, if necessary. 9. 10. If you want to load a hierarchy from a flat file, maintain the Tab Page: External Data. Maintain the Tab Page: Processing

11. 12.

Maintain the Tab Page: Updating To schedule the InfoPackage, you have the following options:

(Manually) in the scheduler, see Scheduling InfoPackages (Automatically) using a process chain (see Loading Hierarchies Using a Process Chain) Note When you upload hierarchies, the system carries out a consistency check, making sure that the hierarchy structure is correct. Error messages are logged in the Monitor. You can get technical details about the error and its type and way of removal in the long text for the respective message. Result The hierarchy structure and the node texts or intervals are loaded. The structure information and the hierarchy texts are stored in the BW system. You can edit the hierarchy. In order to be able to use the hierarchy in report, the hierarchy has to be activated. As long as you have not selected the respective indicator for Loading Hierarchyand Note for Activation or Activate in the InfoPackage, you can also activate the hierarchy later (see Editing Hierarchies). If there are aggregates for a hierarchy and the hierarchy is noted for activation, it is activated after the next change run.

Leaving content frame Function documentation Variable Processing Types Locate the document in its SAP Library structure Use The processing type of a variable determines how a variable is filled with a value for the runtime of the query or Web application. Features The following processing types are available: * * Manual Entry / Default Value * Replacement Path * Customer Exit * SAP Exit Authorization Note Depending on the type of variable used (context-sensitive), the possible processing types are offered in the variable wizard. For more information about the possible combinations of variable

types and processing types, see Overview of Variable Types and Processing Types. Activities Entering content frame Function documentation Replacement Path Locate the document in its SAP Library structure Use You use the Replacement Path to specify the value that automatically replaces the variable when you execute the query or Web application. Integration The processing type Replacement Path can be used with characteristic value variables, text variables and formula variables. Features Text and formula variables with the processing type Replacement Path are replaced by a corresponding characteristic value. The variable wizard takes you automatically to the Characteristic dialog step, in which you select the reference characteristic for replacement. In the Replacement Path dialog step that follows, you choose whether the variable is replaced by the From or the To Value and the Key or the Name of the characteristic value. You can also specify the offset start and offset length for the output. Characteristic value variables with the processing type Replacement Path, are replaced by the results of a query. In the Replacement Path dialog step, select the query whose result you want to use as the variable. You can now use the data result of the selected query as a variable in a different query. Note The processing type Replacement Path takes place automatically, meaning it is never ready-forinput when executing. Activities In the variable wizard in the General Information dialog step, choose the processing type Replacement Path. Example If you specify a variable as a characteristic value, you do not have to give a text for the characteristic value right away. Instead, you can fill the text field dynamically, according to the characteristic that you use for the variable when you execute the query. To do this, define a text variable with automatic replacement. Leaving content frame

Entering content frame Function documentation Customer Exits Locate the document in its SAP Library structure Use If you need to use a processing type other than manual entry / default value, replacement path, SAP exit, or authorization, then a customer exit gives you the option of setting up a processing type for variables, tailor-made to your specific needs. The customer exit is designed as an enhancement that you can configure with customer-specific logic. You can find detailed information about customer exits and their use in the Structure linkEnhancements to the Standard section of the BC Changes to the SAP Standard documentation. Integration You can process all variable types (characteristic value variables, hierarchy node variables, hierarchy variables, formula variables and text variables) using the Customer Exit processing type. Prerequisites You have created a project in the CMOD transaction. You have selected SAP enhancement RSR00001 and assigned it to the enhancement project. You have activated the project. Note In SAP Enhancement Help, you can get further information on working with the SAP enhancement for global variables in reporting. Call up the transaction SMOD. Enter the name of the enhancement (RSR00001), choose Documentation and then Edit Display Sub-object. You can find general information about working with customer exits under Help Application Help in transaction CMOD. Features The Customer Exit processing type for variables allows you to use a function module exit to set default values for variables. The function module EXIT_SAPLRRS0_001 is used here. Example You want to use one characteristic value to calculate a second characteristic value. The InfoProvider only contains the calendar day. However, you now also want to see in a query the cumulated value for the relevant period (beginning with the first day of a quarter). For the first day of the quarter, use a variable with customer exit processing. If you now enter the current calendar day (19.06.2000, for example), a start date of 01.06.2000 appears in the customer exit, and the cumulated value of this period can be displayed. Item

Sales 19.06.2000

Sales 01.06.2000 19.06.2000

263 B

157 C

67 Activities In the variable wizard, in the General Information dialog step, choose the processing type Customer Exit.

See also:

Dependencies for Variables of the Customer-Exit Type

Leaving content frame Entering content frame Function documentation SAP Exit (delivered variables) Locate the document in its SAP Library structure Use The SAP Exit processing type is contained in variables delivered by SAP BW within the Business Content framework. Integration You can find the delivered variables in the Structure linkMetadata Repository if you search for variables using the search function (see Structure linkSearching for Metadata ).

Note The technical name of a delivered SAP object always begins with a number. Prerequisites Before you can use delivered variables you must first activate them. You can get further information on activating the query objects under Structure linkInstalling Business Content. Features SAP delivers a number of variables. There are variables that are processed via automatic replacement using a predefined replacement path (SAP Exit processing type). Example If you want to define a query that only ever displays the data from the current month, drag the delivered variable current month (technical name 0CMONTH) for the characteristic value current month (technical name 0CMONTH) into the query filter. Activities In the variable wizard in the General Information dialog step, choose the processing type SAP Exit. Caution You can only create variables with the processing type SAP Exit in SAP Systems. Customers cannot create any variables with the processing type SAP Exit. For customers, variables with SAP Exit are a part of the delivered Business Information Warehouse Business Content.

Leaving content frame

Entering content frame Function documentation Overview of Variable Types and Processing Types Locate the document in its SAP Library structure Use In the variable wizard, you choose a processing type that is dependent on the type of variable you are using. Depending on the variable type, only certain processing types are useful. The variable wizard offers you automatically only the possible processing types and takes you to the relevant settings for the chosen processing type using different dialog steps. Features The following table gives an overview of the possible combinations of variable types and processing types. The dialog steps that the variable wizard offers for each combination are also

listed. Variable Type/Processing Type

Manual entry / default value

Replacement Path

Customer Exit or SAP Exit

Authorization Characteristic Value Variable

Details Default Values

Replacement Path: Replacement with Query

Details

Details Hierarchy Variable

Details Default Values

Details

Hierarchy Node Variable

Details Default Values

Details

Details Text Variable

Details Default Values

Characteristic Replacement Path: Replacement with a Characteristic Value

Details

Formula Variable

Details Currencies and Units Default Values

Characteristic Replacement Path: Replacement with a Characteristic Value Currencies and Units

Details Currencies and Units

You might also like