Sunteți pe pagina 1din 10

BPC 5.X / 7.

X MASTERDATA AUTOMATIC
UPDATE

USER GUIDE

PROJECT IDENTIFICATION

Project Name CPI/Project Number Project Type


(CBI, Implementation, CSS, Upgrade, Internal, other)

Customer Name Customer Number Planned Start/Finish

SAP Customer Partner Project Sponsor Program Manager

SAP Project Manager Customer Project Manager Partner Project Manager

The table above can be deleted if not applicable to the accelerator you are developing
(Example a white Paper). If required then please leave this table on the front page so
that it can be completed when the accelerator is used.

©SAP AG 2009
Copyright © 2009 SAP AG. All rights reserved
1
OTHER DOCUMENTS
 BPC – MasterData Automatic update.ppt: Powerpoint Summary
 SAP_MasterData_Import.dtsx Package file
 SAP_MasterData_Import.xls Transformation file exemple
 SAP_MaserData_Import.txt Import File exemple

TABLE OF CONTENTS
1. Package Summary............................................................................................................................................................................................
2. Prerequisites.....................................................................................................................................................................................................
2.1. Package..................................................................................................................................................................................................
2.2. Transformation file..................................................................................................................................................................................
2.3. Import file................................................................................................................................................................................................
3. User Selection...................................................................................................................................................................................................
4. Package logs....................................................................................................................................................................................................
4.1. DATA MANAGER LOGS.........................................................................................................................................................................
4.2. LOG FILES.............................................................................................................................................................................................
5. Package Steps detail........................................................................................................................................................................................
5.1. Copy of member table and member sheet..............................................................................................................................................
5.2. Conversion and load of the import file....................................................................................................................................................
5.2.1. Conversion.........................................................................................................................................................................................
5.2.2. Load import file into a temporary table...............................................................................................................................................
5.3. Blocking errors check.............................................................................................................................................................................
5.4. Row-by-row check..................................................................................................................................................................................
5.5. Update dimension...................................................................................................................................................................................
5.5.1. New members....................................................................................................................................................................................
5.5.2. Existing members..............................................................................................................................................................................
5.6. Commit updated.....................................................................................................................................................................................
5.6.1. Replace original table and member sheet by the copies....................................................................................................................
5.6.2. Process..............................................................................................................................................................................................
5.7. Clean......................................................................................................................................................................................................

©SAP AG 2009
Copyright © 2009 SAP AG. All rights reserved
2
1. PACKAGE SUMMARY
This package provides a way to automatically update / add members into a BPC dimension.
The excel member sheet is also updated so it remains up-to-date with dimension table.

Before any member is added or updated, the package performs a “Blocking conditions tests”
which could result in a package failure (see $5.3).

Then it performs a few “Row by row tests” (see $5.4) such as checking that the PARENTH is a
valid member or that the properties values do not exceeds the maximum number of characters.
If one of those checks fails, the row is rejected.

The members that were not rejected in the previous step will be updated or added:
 The properties of existing members will be updated if they are different in the import file.
 The new members will be added, and the dimension properties not existing in the import file will be set
to blank by default

NOTE: The package has originally been designed to handle a “DEFAULT” member in each
dimension filled with default values for each property. If such a member exists in the selected
dimension, its value will be used when adding the new member in the dimensions.

If no members were added or updated, the package ends


Otherwise, the dimension is processed, and depending of the user selection, applications are
processed and the system is made available.

2. PREREQUISITES
2.1. Package
 Copy the file “SAP_MasterData_Import.dtsx” to the data manager folder of your application
 Add the package to the package list in the data manager

2.2. Transformation file


Validate and save the transformation file “SAP_MasterData_Import.xls”

The transformation file must generate a file with ‘OUTPUTDELIMITER = TAB’ and
‘VALIDATERECORDS=NO’.

2.3. Import file


Create an import file (text, xls or csv) containing the members to
import
 First line must contain a header with properties name
 First column must be « ID »

©SAP AG 2009
Copyright © 2009 SAP AG. All rights reserved
3
 Must not included the « NEWID » property

©SAP AG 2009
Copyright © 2009 SAP AG. All rights reserved
4
3. USER SELECTION

 Dimension Name
The « Dimension » prompt is filled with the data manager variable « %DIMS% », therefore it
contains only the application dimensions and the user won’t be able to select any other
dimension not included in the current application.

 Import File
There is no required format for this file as it will be converted in the package by a convert task.
There are a few requirements though: the first line must contain the properties name, and
among these properties, « ID » must be included in the import file and the property « NEWID ».
If any of those requirements is not met, the import will fail (see $5.3 for a complete list of
requirements).

 Transformation file
The transformation file is used to convert any import file format into a tab separated text file. It
does not validate the file contents so the log result displayed in the data manager log will not
display any rejected members.

 Ignore unknown columns? "Ignore and continue" or "Fail import"


As it is possible that the import file contains columns not existing as properties in the selected
dimension, the user can either choose to ignore these columns or to fail the import if such
columns exist in the import file. The default value is « Ignore and continue »

©SAP AG 2009
Copyright © 2009 SAP AG. All rights reserved
5
 Perform a full process of the application after creating the dimension? Yes or No

 Make system available after creating the dimension? Yes or No

