‎2010 Sep 15 7:14 AM
Hi all,
Currently in my program..we have used a data type INT2.
The data type INT2 can hold only 5 characters at a time...with no commas in between and left Justified.
Now I got a problem that..the variable which is declard with INT2 was getting populated with more than 5 charaters.
So it gettin dump.
Now I need to change the data type of that variable.
I tried declaring with INT4..or Char...all these data types are nt left justified and also have commas in between.
Please suggest a data type..which can hold morethan 5 characters..left justified n no commas in between.
Thanks in advance
Regards,
Priya
‎2010 Sep 15 7:17 AM
Hi,
Declare that field as a CHAR Type and the use condense.
Data : lv_fd type char10.
lv_fd = 'abcdefghi'.
Condense lv_fd.
Regards,
Prashant
‎2010 Sep 15 7:17 AM
ever thought of declaring one yourself which fits your needs?
BTW in SE11 when searching for data elements (Leave the field blank for this pls), you got a little "+" in your search help, which will expand the fields for which you can search, maybe you can find one which fits your needs.
‎2010 Sep 15 7:48 AM
Hi,
You can declear CHAR and use the statment SHIFT LEFT DELETING LEADING ' ' .
Regards
Bikas
‎2010 Sep 15 8:12 AM
hi,
CHECK THE BELOW CODING...
parameter: test type int4.
DATA: char TYPE char20.
char = test.
WRITE:/ 'BEFORE CONDENSE ', char.
CONDENSE char.
WRITE:/ 'AFTER CONDENSE ', char.Regards,
Sakthi.
‎2010 Sep 15 8:25 AM
‎2010 Sep 15 8:29 AM
I hardly recommend to use a numeric data type if you are calculating with it. dont care about notation, left justified and stuff.
For output purposes it makes sense to make use of a char variable. you can the use statement "WRITE TO" to get your value into your char variable in desired way. therefor press F1 on write to staement and read the docu.
‎2010 Sep 15 8:37 AM
‎2010 Sep 16 6:45 AM
Hi All,
Thanks a lot for your replies.
The problem..I cant declare the variable as CHAR and manipulate it as required..because the variable which Im using in my program is called from a zstructure..
If I wanna modify it in the structure...then I need to change all the programs..which I cant.
So request you to help me...is there any data type..which would replace INT2 with more than 5 characters in it and also no cammas in between and should be left justified.
Thanks in advance!
Regards,
Priya