Entering content frame

Procedure documentation Creating and Editing SQLJ Sources Locate the document in its SAP Library structure

Use

You can create SQLJ source files in projects where the creation of Java sources is allowed. You can either use the wizard to create an SQLJ source file or convert a Java source file to an SQLJ source file.

You edit an SQLJ source file in the same way that you would a Java source file. Code completion and syntax highlighting are also available for SQLJ source files.

Prerequisites

·        A project exists.

·        You must have added the sqljapi.jar to the build path of your project. For DC projects, you must have declared a dependency to opensql-DC in the DC settings.

Procedure

Using the Wizard

       1.      Choose File ® New ® Other….

       2.      Choose Persistence ® SQLJ source.

       3.      Choose Next.

       4.      Enter the required information as if for a normal java file.

       5.      Choose Finish.

Converting from a Java File

       1.      Create a Java source file.

       2.      Select the Java source file and from the context menu choose Convert to SQLJ.

Result

Whichever method that you use, you will have an SQLJ file and a Java file with the same name. Never edit the Java file – this contains the generated code.

Leaving content frame