SAP G_SET_IMPORT Function Module for Import of Set manager Structures from Table INDX or Global Memory









G_SET_IMPORT is a standard g set import SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Import of Set manager Structures from Table INDX or Global Memory 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 import FM, simply by entering the name G_SET_IMPORT into the relevant SAP transaction such as SE37 or SE38.

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



Function G_SET_IMPORT 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_IMPORT'"Import of Set manager Structures from Table INDX or Global Memory
EXPORTING
SRTFD = "Key Field for INDX or Memory
* IMPORT_FROM_MEMORY = ' ' "'XÄ --> Import from Memory instead of Table INDX
* GREP_KEY = "
* GRRT_KEY = "Key for Table GRRT

EXCEPTIONS
IMPORT_NOT_SUCCESSFUL = 1 EVALERROR_FIELD_TOO_SHORT = 2 EVALERROR_CONVERSION_FAILED = 3 EVALERROR_ARITHMETIC_EXCEPTION = 4 FROM_GT_TO_DUE_TO_VARIABLE = 5
.



IMPORTING Parameters details for G_SET_IMPORT

SRTFD - Key Field for INDX or Memory

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

IMPORT_FROM_MEMORY - 'XÄ --> Import from Memory instead of Table INDX

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

GREP_KEY -

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

GRRT_KEY - Key for Table GRRT

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

EXCEPTIONS details

IMPORT_NOT_SUCCESSFUL - Import was not possible

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

EVALERROR_FIELD_TOO_SHORT - Formula Variable Evaluation: Results too Long

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

EVALERROR_CONVERSION_FAILED - Formula Variable Evaluation: Conversion Error

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

EVALERROR_ARITHMETIC_EXCEPTION - Formula Variable Evaluation: Arithemtic Error

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

FROM_GT_TO_DUE_TO_VARIABLE - After Variable Replacement is From Value > To Value

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

Copy and paste ABAP code example for G_SET_IMPORT 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_srtfd  TYPE INDX-SRTFD, "   
lv_import_not_successful  TYPE INDX, "   
lv_import_from_memory  TYPE C, "   SPACE
lv_evalerror_field_too_short  TYPE C, "   
lv_grep_key  TYPE GREP_KEY, "   
lv_evalerror_conversion_failed  TYPE GREP_KEY, "   
lv_grrt_key  TYPE GRRT_KEY, "   
lv_evalerror_arithmetic_exception  TYPE GRRT_KEY, "   
lv_from_gt_to_due_to_variable  TYPE GRRT_KEY. "   

  CALL FUNCTION 'G_SET_IMPORT'  "Import of Set manager Structures from Table INDX or Global Memory
    EXPORTING
         SRTFD = lv_srtfd
         IMPORT_FROM_MEMORY = lv_import_from_memory
         GREP_KEY = lv_grep_key
         GRRT_KEY = lv_grrt_key
    EXCEPTIONS
        IMPORT_NOT_SUCCESSFUL = 1
        EVALERROR_FIELD_TOO_SHORT = 2
        EVALERROR_CONVERSION_FAILED = 3
        EVALERROR_ARITHMETIC_EXCEPTION = 4
        FROM_GT_TO_DUE_TO_VARIABLE = 5
. " G_SET_IMPORT




ABAP code using 7.40 inline data declarations to call FM G_SET_IMPORT

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 SRTFD FROM INDX INTO @DATA(ld_srtfd).
 
 
DATA(ld_import_from_memory) = ' '.
 
 
 
 
 
 
 


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!