cancel
Showing results for 
Search instead for 
Did you mean: 

How to add n leading space to string in AMDP method?

0 Kudos

Hi Guys,

I have below requirements in AMDP method and I am not able to achieve it:

  1. To combine(concatenate) 2 string with space
  2. To add n leading spaces to a string while querying table(select stmt).

Kindly help me if you know the solution.

Thanks in advance.

lbreddemann
Active Contributor
0 Kudos

What have you tried so far?

Have a look into the SQL/SQLScript documentation (keyword string functions) and you should find the answers to your questions rather quickly.

0 Kudos

I tried using concat( <string>, ' ') and <string> || ' '. But it doesn't work.

Also LPAD() is not adding leading spaces.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Got solution

We have to put below statements before doing any operation with space.

set 'ABAPVARCHARMODE' = 'FALSE';

<string operations>....

set 'ABAPVARCHARMODE' = 'TRUE';

Answers (0)