XLR3 Data Injector User Guide
Introduction
The XLR3 Data Injector allows you to easily transfer your data from Excel to SAP R/3, to execute repetitive tasks and helps in treating big batch input sessions.
Record Types
In order for the SAP system to correctly process the data sent by the data injector, this data must be structured in a way that is understandable by the SAP system. The structure of data is defined by so-called record types.
A record type is simply a structure that will be used as template for records of data that will be passed to SAP R/3 for data input.
For the two data input methods currently supported and based on SAP transactions, a record type describes in fact the transaction that has to be carried out by SAP R/3 to inject the data. The structure contains consequently a list of the screens
and fields that need to be populated using data provided in Excel or with constant values.
Creating a record type with the transaction recorder
To create a record type whose structure correponds to a specific SAP transaction, the easiest way to proceed is to execute the transaction in a test system with the transaction recorder available directly from whithin the XLR3 Data Injector.
The goal of the recorder is to record all the screens and fields concerned by the execution of the transaction you chose and to create a record type based on that information.
All the fields which received information during the recording (because you entered it or because they were assigned default values) are found back in the newly created record type along with their associated values.
Importing record types from an exported batch input session
Record types may also be created directly from an exported batch input session. To proceed so, you must first go in your SAP R/3 system in the transaction SM35 (batch input overview), select a batch input and export it to a file on your desktop using the export command on the toolbar.
Once the file has been downloaded to your PC, it may be imported in the data injector. A record type will be created per transaction found in the batch input sessions. You may choose to import only transactions which are not yet sucessfully processed in the source SAP system.
Assigning Excel sheet data to record types
When you want to input data repetitively in your SAP system using data provided in an Excel sheet, you need to assign the source Excel sheet to the record type. When you need to repetitively input a screen of data within a specific transaction based on data provided in an Excel sheet, you need to assign the Excel sheet to the corresponding screen of the record type. This assignment is done through the menu command 'Record types -> Assign Excel sheet'.
For more information about this process, refer to section Generation of records.
Assigning values to record types fields
When a record type is created either with the transaction recorder or imported from a batch input session file, all the fields it contains have a value associated to them. This value may be changed and another constant value or an Excel sheet column may be assigned to the field.
To change this assignment, you have to select the field in the record types tree and select the menu command 'Record types -> Assign constant or Excel values'. You are then invited to enter a constant value or select an Excel column from an available Excel sheet either by its letter (A is the first column, B the second one, ...) or by its column header name (if the sheet has a header row - recommended).
The available Excel sheets are those assigned to the screen or one of its parent screens (see next topic) or to the record type to which the field belongs.
Hierarchy of screens
In SAP R/3, transactions are made up of screens which, in their turn, are compounded of fields. The order in which the fields are populated in a screen has no importance as long as the screen is not validated. On the over hand the sequence followed by the screens is highly tight to the result sought with the transaction.
This means for example that a transaction made up of two screens S1 and S2 will not give the same result if, within the transaction, the two screens are called sequentially each after the other a certain number of times (S1 * x + S2 * x) than if they are called alternatively the same number of times (x * (S1 + S2)).
To allow proper generation of data records in such a context, record types screens may be arranged in hierarchy. When arranged in hierarchy, the screens adopt either a parent, child or neutral role (neither parent nor child).
A parent - child relationship between two screens means the screens are dependent. A child screen should not exist if its parent screen has not been previously created and it may access the Excel sheets values from the sheet assigned to its parent screen. A parent screen may have any number of instances of a child screen.
Records
Records are instances of record types. Their structure is based on the one of the record types to which they relate but, contrarily to record types, they do contain actual data which can be transfered to the SAP system.
Any number of records may be created based on a specific record type. Their structure needs not be exactly the same as the record type associated. The records are not an exact copy of their associated record type but rather use the latter as a model to shape their own structure and get default values.
Generation of records
Each record type has a script program associated to it. The goal of that script program is, once run, to generate records according to the program statements. The structure and content of records is consequently completely dependent on the way the script program is written. The script program may be written by hand or generated automatically and then modified if necessary.
In many cases, the script generated automatically will be sufficient to get correct records generated. For more complex or dynamic transactions, the script will need to be adapted.
To generate the default script for a given record type, select the record type once it is ready (values assignments are done), select the tab 'Data generation' and then the menu command 'Record types -> Generate code'. A default script program will then be displayed which has been generated based on the current information available on the record type. This script may be executed to generate records.
Attention: each time you execute the script for record generation, the currently existing records associated to the selected record type are deleted. The execution of the script does not add records but replaces the current records with new ones. To know how to avoid this deletion of the existing records, please refer to the correction section.
Check and edition of records
Records may be checked and edited manually in the 'Data inspection' tab. The content of the list display depends on the record types tree selection. When a field or a screen is selected, the content of the corresponding record screens is displayed. When a record type or a group of record types is selected, the list displays the status of each record linked to the selected record types.
When a field is selected in the record types tree, its content may be modified in the different screens of the records where it appears. This is achieved by the menu command 'Records -> Edit Data'.
Importing records from an exported batch input session
When a batch input session is imported in the XLR3 Data Injector, one record type is created per transaction found in the batch input file and one corresponding record is created per record type. In fact in the particular case of a batch input import, each record type created has exactly one record linked to it which is exactly equal to the record type.
Of course, as soon as the batch input has been imported and the record types and records have been imported, you may modify the data as you like in order to generate more transactions based on the batch input data or correct incorrect data in the batch input before reprocessing it.
Data Injection
Currently, the data input in SAP R/3 is possible using the two most popular methods: direct CALL TRANSACTION and creation of batch input files.
Both methods have their pros and cons but you will quickly realize that the CALL TRANSACTION method is particularly efficient when used within the XLR3 Data Injector. The data injector offers parallel processing functionalities for both method for increased performance.
CALL TRANSACTION method
This is the most flexible and performant method. With this method, the transactions in SAP are directly called from your PC and the data is inputed in real time. The result of each transaction call is returned back by SAP to XLR3 Data Injector and you may consequently fully benefit of the correction possibilities offered by the data injector.
The data input may be done either in background (with or without parallel processing), in foreground or in display errors only mode.
Batch input method
You may opt for this very popular method of data input by asking to the XLR3 Data Injector to create one or more (parallel processing) file(s) that will be imported in SAP (with transaction SM35 - Import batch input file).
Less performant and less comfortable to use (have you ever tried to correct a batch input with 500 errors in it?!), this method has the advantage of the security. Indeed, the transactions calls are operated by SAP itself with data stored on the SAP system which offers more guarantees than any PC (well... normally!).
Status of records
Each record has a status which indicates if it was already processed (injected into SAP) or not and whether it was successfully posted or not. The 3 possible statuses are:
- N(ew) : the record was created and never posted to SAP.
- S(uccessful) : the record was created and posted successfully posted to SAP.
- E(rror) : the record was created and posted with error to SAP.
When a record has a status S or E, it has an associated message text that gives more information about the success or the failure of the posting.
When records are imported from an exported batch input session file, it is possible that some transations in the batch input had already been posted in SAP and they keep their actual status during their import. This ensures you don't post with the XLR3 Data Injector records that had already been posted with the batch input in SAP.
Data correction
Records are corrected (or simply modified) in the same way they are created: using the scripting language XLR3Script. Created in the 'Data correction' tab, the correction script presents two major differences when compared to the creation script:
- There exists only one correction script which is common to all record types while there exists one creation script per record type.
- When executing the correction script, the existing records are not deleted and recreated, they are just modified.
As for the creation code, the correction code may be generated automatically. This code is a template based on the errors existing in the records with status 'E' (error) and should be completed in order to correct the existing data.
The correction script may be run on all records or only on records which have a status 'E' (error). New Records may even be created in correction mode. In fact, there is no restriction over the creation mode.
Note that you may also correct the records in the 'Data inspection' tab as previously explained but this possibility has not the flexibility of the modifications operated through the correction script.
|