Use
To specify the parameters for generating code, and to generate code with the SAP Assistant.
You can specify items such as which business objects or RFC functions to generate code for, which target language to generate the code for, where to place the generated files, and which code generator to use.
Prerequisites
The code generator of the Sap Assistant gets the metadata for the specified business objects or functions from a specific R/3 system. You must therefore be logged onto that R/3 system.
Alternatively, you can use a
local repository, in which you have previously saved the metadata of the business objects or functions you wish to generate code for.It may be more efficient to use the local repository for code generation, for example, if you are generating code for many objects or functions, or if the network connection between the application's computer and the R/3 server is slow.
Procedure
The icon next to the marked item changes to an arrow.
You can mark in this way multiple business objects along with multiple RFC functions.
You can switch between RFC and business objects views until you complete your selection of items for code generation.
Enter data in the BAPI Wizard - Language screen as follows:
Field |
Description |
Output Folder |
Enter the path of the file where you wish the generated files to be placed. The code generator uses the output directory you specify to create subdirectories in which to place the files belonging to the individual business objects or RFC functions. For example, for the business object CompanyCode, the BAPI Wizard would create a subdirectory companycode (if it did not already exist) to store all the files generated for that business object. |
Language |
Select the programming language in which the proxy classes are generated. Choose between C++ and Java. To use a Custom language, you or someone else must have created custom templates. Creating custom templates is not described in this document. |
Generate DCOM Connector Proxies |
Checking this box uses a different code generator than the one used for the C++ or Java options above: it uses the code generator that comes with the SAP DCOM Connector product. Check this box only if you wish to generate code for VB or other COM-compatible languages. For C++ we recommend that you do not use this code generator (do not check this box). |
Template and Macro |
SAP Assistant points to the template and macro files of the appropriate language. It includes the full path to these files, using the default subdirectory for the template and macro files (where these files were originally installed). Normally you should take the path suggested by the code generator. However, if the SAP Assistant executable or the template or macro files have been moved to another directory, the path to the template and macro files may be invalid. It is highly recommended that you leave all of these files in their installed location. However if you do move any of these files, make sure that the path and file name specified in the Template and Macro fields are correct. You can choose the button next to the Template or Macro field to browse for the applicable file. |
See
Navigating the BAPI Selector screen for details of how to select items or enter values.To examine the code, double-click the entry in the List of Generated Files.
Result
The BAPI Wizard generates the code and displays the path and name of all the generated files.
See Also
The C++ BAPI Proxy Classes, The Java BAPI Proxy Classes