2008 Apr 17 2:14 PM
Hi,
I am getting syntax error while using the follwing code in a Unicode program.:
1)
type-pools : slis.
constants variable type slis_color value 'C300'.
Error is - "SLIS_COLOR" and "C" are not mutually convertible in a Unicode program
2)
type-pools : slis.
constants variable type slis_color value 300.
"SLIS_COLOR" and "I" are not mutually convertible in a Unicode program
Since CONTANTS statement is used, have to give some value.
Please give me the correct way of writing the statement.
Please help me.
Regards,
Naveen
hi naveen, slis_color is a structure. u can see that by double clicking on slis. u can not define structure as constant. regards, venkat.O
2008 Apr 17 2:18 PM
hi ,
it is generally used like this ..
it_fieldcat-emphasize = 'C200'.
for the color for a particular column..
regards,
venkat.
2008 Apr 17 2:21 PM
hi naveen, slis_color is a structure. u can see that by double clicking on slis. u can not define structure as constant. regards, venkat.O
2008 Apr 17 2:28 PM
2008 Apr 17 2:51 PM
2008 Apr 17 3:03 PM
Naveen,
what do u want to do with that variable row color or column color.
to get Color for perticular column.
While building fieldcatalog, set emphasize with color.
to get Color for perticular row
Define one variable in ur final itab which is displayed on output.
w_fieldcat-fieldname = 'BUKRS'.
w_fieldcat-tabname = 'ITAB'.
w_fieldcat-seltext_m = 'Business Area'.
w_fieldcat-emphasize = 'C300'.
append w_fieldcat to i_fieldcat.
clear w_fieldcat.
2. Once you get the data in the i_data table .
DATA:
BEGIN OF i_data occurs 0,
color TYPE char3, " For color
bukrs TYPE t001-bukrs,
value1 TYPE i,
value2 TYPE i,
value3 TYPE i,
END OF i_data.
3.
And finally build w_layout type slis_layout_alv.
LOOP AT I_DATA.
I_DATA-COLOR = 'C200'.
MODIFY I_DATA INDEX SY-TABIX.
ENDLOOP
pass this though REUSE_ALV_GRID_DISPLAY or LIST
I hope that it solves ur problem.
Regards,
Venkat.O
w_layout-info_fieldname = 'COLOR'.
2008 Apr 17 3:28 PM
Actually I am upgrading from 4.7 to ECC6, When we check the unicode check box in the attributes of the program and check the syntax, it gives the error as i said earlier. I wanted to slow it. I mean it should not give any sytax check.
This is my concern.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |