Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
cianbarrett
Active Participant
Hi everyone!

As a member of the Product Support team, I wanted to give my take on one of the new features available in the SAP Cloud Applications Studio. In this blog post, I will give a quick showcase of the functionality with useful little tips and where to find more information.

ABSL can take a little while to get used to so the Development team wanted to come up with a way to make the studio more accessible to new users and less work for the more advanced users. With the release of 2011, we have introduced an ABSL Code Generator which allows users to create complete code blocks with the click of the button, it's that easy!

The feature can be broken down two types of construct:

  • Simple Constructs

  • Complex Constructs


Wait a minute, slow down, where can the feature be activated?

The ABSL Code Generator window is simply found in the Toolbar under View and can float or be docked as needed (I dock it to the left):


Done! Now on to the core of the functionality...

 

Simple Constructs

The Simple Constructs or Control and Loop Statements will be generated immediately wherever the caret is. What's nifty about this feature is that it will maintain the indentation indicated by the caret placement. Once generated, the user can add or adjust the expressions and statements as required inside the code editor.

The following Control and Loop Statements are currently supported:

  • If

  • If...else

  • If...else if...else

  • Else if

  • Foreach

  • Continue

  • Break


I created the below example shows how these can be quickly generated and chained together:


By using the down arrow on the keyboard after generation, the indentation is automatic.


 

Complex Constructs

The Complex Constructs include Business Object Lifecycle, Messages and Basic SAP Reuse Libraries. These require further configuration in the wizard that opens on click of the button. These support both Custom and Extension Business Objects and implicitly import the required namespaces. On generate, the user can again customize the placeholder information in the code editor.

The following Complex Constructs are currently supported:

  • Create Instance

  • Retrieve

  • Query

  • Raise Message

  • Sensitive Personal Data


Below I have given an example of Create Instance for Extension Business Object CustomerQuote:


Note how the namespace is added as an import at the top of the script. This also shows a Custom Business Object example.


 

And that's how easy it is to use! To summarize, we covered an example of how to use the new ABSL Code Generator in your future projects along with the tips on chaining constructs, automatic indentation, implicit namespace imports and support for Custom and Extension Business Objects.

Hopefully you find this quick little blog post and the new functionality useful in your projects! For more information, see the available documentation for SAP Cloud Applications Studio in the Help Portal.

If you have any questions on the feature, you can raise them in the SAP Cloud Applications Studio Q&A section of the Community. Please also feel free to leave any feedback below 😊

Happy coding!

Cian
3 Comments