1. Open NWDS (or any IDE which you prefer, but in this case I am using NWDS and so the instruction is also for the NWDS.)

2. Create a Java project ( though we script thru Bean shell in SAP sourcing , syntactically no difference with Java, hence Creating a Java project) File >> New >> Others >> Java project or Right click on Project explorer window , you will get the contextual window select New >> Project >>

Give an appropriate name and Finish.

1. Add the Sourcing jars into Java build path.

Right click on the project created >> go to properties >> Java build path >> choose Lib tab as in the Jar as shown in the picture. Add all the Jars which you required for the project.

( This can be achieved in many ways like creating a lib project and add all the jar files into the lib project and add the reference of the lib project to the sourcing project .)

Click on Add external jars and add jars file which are required( Have added few of the jar files , if required add all the jar files which copied from the Server lib folder , mentioned in the earlier steps)

Click on OK to add all the jar files to project. This is very basic way of adding jars to project. As mentioned earlier you can create a Lib project and use the project reference for the same objective.

Create a Java class in the java project.

Since Sourcing has built in objects like “doc”, “otherdoc” , “session” etc.

This you can use it directly without declaring in the sourcing IDE. This we can achieve it by defining a method with these as the parameter in the method.