‎2006 Aug 10 12:41 PM
Hi frnds,
i want to create a field of type char and length 1000...
i tink the normal type char is not possible. i tried lcha.. that was also not of use.. any suggestions?>
points asured to all replies...
madan..
‎2006 Aug 10 12:44 PM
‎2006 Aug 10 12:44 PM
‎2006 Aug 10 12:47 PM
‎2006 Aug 10 12:47 PM
You can use as
<b>data: w_str(30000) type C.</b>
Maxmium size of char is 30000.
~thomas
Message was edited by: Thomas Mann
‎2006 Aug 10 12:49 PM
Hello Madan,
do this way in your table
field - datatype -length -text
lenght- int2 - 5 - lengtt of the variable
text - lchar -1000 - text
regards,
Naimesh
‎2006 Aug 10 12:53 PM
RAWSTRING (as long as you do not use this field in a WHERE clause of the SELECT statement).
‎2006 Aug 10 1:04 PM
im not able to create a length of 1000 characters with rawstring
‎2006 Aug 10 1:13 PM
Hi madan,
got it. you have to use LCHR as data type and give the outputlength as 1000 chars, that will work/
Regards
vijay
‎2006 Aug 10 1:21 PM
hi vij,
but that shud be preceded by a field of type int2 as mentioned by naimesh in one of the reply.... but that will not display the text field... how do i enter the values for that ?
regards,
Madan...
‎2006 Aug 10 1:38 PM
Hi Madan,
yes it requires , preceeding int2.
String is working , what is the problem with that. and i checked it , it is working fine with string.
Regards
vijay
‎2006 Aug 10 2:19 PM
hi vij,
i tried that. but the max. characters is around 500..
regards,
madan..
‎2006 Aug 10 2:22 PM
Hi Madan,
LCHR should meet your reqt.. pl read the following from SAP help" LCHR: Character string of any length, but has to be declared with a minimum of 256 characters. Fields of this type must be located at the end of transparent tables (in each table there can be only one such field) and must be preceded by a length field of type INT2. If there is an INSERT or UPDATE in ABAP programs, this length field must be filled with the length actually required. If the length field is not filled correctly, this may lead to a data loss in the LCHR field! A fields of this type cannot be used in the WHERE condition of a SELECT statement."
~Suresh
‎2006 Aug 11 7:13 AM
Hello Madan,
To insert values in this tables you have to follow this process:
tables: ztest_np.
ztest_np-mandt = sy-mandt.
ZTEST_NP-TEST_S = 'This is for test'.
ZTEST_NP-TEST = STRLEN( ZTEST_NP-TEST_S ).
insert ztest_np.
if sy-subrc = 0.
commit work.
write: 'done'.
endif.
Regards,
Naimesh
‎2006 Aug 10 12:58 PM
Hi,
you can use LCHR it can accomodate 32000 chars.
simply declare
<b>data: var(1000) type c.</b>
Regards
vijay
‎2006 Aug 10 1:01 PM