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

ALV without colors

Former Member
0 Likes
1,139

Hi All,

Is it possible to display ALV without colors ?

If yes pls help me....

Dilip

Hi All,

Is it possible to display ALV without colors ?

If yes pls help me....

Dilip

9 REPLIES 9
Read only

Lakshmant1
Active Contributor
0 Likes
1,113

Hi Dilip,

I guess you are asking about the default colors displayed for Key fields? If so try this one, In the fieldcatalog don't populate value for fieldname 'KEY'.

Thanks

Lakshman

Read only

0 Likes
1,113

Hi Lakshman,

I am sending sample code.

data : fld_cat type slis_t_fieldcat_alv,

fld type slis_fieldcat_alv ,

fld-fieldname = 'VBELN'.

FLD-TABNAME = 'IT_VBAK'.

FLD-SELTEXT_M = 'DOC NO'.

FLD-COL_POS = 0.

*FLD-KEY = 'X'.

FLD-OUTPUTLEN = 15.

APPEND FLD TO FLD_CAT.

CLEAR FLD.

fld-fieldname = 'ERDAT'.

FLD-TABNAME = 'IT_VBAK'.

FLD-SELTEXT_M = 'DOC DATE'.

*FLD-COL_POS = 0.

*FLD-KEY = 'X'.

FLD-OUTPUTLEN = 15.

APPEND FLD TO FLD_CAT.

CLEAR FLD.

I am using ALV list.

In this way I am generating my field catalog.

The client don't want any color on report.

Regards,

Dilip

Read only

Former Member
0 Likes
1,113

Hi,

Could you tell me how r u generating the fieldcatalog and which display are you generating list or grid.

Read only

0 Likes
1,113

Hi Lakshman,

I am sending sample code.

data : fld_cat type slis_t_fieldcat_alv,

fld type slis_fieldcat_alv ,

fld-fieldname = 'VBELN'.

FLD-TABNAME = 'IT_VBAK'.

FLD-SELTEXT_M = 'DOC NO'.

FLD-COL_POS = 0.

*FLD-KEY = 'X'.

FLD-OUTPUTLEN = 15.

APPEND FLD TO FLD_CAT.

CLEAR FLD.

fld-fieldname = 'ERDAT'.

FLD-TABNAME = 'IT_VBAK'.

FLD-SELTEXT_M = 'DOC DATE'.

*FLD-COL_POS = 0.

*FLD-KEY = 'X'.

FLD-OUTPUTLEN = 15.

APPEND FLD TO FLD_CAT.

CLEAR FLD.

I am using ALV list.

In this way I am generating my field catalog.

The client don't want any color on report.

Regards,

Dilip

Read only

0 Likes
1,113

Hi Varun,

I am sending sample code.

data : fld_cat type slis_t_fieldcat_alv,

fld type slis_fieldcat_alv ,

fld-fieldname = 'VBELN'.

FLD-TABNAME = 'IT_VBAK'.

FLD-SELTEXT_M = 'DOC NO'.

FLD-COL_POS = 0.

*FLD-KEY = 'X'.

FLD-OUTPUTLEN = 15.

APPEND FLD TO FLD_CAT.

CLEAR FLD.

fld-fieldname = 'ERDAT'.

FLD-TABNAME = 'IT_VBAK'.

FLD-SELTEXT_M = 'DOC DATE'.

*FLD-COL_POS = 0.

*FLD-KEY = 'X'.

FLD-OUTPUTLEN = 15.

APPEND FLD TO FLD_CAT.

CLEAR FLD.

I am using ALV list.

In this way I am generating my field catalog.

The client don't want any color on report.

Regards,

Dilip

Read only

0 Likes
1,113

Hey Dilip,

What you can do is set the field fld-key = '' .

With this all the fields have the same color.

I went through the ALV. In ALV whether u use grid or list the colors generated are default, its light blue for the contents of the list.try to convince the client that these are default colors and tell him its possible only in classic reports.

I don't think theres any other way maybe someone else has the input .

Regards

Varun

Read only

0 Likes
1,113

Hi Dilip,

Try this code,

REPORT ZTEST.

TYPE-POOLS : SLIS.

DATA: BEGIN OF IT_VBAK OCCURS 0,

VBELN LIKE VBAK-VBELN,

ERDAT LIKE VBAK-ERDAT,

END OF IT_VBAK.

DATA : FLD_CAT TYPE SLIS_T_FIELDCAT_ALV,

FLD TYPE SLIS_FIELDCAT_ALV .

DATA:V_REPID LIKE SY-REPID.

START-OF-SELECTION.

V_REPID = SY-REPID.

SELECT VBELN ERDAT FROM VBAK INTO TABLE IT_VBAK.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

I_PROGRAM_NAME = V_REPID

I_INTERNAL_TABNAME = 'IT_VBAK'

  • I_STRUCTURE_NAME =

I_INCLNAME = V_REPID

CHANGING

CT_FIELDCAT = FLD_CAT

EXCEPTIONS

INCONSISTENT_INTERFACE = 1

PROGRAM_ERROR = 2

OTHERS = 3 .

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

LOOP AT FLD_CAT INTO FLD.

CASE FLD-FIELDNAME.

WHEN 'VBELN'.

FLD-KEY = ' '.

MODIFY FLD_CAT FROM FLD.

ENDCASE.

ENDLOOP.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = V_REPID

IT_FIELDCAT = FLD_CAT

TABLES

T_OUTTAB = IT_VBAK

EXCEPTIONS

PROGRAM_ERROR = 1

OTHERS = 2

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Thanks

Lakshman

Read only

0 Likes
1,113

Dear Lakshman,

I have got the answer. It is possible to display AVL without colors.

Thank you for u r reply.

Regards,

Dilip

Read only

0 Likes
1,113

Dear Varun,

I have got the answer. It is possible to display AVL without colors.

Thank you for u r reply.

Regards,

Dilip