Sie sind auf Seite 1von 66

Chapter 3:

How To

Contents
Using Elementary GUI Elements in R/3 ................................................................32
Manually or Automatically Transferring Data ......................................................33
Starting an SAP Program .....................................................................................311
Identifying Business Object Fields .....................................................................313
Providing the Flat File Structure in C, COBOL, PL/1, or RPG ..........................318
Using Excel to Create an ASCII File ....................................................................321
Creating the Flat File with ABAP .........................................................................322
Starting a Batch Input Session............................................................................323
Transferring Data via Direct Input .......................................................................328
Moving Files From a PC to an Application Server.............................................334
Using Customer-Defined Flat File Structures and Transfer Programs ...........337
Displaying or Editing a Flat File ..........................................................................340
Maintaining Physical Filename for Logical Filenames......................................341
Using the Data Transfer Workbench...................................................................345
Using a CATT Recording for Initial Data Transfer .............................................358
Recording a Batch Input ......................................................................................362

Data Transfer Made Easy

31

Chapter 3: How To
Using Elementary GUI Elements in R/3

Using Elementary GUI Elements in R/3


The following is a description of R/3s basic graphical user interface (GUI) elements.

Icons, Buttons, and Fields


Icons, buttons, and fields are onscreen objects that are selected by clicking the left mouse
button to perform certain functions or actions. See the following definitions:
! A button is labeled with a function name.
! An icon is a button with a pictorial representation of its function.
! A field is an onscreen box in which you enter data.
1. Enter
Clicking this
button is the
1
same action as
pressing Enter on
your keyboard.

2
3

2. Command
Transaction codes
are entered into
this field. Choose
Enter after typing
a command.
3.

Possible entries
This arrow is on
the right-hand
side of a field.
Clicking this tab
allows you to see
the last-entered
values.

4. Save saves your work.


5. Back returns you to the previous screen.
6. Exit exits the current screen and returns you to the first screen within a sequence of screens (for
example, if you create a sales order or a material master record)
7. Cancel exits the current screen without saving your work.
8. Help displays the help messages at the current cursor location (like clicking F1).
9. Output Device is an example of a user input field.

32

Release 4.0B-4.5x

Chapter 3: How To
Manually or Automatically Transferring Data

Transaction Codes
Menu paths and transaction codes are two ways to access a specific screen in the R/3 System.
Following a menu path is intuitive, but entering a transaction code is usually faster. If you are
given a menu path, the corresponding transaction code is listed as an Alternative to the
menu path. See the following example:
1. Choose Tools
Administration
Spool Spool
Administration.

Alternative:

To enter the transaction code in the example above, enter /nSPAD in the Command field and
choose Enter (the green check) or press Enter on your keyboard. Entering /n before the
transaction code allows you to move from one screen to another. For example, if you are in
the User Maintenance screen and wish to send a system message, enter /nSM02 (not SM02) in
Command. You will proceed to the System Message window without exiting the User
Maintenance window.
When using /n you will leave the actual transaction without a warning and unsaved data
will be lost.

Depending on your GUI customizing, error messages may also be seen in the bottom line
of your screen.

Manually or Automatically Transferring Data


The following flowchart may help you understand your data transfer options. You have
three different options to enter your data into R/3:
! Automatically, with SAP standard data transfer programs.
! Automatically, by creating your own batch input (BI) programs.
! Manually, by entering the data via the corresponding online transactions.
To decide which option is most appropriate, we provide an evaluation matrix and a data
conversion justification form that helps you structure and track your decision.

Data Transfer Made Easy

33

Chapter 3: How To
Manually or Automatically Transferring Data

There are three ways


to do initial data
transfer:

Flat File
for Data
Transfer

SAP Data
Transfer

Manual
Entry

R/3 System
Online transaction

Flat File
for own
Program

Customer specific
Transfer

Automatic Transfer with a Standard Data Transfer Program


This guide concentrates on automatic data conversion, which can be done if:
! A standard program exists for the data transfer of a business object in R/3 (see appendix
A).
! The data is available in electronic form.
! There are a significant number of records you want to transfer.
! The cost of converting the legacy data into the required flat file format is acceptable.

Manually Transferring Business Objects


You should manually transfer data to R/3 if:
! You have no legacy system.
! There is only a small number of records to enter.
! Translating the legacy data into the R/3-required structure is more effort than manually
entering the data.
If you choose manual input for a large amount of data, remember that configuration
changes require the data to be manually re-entered. If you previously used an automatic
method, and the change can be made with the data transfer program, you can re-run it.

34

Release 4.0B-4.5x

Chapter 3: How To
Manually or Automatically Transferring Data

The manual option allows you to either transfer all data before starting R/3 or to enter the
data when it is needed. For example, you can enter the data for all the open purchase orders
(POs) prior to your productive start, or you can enter each open PO prior to the
corresponding goods receipt. In this example, the ramifications to consider when entering
data are:
! Materials Requirements Planning (MRP) cannot access data, which can result in an item
being purchased twice.
! Receiving clerks can create POs.
! An invoice can be entered before a goods receipt, which can result in a non-referenced
posting and a reference loss or the information.
To understand the advantages and disadvantages of using manual input for a specific
business object, please see your SAP consultant.

Using Customer-Specific Batch Input to Transfer Business Objects


Create a BI program to transfer data if:
! No standard program exists to transfer that business object in R/3 (see appendix A).
! The data is available in electronic form.
! There is a significant number of records you want to transfer.
! Translating your legacy data into the structure required by your customer program is
easier than manually entering the data.
! You have the time, money, tools, and knowledge required to write the necessary BI
programs.
Do not directly update SAP tables with non-SAP programs!
Use the SAP standard transfer programs, the normal online transactions, or your BI
program. If you create inconsistent data with an improper tool, your R/3 System may not
work properly.

Data Transfer Made Easy

35

Chapter 3: How To
Manually or Automatically Transferring Data

Conversion Evaluation Matrix


Score
Number of objects

<500

5012,500

2,50010,000

>10,000

Weight

see note 1

2 or 3

4, 5, or 6

>6

Good

Fair

Poor

Little

Average

Extensive

Few

Average

Many

Simple

Average

Complex

Extra-complex

1 or 2

3 to 5

6 to 10

