SAP SET_BUILD Function Module for Collect Objects Along Evaluation Path in Internal Object Table









SET_BUILD is a standard set build SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Collect Objects Along Evaluation Path in Internal Object Table 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 build FM, simply by entering the name SET_BUILD into the relevant SAP transaction such as SE37 or SE38.

Function Group: RHAS
Program Name: SAPLRHAS
Main Program: SAPLRHAS
Appliation area: H
Release date: 03-Sep-1999
Mode(Normal, Remote etc): Normal Function Module
Update:



Function SET_BUILD 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_BUILD'"Collect Objects Along Evaluation Path in Internal Object Table
EXPORTING
PLVAR = "Plan version
* SFLAG = 'X' "Cut indicator
* RECURS = ' ' "Recursiveness check: 'X' --> yes, '' --> no
* 77AW_INT = ' ' "Switch: Read Path in T77AW('') or in 77AW(X)
* AUTHY = 'X' "Authorization Indicator
* AUTHY_BASE = '$' "
* SET_ID = ' ' "
* COTYP = ' ' "
* DFLAG = "
* BUFFER_MODE = ' ' "
OTYPE = "Object type
OBJID = "Object Number
* WEGID = ' ' "Evaluation Path
* SVECT = '1' "Status vector
* SBEGD = SY-DATUM "Start date
* SENDD = SY-DATUM "End Date
* ACTIV = ' ' "Status Overlap Indicator
* TDEPTH = 0 "Technical depth

IMPORTING
SET_ID = "
OBJ_COUNT = "

EXCEPTIONS
ROOT_NOT_FOUND = 1 WEGID_NOT_FOUND = 2 SET_ID_NOT_FOUND = 3
.



IMPORTING Parameters details for SET_BUILD

PLVAR - Plan version

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

SFLAG - Cut indicator

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

RECURS - Recursiveness check: 'X' --> yes, '' --> no

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

77AW_INT - Switch: Read Path in T77AW('') or in 77AW(X)

Data type: HRRHAS-77AW_INT
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

AUTHY - Authorization Indicator

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

AUTHY_BASE -

Data type: HRRHAS-AUTHY_BASE
Default: '$'
Optional: Yes
Call by Reference: No ( called with pass by value option)

SET_ID -

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

COTYP -

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

DFLAG -

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

BUFFER_MODE -

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

OTYPE - Object type

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

OBJID - Object Number

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

WEGID - Evaluation Path

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

SVECT - Status vector

Data type: HRRHAS-SVECT
Default: '1'
Optional: Yes
Call by Reference: No ( called with pass by value option)

SBEGD - Start date

Data type: HRRHAS-SBEGD
Default: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)

SENDD - End Date

Data type: HRRHAS-SENDD
Default: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)

ACTIV - Status Overlap Indicator

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

TDEPTH - Technical depth

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

EXPORTING Parameters details for SET_BUILD

SET_ID -

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

OBJ_COUNT -

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

EXCEPTIONS details

ROOT_NOT_FOUND - Root not available

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

WEGID_NOT_FOUND - Evaluation path does not exist

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

SET_ID_NOT_FOUND -

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

