*&---------------------------------------------------------------------* *& Report Z_TEST *& *&---------------------------------------------------------------------* *& *& *&---------------------------------------------------------------------* REPORT Z_TEST. TYPES: BEGIN OF ty_a, werks1 LIKE crhd-werks, arbpl1 LIKE crhd-arbpl, END OF ty_a, tt_a TYPE TABLE OF ty_a. DATA: ls_a TYPE ty_a, lt_a TYPE TABLE OF ty_a. DATA: werks LIKE crhd-werks, arbpl LIKE crhd-arbpl, t_werks LIKE crhd-werks, t_arbpl LIKE crhd-arbpl, save_curow0 LIKE sy-curow. t_werks = 'CZ18'. t_arbpl = '0031'. ls_a-werks1 = 'CZ18'. ls_a-arbpl1 = '0031'. APPEND ls_a to lt_a. ls_a-werks1 = 'CZ18'. ls_a-arbpl1 = '0010'. APPEND ls_a to lt_a. AT LINE-SELECTION. save_curow0 = sy-curow. IF save_curow0 GE 3. READ LINE sy-lilli INDEX 0 FIELD VALUE t_werks INTO werks t_arbpl INTO arbpl. CHECK werks NE space. CHECK arbpl NE space. SET PARAMETER ID 'WRK' FIELD werks. SET PARAMETER ID 'AGR' FIELD arbpl. CALL TRANSACTION 'CR03' AND SKIP FIRST SCREEN. ENDIF. HIDE: werks ,arbpl. TOP-OF-PAGE. WRITE:/02(50) text-103. SKIP. WRITE: /01(01) sy-vline, 02(14) text-109 COLOR COL_HEADING, 16(01) sy-vline, 17(20) text-110 COLOR COL_HEADING, 36(01) sy-vline, 37(40) text-112 COLOR COL_HEADING, 77(01) sy-vline. END-OF-SELECTION. LOOP AT lt_a INTO ls_a. t_werks = ls_a-werks1. t_arbpl = ls_a-arbpl1. write: /01(01) sy-vline, 02(14) t_werks COLOR COL_KEY, 16(14) t_arbpl COLOR COL_KEY. clear: t_werks, t_arbpl, ls_a. ENDLOOP.