> 10

Simple

Average

Complex

Extra-complex

Yes

No

Yes

No

Number legacy inputs


Weight
Quality of legacy data
Weight
Amount of legacy data editing
Weight
Number of data element translations
Weight
Complexity of legacy data
Weight
Number of SAP input screens
Weight
Complexity of SAP input
Weight
Does an SAP transfer program exist?
Weight
Can data be entered as needed?
Weight

Total score:

Notes:
1. If the number of objects is less than 500, the legacy data is complex, the SAP input is complex, and an
SAP standard data transfer program exists, an automatic conversion is the best solution. Otherwise, a
legacy data report and manual data input should be used.
2. A score of 5 or less indicates that a manual conversion is the most cost-effective solution.
3. A score between 5 and 10 indicates that either a manual conversion or an automated conversion may be
a cost-effective solution, but the evaluation factors should be carefully reviewed before deciding a
recommended course of action.

4. A score of 10 or more indicates that an automated conversion is justified.

36

Release 4.0B-4.5x

Chapter 3: How To
Manually or Automatically Transferring Data

Conversion Justification Form


Data to be converted:
Requested by:
Date:
Number of objects:
Number of files:
Quality of legacy data:

Good

Average

Poor

Complexity of legacy data:

Simple

Average

Complex

Extra-complex

Complexity of manual input in


SAP:

Simple

Average

Complex

Extra-complex

Priority:

High

Medium

Low

Number of SAP input screens:

Preliminary Recommendation of Conversion Method:


Manual, as needed
Manual, during conversion
Automatic using existing SAP data transfer program
Automatic creating own data transfer program
Reason for recommendation:

Development labor estimate


(days):
Test labor estimate (days):
Projected cost:
Book cost to:
Cost accepted by:
Project management approval on:
Steering committee approval on:
Refer to minutes of:

Data Transfer Made Easy

37

Chapter 3: How To
Manually or Automatically Transferring Data

Form Label

Description

Data to be converted

The data is to be converted as identified in


questionnaire sessions. This should be a descriptive, not
a file, name. For example, Customer Master Data.

Requested by

The person or persons identifying this data as a


conversion requirement

Date

The date this form was completed

Number of objects

This indicates the number of objects that need to be


converted. For example, if converting customer master
data, how many customers does the company have?
When developing this number, consider legacy data
that will not be converted. For example, if only
active customers will be converted, then only the
number of active customers should be entered here.

Number of files

Two factors need to be considered when developing


this number.
First, does the data to populate the SAP customer
master data have more than one data source? For
example, if a customers name and address exist in one
file, but his or her tax information exists in a different
file, then the two files must be merged during
conversion.
Second, if more than one entity is combined when SAP
is installed, will there be more than one data source?
For example, if the order-processing system has a
customer master file separate and distinct from the
accounts payable customer master file, will the two files
need to be merged and reconciled as part of the
conversion process?

Quality of legacy data

38

An indication of how clean the legacy data is: Is the


data worth converting? If the data is to be converted,
will it need a significant effort to scrub the data? How
many problems will be encountered due to invalid
data?

Release 4.0B-4.5x

Chapter 3: How To
Manually or Automatically Transferring Data

Form Label

Description

Complexity of legacy data

A number of factors need to be considered when


determining the complexity of the legacy data.
How many are there and what is the nature of legacy
data inputs (from question above)? Does the legacy
data reside on different media? Will a number of
translations be required from the legacy data to the SAP
data?
Is the data consistent for a given data item or can the
formats vary? For example, are the dates stored
MM/DD/YY or YYYYMMDD? Is it an eight-character
alphanumeric field with data stored in any one of a
number of formats?

Number of SAP screens

If the data were to be manually input, this is the


number of SAP screens that must be processed.

Complexity of input in SAP

An indication of the complexity of manually entering


the data: Will a number of screens be required? Is the
data readable as names and address, or is it a number
of abstract codes? Will much of the data be the same
for each object or will most of the data change from
object to object?

Priority

How critical is the data? Do other conversions depend


on the conversion of this data? The priority will also be
used later when developing the conversion plan.

Preliminary recommendation
of conversion method

Review the attached table and decision tree to develop


a preliminary recommendation of the conversion
method.

Reason for recommendation

A short discussion of why you chose a conversion


method, especially if this method is contrary to the
tables and decision tree.

Development labor estimate

A rough estimate of the development labor costs is


associated with the development of the conversion
programs. This will be revised as more analysis,
program specifications, and designs are complete. This
estimate will include ABAP developer effort, but
should also include some business analyst and user
time for walk-through and review tasks.

Data Transfer Made Easy

39

Chapter 3: How To
Manually or Automatically Transferring Data

Form Label

Description

Test labor estimate

A rough estimate of the testing labor costs is associated


with the development of conversion programs. This
estimate will be revised as more analysis, program
specification, and designs are completed. This revision
will include ABAP developer, business analyst, and
end-user effort to test the conversions.

Projected cost

The total development and testing costs associated with


this conversion

Book cost to

The cost center, phases, or projects to which the


conversion will be charged

Cost accepted by

The person identifying this data as a conversion


requirement, as this data conversion should occur only
after the size, complexity, costs, and factors have been
evaluated.

Project management approval


on

The date the SAP project manager agrees that the


conversion is necessary and cost-justified

Steering committee approval


on

The date the projects steering committee agrees that


the conversion is necessary and cost-justified

Refer to minutes of

An indication of supporting documents about approval

The conversion evaluation matrix and the justification form are on a file on the diskette inside
the back cover of this guidebook.

310

Release 4.0B-4.5x

Chapter 3: How To
Starting an SAP Program

Starting an SAP Program


This section describes how to start programs in R/3. You must enter all the necessary data in the selection
screens to run the program. In this example, we start the program to transfer the data for the material
master.
1. Choose System Services
Reporting.

2. Enter RMDATIND (the program


name) in Program.
3. Choose Execute.

3
2

After the program is started, you will see its selection screen.

Data Transfer Made Easy

311

Chapter 3: How To
Starting an SAP Program

4. Enter the appropriate


parameters on the program
selection screen.
The parameter determines how
the program works. Most often
the defaults are okay.

5. Choose Execute.

312

Release 4.0B-4.5x

Chapter 3: How To
Identifying Business Object Fields

Identifying Business Object Fields


Using the material master as an example, you will learn how to identify the business object fields. This
example does not contain the entire material master, only the steps to obtain the field information on the
transactions first screen.
1. Choose Logistics Materials
management Material master
and Material Create (general)
Immediately.

You are now in the Initial screen


to create a material.
2. Choose Help to see the field
documentation for the screen.
(To activate Help for a specific
field, place the cursor on that
field.)

3. Read the documentation and


decide if you have to enter
information in this field.
4. Choose Technical info.
3

Data Transfer Made Easy

313

Chapter 3: How To
Identifying Business Object Fields

5. Note the field name in Field name.


6. Choose Enter.
7. Choose Enter and return to the
screen in step 3.

8. If you need to externally assign


your material numbers, enter a
material number in Material;
otherwise leave the field empty.
Do not enter any other values.
9. Choose Enter.

314

Release 4.0B-4.5x

Chapter 3: How To
Identifying Business Object Fields

10. This message tells


you that you have
to enter a material
type. Choose OK
to acknowledge
this error message.
Now you know
that a material
type is a
mandatory entry
for the material
master.

10

By repeating this procedure you will identify all mandatory fields. If you complete this
process for the material master's first screen you will recognize the industry type (MBRSH)
and the material type (MTART) fields as mandatory entries. The material number (MATNR)
is only mandatory if you use an external number assignment. To use the SAP standard data
transfer programs, provide this data in the corresponding fields of the required flat file
structure. To see which record structures are used, see the section of the Use the Data Transfer
Workbench later this chapter, or refer to chapter 2 for that business object.
From release 4.5A it is possible, to record the relevant fields of the online transaction that
must be supplied in the transfer file. The advantage of this is that you can automatically
identify fields in the transfer file. You can access this function from the Data Transfer
Workbench central initial screen by choosing Goto Record fields. When you enter the
transaction code, the system calls the online transaction and processes it after you have
entered the field values. The fields are recorded in the background. When the recording is
complete, the system displays these as a list that contains the fields that were entered and
the following information on each field:
- Short text of the screen field
- Field value of the screen field
- Field identification of the screen field
- The corresponding record layout description.
You can call part of the F1 help from the list generated.

Data Transfer Made Easy

315

Chapter 3: How To
Identifying Business Object Fields

Obtain the Fields of an SAP Structure


The required flat file structure depends on the business object you want to transfer. The
approach you choose depends if the business object is supported in the Data Transfer
Workbench (in Release 4.0, this is called the Data Transfer Workbench and no longer Data
Transfer Control Center).

Business Object Supported in Data Transfer Workbench


This approach is preferable, because the information is presented in one list. For more
information on how to use this feature, see the Use the Data Transfer Workbench section.

Business Object Not Supported in Data Transfer Workbench


This approach is the most generic and works for any structure defined in the SAP
repository. The following is an example of how you can see all the defined fields for
structure BGR00, also used in many flat files.
1. Choose Tools
ABAP Workbench.
2. Choose
Dictionary.
2

316

Release 4.0B-4.5x

Chapter 3: How To
Identifying Business Object Fields

3. Enter BGR00 (or


another structure)
in Object name.
4. Select Structures.
5. Choose Display.

On the next screen, you will see Field names (the first column) and Short text (in the righthand-side column). Browse through the fields by clicking Page Up or Page Down.
6. Print the
6
definitions by
choosing Table
Print.

Data Transfer Made Easy

317

Chapter 3: How To
Providing the Flat File Structure in C, COBOL, PL/1, or RPG

7. Before you print,


verify your
settings on the
Print screen.

Providing the Flat File Structure in C, COBOL, PL/1, or RPG


Flat files can be created in different programming languages. To help you write a C, COBOL, PL/1, or RPG
program, R/3 provides a report that allows you to download and print the SAP record structure definition
in these programming languages. Once you have selected the business object you want to transfer, and you
know the structures needed by the flat file (for example, BGR00, BKOND1, BKOND2, and BKOND3, for
the pricing conditions), you are ready to begin.
1. Enter RDDSRCG0 (transaction
SE38).
2. Choose Execute.

1
2

318

Release 4.0B-4.5x

Chapter 3: How To
Providing the Flat File Structure in C, COBOL, PL/1, or RPG

3. Select the programming


language where you need
structure definitions.
4. Choose Multiple Selection to the
right of Table names.

5. Enter the structures in which


you are interested (BGR00,
BKOND1, BKOND2, and
BKOND3).

6. Choose Copy.

Data Transfer Made Easy

319

Chapter 3: How To
Providing the Flat File Structure in C, COBOL, PL/1, or RPG

7. Enter a filename
(for example,
C:\strucdef.t
xt).

8. Choose Execute or
press F8.
You can now use
the file to copy
the definitions
into your
conversion
program.

The Identifier in TSRCG field prevents you from manually entering all table names. Enter
one of the following:
! ALL-DEBI for all data transfer records for customer master (FI-DEBI is used for only
the specific FI record structures).
! ALL-KREDI for all transfer structures for the vendor master (FI-KREDI for only the
specific FI record structures).
! FI-BELE for all structures involved in the transfer of posting documents.
! MM-MM for the structures associated with the MM.
! AM-ANLA for the assets transfer structures.
! CS-BOM for the transfer structures relevant for bills of material.
! FI-SAKO for the structures involved in the transfer of GL accounts.
Improved Integration of the Generator for Advanced Programming Languages. Until
Release 4.5A to export the data structure into a different programming language
(COBOL, PL/1, C, RPG) you had to specify the corresponding table names. From Release
4.5A, the system automatically reads the structures of the objects so that you do not need
to enter them.

320

Release 4.0B-4.5x

Chapter 3: How To
Using Excel to Create an ASCII File

Using Excel to Create an ASCII File


This chapter explains how you can use Excel to save a spreadsheet in an ASCII/text format to allow, for
example, ABAP programs to convert the data into the required flat file structure.
To start, use the following Excel file that contains some material data from the legacy system:
1. Open MatMaster.xls, from the
sample data disk.
2. Choose File Save As.
This step is done to save this
data as a Text (tab-delimited)
file.

3. Choose Text (tab delimited) *.txt