Copy and paste ABAP code example for SET_BUILD 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_plvar  TYPE HRRHAS-PLVAR, "   
lv_set_id  TYPE HRRHAS-SET_ID, "   
lv_root_not_found  TYPE HRRHAS, "   
lv_sflag  TYPE HRRHAS-SFLAG, "   'X'
lv_recurs  TYPE HRRHAS-RECURS, "   SPACE
lv_77aw_int  TYPE HRRHAS-77AW_INT, "   SPACE
lv_authy  TYPE HRRHAS-AUTHY, "   'X'
lv_authy_base  TYPE HRRHAS-AUTHY_BASE, "   '$'
lv_set_id  TYPE HRRHAS-SET_ID, "   SPACE
lv_cotyp  TYPE HRRHAS-COTYP, "   SPACE
lv_dflag  TYPE HRRHAS, "   
lv_buffer_mode  TYPE HRRHAS, "   SPACE
lv_otype  TYPE HRRHAS-OTYPE, "   
lv_obj_count  TYPE GDSTR-CSTRU, "   
lv_wegid_not_found  TYPE GDSTR, "   
lv_objid  TYPE GDSTR, "   
lv_set_id_not_found  TYPE GDSTR, "   
lv_wegid  TYPE HRRHAS-WEGID, "   SPACE
lv_svect  TYPE HRRHAS-SVECT, "   '1'
lv_sbegd  TYPE HRRHAS-SBEGD, "   SY-DATUM
lv_sendd  TYPE HRRHAS-SENDD, "   SY-DATUM
lv_activ  TYPE HRRHAS-ACTIV, "   SPACE
lv_tdepth  TYPE HRRHAS-TDEPTH. "   0

  CALL FUNCTION 'SET_BUILD'  "Collect Objects Along Evaluation Path in Internal Object Table
    EXPORTING
         PLVAR = lv_plvar
         SFLAG = lv_sflag
         RECURS = lv_recurs
         77AW_INT = lv_77aw_int
         AUTHY = lv_authy
         AUTHY_BASE = lv_authy_base
         SET_ID = lv_set_id
         COTYP = lv_cotyp
         DFLAG = lv_dflag
         BUFFER_MODE = lv_buffer_mode
         OTYPE = lv_otype
         OBJID = lv_objid
         WEGID = lv_wegid
         SVECT = lv_svect
         SBEGD = lv_sbegd
         SENDD = lv_sendd
         ACTIV = lv_activ
         TDEPTH = lv_tdepth
    IMPORTING
         SET_ID = lv_set_id
         OBJ_COUNT = lv_obj_count
    EXCEPTIONS
        ROOT_NOT_FOUND = 1
        WEGID_NOT_FOUND = 2
        SET_ID_NOT_FOUND = 3
. " SET_BUILD




ABAP code using 7.40 inline data declarations to call FM SET_BUILD

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 PLVAR FROM HRRHAS INTO @DATA(ld_plvar).
 
"SELECT single SET_ID FROM HRRHAS INTO @DATA(ld_set_id).
 
 
"SELECT single SFLAG FROM HRRHAS INTO @DATA(ld_sflag).
DATA(ld_sflag) = 'X'.
 
"SELECT single RECURS FROM HRRHAS INTO @DATA(ld_recurs).
DATA(ld_recurs) = ' '.
 
"SELECT single 77AW_INT FROM HRRHAS INTO @DATA(ld_77aw_int).
DATA(ld_77aw_int) = ' '.
 
"SELECT single AUTHY FROM HRRHAS INTO @DATA(ld_authy).
DATA(ld_authy) = 'X'.
 
"SELECT single AUTHY_BASE FROM HRRHAS INTO @DATA(ld_authy_base).
DATA(ld_authy_base) = '$'.
 
"SELECT single SET_ID FROM HRRHAS INTO @DATA(ld_set_id).
DATA(ld_set_id) = ' '.
 
"SELECT single COTYP FROM HRRHAS INTO @DATA(ld_cotyp).
DATA(ld_cotyp) = ' '.
 
 
DATA(ld_buffer_mode) = ' '.
 
"SELECT single OTYPE FROM HRRHAS INTO @DATA(ld_otype).
 
"SELECT single CSTRU FROM GDSTR INTO @DATA(ld_obj_count).
 
 
 
 
"SELECT single WEGID FROM HRRHAS INTO @DATA(ld_wegid).
DATA(ld_wegid) = ' '.
 
"SELECT single SVECT FROM HRRHAS INTO @DATA(ld_svect).
DATA(ld_svect) = '1'.
 
"SELECT single SBEGD FROM HRRHAS INTO @DATA(ld_sbegd).
DATA(ld_sbegd) = SY-DATUM.
 
"SELECT single SENDD FROM HRRHAS INTO @DATA(ld_sendd).
DATA(ld_sendd) = SY-DATUM.
 
"SELECT single ACTIV FROM HRRHAS INTO @DATA(ld_activ).
DATA(ld_activ) = ' '.
 
"SELECT single TDEPTH FROM HRRHAS INTO @DATA(ld_tdepth).
 


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!