2011 Dec 16 5:03 AM
I need to create table maintenance in which one filed have more than 400 characters. CHAR type support between 1-255 & STRING type not supported by Table Maintenance. Is there any alternative type or solution for that?
2011 Dec 16 5:19 AM
Hi,
you can use data type LCHAR which can hold more than 255 .
once try it
Regards,
ravi
2011 Dec 16 5:26 AM
Hi,
Try using the data type 'LCHR' and give the no.of.characters as per requirement.
Regards,
Sharin
2011 Dec 16 6:11 AM
Facing this error for LCHAR :
" Field EMAIL_ADR ( field name) does not have a preceding length field of type INT4"
Edited by: ritesh9898 on Dec 16, 2011 7:12 AM
2011 Dec 16 12:44 PM
Hi,
If you assign TMG to the table, it will throw error as unable to display the field on screen. why because it can able to display upto 255 char length only.
For this requirement you have 2 solutions :
1) Create multiple fields and your Z table, split the data and store them as required.
2) Create a TEXT ID and store it as a long text using FM CREATE_TEXT.
or
This type of text should be treated as Long Text.
And the steps are:
1. Create Text Object Using SE75.
2. Create Text ID Using SE75.
3. Now you have to Save the text with FM SAVE_TEXT.
For example:
The Most simple solution for it can be that Divide the field REMARKS of size 1000 in multiples of 200 characters like REMARK1, REMARK2....REMARKn.
Now you can create two FMs :
zset_data: To Store 1000 char long data in Table
Here you will divide the data of Variable (type char1024) in multiples of 200 and will store in REMARK1, REMARK2.....
zget_data: To Get 1000 char long data back from Table
Here you will concatenate REMARK1, REMARK2..... and will store in Variable of Type char1024.
This is the best solution if Table is not going to be maintained by Table Maintenance Generator.
regards,
ravi
2011 Dec 17 7:31 AM
Hi,
Please check the following conditions:
1) In your Table 'LCHR' data type field should be a last field.
2) Before this field declare one variable of Data Type 'INT2'.
Before entering the Long text in the Text field you need to specify the length of the string in the field which has the data type 'INT2' in the Table Maintenance Generator.
While inserting data to the table using the screen, need to handle the length of the string dynamically.
2011 Dec 20 12:20 PM
you can use data type LCHAR which can hold more than 255 .
once try it
2011 Dec 21 6:42 AM
Hi Ritesh
Its not LCHAR its LCHR.
you can use the data type LCHR, it should be used for character strings of arbitrary length, but with at least 256 characters.
Unlike binary data (LRAW), character data (LCHR) is converted automatically in heterogeneous environments, providing the database system used supports ASCII-EBCDIC or code page conversion in heterogeneous networks. Type LCHR is therefore suitable for long texts that are to be stored. Fields of type LCHR can occur in structures and tables. Fields of this type must be placed at the end in tables and have a preceding length field of the type INT2. When using INSERT or UPDATE in ABAP/4 programs, the preceding length field must be filled with the length actually required. LCHR fields cannot be used in WHERE conditions.
LCHR is a character string of any length ...
So you can try creating a text object and text id in se75 and try with read_text.
Warm Regards
NZAB
2011 Dec 31 3:27 AM
If you are giving the type more than char255.... say string or lchar ....you cannot use table maintenance generator ....
For this you will have to create a upload program or a program which will give you on screen updation of table....
whichever suits your requirement.
Regards,
Lalit Mohan Gupta
2011 Dec 31 3:28 AM
Even if with LCHAR system allows you to create table maintenance generator... you won't be able to give text more than 255 on the screen.....
Please try a upload program for your use.
Lalit.