in Save File as Type.

4. Choose OK.

Data Transfer Made Easy

321

Chapter 3: How To
Creating the Flat File with ABAP

Now you have a flat file of your legacy data with the correct structure.
5. In Notepad, open
the file you just
created.

Creating the Flat File with ABAP


Before you take advantage of the existing SAP data transfer programs, you have to provide
a flat file in the required flat file structure. This step was step one (Conversion) in the big
picture. As an alternative to other programming languages, you can use ABAP to perform
the conversion. This section lists some prerequisites. To show you the important elements of
the program, some sample code is provided in appendix B.
The prerequisites are to:
! Provide the data in an ASCII/text file format.
! Know how each line of the ASCII file is structured.
! This means knowing which fields are at which position in each line of the file. Normally
you define this structure in the R/3 dictionary or as an internal table.
! Know how the required flat file for the business object must be structured.
The challenge is to convert the given legacy file into the required flat file structure. For
illustration purposes, some sample code is provided in appendix B. Because the program
depends on the legacy data structure, which varies from case to case, some critical parts of
Appendix B were written in pseudo code. Pseudo code describes the action in normal words
and is marked with quotation marks at the beginning of the text.

322

Release 4.0B-4.5x

Chapter 3: How To
Starting a Batch Input Session

Starting a Batch Input Session


Batch Input (BI) is a standard procedure to transfer large amounts of data into the R/3
System. It simulates manual data entry. Data consistency is ensured because BI uses all the
checks conducted on the normal screens. Using BI is like entering the data online. Another
advantage to BI is that you do not have to check the data in advance or know all the
business rules behind each program.
BI, a two-step procedure, involves a program that creates the BI session. This session is the
data file that includes everything necessary to begin the transaction and the data to be
entered on the appropriate screens. The data is not yet in the database tables of the R/3
application (this happens in the next step). Most of the SAP standard data transfer programs
are based on the BI technique. A general transaction exists to process the BI session that was
created in the first step. This step completes the transfer by simulating the online transaction
and finally posts the data into the appropriate R/3 tables.
For this example, it is assumed that you have created a BI session with a data transfer
program. You can start the BI transaction from anywhere in the R/3 System by choosing
this menu path:
1. Choose System
Services Batch
input Edit.
2. Choose Overview.

Data Transfer Made Easy

323

Chapter 3: How To
Starting a Batch Input Session

On the screen above, you can reduce the number of sessions to be shown on the next screen
by entering the following selection criteria:
! Session name
! Creation date
! Status criteria
If you just created the session, enter todays date and select To be processed. In this example,
no selection criteria were selected.
3. Choose Process.
This action begins
the session as
3
determined by
your cursor
position.

4. Select
Process/foreground.
5. Choose Process or
press Enter.

You have three


processing options:
! Process/foreground
This option lets
you step through
all screens as if
you were using
the online
transaction.

! Display errors only


This option
displays errors on
the transaction
where they occur.

324

Release 4.0B-4.5x

Chapter 3: How To
Starting a Batch Input Session

! Background
This option
causes all
processing to
occur in the
background. The
log provides
detailed
information of
what happened.
6. In our example, we selected Process/foreground. On each screen, your flat file data is
automatically loaded into the appropriate fields.
7. Press Enter to move from screen to screen until you get the completion or an error
message. The screens you see are usually the same screens that you would see in the
online transaction.
To see if your data works properly, select Foreground or Error only. To transfer the data or to
check the performance of the transfer, select Background. To end a transaction, enter /bend
in the command line when you process the BI session.
In the BGR00 session header, the XKEEP field determines what happens with the BI session
after it is successfully processed. If the field is empty, the session was deleted and the log is
not available. If you enter an X in the XKEEP field, the session is not automatically deleted;
you can view the log, correct each problem, and then manually delete the session.

Viewing the Log File


If you finish a transaction and find that the system did not completely process your session
or generated an error message, use the log file to understand the cause of the problem. To
see the log file:
1. Place the cursor
on a session that
is already
processed.

2. Choose Log.

Data Transfer Made Easy

325

Chapter 3: How To
Starting a Batch Input Session

3. You can see how many


transactions were successfully
processed.
4. For more information, click
Analysis or Long text.

Viewing the Batch Input Session


To see what data is stored in a BI session without processing it:
1. Place the cursor on a session you
want to see in detail.

2. Choose Session.
1

3. Select one out of more options to


display the data of a BI session.
In this example, we selected
Contents and All transactions.

326

Release 4.0B-4.5x

Chapter 3: How To
Starting a Batch Input Session

4. Position the cursor on the screen


you want to view.
5. Choose Data.

5. Choose Screen.
This is a technical view. To see
the data as it appears on the
transaction, choose Screen.

Data Transfer Made Easy

327

Chapter 3: How To
Transferring Data via Direct Input

6. The Log button works only if the


session is already processed.
On the screen you can see the
data almost the way it would
look in the transaction.

For more information on this topic, see Help R/3 library.

Transferring Data via Direct Input


Overview
Direct Input (DI) thoroughly checks the flat file before processing and updating the R/3
database. It is supplied for the material master, FI accounting documents, SD sales order
and classification.
You can start a DI program in two ways:
! Directly
This method is the quickest way to see if the program works with your flat file. This
option is possible with all direct input programs. If something goes wrong and the
program ends abnormally, you will not have any logs telling you what has or has not
been posted. To minimize the chance of this happening, always use the check file option
for the first run with your flat file. This option allows you to detect formal errors before
doing the transfer.
If you start the DI program and the program has ended abnormally, you have to
manually verify which of your data was correctly transferred and delete the
corresponding records in the flat file. This verification and deletion of correctly
transferred records from the flat file is a lot of work, especially for large flat files. To
prevent the above situation from happening, thoroughly check your legacy data before
beginning the transfer and use Direct Input Administration Transaction for the transfer.

328

Release 4.0B-4.5x

Chapter 3: How To
Transferring Data via Direct Input

! Via the DI Administration transaction BMV0.


This transaction restarts the processing, if the data transfer program aborts. Since the
documents are immediately posted into the SAP database with Call Transaction or direct
table updates, this transaction is a precaution that allows you to restart the data transfer
program after an abnormal termination. If you started the program directly, the restart
option prevents the duplicate document postings that occur during a program restart
(without adjusting your flat file). The DI administration transaction is supported for the
material master, the FI documents and the EH&S programs.
Start the data transfer program directly if you are working with test data or are in the
process of refining the data conversion. For the final data transfer, we strongly recommend
that you use the DI administration transaction.
The first time you work with the DI administration program, you will need to do some
preparation before you can transfer data. The following example is based on the material
master.
1. To start the DI
administration
transaction, enter
BMV0.

2. Choose Execute.
3. Entering a date is
optional.
You will then see
the Direct Input
screen.

Creating a Variant
If you do not have a variant for the data transfer program of the material master or the FI
accounting documents, create one. A variant stores all the information you want to enter for
a report on the selection screen, and allows you to start the program without re-entering
that information. The DI administration program starts the data transfer program by using a
variant.

Data Transfer Made Easy

329

Chapter 3: How To
Transferring Data via Direct Input

1. To define a variant, choose


Applications Industry matl.
master Create variant.

For FI documents, choose


Applications Fin. Acctg.
documents Create variant.

2. Enter a variant name (for


example, SAP_Material or
SAP_Accounting).
3. Choose Create.

330

Release 4.0B-4.5x

Chapter 3: How To
Transferring Data via Direct Input

4. Enter the relevant selection data


(for example, for the material
master there is no further
information required).

6
4

5. Fill in all required fields.

6. Choose Continue.

7. Enter a description.
8. Choose Save.

9. Choose OK.

Data Transfer Made Easy

331

Chapter 3: How To
Transferring Data via Direct Input

Job Definition
The job definition is the second prerequisite before you can run DI with the DI administration program.
The job description is necessary to schedule the data transfer program run with the correct variant.
1. In the Direct Input Administration
screen, click Define job.

2. Choose New entries.

If you already defined a job, edit


the following input fields:
3. Enter RMDATIND (the program
name for the material master) or
RFBIBL00 (for accounting
documents).

4. Enter the variant name you just


created (SAP_Material or
SAP_Accounting).
5. Choose Save.
6. Return to the Direct Input
Administration screen.

332

Release 4.0B-4.5x

Chapter 3: How To
Transferring Data via Direct Input

Starting a New Job


If you want to start the data transfer program, you need to start a new job.
1. Choose Job Administration
Start new job to access this
screen.

2. Enter the name of a previously


defined job in Name of DI job.
3. Choose Enter.
4. For another option to look for
defined jobs, press F4.

5. Choose Start immediately.

Restarting a Job
Restart a job if termination problems occurred during data transfer. Before you restart the job, look at the
job log and correct any problems that may have caused the error.
1. Position the cursor on a job.

2. Choose Job Administration


Restart job.
1

Data Transfer Made Easy

333

Chapter 3: How To
Moving Files From a PC to an Application Server

3. Choose Restart immediately.

4. Choose OK.

Moving Files From a PC to an Application Server


This information will help you move the sample flat files from the disk into your application servers
working directory.

Moving Files with the Data Transfer Workbench


In the Data Transfer Workbench you can easily copy files between your PC and any R/3 application server.
For more information, please see Easy Copy in the Using the Data Transfer Workbench section later in this
chapter.

Moving Files Without the Data Transfer Workbench


Please ask your system administrator for the necessary authorizations to either log into the shared drive of
the application server or use FTP to write the flat files into your working directory.
If Windows NT is the operating system of your R/3 System, move the files from your PC to
the R/3 System with file manager. Inform your network administrator, so that he or she can
make the necessary network configurations.

334

Release 4.0B-4.5x

Chapter 3: How To
Moving Files From a PC to an Application Server

Using FTP
1. Start MS-DOS Prompt.
2. Enter ftp and pnsfo113 (the
application servers name).

3. Separate the two words with a


space.
4. Press Enter.

5. Enter user name.


The user provided by your
system administrator has to
have write permissions.

6. Press Enter.

7. Enter the Password.


8. Press Enter.
7

Data Transfer Made Easy

335

Chapter 3: How To
Moving Files From a PC to an Application Server

9. Enter cd and the working


directory path.
Ask your system administrator
for the path.
10. Press Enter.
9

11. Enter lcd a:\ to specify that


you want to get the data from
the disk.
12. Press Enter.

11

13. Enter bin.


14. Press Enter.
15. Enter prompt off.
16. Press Enter.
17. Enter hash
18. Press Enter.

336

13
15
17

Release 4.0B-4.5x

Chapter 3: How To
Using Customer-Defined Flat File Structures and Transfer Programs

19. Enter mput *.txt.


20. Press Enter.

19

21. Enter by to log off.


22. Press Enter.

21

Using Customer-Defined Flat File Structures and Transfer


Programs
Customer-defined flat file structures (Z-structures) allow you to replace SAP structures used
in the required flat file. For the material master, for example, you can define a shorter
structure ZMMH1 to reduce the number of fields in the BMMH1 structure to the 20 you
actually use.
Data transfer programs support these customer-defined flat file structures:
! Material master (ZMMH1 to replace BMMH1)
! G/L account master (ZSKA1 for BSKA1, ZSKAT for BSKAT, ZSKB1 for BSKB1)
! Posting documents (ZBSEG for BBSEG, ZSELP for BSELP)
In general, Z-structures are always subsets of the regular SAP structures. Create these
structures by copying the corresponding SAP structure and deleting the fields you do not
need.

Data Transfer Made Easy

337

Chapter 3: How To
Using Customer-Defined Flat File Structures and Transfer Programs

Do not enter new fields or other fields in Z-structures, because you can adversely affect the
transfer of the SAP-required fields and the entire data transfer process. If you need additional
fields, please contact your SAP consultant.

Creating and Changing the Customer Structure


1. From the R/3 main menu
choose Tools ABAP
Workbench.
2. Choose Dictionary.

3. Enter the SAP structure you


want to replace with a Zstructure (for example, ZMMH1).
4. Choose Copy.

4
3

338

Release 4.0B-4.5x

Chapter 3: How To
Using Customer-Defined Flat File Structures and Transfer Programs

5. Enter the source and target


structure (for example, BMMH1
and ZMMH1).
5

6. Choose Enter.
6

