ABAP Blog Posts
cancel
Showing results for 
Search instead for 
Did you mean: 
sheenamk
Developer Advocate
Developer Advocate
9,382

Congratulations to everyone who came along with us till the 4th week of the ABAP Developer Challenge. So far we have seen :

  • How to create a OData UI Service from Scratch using Joule Chat
  • How to use Joule - Explain feature to understand a block of code.
  • How to use Joule - RAP Predict Business Logic to create logic for specific tasks.

Let us wrap up with another interesting feature of Joule's ABAP AI Capability - The Joule Predictive Code Completion.

Quick Links

Please use this separate thread to ask your questions and discuss issues

Sample Scenario

We had asked you to create a field of type 'Date' during the RAP application creation.

Now let us use Determination function to calculate the number of years since the value in Date field. You can implement it while creating a new record using the app.

Task1: Create a determination and implement the corresponding method.

  1. Define a determination in the BDEF of the CDS view.Define DeterminationDefine Determination
  2. Now you can notice a small icon to the left of the determination definition. Click on it to create the implementation method for adding determination logic in the local handler class of the behavior pool of your entity. Save and activate the changes.Implement DeterminationImplement DeterminationFor additional information on Determinations and its syntax and use you can refer the BDEF ‘/DMO/R_Travel_D’. Alternatively you can also refer https://github.com/SAP-samples/abap-platform-rap100/blob/main/exercises/ex04

Task2: Enhance determination with Joule Code Prediction Capability

Use Joule's Predictive Code Completion feature to complete your code by providing simple prompts for each step in the logic.

Here please note that we should use the Toggle option to disable / enable Joule Code Prediction Capability by pressing sheenamk_0-1772735109647.png button in the toolbar.

Hint: Disable the Joule Code Prediction Capability if you want to give prompts for new steps / once finished to stop Automatic Code Prediction.

Note:- The logic and examples are mentioned just for your reference and to make the purpose of the challenge easy to understand. Please feel free to use your own logic and dataset.

To know how to use Predictive Code Completion follow this tutorial

Please note that the challenge will remain open for another week for anyone who is running late. 

Before we close for this year we would like to thank everyone who participated. We hope all of you enjoyed the challenge. Let us continue to explore how SAP Joule for developers, ABAP AI capabilities can support us with our day-to-day tasks when working with ABAP code, to increase our efficiency and to lower total cost of development.

Happy Jouling!!!

 

175 Comments