SAP SPAM_READ_PAT03 Function Module for









SPAM_READ_PAT03 is a standard spam read pat03 SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 spam read pat03 FM, simply by entering the name SPAM_READ_PAT03 into the relevant SAP transaction such as SE37 or SE38.

Function Group: SPAM
Program Name: SAPLSPAM
Main Program: SAPLSPAM
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function SPAM_READ_PAT03 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 'SPAM_READ_PAT03'"
EXPORTING
* IV_PATCH_NAME = '*' "Support Package name
* IV_RSTLAN_IO_MODE = ' ' "
* IV_PATCH_TYPE = '*' "Support Package Type
* IV_BASE_RELEASE = 'CURR' "Basis Release
* IV_COMPONENT_ID = 'CURR' "
* IV_COMPONENT_RELEASE = 'CURR' "Component release
* IV_ADDON_ID = 'CURR' "
* IV_ADDON_RELEASE = 'CURR' "Add-on Release
* IV_ACTIV = 'X' "
* IV_ONLY_SUPP_PACKS = 'X' "

IMPORTING
EV_PAT03_ENTRIES = "

TABLES
* TT_PAT03_SELECTED = "

EXCEPTIONS
WRONG_RELEASE_STRING = 1 WRONG_PATCH_TYPE = 2 NO_COMPONENT_AVAILABLE = 3 WRONG_COMPONENT_ID_RELEASE = 4 WRONG_ADDON_ID_RELEASE = 5
.



IMPORTING Parameters details for SPAM_READ_PAT03

IV_PATCH_NAME - Support Package name

Data type: PAT03-PATCH
Default: '*'
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_RSTLAN_IO_MODE -

Data type: C
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_PATCH_TYPE - Support Package Type

Data type: PAT03-PATCH_TYPE
Default: '*'
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_BASE_RELEASE - Basis Release

Data type: SY-SAPRL
Default: 'CURR'
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_COMPONENT_ID -

Data type: PAT03-COMPONENT
Default: 'CURR'
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_COMPONENT_RELEASE - Component release

Data type: PAT03-COMP_REL
Default: 'CURR'
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_ADDON_ID -

Data type: PAT03-ADDON_ID
Default: 'CURR'
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_ADDON_RELEASE - Add-on Release

Data type: PAT03-ADDON_REL
Default: 'CURR'
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_ACTIV -

Data type: PAT03-CONFIRMED
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_ONLY_SUPP_PACKS -

Data type: C
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for SPAM_READ_PAT03

EV_PAT03_ENTRIES -

Data type: SY-DBCNT
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for SPAM_READ_PAT03

TT_PAT03_SELECTED -

Data type: PAT03
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

WRONG_RELEASE_STRING -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

WRONG_PATCH_TYPE -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NO_COMPONENT_AVAILABLE - Component was not Found

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

WRONG_COMPONENT_ID_RELEASE -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

WRONG_ADDON_ID_RELEASE -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for SPAM_READ_PAT03 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_iv_patch_name  TYPE PAT03-PATCH, "   '*'
lv_ev_pat03_entries  TYPE SY-DBCNT, "   
lt_tt_pat03_selected  TYPE STANDARD TABLE OF PAT03, "   
lv_wrong_release_string  TYPE PAT03, "   
lv_iv_rstlan_io_mode  TYPE C, "   SPACE
lv_iv_patch_type  TYPE PAT03-PATCH_TYPE, "   '*'
lv_wrong_patch_type  TYPE PAT03, "   
lv_iv_base_release  TYPE SY-SAPRL, "   'CURR'
lv_no_component_available  TYPE SY, "   
lv_iv_component_id  TYPE PAT03-COMPONENT, "   'CURR'
lv_wrong_component_id_release  TYPE PAT03, "   
lv_iv_component_release  TYPE PAT03-COMP_REL, "   'CURR'
lv_wrong_addon_id_release  TYPE PAT03, "   
lv_iv_addon_id  TYPE PAT03-ADDON_ID, "   'CURR'
lv_iv_addon_release  TYPE PAT03-ADDON_REL, "   'CURR'
lv_iv_activ  TYPE PAT03-CONFIRMED, "   'X'
lv_iv_only_supp_packs  TYPE C. "   'X'

  CALL FUNCTION 'SPAM_READ_PAT03'  "
    EXPORTING
         IV_PATCH_NAME = lv_iv_patch_name
         IV_RSTLAN_IO_MODE = lv_iv_rstlan_io_mode
         IV_PATCH_TYPE = lv_iv_patch_type
         IV_BASE_RELEASE = lv_iv_base_release
         IV_COMPONENT_ID = lv_iv_component_id
         IV_COMPONENT_RELEASE = lv_iv_component_release
         IV_ADDON_ID = lv_iv_addon_id
         IV_ADDON_RELEASE = lv_iv_addon_release
         IV_ACTIV = lv_iv_activ
         IV_ONLY_SUPP_PACKS = lv_iv_only_supp_packs
    IMPORTING
         EV_PAT03_ENTRIES = lv_ev_pat03_entries
    TABLES
         TT_PAT03_SELECTED = lt_tt_pat03_selected
    EXCEPTIONS
        WRONG_RELEASE_STRING = 1
        WRONG_PATCH_TYPE = 2
        NO_COMPONENT_AVAILABLE = 3
        WRONG_COMPONENT_ID_RELEASE = 4
        WRONG_ADDON_ID_RELEASE = 5
. " SPAM_READ_PAT03




ABAP code using 7.40 inline data declarations to call FM SPAM_READ_PAT03

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 PATCH FROM PAT03 INTO @DATA(ld_iv_patch_name).
DATA(ld_iv_patch_name) = '*'.
 
"SELECT single DBCNT FROM SY INTO @DATA(ld_ev_pat03_entries).
 
 
 
DATA(ld_iv_rstlan_io_mode) = ' '.
 
"SELECT single PATCH_TYPE FROM PAT03 INTO @DATA(ld_iv_patch_type).
DATA(ld_iv_patch_type) = '*'.
 
 
"SELECT single SAPRL FROM SY INTO @DATA(ld_iv_base_release).
DATA(ld_iv_base_release) = 'CURR'.
 
 
"SELECT single COMPONENT FROM PAT03 INTO @DATA(ld_iv_component_id).
DATA(ld_iv_component_id) = 'CURR'.
 
 
"SELECT single COMP_REL FROM PAT03 INTO @DATA(ld_iv_component_release).
DATA(ld_iv_component_release) = 'CURR'.
 
 
"SELECT single ADDON_ID FROM PAT03 INTO @DATA(ld_iv_addon_id).
DATA(ld_iv_addon_id) = 'CURR'.
 
"SELECT single ADDON_REL FROM PAT03 INTO @DATA(ld_iv_addon_release).
DATA(ld_iv_addon_release) = 'CURR'.
 
"SELECT single CONFIRMED FROM PAT03 INTO @DATA(ld_iv_activ).
DATA(ld_iv_activ) = 'X'.
 
DATA(ld_iv_only_supp_packs) = 'X'.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!