©SAP AG 2009
Copyright © 2009 SAP AG. All rights reserved
6
4. PACKAGE LOGS
4.1. DATA MANAGER LOGS
 Only for execution time and error log if the package fail
 The « Accept Count » and « Reject Count » do not represent the actual number of rejected
records. These lines are generated by the Convert task, and as the transformation file does
not validate records, all import file rows are accepted.

As no way was found to modify those figures in the datamanager log, the only way the
find out the number of new, updated and rejected records is by looking at the log files in
the temp folder (see $4.2)

4.2. LOG FILES


The log files used by the package are stored in the temp folder:
<Application>\PrivatePublications\<User>\TempFiles\

Depending of execution results, log files are created by the package while others are
automatically generated by BPC:

If the package fails: the import file is copied to this folder


If a row of the import is rejected, a “Reject.LOG” file is created and includes the reject cause.
If a member is added: a “NewMembers.LOG” file is created
If a member has been updated, an “UpdatedMembers.LOG” file is created

NOTE: The « X » in the file names stands for the package execution instance number which is
incremented each time the package is run from BPC.

 SAP_MasterData_Import_X.LOG: package log.


Generated by BPC

 SAP_MasterData_Import_X_Dimension_ImportFile.txt: copy of the import file


 SAP_MasterData_Import_X_Reject.LOG: contains rejected
members and reason why
 SAP_MasterData_Import_X_Dimension_NewMembers.LOG: contains members added in
the dimension
 SAP_MasterData_Import_X_Dimension_UpdatedMembers.LOG: contains members
updated in the dimension

©SAP AG 2009
Copyright © 2009 SAP AG. All rights reserved
7
5. PACKAGE STEPS DETAIL
5.1. Copy of member table and member sheet
At the beginning of the package, the read-only status of the excel member sheet is tested.

If it is read-only the package ends


If not, the mbr table is copied into a temporary table (tmp_CopymbrTable) and the excel
member sheet is copied in the TempFiles folder

Those copies are used during the package processing to update or/and add new members.
If all steps are successful, the temporary table and excel member sheet will be copied back.

Therefore, if a problem occurs during package processing, the system will be left as it was
before.

5.2. Conversion and load of the import file


5.2.1. Conversion
After the creation of the working copies, the import file is converted to a tab separated text file.
This enable the user to upload a file in all BPC supported format: txt, xls, csv
5.2.2. Load import file into a temporary table
After it has been converted, the import file is loaded into a temporary table “tmp_Import”
This table also contains log columns which will be used as an error tag and error description by
following steps

5.3. Blocking errors check


If any of the following requirements is not met, all import rows are rejected and the package fails
 The « ID » column must exist in the import file
 The « NEWID » column must not exists in the import file
 If the user chose to reject the import if unknown columns were found (ie properties not
existing in the dimension)

If the a blocking error occurs, a file is « reject.LOG » file is created containing all import rows
Otherwise the package proceeds to the next step

5.4. Row-by-row check


For each row, if one of the following requirement is not met, the whole row is rejected:
 The ID has multiple rows in the import file
 The property value exceeds the maximum length allowed in the dimension
 The PARENTH property does not exists

©SAP AG 2009
Copyright © 2009 SAP AG. All rights reserved
8
NOTE: If the PARENTH value does not exists in the dimension but does exists in the import file,
the corresponding ID will not be rejected

If members were rejected, a “reject.LOG” file is created containing all rejected members and
why they were rejected.

5.5. Update dimension


5.5.1. New members
The members that were not rejected in the previous step and that do not exist in the dimension
will be added:
 In the temporary member table
 In the temporary excel member sheet
For the dimension property that were not part of the import file, the value will be set to blank by
default

NOTE: The package has originally been designed to handle a “DEFAULT” member in each
dimension filled with default values for each property. If such a member exists in the selected
dimension, its value will be used when adding the new member in the dimensions.

If new members are added during this step, a “NewMembers.LOG” file is created

5.5.2. Existing members


For existing members, the values are updated for each property
 In the temporary member table
 In the temporary excel member sheet

If new members are added during this step, a “NewMembers.LOG” file is created

Only the properties values different between the import file and the dimension will be updated,
thus:
 If a property is not part of the import file, its value in the dimension won’t be changed
 If a member property has the same value in the import file and in the dimension, this
member won’t be included in “UpdatedMembers.LOG” file

5.6. Commit updated


5.6.1. Replace original table and member sheet by the copies
If members were added or updated, the original member table is replaced by the temporary.
And the original excel member sheet is replaced by the copy made at the beginning of the
package.

This way, if, for any reason, the package were to fail before this step, the original system would
not be modified.

If no members were added or updated, the member table is not replaced as no modifications
were made to the copy table.

©SAP AG 2009
Copyright © 2009 SAP AG. All rights reserved
9
5.6.2. Process
The dimension is then processed and, depending of the user selection, applications are
processed and the system is made available

5.7. Clean
At the end of the package, unnecessary files and temporary tables are deleted.

©SAP AG 2009
Copyright © 2009 SAP AG. All rights reserved
10

S-ar putea să vă placă și