
You have to plan the data transfer run for each business object type, divide it into individual task types (EXT, PUR, CHK, MAP, LOA, SPL, and AUD), and find existing programs or even develop and register your own.
For more information about loading data into the SAP system (task type LOA), see Data Transfer Techniques.
You can then use these programs or ones you have created to execute tasks in the Data Transfer Workbench.
When you execute these tasks in a run, values are entered in the parameters described below.
You have analyzed the fields and structures as well as the data to be transferred and the transfer file in SAP format.
Developing Programs
There are no specifications for program development because the program is called at runtime with a variant that is specified in the task.
If you create a function module (program type FUNC) to execute the task, it must contain the following parameters:
Import Parameters
PROJECT LIKE DXTASKS-PROJECT,
SUBPROJECT LIKE DXTASKS-SUBPROJECT,
RUNDEF LIKE DXTASKS-RUNDEF,
TASK LIKE DXTASKS-TASK,
RUNID LIKE DXTASKS-RUNID
Table Parameters (import)
I_FILES LIKE DXFILEN,
O_FILES LIKE DXFILEN
Export Parameters
RETURN LIKE DXRETURN
The status of the task is transferred in the export parameter RETURN. The STATUS field must contain one of the values below:
Using fields MSGTY, MSGID, MSGNO, MSGV1, MSGV2, MSGV3, MSGV4, you can return an appropriate message that is stored in the log.
If your function module itself stores messages in the application log, you can return this message ID in the field LOG_HANDLE.
Develop BAPIs
If you want to enhance the BAPIs provided by SAP for data transfer by developing your own BAPIs, see the BAPI Programming Guide (CA-BFA).
To use the BAPIs you develop for the Data Transfer Workbench, you have to generate BAPI-ALE interfaces.
If you want to provide application data for test purposes, you can create a report and include it in the Data Transfer Workbench tools (see Creating Example Files and Analyzing Structures under Creating a Data File).
As well as fields for selecting objects, a parameter for the receiver of the IDocs is also mandatory.
The Data Transfer Workbench uses this report to write the IDocs to a special file. The receiver is specified when the report is run. For this reason, this field must be defined in the report as follows:
parameters: receiver like tbdlst-logsys no-display or
select-options: receiver for tbdlst-logsys no-display
The report generates IDocs from SAP objects by determining all the data relevant for the objects and calling the generated ALE outbound function module to create IDocs. This generates outbound IDocs in the database.
If the user has defined outbound partner profiles and a file port beforehand, the outbound IDocs are written to an outbound file. These are then converted to inbound IDocs.
Unlike reports that generate IDocs in an ALE business process, this report must not execute receiver determination.