2005 Sep 08 11:38 AM
Hi,
what is the data type to define long character where has more than 500 characters.
Type of char will only output 255 characters.
thanks
Alia
2005 Sep 08 11:43 AM
Alia,
If you are working with WAS 6.4 you can use STRING data type.
Regards,
Ravi
Note : Please reward if you find the answers useful.
Alia,
If you are working with WAS 6.4 you can use STRING data type.
Regards,
Ravi
Note : Please reward if you find the answers useful.
2005 Sep 08 11:43 AM
Alia,
If you are working with WAS 6.4 you can use STRING data type.
Regards,
Ravi
Note : Please reward if you find the answers useful.
2005 Sep 08 11:45 AM
Hi Alia
Depend on what you should to do.
You could use:
DATA STRING(LEN) TYPE C.
and LEN is the length which you need, for exalmple:
DATA STRING(1000) TYPE C.
But remember when you print the string on screen, you can see only 255 chars.
Or you can use the type STRING:
DATA STRING TYPE STRING.
now the length is automatically calculated by system
Max
Message was edited by: max bianchi
2005 Sep 08 11:56 AM
Hi.
I did the test with character and string. It is true that only the 255 first characters of the char is displayed, but the string is complete !
Do not forget to change the line-siez of the report.
Here is the code for the example :
REPORT ZTEST LINE-SIZE 1023.
DATA : w_char(1001) TYPE c.
DATA : w_string TYPE string.
DO 1000 TIMES.
w_char+sy-index = 'A'.
ENDDO.
w_string = w_char.
WRITE : 'Test'.
SKIP.
WRITE : / 'CHAR ', w_char.
WRITE : / 'STRING', w_string.Let me know if I'm wrong.
Cheers
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |