0% found this document useful (0 votes)
3 views10 pages

Defining Virtual Tables and Uploading Data From CSV Files: Level Topic

Uploaded by

John Gutierrez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views10 pages

Defining Virtual Tables and Uploading Data From CSV Files: Level Topic

Uploaded by

John Gutierrez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

B2.

1 - Defining Virtual Tables and


Uploading Data from CSV Files
Level Topic
B2 (Medium Two) Virtual tables can be created and appended to data objects in the transformation
tree of the control system. Data from NON-SAP tables can be uploaded from
CSV files during the definition of the virtual table. The first line of the CSV file is
Keys interpreted as the header and the following lines as data records. The default
type of a virtual table field is initially created as Character 50 and can be
Scenario
changed, if necessary.
After uploading, you can view information on the data in the export log of the
Estimated time: table – when it was uploaded, from which file it was uploaded, how many data
1h records were uploaded. The log looks the same as the regular tables after the
export.
The set of rules for the import is used for the import to the target system. There
TC release:
is no export syntax check for virtual tables, because neither selections nor
XX.XX SPXX export rule sets affect these tables.
Virtual tables:
Related JIRA tests:
• Must start with $.
TCT-73, TCT-43, TCT- • Cannot be used as root nodes for other dependent tables
56
• Can only be created at the top level of an object
• Must have a differing target table for the import
Last changes: • Have no export rule set
• Cannot be transferred to export blocks
• Are ignored during single object executions
29-Jan-18 • Cannot be attached as child tables to other selection tables
• Cannot be created in the mass maintenance

Content

• ...
• ...

Goals

...

Attachments

• ...
• ...

Fields/Virtual tables/System Environment:

• ...
• ...

Prerequisites:

Level: B2 (Medium Two) Seite 1


• You have created data objects
• You have created a source and target system in the system administration
• You have defined the correct export directory for the scenario (please make
sure that the import directory refers to the same directory)
• Data sets t_supply.csv and t_supply.doppelte_feldnamen.csv are available

Nice to have:

• All tutorials of level A (Basic).

Necessary tutorials to complete beforehand:

• A1.1
• A1.5
• ...

Following Tutorials can be recommended afterwards:

• All remaining tutorials of this level.

Level: B2 (Medium Two) Seite 2


Values Result

1 In the Data objects area, create a new The new data object is
module and a data object. displayed in the tree.

2 Double-click the created data object. The Mass maintenance


and Settings tabs appear
on the right-hand side of
the tree.

3 Select the Mass maintenance tab.

4 Add a new line and insert an SAP table into e.g. MARA or An SAP table has been
the Table name field. Save your entries. assigned to the data
MARC
object. You can also view
the table by expanding the
tree.

5 Add a second new line, create a virtual table $TEST or It is not possible to create
and save. Virtual tables start with the a virtual table via mass
$TEST2
character ‘$’. maintenance.

6 Try to add an SAP dependent table to an SAP e.g. MARM


table.

7 Save your entries. The ID number you


entered in the
Predecessor no. field has
been saved successfully.
The correct name of the
selection table appears in
the row of the dependent
table.

Level: B2 (Medium Two) Seite 3


Values Result

8 Expand the tree. You can only The dependent table


create appears under the
dependencies selection table and is
between SAP indented compared with
tables and other the other tables.
SAP tables.

Defining Virtual Tables Using the Context Menu


Values Result

1 Switch to the Data objects area and expand Create table allows you to
the tree. Right-click an existing SAP table, assign a dependent child
e.g. MARA, and click Create table. table to the selection table.

2 Right-click an existing SAP table and click Export in background


Execute => Export in background. starts the export of a single
table.

1. Right-click an existing virtual table and search Export in background


3
for the entry Export in background.
does not exist for virtual
tables.

Level: B2 (Medium Two) Seite 4


Values Result
2. Right-click a virtual table and click File upload. The file explorer opens.
4
You can select a path to a
CSV file that contains the
table data to export.

3. Select the file t_supply.csv appended to this No error messages appear


5
tutorial. Execute the File upload and save. You
and the uploaded data
can view the uploaded data by clicking Display
records are correct.
export files in the context menu of the virtual
table.

Transformation
Values Result

1 Switch to the Transformation area and The export block has been
create an export block. defined.

2 Assign the data object to the export block and The data object has been
save. assigned to the export
block.

3 Expand the Transformation tree. Only SAP tables are


displayed in the export
block. The virtual tables do
not appear.

4 Define an import block. The import block appears in


the tree.
5 Transfer the data object to the import block. The data object appears in
the tree.

Level: B2 (Medium Two) Seite 5


Values Result

6 Expand the created import block. Besides the SAP tables,


virtual tables also appear.

Defining Virtual Tables Using the Context Menu


Values Result
1 1. Switch to the Data objects area. Right-click a 2. A dialog opens: “Create virtual
data object and click Create virtual table. table”.

2 3. Enter the name $MLAN into the Virtual table The first character of
field. the name must be ‘$’.

3 4. In the File field, enter the file path for You can use the The file path has been
t_supply.csv, which is appended to this tutorial. value help (F4). maintained.

4 Confirm with OK. A success message


appears: “Virtual table
$MLAN was created for
object MARA”.
You can view the virtual
table $MLAN in the tree
by expanding the data
object.

Level: B2 (Medium Two) Seite 6


Values Result

5 In the Mass maintenance tab, specify a If the differing The data is imported into
differing target table. target is not the SAP table MLAN in
maintained, the the target system.
Enter the SAP table name MLAN in the row
execution of an
of the virtual table $MLAN and save.
import block will
abort with errors.

6 Go to the Transformation area and expand There is a new run with


the Transformation tree. the name “Single
execution” and the table
name. The Status has
changed to Complete,
and the Progress to
100.00%.

Level: B2 (Medium Two) Seite 7


Values Result

7 Right-click the virtual table and click Display A selection screen opens.
export files.

8 Click Start search. The first 500 data records


are displayed.

9 Go back to the Transformation area (F3)

10 Create an import block. Right-click the run A dialog opens: “Create


and click Create block => Import/Delete. transformation block”.

11 Enter an ID into the Name field. If the table MLAN


contains data
The other fields have been maintained with
records, the
default values and can be left unchanged.
block mode can
be changed to
Modify. This
table mode does
not lead to an
abortion if
duplicate entries
are inserted.

12 Click the green tick to confirm your entries. The import block has
been created and appears
in the tree.

13 Transfer the data object to the import block


and expand the tree.

Level: B2 (Medium Two) Seite 8


Values Result

14 Right-click the virtual table $MLAN and click A message appears: “The
Start table in background. transformation table
$MLAN was started”.

15 Click Refresh. The status of the table


MLAN changes to
Complete. The number of
inserted data records is
displayed in the
Processed records
column. The Status of the
block remains Paused
because not all tables
have been executed.

16 Check the imported data for the table MLAN The data records of the
in the target system. Log in and use CSV file have been
transaction SE16. imported properly.

Attachment

Uploading CSV files


Values Result

1 Switch to the Data objects area. Right-click A dialog opens: “Create


a data object and click Create table. table”.

Level: B2 (Medium Two) Seite 9


Values Result

2 Define the table MLAN. The SAP table MLAN has


been created.

3 Right-click the SAP table MLAN and click


Upload the CSV file.

4 Enter the path of the CSV file and execute The upload of the file was
the upload. successful.

5 Go to the Transformation area and expand There is a new run with the
the Transformation tree. name “Single execution”
and the table name. The
Status has changed to
Complete, and the
Progress to 100.00%.

6 Right-click the table MLAN and click Display A selection screen opens.
export files.

Level: B2 (Medium Two) Seite 10

You might also like