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: 
Andre_Fischer
Product and Topic Expert
Product and Topic Expert
I am currently working on using json strings as input for my RAP generator tool.

Here I ran into the problem that I had to provide a (very) long json string as an input for a class that is run as a console application.

But also when using a simple json string such as this one (taken from Wikipedia) it is not possible to use cut & paste to work with it in ADT.


Error when using cut and paste with default editor settings


 

... unless you know which settings you have to change for your ABAP editor in ADT.

From the menu choose Window --> Preferences and there ABAP Development -->

Editors --> Source Code Editors or you search for source code editors in the Preferences dialogue.

Here you have to activate the check box Escape text when pasting into a string literal.


Preferences - Escape text when pasting into a string literal


 

When you now use cut and paste and paste a long string, a json string or even an xml string to your source code within the placeholders for a literal
json_string = ''.

all strings will be wrapped automatically


Result


 

 

 
8 Comments