Skip to Content
0
Former Member
Oct 24, 2006 at 08:37 AM

Color cell

51 Views

I am getting suceess in this code, but i am getting same color on Filed ' Sunday ' in index 7, i need the color only on index 2.

how to solve this ?

READ TABLE GT_BPSTAB INTO WA_BPSTAB INDEX 2 .

IF SY-SUBRC = 0.

MOVE 'SUNDAY' TO LS_COLOR_CELL-FNAME.

MOVE '1' TO LS_COLOR_CELL-COLOR-COL.

MOVE '1' TO LS_COLOR_CELL-COLOR-INT.

MOVE '0' TO LS_COLOR_CELL-COLOR-INV.

APPEND LS_COLOR_CELL TO LT_COLOR_CELL.

WA_BPSTAB-COLOR_CELL[] = LT_COLOR_CELL[].

MODIFY GT_BPSTAB FROM WA_BPSTAB INDEX 2.

CLEAR WA_BPSTAB.

ENDIF.

CLEAR : LS_COLOR_CELL-FNAME,LS_COLOR_CELL-COLOR-COL,LS_COLOR_CELL-COLOR-INT,LS_COLOR_CELL-COLOR-INV.

READ TABLE GT_BPSTAB INTO WA_BPSTAB INDEX 7 .

IF SY-SUBRC = 0.

MOVE 'MONDAY' TO LS_COLOR_CELL-FNAME.

MOVE '6' TO LS_COLOR_CELL-COLOR-COL.

MOVE '0' TO LS_COLOR_CELL-COLOR-INT.

MOVE '0' TO LS_COLOR_CELL-COLOR-INV.

APPEND LS_COLOR_CELL TO LT_COLOR_CELL.

WA_BPSTAB-COLOR_CELL[] = LT_COLOR_CELL[].

MODIFY GT_BPSTAB FROM WA_BPSTAB INDEX 7.

ENDIF.

CLEAR : LS_COLOR_CELL-FNAME,LS_COLOR_CELL-COLOR-COL,LS_COLOR_CELL-COLOR-INT,LS_COLOR_CELL-COLOR-INV.

READ TABLE GT_BPSTAB INTO WA_BPSTAB INDEX 7 .

IF SY-SUBRC = 0.

MOVE 'TUESDAY' TO LS_COLOR_CELL-FNAME.

MOVE '5' TO LS_COLOR_CELL-COLOR-COL.

MOVE '0' TO LS_COLOR_CELL-COLOR-INT.

MOVE '0' TO LS_COLOR_CELL-COLOR-INV.

APPEND LS_COLOR_CELL TO LT_COLOR_CELL.

WA_BPSTAB-COLOR_CELL[] = LT_COLOR_CELL[].

MODIFY GT_BPSTAB FROM WA_BPSTAB INDEX 7.

ENDIF.