HDHSSD Oo
HDHSSD Oo
SNP2[TC] Exercises
Page 2 of 44
General Information
Please replace the characters XX by the participant number you received from your trainer at the
beginning of this training.
Page 3 of 44
Logon Data
At the beginning please check whether logging on to the following systems works.
Please, replace the XX by the participant number, your trainer assigned to you at
the beginning of the training.
SAP-Logon
-----------------------------------------------------------------------------
Logging on to SAP
User: SU_TBXX
Password: initial (afterwards please select your own password)
Page 4 of 44
Scenario
You are consultant in a transformation project. The customer instructs you to migrate sales
documents from source system SNP-TAR-800 into a target system, which has not yet been
determined. All dependent data must be adopted to the target system. Moreover, parts of the
data shall be adjusted according to the requirements of the customer.
The transformation tool you use is the Transformation Cockpit (/n/SNP/TC). Since the
Transformation Cockpit needs a control system the customer provides the solution manager
system SNP-TRA-001 to you. All necessary transports have already been imported and the
software has also been licensed.
Furthermore, the system administrator of the customer has already created RFC connections in
transaction SM59, as well as the corresponding whitelist entries for all determined systems
(control and source system) according to the SNP name convention. The systems have also
been entered into the system maintenance of the Transformation Cockpit and can now be used
for the transformation.
Page 5 of 44
Exercise 1: Create and Check System Connections
Now the customer also provides the target system SNP-TAR-9XX (XX is your participant
number).
Logon to the control system using username SU_TBXX (e.g. SU_TB01, SU_TB02, …) and
password initial. Check whether a RFC as well as a dialog RFC connection has already been
created (SM59) and write down the names for further steps.
____________________________________
____________________________________
Change to the Transformation Cockpit, which you call by transaction /n/SNP/TC. If there is a
message that there is no chosen scenario, go to the SAP menu and select Scenario Select
scenario. Choose one of the available scenarios.
Now you have to announce the provided target system of the customer to the Transformation
Cockpit, in order to use it later on in the tool. Choose Systems in the left-hand navigation bar and
afterwards select Jump Sys. Maint. in the SAP menu. Alternatively, you can use transaction
/SNP/TCSYS. Add a new entry to the list and maintain the necessary data:
Refresh the system details via button Refresh system details. The fields for technical data such
as system ID etc. will be filled automatically. Confirm your entries and save the created system.
Now you can use it working with your transformation project within the Transformation Cockpit.
Page 6 of 44
Exercise 2: Create Scenario and Make Settings
Since the Transformation Cockpit is delivered without content, it is necessary to create a new
or upload an existing scenario in the next step.
Create a Scenario
You decide to create a new scenario. To do that select Scenario Create new scenario in the
SAP menu.
In the next step, you have to assign at least one source and one target system to your scenario.
In order to do that, go back to Systems in the left-hand navigation bar, choose tab Systems and
assign them as follows:
The customer wishes for the exported files to be deposited in the register /export/. Check the file
path for the source, as well as the target system.
Also, please add a new Alias name Source_1 for the source system.
Save your entries.
Switch to tab System connections and check if all necessary connections are entered. Which
connections are necessary for a data migration from source to target system?
____________________________________
____________________________________
Afterwards, check the system connections using button Check system connections.
Page 7 of 44
Which results does the connection check show regarding the whitelist entries in your system?
____________________________________
With the aid of the connection check you found out, that the customer did not maintain a whitelist
entry for the dialog connection on the control system to the provided target system. Normally you
ask the customer to carry out this task subsequently. In the context of this training, you solve the
problem by yourself. Hence, open transaction /n/SNP/PXRFCWL and maintain the missing
whitelist entry.
To do that, search for your RFC connection and perform the action Write entry. You have now
maintained the whitelist entry successfully.
Check the system connections again under Systems. The message does not appear anymore.
Upload Scenario
Now switch to the area Data Objects. In the center screen area, you will see the scenario you
have created. This scenario is empty at this point. For a complete transformation of the sales
documents it is also necessary to migrate data from the modules FI, MM and SD. Furthermore,
you need a data object, which collects the addresses out of the corresponding objects as well as
a predecessor, which prepares the mapping (e.g. number get next) for certain objects in the
target system later.
Page 8 of 44
7. Also confirm the appearing message asking whether you want to go to the imported
scenario with Yes.
You can select settings for the scenario in tab run parameters in the left-hand navigation bar
under Data objects after double-clicking the scenario. Check, which values are defined in the
fields Pack.-size for other tasks and Processes for other tasks. For which kind of tasks are these
values used?
____________________________________
____________________________________
Finally, change the Max. package size (MB) to 10 MB and save your entry. Reaching a file size
of 10 MB or 200.000 datasets (it counts what is reached first) a new file will be generated for the
export.
Now you have successfully made all settings for your scenario.
Page 9 of 44
Exercise 3: Create Tasks
Your project manager wants the project team to centrally store all corresponding project tasks
in the Transformation Cockpit.
He asks you to maintain the following task in the task list using ID 001:
Setup satellite system with the description Setup source and target system, check
logical system, maintain whitelist entries
Since you can only maintain whitelist entries for already existing RFC connections you should
set up necessary dependencies for your tasks. To do that choose button Maintain dependencies.
Now enter the dependencies for the tasks. Each whitelist entry needs the predecessor Setup
RFC connection.
Page 10 of 44
You know that all necessary RFC connections and whitelist entries for the source system have
been maintained. That is why you can set the status of the subtasks regarding the source to
Done. Which status does the main task assume in the task list now?
____________________________________
We assume you have found out that a RFC connection but no whitelist entry for the target
system has been maintained. Consequently, you should set the status for the whitelist entry to
Erroneous. How does the status of the main task in the task list change now?
____________________________________
Finally, set all remaining subtasks to Done, as well. The main task is also displayed as Done
now.
Page 11 of 44
Exercise 4: Data Objects
In the next step, you must ensure that all necessary objects and tables you need for your
transformation of sales documents are maintained in the area Data objects.
While checking, you find out that the tables for the customer master data from the SD module
are missing. An experienced SD consultant tells you that the tables you need can be found in the
data object VTDE_TRAINING and that it has already been imported into another scenario on the
same system.
Your next task is to copy the corresponding data object (VTDE_TRAINING) from scenario
SNP_SALES_ORDER.
Proceed as follows:
1. Open area Data objects and right-click on the scenario. Create a new module.
2. Enter the ID SDXX and the name SDXX.
3. Perform another right-click on the just created module and create a data object.
4. Enter ID VTDE_TRAINING and title sales customer.
5. The status of the data object is active. Save your entries.
6. Double-click on the data object VTDE_TRAINING and switch to the tab Mass
maintenance.
7. Press the button Copy from data object and type the scenario SNP_SALES_ORDER in
the appearing window. Choose the object VTDE_TRAINING with the help of the search
help. Uncheck the options Copy export rules and Copy import rules and press the Next
button.
8. Now select the whole object and press Apply.
9. Save your entries.
In the mass maintenance of your created data object you can now see the copied tables and
their dependencies (see Predecessor no. and Selection tables).
Alternatively, you also could have copied the data object VTDE_TRAINING directly into the
module SD. Move the object into the SD module changing the module assignment. Perform a
right-click on the data object and choose Further functions Change module assignment.
Page 12 of 44
Create and Connect Tables
The next thing you find out with the help of an FI consultant is that the tables for the bank details
are missing in the data object DEBI_TRAINING. That concerns the selection table KNBK
(Customer master data: Bank details) and the dependent tables BNKA (Bank master data) and
TIBAN (IBAN). Note that table BNKA has the dependent table CDHDR (Change document
header) and this one also has the dependent table CDPOS (Change document position) (see
figure below).
Create the tables within the object DEBI_TRAINING and place them as dependent tables under
selection table KNB1.
Proceed as follows:
1. Perform a double-click on the data object DEBI_TRAINING in the Data object area.
2. Select the tab Mass maintenance and add the tables KNBK, BNKA and TIBAN using the
functionality Add from DDIC.
3. In the next step maintain the dependencies of the tables in field Predecessor No. Table
KNBK has the selection table KNB1. Consider field No. of table KNB1 and maintain this
one in field Predecessor No. of KNBK (see figure). Repeat the process for TIBAN and
BNKA. Note that both have the selection table KNBK (different Predecessor No.). Save
your entries (a resorting of the tables take place automatically).
Page 13 of 44
Alternatively, tables can be created by right-clicking on the corresponding selection table or the
data object in the Data object area. In this manner, the tables CDHDR and CDPOS shall be
assigned to selection table BNKA respectively CDHDR:
Go back to the mass maintenance of object DEBI_TRAINING and check the dependencies of
the created tables. Pay special attention to column Selection tables. Which selection tables are
displayed for your created table CDPOS?
____________________________________
After creating the new tables, the connections of the tables must be checked. Double-click on
the corresponding table and select tab Export. Via Connections you can see, which field(s)
connect(s) the selection table and the dependent table with each other.
Page 14 of 44
Which field(s) connect(s) table KNBK with selection table KNB1?
____________________________________
____________________________________
____________________________________
____________________________________
____________________________________
Concatenated Selection
You found out that there is no automatic connection between table CDHDR and table BNKA.
Discuss in teams of two which problem occurs in this case.
Note: Opening both tables in transaction SE16/SE16n in the source system and checking the
key fields might help. Login to the source system with username SU_TBXX (e.g. SU_TB01,
SU_TB02, …) and password initial.
You will learn how to solve the occurring problem in exercise Maintain Selections and Export
Rules.
In addition to the TC standard view the Transformation Cockpit also provides a SQL Expert Mode
(e.g. for more complex selections). Double-click on table KNBK open the SQL Expert Mode,
changing the selection mode to S (Free Selection (SQL). Save your entries and confirm the
appearing message.
Page 15 of 44
Using which SQL statement table KNBK relates to table KNB1?
____________________________________
Close the SQL Expert Mode, switching the selection mode back to F (Field selection) and saving
the entries.
The area connections appears again. You have to recreate the connection between the fields
now. Connect table KNBK again with selection table KNB1, selecting the field KUNNR in table
KNB1 using the search help. Save your entries.
You now have deleted the SQL expert mode statement and connected the newly created tables
as far as possible.
Page 16 of 44
Exercise 5: Maintain Selections and Export Rules
Maintain and Link Global Selections
The customer provides Excel lists to you, in which he classifies the data to transfer from source
to target system. Your next task is it to select exactly the data the customer wants you to migrate.
To do that, you must maintain selection rules and link them within the corresponding tables.
Subsequently, you will find the number of the sales documents you should migrate with all
dependent data from FI, MM, SD as well as the corresponding address numbers.
Page 17 of 44
22 0000010184
23 0000009930
There is a specific amount of data which shall be transferred from source to target system per
participant. Hence, the data to be selected needs to be restricted using global selections. That
guarantees that later only relevant data is exported from the data pool of the source system. The
advantage of global selections is that they only need to be created once for a domain and can
be reused for all fields with the corresponding domain.
The following selection rules are already available and assigned in the system. You just have to
fill in values:
Since data object VTDE_TRAINING has been copied without export and import rules, the
following global selections have to be assigned and filled with values:
Additionally, the global selection for the following domains (they have an impact on certain fields
later) have to be maintained, linked and filled:
1. Go to the area Global and open the tab Selections. Here, you can see the already created
selections.
2. Click the add button.
3. First, maintain the global selection for the domain VBELN. Fill the field ID with
SEL_VBELN. Enter the title Selection: Sales document number. Select the domain
VBELN.
4. Save your entries with the button Save & close.
Page 18 of 44
Repeat the process for the domain VSTEL with ID SEL_VSTEL and title Selection: Shipping
point.
Note: The global selection for the domain BUKRS is created in a later part of this exercise.
For the global selections to work later, they must be linked to the corresponding fields in the
tables.
Therefore, switch to area Data objects. First open the object VBAU_TRAINING in module SD.
The global selection SEL_VBELN must be linked to the corresponding field of tables VBAK
(Sales document header) and VBKA (Sales activities). Proceed as follows:
Repeat the process for table VBKA. This table also contains field VBELN.
For the assignment of the global selection SEL_VSTEL repeat the operations as described
above. The concerned table is called KNVS (Customer data: Shipping data) with field VSTEL in
this case.
Note: In order to find out, which module/data object the table is assigned to, use the search help
selecting Table as search criterion.
Page 19 of 44
In which data object can the table KNVS be found?
____________________________________
Global selections can also be created directly in the Data object area. Afterwards, they can be
reused for any tables.
Your next task is to create the remaining global selection SEL_BUKRS that way. Proceed as
follows:
1. In the area Data objects, open module FI and the data object DEBI_TRAINING. One of
the relevant tables for this selection is the selection table KNB1 (Customer data
(Company code).
2. Perform a double-click on that table and open the tab Export. Add a new selection using
the add selection button.
3. In field Type select again the value Global Selection.
4. Open the Value help and select the field BUKRS. Confirm your entry. The system
automatically offers Title and ID under Create new selection.
5. Press Save & close. You have now added the new global selection SEL_BUKRS to table
KNB1 successfully.
6. Go to the area Global now and open tab Selections. Your just created global selection is
shown here and can be reused.
Finally, assign the global selection SEL_BUKRS to field BUKRS of the following tables in data
object DEBI_TRAINING:
Page 20 of 44
Now, you must assign the already existing global selections SEL_KUNNR and SEL_VKORG to
the tables of the copied data object VTDE_TRAINING.
When assigning the selections to the tables, you noticed that there is one more selection type –
the field selection. What is the difference between the field selection and the global selection and
when is it applied?
____________________________________
____________________________________
You have now managed all required conditions for the selection of your assigned sales
document.
In the next step, it is necessary to fill the already existing as well as the new global selection with
values from your sales document.
Page 21 of 44
For better understanding open the source system again. Login with user SU_TBXX (e.g.
SU_TB01, SU_TB02, …). Open transaction VA03 and display the sales document which was
assigned to you (see table). Make yourself familiar with the data of the sales document.
Click into the field Standard Order and press F1. The SAP help opens. Press the button for
technical information. In the appearing window, you can see technical information for the selected
field such as the table name and field name. By double-clicking the field name VBELN you jump
to transaction SE11. You can see the domain of the field for which you have already created a
global selection and assigned it to the corresponding table.
In further consideration, you can find out more data of the sales document, which are needed for
your selection. Find out the values which are maintained for the following entities:
Customer number
Company code
Sales organization
Shipping point
Materials in the sales document position
Plant in the sales document position
The values you have determined are the ones you should fill your created global selections with.
Subsequently, you will find a table, which summarizes the data of your sales document:
Page 22 of 44
Particip VBELN KUNNR BUKRS VKORG VSTEL MATNR WERKS
ant No.
Page 23 of 44
Particip VBELN KUNNR BUKRS VKORG VSTEL MATNR WERKS
ant No.
Now go back to the Transformation Cockpit in the control system and fill your global selections
with the determined values. Note that some of the data is shown without leading zeros.
However, these are essential for the selection.
Page 24 of 44
Note: In order to identify leading zeros, you can open transaction SE16/SE16N and take a look
at the database format. To do that open table VBAK for example and start searching for records.
Double-click on one of the appearing records. A detail view opens. In this you can find the value
for field VBELN in data base format, which means that leading zeros are displayed.
The centrally maintained values are displayed in the Selection area of each table in area Data
objects, they are linked to (see figure).
For selections that contain many values, an excel file with the selection values can alternatively
be uploaded into the Transformation Cockpit.
Page 25 of 44
5. Save your entries and close the Excel file.
6. In the Transformation Cockpit, press Import and under file path, select your recently filled
in Excel file and upload it.
7. You have successfully imported selection values using Excel.
Alternatively, you can maintain the values in the export tab of each table in the Data objects area:
The value you have entered in the Data object area has been adopted automatically into the
global selection. Therefore, it is valid for all fields the global selection is assigned to.
Choose one of the described options and make sure that the following global selections are filled
with the values of your sales document:
SEL_KUNNR
SEL_VBELN
SEL_MATNR
SEL_BUKRS
SEL_VKORG
SEL_VSTEL
SEL_WERKS
Note: For global selections that have no values but are already assigned to tables no datasets
will be exported.
Now you have created all conditions required for your data export.
Page 26 of 44
Create Selections in the SQL Expert Mode
As an alternative to ‘clicking the selection conditions together’, you can also code selections
yourself using the SQL expert mode. Note that once you have jumped into expert mode, your
previously selected selections are only visible in the SQL version.
You have previously linked the global SEL_VSTEL and SEL_KUNNR selection to the table
KNVS. Navigate to the corresponding table and open the SQL expert mode changing the
selection mode to S (Free selection (SQL)). Save your entries. What is the SQL statement for
the corresponding selection?
____________________________________
Your selection is now displayed as an SQL statement. Undo this by changing the selection mode
to F (Field selection) again and saving your entry. Then add SEL_VSTEL and SEL_KUNNR
again for the field VSTEL.
Syntax-Check
Syntax checks are always carried out automatically after the start of an export and import. In
order not to delay the project process, it is useful to start syntax checks regularly. This can be
done on several levels (Scenario, Module, Object, Table) each for import, export and to check
the completeness of the field usages of global rules. In addition, there is the possibility to check
directly on the level of each rule.
Run a syntax check for the object DEBI_TRAINING, by double-clicking on the object
DEBI_TRAINING, pressing the button Syntax-Check and checking the box for Export on the
following screen.
____________________________________
____________________________________
Concatenated Selection
You now need to fix the syntax errors that occur. For this purpose, a concatenated selection must
be created between the tables BNKA and CDHDR.
Page 27 of 44
After having analyzed the table CDHDR for change documents on SE16/SE16n in the previous
exercise, you have found out that this table keeps change documents for lots of objects. They
are specified in more detail by a change object (OBJECTCLAS). This results in a particularity
when linking the selection table and the dependent table. Because of this, in case of Export we
must ensure that the relevant line items for a specific Object class will be exported only. For bank
data (table BNKA), it is BANK. This means if the link of both tables exists, a selection on table
CDHDR takes place accordingly.
Now check by logging in to the source system again (User SU_TBXX (e.g. SU_TB01, SU_TB02,
…), which are the keys the field Object Value (OBJECTID) that got concatenated for object class
BANK:
____________________________________
____________________________________
Using the knowledge you acquired earlier, subsequently link the tables BNKA and CDHDR by a
concatenated selection.
Proceed as follows:
Run syntax check for the object DEBI_TRAINING again. If no message shows up, the
concatenated selection was added correctly.
Page 28 of 44
Exercise 6: Adding Mappings and Import Rules
In the workshop with the customer, it was defined that during the import, both the materials and
the associated plant should be changed. The plant should be mapped to 77XX (XX stands for
your participant number) and the material master numbers should get a prefix XX_.
First you need to define the structure for the mapping in the area Global on tab Mapping.
Afterwards mappings can be defined. Proceed as follows:
Note: Alternatively, there is always the option for adding line items by using the Add button and
populating the fields manually.
Now you can populate the created mapping structure with content:
1. Open the new mapping structure MAP_MATNR by a double-click on the line item on tab
Mapping.
2. Using the button Add you must create a new line item on the table.
3. You now can see the fields you have previously defined for source and target.
4. Fill in the field MATNR source with the material number(s) from your sales document.
5. Fill the field MATNR target according to customers’ specification (XX_ (your material)
6. Press the button Save & Close.
You have successfully defined your mappings for the material number (see figure).
Page 29 of 44
Repeat the entire process for plant by creating a second mapping using ID MAP_WERKS and
domain WERKS for source and target. Last populate the mapping table according to the above
specification (target value 77XX).
Note: You always have the possibility to adopt your table structure. To do this, select the Change
table structure button within the mapping. In this case, however, you should note that all existing
content for the customized domain is deleted.
In order to apply the mappings, you have just created, you must refer to them within a global
import rule. Global import rules can be created for different scope: domain, data element, and
table fields. They are created once and then apply within the entire scenario for the defined effect
scope.
Group by two and consider what such a global import rule might look like for the material number
mappings. Use parameters IV_VALUE and EV_VALUE.
Global import rules can be created both under Global in the Import rules tab and directly in a
selected table in the area Data objects.
Maintain the global import rule for mapping the material number in the area Global. Proceed as
follows:
1. Open the area Global and choose the tab Import rules.
2. By using the button Add create a new rule.
3. For Scope define domain MATNR, again by using the Add-button.
Page 30 of 44
4. Confirm your input by ENTER. The screen refreshes and shows some coding parameters
which can be used for creating the global import rule.
5. Maintain the following import rule:
DATA: lv_message(200) TYPE c.
PERFORM api_mapping_get
USING
'MAP_MATNR'
iv_value
CHANGING
ev_value.
Point the cursor to the line item for the new import rule in tab Import Rules. Next click on button
Cross reference. You get a list of tables including the path where the import rule you created will
apply.
For table VBAP the cross-reference list shows multiple entries for the domain MATNR. What
might be the reason for that?
Page 31 of 44
____________________________________
____________________________________
Starting with one of the entries for table VBAP on the cross-reference list directly navigate to the
table in the area Data objects by double-clicking on an entry. You will now see that your
previously created global import rule is shown in detail in the tree view on the left under Import.
Note the names of the fields that will get mapped by the import rule MATNR within the table
VBAP:
____________________________________
____________________________________
____________________________________
Now also maintain the global import rule for the domain WERKS. This time the import rule should
be created directly in the table. Go ahead as follows:
1. Go to the Data objects area and open the table MARC. Use the search help again.
2. In the tree structure make a right-click on table MARC. From context menu choose Create
import rule base Create global import rule.
3. For Scope, add a new line item and make sure it is defined for the domain WERKS.
4. Confirm all your changes by ENTER. You now can see again the coding parameters that
can be used for creating your global import rule.
5. Maintain the following import rule:
Page 32 of 44
DATA: lv_message(200) TYPE c.
PERFORM api_mapping_get
USING
'MAP_WERKS'
iv_value
CHANGING
ev_value.
Return to the area Global and open the tab Import rules. Select the global import rule you
just created for WERKS and click again the button Cross references. Once again, all tables
affected by the global import rule will be displayed. Therefore, it does not matter where you
maintain the global import rule.
Page 33 of 44
Deactivating a Global Rule
The customer is using generic material in the MM module of his system. This means that
materials only differ in certain attributes (e.g. size, color). These differences are set up as material
variants. The basic attributes of the material, however, can be found in the generic material. The
key of the generic material therefore differs from the key of the material variant.
Log on to the source system with the user SU_TBXX (e.g. SU_TB01, SU_TB02, …). In
transaction SE11, check the domain of the generic material (field: GENNR) in table MARA.
____________________________________
What conclusions can you draw from this fact regarding the mapping?
____________________________________
____________________________________
It is now up to you to create a field rule that overrides the global import rule you defined for the
domain MATNR in the table MARA. In order to do this, choose one of the proposed options:
Your field rule will now be directly displayed in the tree view under Import and overrides the global
import rule.
Page 34 of 44
Option 2: Deactivating the global rule:
You have successfully deactivated the global import rule for the field GENNR.
The customer wants the user name Migration _XX in the field ERNAM (name of the consultant
who added the object) added to the sales documents (table: VBAK) via the migration. Go to the
area Data objects and check whether there is already an import rule for the field ERNAM in
table VBAK. Which is it?
____________________________________
Override this rule with a field rule that writes the user name Migration_XX into the field ERNAM.
Proceed as follows:
1. Create a field rule for the field ERNAM by right-clicking on VBAK Create import rule
base Create field rule.
2. Fill the field Title with Field rule_ERNAM.
3. Define in the coding that the user Migration_XX should be written into the field ERNAM
using the given parameters IS_VBAK and CV_ERNAM.
4. Save your entries.
5. Perform a syntax check for the field rule and correct syntax errors if necessary.
Note: Keep in mind that parameter IS_VBAK is the structure of the table you refer to in your
coding.
You have now successfully maintained all import rules required for the migration.
Page 35 of 44
Exercise 7: Create and Perform the Transformation
In the previous exercises, you created the basis for migrating the sales document from the
source to the target system.
As a next step, you will test your selections and import rules on a random basis. To do this, you
carry out single executions of the export/import of the tables in dialog or in background, and
finally you perform the export and import of the sales document.
First go to the tab Global and open the tab Selections. You have created, amongst others,
selections for the scope KUNNR, VBELN and MATNR, filled them with content and connected
them with the respective fields. With the single execution, you have the possibility to export
both tables and entire data objects individually and without significant effort.
In this example, you export the tables KNB1, VBAK and MARC individually and check the
exported data for plausibility in the area Transformation.
How many data records of table KNB1 were exported to the file?
____________________________________
Display the export files by right-clicking on the table KNB1 and selecting Display export files. You
jump to the file view. Execute it without specifying any selection criteria.
As a result, the customer number and the respective company code from your document are
displayed.
Page 36 of 44
Repeat the procedure for the table VBAK and MARC.
____________________________________
How many data records have you exported for table MARC?
____________________________________
You also have the option to download the data from the file. In order to do this, click on the
according table on the right and select Further Functions Download Export Files. Save the
files again on your desktop. Display the contents of the Excel file.
Besides directly writing data into the database of the target system, you can simulate the import.
This way you can test whether all desired records are imported and whether terminations occur.
Furthermore, it may be expedient to carry out the import in dialog to use the Debugger.
Your task is now to simulate an import (in the background) for the table VBAK.
Proceed as follows:
1. Go to the area Data objects and open the table VBAK in the data object
VBAU_TRAINING.
2. Right-click on the table. The context menu opens.
3. Select Execute Import (simulation) in background.
4. Confirm the message with Ok.
5. Go to the area Transformation. An import entry was automatically added to your folder
Single execution VBAU_TRAINING.
6. Open the tree as far as possible.
7. Under VBAK you can view the number of records that would be imported. In addition, you
obtain an overview of the status of the run.
Does the number of imported records of the simulation match the number of exported records?
If not, find the error.
Page 37 of 44
Perform Import in Dialog and Debug
To detect errors or check the correct mapping of data, you can perform the import (both the actual
one and the simulation) in dialog. This allows you to jump to the debugger. In doing so, specific
debugging points are available to you. Which ones?
____________________________________
____________________________________
____________________________________
____________________________________
You can also set your own break points. As a next step, you will simulate an import in dialog for
the table MARC and jump to the debugger within the global import rule to check whether the
maintained mapping is correctly applied. To do this, proceed as follows:
Page 38 of 44
Create Export/Import Blocks
After performing individual tests, a mass test takes place in a project. In a mass test, all data
objects in the scenario are first exported and then imported.
To prepare the transformation, you must add blocks for the export and import as well as
forerunners to the existing run in the area Transformation.
Proceed as follows:
You have successfully created the preconditions to execute the mass test.
Now you can migrate your sales document. To do this, first perform a syntax check for the
Export and Import of the entire scenario (Area Data objects). Execute the Syntax check in the
Page 39 of 44
background and then jump to the protocol of the syntax check via Information Display
Syntax check results.
If errors occur, correct them. You have the possibility to directly jump to the respective point in
the data objects.
After successfully correcting the syntax errors start your export right-clicking on the run. Select
Start run in the background. Alternatively, you can start the blocks one by one. Keep in mind
that the previous block always should be finished completely before the next block can be
started. After exporting the data check the number of records of the tables.
If the check was successful start your import block by right-click Start run in the background.
After it has been completed successfully, check the number of imported records. Are there
differences between exported and imported datasets?
If one of the blocks terminates during the export or import, find the error.
To verify the success of an import, open the target system. Log on to the system using the user
SU_TBXX (e.g. SU_TB01, SU_TB02, …). Start transaction VA03. Display your sales
document.
Check whether the mapping of the material number, the plant and your field rule were
successful. If not, find the error.
After that, open transaction XD03 and open the customer from your sales document. Can you
display the customer master record? If not, find the error.
As an alternative to this procedure, there is the option to maintain Test Units in the area Data
objects within the Transformation Cockpit. These allow a direct jump from the Transformation
Cockpit to the according transaction for testing the data. The Test Units are part of the delivery
content.
Optional
Switch to the area Data objects and double-click on the module MM. All transactions for the
module maintained in the training content are displayed in the Tab Test Units.
Open the import for MARA_TRAINING in the area Transformation. Right-click on the object
and select Further Functions Transactions MM02. Select Display data.
Page 40 of 44
If you are able to open the master data and if the fields within your sales document were
correctly mapped, you have successfully migrated your sales document. The base for your
imported data is now displayed to you. Copy the material number which you want to test and
then double-click the according data record. After signing into the correct client, the dialog
connection directly transfers you to the transaction with your dialog user. Enter the previously
copied material number here. You can now display the according views of the material. If the
material cannot be displayed, find the error.
If you can open the master data and the errors within your sales document were successfully
recoded, you have successfully migrated your sales document.
Page 41 of 44
Exercise 8: Data Validation
After completing the migration, you must validate the results at a technical level. In the
following, you will learn three options for doing this:
Using this method, you can determine whether data records with the same key fields differ
within the non-key fields. In the case of a sales document it is possible to test here, whether the
mapping of the material number and plant was successful. For comparing the export with the
content in the target, proceed as follows:
1. Open the table VBAP of your import block in the area Transformation.
2. Right-click on VBAP and select Compare Export with Content in Target.
3. Familiarize yourself with the interface and check whether the mapping for material
number and plant was successful. If not, re-check your import rule base.
4. Are there more fields that differ? If so, find the cause by also checking the import rule
base.
Describe in a few words what the Foreign Key check is and why it is used in this stage of the
project:
____________________________________
____________________________________
____________________________________
____________________________________
Log on to the target system using the user SU_TBXX (e.g. SU_TB01, SU_TB02, …), and
proceed as follows:
1. Open transaction /n/SNP/FKC to go to the initial screen of the Foreign Key Check.
2. Familiarize yourself with the predefined and available selection options.
Page 42 of 44
3. In Transaction description, enter a unique designation for your foreign key check and
change the Number of processes to 1 (Please observe this! The number of batch
processes on the training system is limited).
4. Tick Gather examples/messages under Options to limit space and memory consumption
and runtime and confirm the message with ENTER.
5. Leave the other parameters unchanged.
6. Now open the area Selection by Transformation Cockpit (TC) rulesets.
7. In the field Central system (RFC connection), enter the RFC connection
SNP_TB_TRA_001.
8. In the field Scenario, enter the number/ID of your training scenario SNP_TC_XX.
9. Select the Module MM and the Object MARA_TRAINING.
10. Click the button Execute.
11. A list with all determined tables, the worklist, will be displayed. By default, it is completely
selected.
12. Confirm the selection by clicking the button Start selected checks. It is only now that the
actual processing starts.
13. In this example, the program creates a batch job and switches to the view Monitoring.
14. Press the Execute button. Jump to the table view where you can monitor the progress of
your processing.
Note: The procedure can take several minutes since the runtime is negatively impacted by the
number of executed processes per participant.
If the processing is complete, the status of the processes switches to COMPLETE after refreshing
the view in Monitoring. Now you can view the results and messages of the Foreign Key Check:
Note: If there are messages, normally the customer and responsible process consultant have to
be consulted to remove them.
There is an option to perform Automated Testing for the Transformation Scope. The prerequisites
for this (Upload/ activate global function SAVE_DATA_FOR_AT and create Global event: After
Page 43 of 44
Package processing (Import) by invoking the function) were already established within your
training scenario.
Log into the target system again and open the transaction /n/SNP/AT_mig_check. During the
transformation, the objects to be tested were transferred automatically to AT. Additionally, the
number of migrated data records in the according object is displayed.
Open the tree until you reach the area All objects and select the object MARA as an example.
Press the Execute button. Enter a description and confirm the default settings. After completing
the execution, you can choose to display the protocol by double-clicking Display protocol. Here
you will be able to see the error messages that would also appear in the SAP transaction. By
double-clicking on the according line, you can directly jump to the data record that has caused
the errors.
Note: If messages occur, the customer and the responsible process consultant are to be involved
in the clarification.
Page 44 of 44