You are on page 1of 4

SELECT

/*

[NAME]

- HANA_ABAP_InstalledComponents

[DESCRIPTION]

- Overview of installed ABAP components

[SOURCE]

- SAP Note 1969700

[DETAILS AND RESTRICTIONS]

- Table AVERS only available in SAP ABAP environments


- You have to be connected to the SAP<sid> schema otherwise the following error is
issued:

[259]: invalid table name: Could not find table/view AVERS in schema

- If access to ABAP objects is possible but you cannot log on as ABAP user, you can
switch the default schema before executing the command:

SET SCHEMA SAP<sid>

[VALID FOR]

- Revisions: all
- Client application: ABAP

[SQL COMMAND VERSION]

- 2020/07/19: 1.0 (initial version)


- 2020/09/15: 1.1 (SP_LEVEL included)
- 2020/11/29: 1.2 (EXCLUDE_SUB_COMPONENTS included)

[INVOLVED TABLES]

- AVERS
- CVERS

[INPUT PARAMETERS]

- COMPONENT

Installed component

'SAP_BASIS' --> Show details for installed component SAP_BASIS


'PI%' --> Show details for installed components starting with "PI"
'%' --> No restriction related to installed component

- RELEASE

Component release
'750' --> Show components with release 750
'%' --> No restriction related installed release

- SP_LEVEL

Support package level

'0017' --> Support package level 0017


'%' --> No restriction related to support package level

- DESCRIPTION

Component description

'Basis Plug-In' --> Show components with description "Basis Plug-In"


'DMIS%' --> Show components with descriptions starting with "DMIS"
'%' --> No restriction related to component description

- SKIP_PREVIOUS_RELEASES

Possibility to skip older releases meanwhile replaced with a newer version

'X' --> Only show most recent release of a component


' ' --> Also show previously installed releases of a component

- EXCLUDE_SUB_COMPONENTS

Possibility to exclude sub components

'X' --> Only display main components


' ' --> No restriction related to sub components

[OUTPUT PARAMETERS]

- COMPONENT: Component name


- RELEASE: Component release
- SP_LEVEL: Component support package level
- DESCRIPTION: Component description
- START_TIME: Component installation time
- END_TIME: Component end installation time / last check time

[EXAMPLE OUTPUT]

-----------------------------------------------------------------------------------
-------------------------------
|COMPONENT |VERSION |R3VERSION|DESCRIPTION |
START_TIME |END_TIME |
-----------------------------------------------------------------------------------
-------------------------------
|LCAPPS |2005_700 |750 |LC Applications (LCAPPS) 2005_700 |
2013/07/09 16:42:00|2019/10/19 09:19:33|
|MDG_FND |731 |740 |MDG Foundation 732 |
2011/09/08 19:37:30|2015/04/25 07:57:02|
|MDG_FND |747 |740 |MDG Foundation 732 |
2015/04/20 09:14:27|2015/04/25 07:57:03|
|MDG_FND |749 |750 |MDG Foundation |
2018/04/10 15:06:42|2019/10/19 09:19:33|
|SAP_BASIS |731 |740 |SAP Basis Component |
2011/09/08 19:37:30|2015/04/25 07:57:02|
|SAP_BASIS |740 |740 |SAP Basis Component |
2015/04/20 09:14:27|2015/04/25 07:57:03|
|SAP_BASIS |750 |750 |SAP Basis Component |
2018/04/10 15:06:42|2019/10/19 09:19:33|
|SAP_BS_FND|731 |740 |SAP Business Suite Foundation |
2011/09/08 19:37:30|2015/04/25 07:57:02|
|SAP_BS_FND|747 |740 |SAP Business Suite Foundation |
2015/04/20 09:14:27|2015/04/25 07:57:03|
|SAP_BS_FND|748 |750 |SAP Business Suite Foundation |
2018/04/10 15:06:42|2019/10/19 09:19:33|
|SAP_BW |731 |740 |SAP Business Warehouse |
2011/09/08 19:37:30|2015/04/25 07:57:02|
|SAP_BW |740 |740 |SAP Business Warehouse |
2015/04/20 09:14:27|2015/04/25 07:57:03|
|SAP_BW |750 |750 |SAP Business Warehouse |
2018/04/10 15:06:42|2019/10/19 09:19:33|
-----------------------------------------------------------------------------------
-------------------------------

*/

COMPONENT,
RELEASE,
SP_LEVEL,
DESCRIPTION,
START_TIME,
END_TIME
FROM
( SELECT
ROW_NUMBER () OVER (PARTITION BY A.ADDONID ORDER BY A.STARTDATE || A.STARTTIME
DESC) LINE_NO,
A.ADDONID COMPONENT,
A.ADDONRL RELEASE,
A.PCOMMENT DESCRIPTION,
TO_VARCHAR(TO_TIMESTAMP(A.STARTDATE || A.STARTTIME, 'YYYYMMDDHH24MISS'),
'YYYY/MM/DD HH24:MI:SS') START_TIME,
TO_VARCHAR(TO_TIMESTAMP(A.ENDDATE || A.ENDTIME, 'YYYYMMDDHH24MISS'),
'YYYY/MM/DD HH24:MI:SS') END_TIME,
( SELECT MAX(EXTRELEASE) FROM CVERS C WHERE C.COMPONENT = A.ADDONID ) SP_LEVEL,
BI.SKIP_PREVIOUS_RELEASES,
BI.SP_LEVEL BI_SP_LEVEL
FROM
( SELECT /* Modification section */
'%' COMPONENT,
'%' RELEASE,
'%' SP_LEVEL,
'%' DESCRIPTION,
'X' SKIP_PREVIOUS_RELEASES,
'X' EXCLUDE_SUB_COMPONENTS
FROM
DUMMY
) BI,
AVERS A
WHERE
A.ADDONID LIKE BI.COMPONENT AND
A.ADDONRL LIKE BI.RELEASE AND
A.PCOMMENT LIKE BI.DESCRIPTION AND
( BI.EXCLUDE_SUB_COMPONENTS = ' ' OR UPPER(SUBSTR(A.PCOMMENT, 1, 10)) NOT IN
('SUB COMPON', 'SUBCOMPONE') )
)
WHERE
( SKIP_PREVIOUS_RELEASES = ' ' OR ( LINE_NO = 1 AND COMPONENT IN ( SELECT
COMPONENT FROM CVERS ) ) ) AND
SP_LEVEL LIKE BI_SP_LEVEL
ORDER BY
COMPONENT,
RELEASE,
SP_LEVEL

You might also like