2007 Jan 19 1:51 PM
Hi Experts,
I have field 'txt1' with character type and length 500. Im printing this field in SAP SCRIPT.
The problem is that if the field has 100 characters, it prints all 100 plus the leading 400 spaces too. It consumes blank spaces in the SCRIPT.
How can i print only 100 characters without any leading spaces.
I tried 'Condense". Its not working.
Please Suggest?
Rajiv Ranjan
Hi Experts,
I have field 'txt1' with character type and length 500. Im printing this field in SAP SCRIPT.
The problem is that if the field has 100 characters, it prints all 100 plus the leading 400 spaces too. It consumes blank spaces in the SCRIPT.
How can i print only 100 characters without any leading spaces.
I tried 'Condense". Its not working.
Please Suggest?
Rajiv Ranjan
2007 Jan 19 2:12 PM
hi,
u can condense the field in print program itself and pass it to sapscript.
check this..
data sab(20) type c.
sab = ' 234556'.
write: / sab.
shift sab left deleting leading space.
write: / sab.
or in sapscript command prompt editor u should write like
/: &field(c)&
Regards
CNU
2007 Jan 19 2:13 PM
Hello,
Yuo can check the length of field. & print field content from 0 till the length of string(field).
Hoep this helps.
Thanks.
2007 Jan 19 2:20 PM
Hi Rajeev.
declare a string. assign value of char field to string. And condense the string. Then write the string. This will solve your problem.
Ashven
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |