CRM and CX Blogs by Members
Find insights on SAP customer relationship management and customer experience products in blog posts from community members. Post your own perspective today!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

The Prepared Eclipse Project

Setting up the prepared project keeps the effort low and helps in fastened results. An experienced user can easily adapt

the project layout and location to their needs (e.g. using a source versioning system).

  1. Create an empty folder where all relevant data is stored (e.g. C:\DEV). This folder will be the workspace folder for eclipse.
  2. Unpack the ZIP file attached to the SAP note into that empty directory (e.g. C:\DEV). Then a subdirectory with the name PRC_UE_CUSTOMER should appear (C:\DEV\PRC_UE_CUSTOMER), containing the project files.
  3. Start your SAP GUI on the same machine, login into the system and start transaction /SAPCND/UE_DEV (using the command field enter /n/SAPCND/UE_DEV).

4) Select the Download option and activate the option Libraries. Downloading requires a minimum authorization of exporting data from SAPGUI into the local file system (Object S_GUI, ACTVT 61)

5) Enter as path the newly created subfolder PRC_UE_CUSTOMER (e.g. C:\DEV\ PRC_UE_CUSTOMER) and hit the execute button. The downloading will take a few minutes and create some subfolder in the PRC_UE_CUSTOMER directory containing some API jars and some source jars.

6)Start eclipse and select as workspace the manual created folder (C:\DEV). Eclipse will create the meta data for an empty workspace.

7) Select File Import… and Import an Existing Project into Workspace. Select the PRC_UE_CUSTOMER folder as root directory. Eclipse should show the PRC_UE_CUSTOMER as project name.

😎 Now the JRE System Libraries have to be added to the build path of eclipse. Activate the context menu on the project (right mouse click) and select Build Path    Add Libraries. Select JRE System Library and use a 1.4.x version.

9) Prepare the API source and build the HTML documentation. Activate the context menu (right mouse click) onbuild_api_doc.xml and select Run As Ant Build. Please ignore the error message thrown during that process.

10)

Refresh the eclipse Project by right mouse clicking on the project and selecting Refresh (F5) in the context menu.

Now the default project is ready to be used for custom developments. Java Documentation for all API classes is  available and can be viewed by eclipse auto completion help or by opening the file

PRC_UE_CUSTOMER/api_doc/index.html.

The project has following structure (the screenshot can look different):

11) Create the PRC_UE_CUSTOMER.jar

After implementing the customer userexits, it is time to upload the userexits classes into the system. However, it is required first to archive all the classes (preferably together with the sources) into a JAR file. Before creating the JAR file, make sure the java sources and compiled classes are up-to-date and error free.

To generate a JAR file eclipse provides the ‘JAR Packager’ feature that guides you though easy steps to configure and create such a JAR file.

11.1)  From Eclipse’s FILE menu choose the EXPORT option.

11.2) From the pop up list choose JAR FILE and click NEXT.

11.3)  From the resources tree of PRC_UE_CUSTOMER choose only the SRC node making sure that the other  nodes LIB_API and LIB_SRC are not chosen.

11.4) Make sure that the option ‘export generated class files and resources’ is selected.

11.5) Enter a name and path for the JAR file e.g. ‘PRC_UE_CUSTOMER.jar’.

11.6) Click on FINISH to generate the JAR file.

To make it even easier, SAP delivers a configuration file called ‘create_PRC_UE_CUSTOMER _jar.jardesc’ which contains pre-configuration data that spares the above steps.

Simply right mouse click on the jardesc file within eclipse and select CREATE JAR from the context menu. This will export the JAR file PRC_UE_CUSTOMER.jar into Eclipse’s workspace folder. That’s the default destination and can be changed by using the option “Open JAR Packager …” in the context menu of the .jardesc file.

12) Create a package under source folder in the project like “your.company.pricing.userexits”.

13) Create a new java class like below.

13) After successful creation of Class, create a Jar file as mentioned in the step 11.

14) Once the Jar creation is complete, go to transaction /n/SAPCND/UE_DEV and upload the jar file in to CRM.

14.1) Need a Transport Request.

14.2) Need a Package Name for uploading Jar file.

As shown in the below screen shot upload the Jar file.

15) Once you successfully uploaded the Jar file, go to SM53 transaction to check whether files uploaded or not. The transaction sm53 contains also a browser to see the installed and uploaded java modules along with the userexit files.

  1. 15.1)  Select in the Navigation tree the element Application
  2. 15.2)  Browse the Installation tree down to the shown level 0/SAP/IPC  Modules
  3. 15.3)  All modules ending with _SAPCND_UE are customer uploaded modules equals jar files.

16) Once the Jar file is successfully uploaded in to VMC. Now the user exit needs to be registered.

User Exit Registration:

Depends on the requirement the user exit need to be registered. Here as a example, registering condition value formula as a Requirement routine.

17) Go to Transaction /SAPCND/UEASS, give PR in the usage type and execute.

The following view opens:

17.1) Create a new Entry under Condition Value Formula(under implementations). And enter the details as below.

17.2) Once the User exit is created successfully, a formula number need to be assigned to it. Under the formula section create a new entry and assign custom number and User exist name given in the step 17.1. The custom formula number range can be checked at transaction /SAPCND/UERNG.

18) The Pricing user exit is created successfully, now the formula number need to given in the pricing procedure for its usage. Once the above steps are successful, the formula number can be assigned to a condition type in the pricing procedure depends on the requirement.

19) Once the above steps are completed, VMC need to be restarted for the changes to be effected. To restart VMC go the Transaction sm52.

20) To check for pricing user exit logs, the following procedure need to be followed.

a) Go to Transaction sm53(VMC adminstration), click on Log Adminstration as shown in the below screen shot.

b) Go to Log configuration, to set for the logs.

c) Enter the path of the Pricing User exit in the right side area as shown in the below screen shot and click on Transfer button.

d) Once Transfer button is clicked, the logs are set for the pricing user exit and it will show as below screen shot.

e) Go to Log Display on left side menu. Select the user exit path and click on update Log messages for the logs to be displayed on the right side area.

10 Comments