SAP SET_USAGE_REPORT Function Module for Maintenance of Set Usage in Reports









SET_USAGE_REPORT is a standard set usage report SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Maintenance of Set Usage in Reports 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 set usage report FM, simply by entering the name SET_USAGE_REPORT into the relevant SAP transaction such as SE37 or SE38.

Function Group: RGSU
Program Name: SAPLRGSU
Main Program: SAPLRGSU
Appliation area: G
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function SET_USAGE_REPORT 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 'SET_USAGE_REPORT'"Maintenance of Set Usage in Reports
EXPORTING
* CLIENT = "Client
IN_FUNCTION = "Insert, Delete, Delete All (I/D/A)
IN_LIB = "Library
IN_RNAME = "Report
IN_SEQNR = "Number
IN_TYP = "L(Line)/C(Column)/S(Selection)
SET_ID = "Set Used
* SET_TABLE = ' ' "Table of Set Used

IMPORTING
REFERENCE_CREATED = "'X': Where-Used List was Written
.



IMPORTING Parameters details for SET_USAGE_REPORT

CLIENT - Client

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

IN_FUNCTION - Insert, Delete, Delete All (I/D/A)

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

IN_LIB - Library

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

IN_RNAME - Report

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

IN_SEQNR - Number

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

IN_TYP - L(Line)/C(Column)/S(Selection)

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

SET_ID - Set Used

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

SET_TABLE - Table of Set Used

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

EXPORTING Parameters details for SET_USAGE_REPORT

REFERENCE_CREATED - 'X': Where-Used List was Written

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

Copy and paste ABAP code example for SET_USAGE_REPORT 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_client  TYPE SY-MANDT, "   
lv_reference_created  TYPE SY-DATAR, "   
lv_in_function  TYPE C, "   
lv_in_lib  TYPE C, "   
lv_in_rname  TYPE C, "   
lv_in_seqnr  TYPE SIMPLE, "   
lv_in_typ  TYPE T801M-RC, "   
lv_set_id  TYPE C, "   
lv_set_table  TYPE SETHIER-TABNAME. "   SPACE

  CALL FUNCTION 'SET_USAGE_REPORT'  "Maintenance of Set Usage in Reports
    EXPORTING
         CLIENT = lv_client
         IN_FUNCTION = lv_in_function
         IN_LIB = lv_in_lib
         IN_RNAME = lv_in_rname
         IN_SEQNR = lv_in_seqnr
         IN_TYP = lv_in_typ
         SET_ID = lv_set_id
         SET_TABLE = lv_set_table
    IMPORTING
         REFERENCE_CREATED = lv_reference_created
. " SET_USAGE_REPORT




ABAP code using 7.40 inline data declarations to call FM SET_USAGE_REPORT

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 MANDT FROM SY INTO @DATA(ld_client).
 
"SELECT single DATAR FROM SY INTO @DATA(ld_reference_created).
 
 
 
 
 
"SELECT single RC FROM T801M INTO @DATA(ld_in_typ).
 
 
"SELECT single TABNAME FROM SETHIER INTO @DATA(ld_set_table).
DATA(ld_set_table) = ' '.
 


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!