ALV-LIGHT_SET
REPORT ZLIGHT_SET. TYPE-POOLS: SLIS. TYPES: BEGIN OF TY_VBAK, VBELN TYPE VBAK-VBELN, ERNAM TYPE VBAK-ERNAM, NETWR TYPE VBAK-NETWR, LIGHTS TYPE C, END OF TY_VBAK. DATA: IT_VBAK TYPE TABLE OF TY_VBAK, WA_VBAK TYPE TY_VBAK. DATA: WA_LAYOUT TYPE SLIS_LAYOUT_ALV , IT_FCAT TYPE SLIS_T_FIELDCAT_ALV , WA_FCAT LIKE LINE OF IT_FCAT. SELECT-OPTIONS : S_VBELN FOR WA_VBAK-VBELN. START-OF-SELECTION. SELECT VBELN ERNAM NETWR FROM VBAK INTO TABLE IT_VBAK UP TO 10 ROWS. LOOP AT IT_VBAK INTO WA_VBAK. IF WA_VBAK-ERNAM = 'BOLLINGER'. WA_VBAK-LIGHTS = 1. MODIFY IT_VBAK FROM WA_VBAK TRANSPORTING LIGHTS. ELSEIF WA_VBAK-ERNAM = 'ARUN'. WA_VBAK-LIGHTS = 3. MODIFY IT_VBAK FROM WA_VBAK TRANSPORTING LIGHTS. ENDIF. ENDLOOP. WA_FCAT-COL_POS = 1. WA_FCAT-FIELDNAME = 'VBELN'. WA_FCAT-TABNAME = 'VBAK'. WA_FCAT-SELTEXT_M = 'SALES_ORDER_NO'