SAP G_SET_SEARCH_FOR_OVERLAPS Function Module for Search for Value Overlapping between Several Sets









G_SET_SEARCH_FOR_OVERLAPS is a standard g set search for overlaps SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Search for Value Overlapping between Several Sets 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 g set search for overlaps FM, simply by entering the name G_SET_SEARCH_FOR_OVERLAPS into the relevant SAP transaction such as SE37 or SE38.

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



Function G_SET_SEARCH_FOR_OVERLAPS 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 'G_SET_SEARCH_FOR_OVERLAPS'"Search for Value Overlapping between Several Sets
EXPORTING
* TABNAME = "Caution: Beginning 4.0 is not Analyzed

IMPORTING
OVERLAPINDEX1 = "Index of 1st SETLIST Entry with Overlapping
OVERLAPINDEX2 = "Index of 2nd SETLIST Entry with Overlapping
OVERLAPSETCLASS1 = "
OVERLAPSETCLASS2 = "
OVERLAPSETNAME1 = "Name of 1st Set with Overlapping
OVERLAPSETNAME2 = "Name of 2nd Set with Overlapping
OVERLAP_FROMVALUE = "Lower Limit of the Overlapping Interval
OVERLAP_TOVALUE = "Upper limit of the overlapping interval

TABLES
SETLIST = "Table of Sets to be Examined

EXCEPTIONS
DIFFERENT_FIELDS = 1 NO_OVERLAP_FOUND = 2 SET_NOT_FOUND = 3 WRONG_SET_TYPE = 4 ERROR_REPLACING_VARIABLES = 5
.



IMPORTING Parameters details for G_SET_SEARCH_FOR_OVERLAPS

TABNAME - Caution: Beginning 4.0 is not Analyzed

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

EXPORTING Parameters details for G_SET_SEARCH_FOR_OVERLAPS

OVERLAPINDEX1 - Index of 1st SETLIST Entry with Overlapping

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

OVERLAPINDEX2 - Index of 2nd SETLIST Entry with Overlapping

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

OVERLAPSETCLASS1 -

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

OVERLAPSETCLASS2 -

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

OVERLAPSETNAME1 - Name of 1st Set with Overlapping

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

OVERLAPSETNAME2 - Name of 2nd Set with Overlapping

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

OVERLAP_FROMVALUE - Lower Limit of the Overlapping Interval

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

OVERLAP_TOVALUE - Upper limit of the overlapping interval

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

TABLES Parameters details for G_SET_SEARCH_FOR_OVERLAPS

SETLIST - Table of Sets to be Examined

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

EXCEPTIONS details

DIFFERENT_FIELDS - Sets in SETLIST have Different Fields

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

NO_OVERLAP_FOUND -

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

SET_NOT_FOUND - Set does not exist in SETLIST

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

WRONG_SET_TYPE - Set in SETLIST is Multi Set or Data Set

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

ERROR_REPLACING_VARIABLES - Error Occurred During Value Variable Replace

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

Copy and paste ABAP code example for G_SET_SEARCH_FOR_OVERLAPS 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:
lt_setlist  TYPE STANDARD TABLE OF SETLIST, "   
lv_tabname  TYPE RGSBS-TABLE, "   
lv_overlapindex1  TYPE SY-TABIX, "   
lv_different_fields  TYPE SY, "   
lv_overlapindex2  TYPE SY-TABIX, "   
lv_no_overlap_found  TYPE SY, "   
lv_set_not_found  TYPE SY, "   
lv_overlapsetclass1  TYPE RGSBS-CLASS, "   
lv_wrong_set_type  TYPE RGSBS, "   
lv_overlapsetclass2  TYPE RGSBS-CLASS, "   
lv_overlapsetname1  TYPE RGSBS-SETNR, "   
lv_error_replacing_variables  TYPE RGSBS, "   
lv_overlapsetname2  TYPE RGSBS-SETNR, "   
lv_overlap_fromvalue  TYPE RGSBV-FROM, "   
lv_overlap_tovalue  TYPE RGSBV-TO. "   

  CALL FUNCTION 'G_SET_SEARCH_FOR_OVERLAPS'  "Search for Value Overlapping between Several Sets
    EXPORTING
         TABNAME = lv_tabname
    IMPORTING
         OVERLAPINDEX1 = lv_overlapindex1
         OVERLAPINDEX2 = lv_overlapindex2
         OVERLAPSETCLASS1 = lv_overlapsetclass1
         OVERLAPSETCLASS2 = lv_overlapsetclass2
         OVERLAPSETNAME1 = lv_overlapsetname1
         OVERLAPSETNAME2 = lv_overlapsetname2
         OVERLAP_FROMVALUE = lv_overlap_fromvalue
         OVERLAP_TOVALUE = lv_overlap_tovalue
    TABLES
         SETLIST = lt_setlist
    EXCEPTIONS
        DIFFERENT_FIELDS = 1
        NO_OVERLAP_FOUND = 2
        SET_NOT_FOUND = 3
        WRONG_SET_TYPE = 4
        ERROR_REPLACING_VARIABLES = 5
. " G_SET_SEARCH_FOR_OVERLAPS




ABAP code using 7.40 inline data declarations to call FM G_SET_SEARCH_FOR_OVERLAPS

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 TABLE FROM RGSBS INTO @DATA(ld_tabname).
 
"SELECT single TABIX FROM SY INTO @DATA(ld_overlapindex1).
 
 
"SELECT single TABIX FROM SY INTO @DATA(ld_overlapindex2).
 
 
 
"SELECT single CLASS FROM RGSBS INTO @DATA(ld_overlapsetclass1).
 
 
"SELECT single CLASS FROM RGSBS INTO @DATA(ld_overlapsetclass2).
 
"SELECT single SETNR FROM RGSBS INTO @DATA(ld_overlapsetname1).
 
 
"SELECT single SETNR FROM RGSBS INTO @DATA(ld_overlapsetname2).
 
"SELECT single FROM FROM RGSBV INTO @DATA(ld_overlap_fromvalue).
 
"SELECT single TO FROM RGSBV INTO @DATA(ld_overlap_tovalue).
 


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!