Connecting the ConverterThere are several ways to connect a converter to the SAP System. You must consider the conversion results when selecting one. For example if you want to convert original application files from documents you must set up the conversion server differently than when you want to convert assemblies.
There are three ways to connect a converter to the SAP System.
Method |
Objects you want to convert |
Transfer of parameters |
1 |
Individual original application files from documents |
Parameters are transferred between the SAP System and the converter using files |
2 |
Individual original application files eof documents and assemblies |
|
3 |
Individual original application files eof documents and assemblies |
Parameters are transferred between the SAP System and the converter using an RFC interface |
Method
You can convert individual original application files of documents using the converter connected with this method. You can use the compiled example server
ConvServSamp
. No previous programming knowledge is required. It is however necessary to modify the
shell-script
and possibly a batch file.
You can find examples on the SAP server
SapservX
in the directory ~ftp/general/misc/converter/.
Th graphic display how the example convert
All2tx
t is connected to the SAP System using the first method.
All2tx
t converts files into text files.
A shell-script file (such as ConvServ) starts ConvServSamp
. This method uses the following conversion steps:
Information for the conversion is transferred to the form the SAP System to the program
ConvServSamp
using the RFC destination.
ConvServSamp
stores the information as files on the conversion server and starts a
shell-script
file (in this case:
StartConv
) with its own parameters.
The
shell-script
file (in this case:
StartConv
) calls the converter (here:
All2txt
) using the syntax for the converter.When you install your own converter you must modify
StartConv
that it is called with its special syntax and not
All2txt
which was used only as an example.
Below are tips and notes for the individual steps
Step |
Note |
Call
|
You must enter the following parameters when calling
More information about the document you are converting can be saved as an extra file by using the parameter -ReadDocumentDetails . Examples:
|
|
The file <WorkingDirectory>/Parameters.txt is created
before
calling
Additional Files The following files are also created when
The files contain the data that the function module CAD_GET_TITLE_BLOCK_DATA determines. You can find information about the content of these files in the documentation for this function module (Export Parameter DOCUMENTDATA and ECMDATA and tables DOCUMENTDESCRIPTIONS, LONGTEXTS, CLASS_DATA, OBJECTLINKS, STATUSLOG, EXPORT_DATA and USER_DATA ).
|
|
The example server
Parameter meanings:
|
Modifying
|
Change the example file
After
|
You can convert individual original application files of documents using the converter connected with this method. You can use the compiled example server
ConvServSamp
. No previous programming knowledge is required. It is however necessary to modify the
shell-script
and possibly a batch file.
You can find examples on the SAP server
SapservX
in the directory ~ftp/general/misc/converter/.
Th graphic display how the example convert
All2tx
t is connected to the SAP System using the first method.
All2tx
t converts files into text files.
A shell-script file (such as ConvServ) starts ConvServSamp
. This method uses the following conversion steps:
Information for the conversion is transferred to the form the SAP System to the program
ConvServSamp
using the RFC destination.
ConvServSamp
stores the information as files on the conversion server and starts a
shell-script
file (in this case:
StartConv
) with its own parameters.
The
shell-script
file (in this case:
StartConv
) calls the converter (here:
All2txt
) using the syntax for the converter.When you install your own converter you must modify
StartConv
that it is called with its special syntax and not
All2txt
which was used only as an example.
Below are tips and notes for the individual steps
Step |
Note |
Call
|
You must enter the following parameters when calling
More information about the document you are converting can be saved as an extra file by using the parameter -ReadDocumentDetails . Examples:
|
|
The file <WorkingDirectory>/Parameters.txt is created
before
calling
Additional Files The following files are also created when
The files contain the data that the function module CAD_GET_TITLE_BLOCK_DATA determines. You can find information about the content of these files in the documentation for this function module (Export Parameter DOCUMENTDATA and ECMDATA and tables DOCUMENTDESCRIPTIONS, LONGTEXTS, CLASS_DATA, OBJECTLINKS, STATUSLOG, EXPORT_DATA and USER_DATA ).
|
|
The example server
Parameter meanings:
|
Modifying
|
Change the example file
After
|
You can convert individual original application files of documents and assemblies using the converter connected with this method.
You can use the compiled example server
ConvServSamp
. No previous programming knowledge is required. It is however necessary to modify the shell-script and possibly a batch file.
The procedure is very much the same as the previous method.
The following overview shows information about files and parameters that are processed for converting assemblies only.
Activity |
Note |
|
Before calling
Each line of this file contains the following parameters:
The format is fixed. There is no separator between the entries. |
Converter creates <WorkingDirectory>/ConvPathAndMatrix.txt |
The converter creates <WorkingDirectory>/ConvPathAndMatrix.txt instead of the file <WorkingDirectory>/ConvPath.txt.This file is not read when the file <WorkingDirectory>/ConvPath.txt exists. Each line of this file contains the following parameters:
The format for these three parameters. There is no separator between the entries. In case the path name is not yet at its end, it must contain 12 real number between these there must be an empty space:locox, locoy, locoz, axis1x, axis2x, axis3x, axis1y, axis2y,axis3y, axis1z, axis2z, axis3z, scale The transformation matrix is used to describe the relative position of the part to the father. When more than on instance exists then each instance must have its own line. These lines must be identical except for the transformation matrix. |
You can change the example server
ConvServSamp
when you do not wan to transfer your conversion parameters as files or when the first two methods do not meet your needs. You need to have programming knowledge of (C source code).
You will find the C source code for the RFC Server ConvServSamp on the SAP Server
SapservX
in the following directory: ~ftp/general/misc/converter/source.SAR
The converter is called from the SAP System as follows:
CALL FUNCTION 'ASSEMBLIE_CONVERTER'
DESTINATION wa_converter_dests-conv_dest
EXPORTING interface_version = interface_version
output_directory = output_directory
language = isola
sy_language = sy_isola
timeout_minutes = timeout_minutes
conversion_name = wa_conv_requested-handle
document_key = document_key
current_user_name = sy-uname
IMPORTING error_message = error_message
return = bapireturn
TABLES ti_conv_struct_filename = t_conv_struct_filename
ti_parameters = te_parameters
te_conv_path_and_matrix = ti_conv_path_and_matrix
Information about the type and structure of the fields are in the file
ConvServ.h
.
Below is information about the use of individual fields.
Entries for the Converter
Entry |
Use |
interface_version(int, for example 3) |
Indicates which functions are supported by the current SAP version |
output_directory(char *255) |
Working directory where the converted files are sent |
language(char *2, such DE or EN) |
Language for the error messages in the SAP System |
sy_language(char *2, such as DE or EN) |
Language used by the user to logon to the SAP System before starting the conversion. |
timeout_minutes(int, for example 30) |
Time in minutes after which the conversion is cancelled as not successful |
conversion_name(char *32) |
Name for identifying the conversion |
document_key(struct DOCUMENT_KEY) |
Key of the document that you want to convert |
current_user_name(char 12*) |
User who started the conversion |
ti_conv_struct_filename (table) |
Structure and path namesSee: Section
|
ti_parameters (table) |
See: Section
|
Output of the Converter
Output |
Use |
te_conv_path_and_matrix(table) |
Here you can transfer the converted file and the transformation matrix and/or an error message (in 2 table lines) for the file you entered.
|
error_message(struct MESSAGES) |
Error Messages:
If all fields (except msg_type and msg_txt) are released, an long message can be entered in the msg_txt that has up to 200 characters. |
return(struct BAPIRET2) |
Error messages can also be added to this structure |
The RFC server must also contain the function CONV_SERV_ABOUT that you can use without changing the example
ConvServSamp.c
.