Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SLIS_COLOR Problem

Former Member
0 Likes
1,162

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

6 REPLIES 6
Read only

Former Member
0 Likes
996

hi ,

it is generally used like this ..

it_fieldcat-emphasize = 'C200'.

for the color for a particular column..

regards,

venkat.

Read only

venkat_o
Active Contributor
0 Likes
996

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

Read only

Former Member
0 Likes
996

Venkat is ciorrect. Define as type c.

Read only

Former Member
0 Likes
996

Thank u guys.

but please help him by give some sample code.

Read only

0 Likes
996

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.

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.
to get Color for perticular row Define one variable in ur final itab which is displayed on output.
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.
2. Once you get the data in the i_data table .
LOOP AT I_DATA.
   I_DATA-COLOR = 'C200'.
   MODIFY I_DATA INDEX SY-TABIX.
  ENDLOOP
3. And finally build w_layout type slis_layout_alv.
w_layout-info_fieldname = 'COLOR'.
pass this though REUSE_ALV_GRID_DISPLAY or LIST I hope that it solves ur problem. Regards, Venkat.O

Read only

Former Member
0 Likes
996

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.