2007 Nov 13 8:53 PM
Hi,
Im trying to fill a variable type c with blank spaces before the content, but it just wont work.
For example:
var(10) type c.
concatenate ' ' '12345' into var.
And when i run the program in debug mode, after the concatenate it still shows the value '12345' and the blank spaces are gone.
Could anybody tell me how to make this work, please?
Regards,
Roberto.
2007 Nov 13 8:59 PM
Try with this:
REPORT ZTEST_NP.
data: var(10) type c.
var = '12345'.
shift var right deleting trailing space.
write: var.
Regards,
Naimesh Patel
Hi,
Im trying to fill a variable type c with blank spaces before the content, but it just wont work.
For example:
var(10) type c.
concatenate ' ' '12345' into var.
And when i run the program in debug mode, after the concatenate it still shows the value '12345' and the blank spaces are gone.
Could anybody tell me how to make this work, please?
Regards,
Roberto.
2007 Nov 13 8:59 PM
Hi,
do like this
data: var(15) type c.
constatnts: gc_space type c value ' '.
concatenate ' ' '12345' gc_space ' ' '12345' into var.
Reward points if it helps,
Satish
Message was edited by:
Satish Panakala
2007 Nov 13 8:59 PM
Try with this:
REPORT ZTEST_NP.
data: var(10) type c.
var = '12345'.
shift var right deleting trailing space.
write: var.
Regards,
Naimesh Patel
2007 Nov 13 9:02 PM
Hi,
Please try this.
DATA: VAR(10) TYPE C.
WRITE '12345' TO VAR RIGHT-JUSTIFIED.
Regards,
Ferry Lianto
2007 Nov 13 9:05 PM
Thanx for your answers.
"Shift var right deleting trailing space" solved the problem
I'll reward every helpful answer.
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |