DB Table Creation:
USE [PRD]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[ZLOGONINFO](
[MANDT] [varchar](3) NOT NULL,
[USER_ID] [varchar](12) NOT NULL,
[COMPUTER_NAME] [varchar](32) NOT NULL,
[USER_OS] [varchar](10) NULL,
[IP_ADDR] [varchar](15) NULL,
[GUI] [varchar](4) NULL,
[GUI_PATCH] [varchar](30) NULL,
[DUP_FLG] [varchar](1) NULL,
[LAST_LOGON_DT] [varchar](8) NULL,
[LAST_LOGON_TM] [varchar](6) NULL,
CONSTRAINT [ZLOGONINFO~0] PRIMARY KEY CLUSTERED
(
[MANDT] ASC,
[USER_ID] ASC,
[COMPUTER_NAME] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
Report in SAP:
REPORT zlogoninfo MESSAGE-ID z1 LINE-SIZE 132 NO STANDARD PAGE HEADING
LINE-COUNT 65.
*--------------------------- T A B L E S ------------------------------*
TABLES: zlogoninfo.
*-----------------I N T E R N A L T A B L E S -----------------------*
DATA: BEGIN OF i_zlogoninfo OCCURS 0.
INCLUDE STRUCTURE zlogoninfo.
DATA: END OF i_zlogoninfo.
*-------------T E M P O R A R Y V A R I A B L E S--------------------*
DATA: highlight TYPE i. "used for formatting-global var.
*
*--------------- S E L E C T I O N S C R E E N----------------------*
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_user FOR zlogoninfo-user_id,
s_date FOR zlogoninfo-last_logon_dt.
SELECTION-SCREEN END OF BLOCK blk1.
INCLUDE: zsetinty. "Highlight print lines
*------ S T A R T - O F - S E L E C T I O N ---------------------------*
START-OF-SELECTION.
PERFORM get_data.
*------- E N D - O F - S E L E C T I O N ------------------------------*
END-OF-SELECTION.
PERFORM print_report.
TOP-OF-PAGE.
PERFORM head_lines.
*&---------------------------------------------------------------------*
*& Form HEAD_LINES
*&---------------------------------------------------------------------*
* Display header lines
*----------------------------------------------------------------------*
FORM head_lines.
PERFORM print_report_header.
PERFORM page_heading.
ENDFORM. " HEAD_LINES
*&---------------------------------------------------------------------*
*& Form PRINT_REPORT_HEADER
*&---------------------------------------------------------------------*
FORM print_report_header.
CALL FUNCTION 'Z_REPORT_HEADER'
EXPORTING
i_title = 'USER SAPGUI PATCH LEVEL'
EXCEPTIONS
OTHERS = 1.
ENDFORM. " PRINT_REPORT_HEADER
*&---------------------------------------------------------------------*
*& Form PAGE_HEADING
*&---------------------------------------------------------------------*
FORM page_heading.
FORMAT COLOR COL_HEADING INTENSIFIED ON.
WRITE:/ sy-vline NO-GAP,
(12) 'User Name' NO-GAP, sy-vline NO-GAP,
(32) 'Computer Name' NO-GAP, sy-vline NO-GAP,
(10) 'User OS' NO-GAP, sy-vline NO-GAP,
(15) 'IP Address' NO-GAP, sy-vline NO-GAP,
(04) 'GUI' NO-GAP, sy-vline NO-GAP,
(30) 'GUI PAtch' NO-GAP, sy-vline NO-GAP,
(01) ' ' NO-GAP, sy-vline NO-GAP,
(10) 'Last Date' NO-GAP, sy-vline NO-GAP,
(08) 'Last Time' NO-GAP, sy-vline NO-GAP.
ENDFORM. " PAGE_HEADING
*&---------------------------------------------------------------------*
*& Form Get_data
*&---------------------------------------------------------------------*
FORM get_data.
SELECT *
INTO TABLE i_zlogoninfo
FROM zlogoninfo
WHERE user_id IN s_user
AND last_logon_dt IN s_date.
IF sy-subrc = 0.
SORT i_zlogoninfo.
ENDIF.
ENDFORM. " Get_data
*&---------------------------------------------------------------------*
*& Form print_report
*&---------------------------------------------------------------------*
FORM print_report.
FORMAT COLOR COL_NORMAL.
LOOP AT i_zlogoninfo.
PERFORM set_intensity USING highlight.
WRITE:/ sy-vline NO-GAP,
(12) i_zlogoninfo-user_id NO-GAP, sy-vline NO-GAP,
(32) i_zlogoninfo-computer_name NO-GAP, sy-vline NO-GAP,
(10) i_zlogoninfo-user_os NO-GAP, sy-vline NO-GAP,
(15) i_zlogoninfo-ip_addr NO-GAP, sy-vline NO-GAP,
(04) i_zlogoninfo-gui NO-GAP, sy-vline NO-GAP,
(30) i_zlogoninfo-gui_patch NO-GAP, sy-vline NO-GAP,
(01) i_zlogoninfo-dup_flg NO-GAP, sy-vline NO-GAP,
(10) i_zlogoninfo-last_logon_dt NO-GAP, sy-vline NO-GAP,
(08) i_zlogoninfo-last_logon_tm NO-GAP, sy-vline NO-GAP.
ENDLOOP.
ULINE.ENDFORM. " print_report
Tuesday, January 29, 2008
Wednesday, January 23, 2008
Recreating Transport Data and Cofiles
If you no longer have the Data and Cofiles for Transports that still exist in your SAP system, there is a method to export those files back to the Transport Directory on the Transport Host.
This is done using the TP tools on the OS:
tp export
example:
tp export DEVK901234
This is done using the TP tools on the OS:
tp export
example:
tp export DEVK901234
Labels:
SAP
Subscribe to:
Posts (Atom)