SAP UPG_GET_UPGRADE_INFO Function Module for Read Administration Information for Upgrades in System
UPG_GET_UPGRADE_INFO is a standard upg get upgrade info SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Read Administration Information for Upgrades in System processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for upg get upgrade info FM, simply by entering the name UPG_GET_UPGRADE_INFO into the relevant SAP transaction such as SE37 or SE38.
Function Group: SUGS
Program Name: SAPLSUGS
Main Program: SAPLSUGS
Appliation area: S
Release date: 12-May-1999
Mode(Normal, Remote etc): Normal Function Module
Update:
Function UPG_GET_UPGRADE_INFO pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'UPG_GET_UPGRADE_INFO'"Read Administration Information for Upgrades in System.
EXPORTING
* IV_COMPONENT = '*' "Component for which is to be read (without '*')
* IV_NEWRELEASE = ' ' "Target release of the upgrade(s)
* IV_UPGTYPE = '*' "Upgrade type (see SUGS_FPARA-UPGTYPE)
* IV_READMODE = 'LST' "Read mode (see SUGS_FPARA-SUGSUPGMOD)
* IV_COMP_SELECT = 'X' "Only existing (X) or all (A) components
* IV_BUFFERED = ' ' "Read using table buffer (X) or without table buffer
* IV_AVERS_SELECT = ' ' "Read additional AVERS entries (X)
IMPORTING
EV_UPGCNT = "Return: Number of entries in TT_UPGINFO
TABLES
TT_UPGINFO = "Return table for information that has been read
EXCEPTIONS
READMODE_UNKNOWN = 1 COMPONENT_NOT_ACTIVE = 2 AMBIGIOUS_ENTRIES = 3 NO_UPGRADE_ACTIVE = 4
IMPORTING Parameters details for UPG_GET_UPGRADE_INFO
IV_COMPONENT - Component for which is to be read (without '*')
Data type: UVERS-COMPONENTDefault: '*'
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_NEWRELEASE - Target release of the upgrade(s)
Data type: UVERS-NEWRELEASEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_UPGTYPE - Upgrade type (see SUGS_FPARA-UPGTYPE)
Data type: SUGS_FPARA-UPGTYPEDefault: '*'
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_READMODE - Read mode (see SUGS_FPARA-SUGSUPGMOD)
Data type: SUGS_FPARA-MODEGETUPGDefault: 'LST'
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_COMP_SELECT - Only existing (X) or all (A) components
Data type: SUGS_FPARA-INCLGETUPGDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_BUFFERED - Read using table buffer (X) or without table buffer
Data type: SUGS_FPARA-BOOLDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_AVERS_SELECT - Read additional AVERS entries (X)
Data type: SUGS_FPARA-BOOLDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for UPG_GET_UPGRADE_INFO
EV_UPGCNT - Return: Number of entries in TT_UPGINFO
Data type: SY-DBCNTOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for UPG_GET_UPGRADE_INFO
TT_UPGINFO - Return table for information that has been read
Data type: UVERSOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
READMODE_UNKNOWN - Read mode is unknown
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
COMPONENT_NOT_ACTIVE - IV_COMPONENT no longer exists in this system
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
AMBIGIOUS_ENTRIES - For >= 1 component, > 1 current upgrade has been found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_UPGRADE_ACTIVE - No active upgrade was found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for UPG_GET_UPGRADE_INFO Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.DATA: | ||||
lv_ev_upgcnt | TYPE SY-DBCNT, " | |||
lt_tt_upginfo | TYPE STANDARD TABLE OF UVERS, " | |||
lv_iv_component | TYPE UVERS-COMPONENT, " '*' | |||
lv_readmode_unknown | TYPE UVERS, " | |||
lv_iv_newrelease | TYPE UVERS-NEWRELEASE, " SPACE | |||
lv_component_not_active | TYPE UVERS, " | |||
lv_iv_upgtype | TYPE SUGS_FPARA-UPGTYPE, " '*' | |||
lv_ambigious_entries | TYPE SUGS_FPARA, " | |||
lv_iv_readmode | TYPE SUGS_FPARA-MODEGETUPG, " 'LST' | |||
lv_no_upgrade_active | TYPE SUGS_FPARA, " | |||
lv_iv_comp_select | TYPE SUGS_FPARA-INCLGETUPG, " 'X' | |||
lv_iv_buffered | TYPE SUGS_FPARA-BOOL, " SPACE | |||
lv_iv_avers_select | TYPE SUGS_FPARA-BOOL. " SPACE |
  CALL FUNCTION 'UPG_GET_UPGRADE_INFO' "Read Administration Information for Upgrades in System |
EXPORTING | ||
IV_COMPONENT | = lv_iv_component | |
IV_NEWRELEASE | = lv_iv_newrelease | |
IV_UPGTYPE | = lv_iv_upgtype | |
IV_READMODE | = lv_iv_readmode | |
IV_COMP_SELECT | = lv_iv_comp_select | |
IV_BUFFERED | = lv_iv_buffered | |
IV_AVERS_SELECT | = lv_iv_avers_select | |
IMPORTING | ||
EV_UPGCNT | = lv_ev_upgcnt | |
TABLES | ||
TT_UPGINFO | = lt_tt_upginfo | |
EXCEPTIONS | ||
READMODE_UNKNOWN = 1 | ||
COMPONENT_NOT_ACTIVE = 2 | ||
AMBIGIOUS_ENTRIES = 3 | ||
NO_UPGRADE_ACTIVE = 4 | ||
. " UPG_GET_UPGRADE_INFO |
ABAP code using 7.40 inline data declarations to call FM UPG_GET_UPGRADE_INFO
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8."SELECT single DBCNT FROM SY INTO @DATA(ld_ev_upgcnt). | ||||
"SELECT single COMPONENT FROM UVERS INTO @DATA(ld_iv_component). | ||||
DATA(ld_iv_component) | = '*'. | |||
"SELECT single NEWRELEASE FROM UVERS INTO @DATA(ld_iv_newrelease). | ||||
DATA(ld_iv_newrelease) | = ' '. | |||
"SELECT single UPGTYPE FROM SUGS_FPARA INTO @DATA(ld_iv_upgtype). | ||||
DATA(ld_iv_upgtype) | = '*'. | |||
"SELECT single MODEGETUPG FROM SUGS_FPARA INTO @DATA(ld_iv_readmode). | ||||
DATA(ld_iv_readmode) | = 'LST'. | |||
"SELECT single INCLGETUPG FROM SUGS_FPARA INTO @DATA(ld_iv_comp_select). | ||||
DATA(ld_iv_comp_select) | = 'X'. | |||
"SELECT single BOOL FROM SUGS_FPARA INTO @DATA(ld_iv_buffered). | ||||
DATA(ld_iv_buffered) | = ' '. | |||
"SELECT single BOOL FROM SUGS_FPARA INTO @DATA(ld_iv_avers_select). | ||||
DATA(ld_iv_avers_select) | = ' '. | |||
Search for further information about these or an SAP related objects