Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

alv

Hi everyone,

In case of ALV if at all the field is charcter type and if i write a condition like

<code>

LOOP AT IT_FINAL_BAS.

IF IT_FINAL_BAS-BUKRS LE '1000'.

IT_FINAL_BAS-COLOR = 'C21'.

ELSEIF IT_FINAL_BAS-BUKRS GT '1000' AND IT_FINAL_BAS-BUKRS LE '2000'.

IT_FINAL_BAS-COLOR = 'C41'.

ELSEIF IT_FINAL_BAS-BUKRS GT '2000' AND IT_FINAL_BAS-BUKRS LE '3000'.

IT_FINAL_BAS-COLOR = 'C71'.

ELSEIF IT_FINAL_BAS-BUKRS GT '3000'.

IT_FINAL_BAS-COLOR = 'C51'.

ELSE.

IT_FINAL_BAS-COLOR = 'C61'.

ENDIF.

MODIFY IT_FINAL_BAS INDEX SY-TABIX.

ENDLOOP.

</code>

Will there be any problem in writing like this.

Thanks,

satish

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question