Based on your SAP correction and transport system settings, a different popup screen may appear.
7. Select Structures.
8. Choose Change.

9. Use Delete or Cut to remove


unnecessary fields.

10

10. Choose Activate.

Data Transfer Made Easy

339

Chapter 3: How To
Displaying or Editing a Flat File

Do not delete any required fields (for example, never delete STYPE). Deleting required
fields prevents your flat file from working successfully.
To delete consecutive fields, use the block selection option on the Edit menu to mark the
data before you delete it.
If you create or delete the ZMMH1 structure, restart program RMDATING to activate your
changes.

Integrating User-Defined Data Transfer Programs in the Workbench


(4.5A)
From Release 4.5A, you can generate user-defined data transfer programs and integrate
them in the Data Transfer Workbench. This means that you can also use the workbench's
functions for user-defined transfer programs.
In the first step, you run a transaction and use the batch input recorder to record it and store
it (that is, the screens, fields and field values). You base the user-defined data transfer
program on this recording. In an additional step, you create a customer transfer object for
this transfer program and integrate it in the Data Transfer Workbench.
You start the function by calling the Data Transfer Workbench using Transaction SXDA and
then choosing Goto Int. customer data transfer object.
User-defined data transfer programs and customer transfer objects can also be deleted.
There is also a direct link to the ABAP dictionary in case you need to maintain structures
there.

Displaying or Editing a Flat File


Business Object Supported in Data Transfer Workbench
Use the editor provided within the Data Transfer Workbench. For more information on how
to use this feature, see Editing the flat file in Using the Data Transfer Workbench section later in
this chapter.

Business Object Not Supported in Data Transfer Workbench


For these business objects, use the editor provided by your operating system. If you are
using Windows, use Notepad, and with UNIX, use VI.
Do not to corrupt flat file records by inserting fields. All SAP flat files have fixed-length
fields. If you add extra characters, all fields will shift to the right of the insertion point. This
then moves the fields to an incorrect position in the record and corrupts your file.

340

Release 4.0B-4.5x

Chapter 3: How To
Maintaining Physical Filename for Logical Filenames

Maintaining Physical Filename for Logical Filenames


SAP uses logical filenames to address distinct files with a unique name across different platforms. Each
logical name allows you to automatically include a reference to the physical filename and path. The system
automatically defaults to the working directory, unless you specify otherwise.
To change or display a logical filename:
1. Choose Tools Business
Engineering Customizing.

2. Choose Enterprise IMG.

Data Transfer Made Easy

341

Chapter 3: How To
Maintaining Physical Filename for Logical Filenames

3. Choose Basis Components.


The main topics of the R/3
Implementation Guides (IMG)
tree structure are displayed.
You can open (or close) a
branch by clicking on +.
4. Choose System Administration.
5. Choose Platform-independent File
Names.

3
4

Before proceeding, find out if your business object requires client-dependent or clientindependent filename maintenance. Read the Caution textbox below to see the type of
filename maintenance your business object requires:
Listed below are the logical filenames in the R/3 standard system. Maintain these
filenames with the Additional client-dependent file name maintenance transaction:
! MM: MATERIAL_MASTER_BTCI
! Stocks: MM_INVENTORY_MANAGEMENT_GOODS_MOVEMENT
! Reservations: MM_INVENTORY_MANAGEMENT_RESERVATION
Below are the logical filenames in the standard system that you can maintain with Clientindependent maintenance of file names and paths:
! Bill of Material: CS_BI_VARIANT_BOM_CREATE
! Characteristics: CHARACTERISTIC
! Classes: CLASS_CREATE
! Classification: CLASSIFICATION
! Documents Info Records: CV_BI_DOCUMENT_INFO_RECORDS_CREATE
! Open Sales Orders: SD_OPEN_ORDERS (only test data)
! Purchase Requisition: MM_PURCHASING_REQUISITIONS
! Purchasing Information Record: MM_PURCHASING_INFORECORDS

342

Release 4.0B-4.5x

Chapter 3: How To
Maintaining Physical Filename for Logical Filenames

Client-Independent Maintenance of Filenames


1. In the IMG, click Execute next to
Client-independent maintenance of
file names and paths.
2. Choose Enter.
2

3. Select Logical file name definition,


client-independent.

4. Scroll through the screen for the


logical filename you want to
maintain.
In this example we chose
MM_PURCHASING_
REQUISITIONS.

5. Place the cursor on the filename.


6. Choose Details.

Data Transfer Made Easy

343

Chapter 3: How To
Maintaining Physical Filename for Logical Filenames

7. Enter the filename in Physical


file.
In this example, we entered
purreq.txt.

8. Choose Save.

After you click this button,


depending on your system
settings for the R/3 correction
and transport system, there may
be several screens that appear.

Client-Dependent Maintenance of Filenames and Paths


1. In the IMG, choose Execute next
to Additional client-dependent file
name maintenance.

2. Using the Page Up or Page Down


keys, browse for the logical
filename you want to change.

3. Place the cursor on the filename


you want to maintain.
In this example, we are looking
for ARCHIVE_DATA_FILE.
4. Choose Details.
4

344

Release 4.0B-4.5x

Chapter 3: How To
Using the Data Transfer Workbench

5. Enter the physical filename and


the path that you want to, or are
required to, use.

For this example, enter


archive.txt (this file must be
in your working directory.)

6. Choose Save (after you have


saved, there may be several
screens that appear).

Using the Data Transfer Workbench


Overview
SXDA is a central transaction that facilitates initial data transfer by providing general tools and access to 26
(4.0B) standard data transfer programs. The provided functionality includes:
! A Generic Editor to display or change flat files for 26 existing data transfer programs (4.0B).
! An export report that describes the needed flat file structure in a machine-readable format (similar to
the interface used for the SAP IDoc Interface).
! A function that allows you to easily copy files between the presentation server and other application
servers in the network.
! The creation of an empty flat file for testing.
! The link to the standard data transfer program.
! Automatic recording of relevant F1 help fields (4.5A).
! Integrating User-Defined Data Transfer Programs in the Workbench (4.5A).
This functionality is embedded in a central transaction (SXDA), where the data transfer object can be
selected and the functionality can be used.
The Data Transfer Control Center is available in 3.1G, but it is still in beta mode. If you would
like to take advantage of this new functionality in an R/3 version before 3.1G, visit the
developers web site at www.saplabs.com/simple.
Transaction SXDA has been officially released from release 4.0A and is renamed Data
Transfer Workbench. If you want to use the 4.0 version in your 3.0F or better system, visit the
developers web site at www.saplabs.com/simple.

Data Transfer Made Easy

345

Chapter 3: How To
Using the Data Transfer Workbench

With R/3 System 4.5A, This Tool Supports the Following Data Transfer Objects:
! Accounting documents

! HR Master data

! (Open) Sales orders

! Assets

! HR Personnel planning

! Stocks

! Bank data

! Material master

! Vendor master

! Bill of material

! Planned indep. requirements

! WM Stocks

! Classes

! Purchase requisitions

! WM Storage bins

! Classifications

! Purchasing info records

! Characteristics

! (Open) Purchase orders

! Condition records (pricing)

! Rental contracts

! Customer master

! Rental units

! Documentation info records

! Reservations

! G/L Account master

! Routings

Since the tool is driven by control data stored in tables, it can be easily extended to other standard data
transfer programs. The workbench also supports the PM objects (400490). Selecting a PM object starts
transaction IBIP directly, which can also be used to transfer the PM objects.

The Functionality
Beginning the Transaction and Choosing a Data Transfer Object
1. Enter SXDA or /nSXDA.
2. Choose Enter.
2

3. In the Data Transfer Workbench, click


possible entries to view data transfer
objects.

346

Release 4.0B-4.5x

Chapter 3: How To
Using the Data Transfer Workbench

4. Select a data transfer object from


the menu by placing the cursor on
your choice and choosing Enter, or
by double-clicking on the selection.
4

5. After selecting an object, choose


Enter.
5

Data Transfer Made Easy

347

Chapter 3: How To
Using the Data Transfer Workbench

The SXDA Main Screen


From the Data Transfer Workbench Main
Screen, perform the following actions:
1. Change the Data transfer object.
2. Create an empty flat file.

3
1

5
4

3. Edit a flat file.


4. Display a flat file.
5. Perform an easy copy.
6. Start your data transfer program.
7. Export the flat file structure into a
machine-readable format.

7. The Data Transfer Object and its


short name you selected should
appear.
8. The data transfer objects filename
can be seen. This name may either
be the logical or the physical
filename.

There are two main options when selecting the location where the file will be retrieved, the application
server, and the presentation server.

Selecting an Application Server


1. Selecting the Application Server
option means that the file will be
retrieved from the current
application server, or from any
other application server on which
your R/3 System is running.
2. Select Remote Server.
3. Choose a server by clicking possible
entries.

348

1
2

Release 4.0B-4.5x

Chapter 3: How To
Using the Data Transfer Workbench

4. Choose a server from the list that


appears.
5. When you have highlighted a
server, choose Choose.
6. To cancel this process without
selecting a server, choose Back.

4
5

Selecting a Presentation Server


1. Selecting the Presentation Server
option specifies that the file should
be retrieved from your front-end
computer.
2. After selecting Presentation server,
choose possible entries to specify the
directory and the filename.
2

3. The screenshot to the right


represents the possible entries
menu for Windows NT.

4. Select the file you want to use and


choose Open.
The path and filename will
populate the filename for the
presentation server.

Since this central tool can read and write files between application servers and presentation
servers, most standard data transfer programs require that you have the file on the local
application server. Therefore, you may use this tool to copy these files to the application server
when they are needed.

Data Transfer Made Easy

349

Chapter 3: How To
Using the Data Transfer Workbench

Changing the Data Transfer Object


1. Chooseing Other DX object takes
you to a screen where you can
choose another supported data
transfer object.

2. Choose possible entries or press F4.

350

Release 4.0B-4.5x

Chapter 3: How To
Using the Data Transfer Workbench

3. Highlight a new data transfer


object.
4. Choose Enter.

5. The new data transfer object


number should appear.
6. Choose Enter.

6
5

Data Transfer Made Easy

351

Chapter 3: How To
Using the Data Transfer Workbench

7. The Data Transfer Workbench will


reflect the change in data transfer
objects.
7

Creating an Empty Flat File


1. Choose Create init. file to create an
empty flat file. This file is
considered empty, although it
does include the following:
! All record types used in the flat file
to transfer an object of the chosen
data transfer object.
! The record types and some header
information.
! The object-specific NODATA sign is
either a / or a space.

A warning message will appear if you overwrite an existing file. If you ignore this message,
the existing file will be lost. To save the existing file in another location, choose Copy.
2. When you choose Create init. file,
the popup window to the right
should appear.

352

Release 4.0B-4.5x

Chapter 3: How To
Using the Data Transfer Workbench

Editing the Flat File


This option calls an editor for the file
specified in File access.
1. From the main screen, choose
Change file.

The first screen is an overview of the


structures identified in the file, a
description of the file, and the first 100
bytes of the content.
2. Position your cursor on the line
you want to edit.

3
2

3. Choose Change to edit the content,


field by field. Choose Display to
read the contents, field by field.

4. You can now edit specific field


values without counting bits and
bytes.

5. To keep changes, choose Transfer


Data.

Data Transfer Made Easy

353

Chapter 3: How To
Using the Data Transfer Workbench

Display Flat File

Display flat file


This function operates in the same way
as Edit Flat File, although it does not
allow you to make any changes.

Copy Files
1. This function enables you to copy
files between the front-end and any
R/3 application server, or between
any two R/3 application servers.
During the copy process you may
also change the filename.

2. Select a From location.


3. Select a To location.
The default data is the information
that appears on your main screen
for both the From and To locations.
After you have copied the files, the
main screen will show the To
location in the File access fields.
4. Choose Copy to copy the files.

354

4
2

Release 4.0B-4.5x

Chapter 3: How To
Using the Data Transfer Workbench

With Release 4.5A the copy function was enhanced. The copying of transfer files has been
extended with the following options:
- Copy without conversion: The file is copied unchanged.
- Conversion of fixed length -> delimited tab: This copy function can only be executed from the
application server to the presentation server. The data is converted from a fixed length to a
tabulator delimited format.
- Conversion of delimited tab. -> fixed length: This copy function can only be executed from
the presentation server to the application server. During this copying process, the data is
converted from tabulator delimited format to fixed length.

