This report retrieves user data from the USR02 table for client 200, sorts it by entry date in descending order, and writes the user ID, name, start date, end date, and flag fields to the output. It defines a structure to store the user data, selects all records from USR02 into a internal table, sorts the table by start date, then loops through the table writing each user's fields to the output.
This report retrieves user data from the USR02 table for client 200, sorts it by entry date in descending order, and writes the user ID, name, start date, end date, and flag fields to the output. It defines a structure to store the user data, selects all records from USR02 into a internal table, sorts the table by start date, then loops through the table writing each user's fields to the output.
This report retrieves user data from the USR02 table for client 200, sorts it by entry date in descending order, and writes the user ID, name, start date, end date, and flag fields to the output. It defines a structure to store the user data, selects all records from USR02 into a internal table, sorts the table by start date, then loops through the table writing each user's fields to the output.
This report retrieves user data from the USR02 table for client 200, sorts it by entry date in descending order, and writes the user ID, name, start date, end date, and flag fields to the output. It defines a structure to store the user data, selects all records from USR02 into a internal table, sorts the table by start date, then loops through the table writing each user's fields to the output.
*& *&---------------------------------------------------------------------* *& *& *&---------------------------------------------------------------------* REPORT ZTEST. TYPES: BEGIN OF st_u, MANDT TYPE USR02-MANDT, BNAME TYPE USR02-BNAME, ANAME TYPE USR02-ANAME, TRDAT TYPE USR02-TRDAT, ERDAT TYPE USR02-ERDAT, UFLAG TYPE USR02-UFLAG, END OF st_u. DATA: it_u TYPE STANDARD TABLE OF st_u INITIAL SIZE 0, it_u_wa TYPE st_u. SELECT * FROM USR02 CLIENT SPECIFIED INTO CORRESPONDING FIELDS OF TABLE it_U where mandt = '200' ORDER BY ERDAT DESCENDING. SORT it_U by TRDAT. LOOP AT it_u INTO it_u_wa. write :/ it_u_wa-MANDT. write : it_u_wa-BNAME. write : it_u_wa-ANAME. write : it_u_wa-TRDAT. WRITE : it_u_wa-ERDAT. WRITE : it_u_wa-UFLAG. ENDLOOP.