Starting a Data Transfer Program


1. Choose Data transfer.
You can start the corresponding
data transfer program from this
screen, without knowing the
program name.

Data Transfer Made Easy

355

Chapter 3: How To
Using the Data Transfer Workbench

This option is a link to the standard


data transfer program maintained
for this business object. This
example is for the material master.
Other programs look different.

Export Structure
By clicking Structure, you can display
required flat file structure to be used as
input for mapping tools that can
understand this machine-readable
structure.
The output includes the following
information:
! Structures used in the flat file, and
whether the structures are optional
or mandatory.
! Order between the different
structures.
! Fields belonging to each structure
(field name, type, offset, and
length).

356

Release 4.0B-4.5x

Chapter 3: How To
Using the Data Transfer Workbench

The data transfer object


is preset with the
example (in the main
screen) and the field
name language is preset
to English.
The format is similar to
report RSEIDOC3, used
for the IDoc interface to
external mapping tools.
If the mapping tool
being used is CA-OML
certified, it would be
able to understand this
format.

Frequently Asked Questions


Supporting Further Data Transfer Objects
Because this tool is table-driven, you can support other data transfer objects by maintaining
the underlying control tables. The goal is to maintain these tables for all existing data
transfer programs, so that this maintenance will not have to be done during an
implementation. If you support customer-specific programs, you will have to do this
maintenance.
The underlying tables are:
! SXDA1 for all control information for the data transfer object
! SXDA1T, which contains the language-dependent object description and is maintained
simultaneously
! SXDA2, which contains the different structures used for the data transfer object, and
SXDA2T which contains the related (language-dependent) description.
! SXDA3, which contains some field information about the identifying fields and their
values

Data Transfer Made Easy

357

Chapter 3: How To
Using a CATT Recording for Initial Data Transfer

Tables may be maintained with transaction SM30, but SAP strongly recommends that you
keep the settings for the existing entries. If you want to add entries, please use only data
transfer object numbers greater than 9000.

Using a CATT Recording for Initial Data Transfer


The Computer Aided Test Tool (CATT) was developed by SAP to test SAP transactions. This testing is
conducted by describing the relevant screens in a test module and executing this transaction like a BI. A
CATT recording is a flexible way to transfer data in your R/3 System.
To use a CATT recording for initial data transfer:
1. Record the transaction.
2. Generate the test module.
3. Assign parameters to the test module.
4. Create an external text file.
5. Run the test module and transfer the data.

A CATT Example with the Production Order


1. Choose Tools ABAP Workbench
Test Test Workbench CATT
procedures.
2. Choose Record module.

3.

Enter the transaction code for the


desired transaction to be recorded
(for example, CO01).

358

Release 4.0B-4.5x

Chapter 3: How To
Using a CATT Recording for Initial Data Transfer

4. Process all screens of the


transaction that are relevant for
you. When you choose Save to end
the transaction, you will see the
screen to the right.
4
Choose Enter.
5. Provide entries for Application,
Subapplication, and the Component
to which your transaction belongs. 6
In this example it is PP-SFC-PLN.
6. Choose Functions.

7. Double-click on TCD.

Data Transfer Made Easy

359

Chapter 3: How To
Using a CATT Recording for Initial Data Transfer

8. This screen lists all of the screens


you recorded. To change the
entered values into variables,
double-click on a particular line.

9. Double-click on the fields you


want to change (for example,
Material).
9

360

Release 4.0B-4.5x

Chapter 3: How To
Using a CATT Recording for Initial Data Transfer

10. Define Import parameter.


11. Choose Enter.

10

12. Repeat steps 911 for all the fields


that you want to be variables.
13. Return to the screen in step 9.
14. Choose Save.

11

15. Choose Goto External variants


Export Defaults.

15

16. Keep the default filename and


choose Transfer.

16

17. Edit the flat file using an editor of


your choice (for example, Notepad).

Data Transfer Made Easy

361

Chapter 3: How To
Recording a Batch Input

18. Run the CATT procedure.

Maintain Downloaded Flat File


The test module number with a TXT extension will be the filename. The text file comprises the
following three lines:
! Parameter name without &
! Short texts
! Default values
Maintain the text file from the fourth line, one line per variant. Empty fields take the test
module default values. Enter ! to leave a field empty, and do not forget to save.
Prerequisites
Data can be transferred using the CATTs from Release 3.1G that provide a transaction
recording and a CATT external data processing functionality. Both prerequisites can be
realized in systems from Release 3.0D with a downgrade installation. See Online Service
System notes 78448 (Advance installation of Batch Input Recorder) and 78795 (Advance installation
of CATT from 3.1H).

Recording a Batch Input


A BI recording allows you to record a R/3 transaction and generate a program that contains all screen and
field information in the required BDC_DATA format. Replace the field entries you want to define as
variables and add the necessary file handling logic to the generated program.

362

Release 4.0B-4.5x

Chapter 3: How To
Recording a Batch Input

You need some basic ABAP knowledge to use BI recording efficiently; experience with regular
BI programming is beneficial.
1. Choose System Services Batch
Input Edit.
2. Choose Recording.

3. Enter a name for the recording


(dates are optional).
4. Choose Create.
4
3

Data Transfer Made Easy

363

Chapter 3: How To
Recording a Batch Input

5. Enter a transaction code (for


example, VA01, Create Sales order).
5

6. Choose Enter.
6

7. Enter the needed fields of the sales


order on this and the following
screens (depending on your
system).
8. Save the sales order.

After you saved the recorded


transaction, you arrive on this
screen.

9. Choose Get transaction.

364

Release 4.0B-4.5x

Chapter 3: How To
Recording a Batch Input

10. Choose OK.

10

11. Choose Save.


11

12. Return to the Batch Input:


Recording screen and click
Overview.
12

Data Transfer Made Easy

365

Chapter 3: How To

13. Position the cursor on the justrecorded entry and click Generate
Program.

13

14. Enter a program name (for


example, ZGENVA01).
14

15. Choose Enter.


15

Saving a program can result in multiple popup screens depending on your system settings (for
example, transport number for correction and transport system).

366

Release 4.0B-4.5x

Das könnte Ihnen auch gefallen