G_GENERATE_SINGLE_SET is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.
See here to view full function module documentation and code listing, simply by entering the name G_GENERATE_SINGLE_SET into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
GSGF
Released Date:
Not Released
Processing type: Normal fucntion module
CALL FUNCTION 'G_GENERATE_SINGLE_SET' "
EXPORTING
* client = SPACE " sy-mandt Client in which set is to be created
* langu = SY-LANGU " sy-langu Language of text
set_header = " rgsbs Header of the S set
* ref_set = SPACE " rgsbs-setnr Name of reference set
* tolerate_ambiguity = SPACE " sy-datar 'X': Unambiguity indicator ignored
* nothing_changed = SPACE " sy-datar Internal use only (set not changed)
* flag_use_rgsbs_user = SPACE " sy-datar Internal use (take user from header)
* TABLES
* set_lines = " rgsb1 Table with set lines
* set_lines_basic = " rgsbv Table with values of single set
* formula_lines = " rgsbf Table with formulas for the values
EXCEPTIONS
NOT_UNIQUE = 1 " Set is not unique, although required
OLD_SET_HAS_WRONG_DATA_ELEMENT = 2 " Set with same name but different data element
OLD_SET_HAS_WRONG_TYPE = 3 " Set with same name but different type
SUBSET_DOES_NOT_EXIST = 4 " Subset used does not exist
SET_IS_RECURSIVE = 5 " Subset used contains the highest set
TEMPORARY_IN_PERMANENT_SET = 6 " Set contains temporary set
SETNAME_TOO_LONG = 7 " Set name too long for temporary set
SUBSET_HAS_WRONG_DATA_ELEMENT = 8 " Subset used has a different set data element
SUBSET_HAS_WRONG_CLASS = 9 " Subset used has a different class
TABLE_OR_FIELDNAME_MISSING = 10 " Table or field name has not been specified
SUBSET_HAS_WRONG_TYPE = 11 " Subset used has incorrect type (M/D)
VARIABLE_DOES_NOT_EXIST = 12 " Variable used does not exist
. " G_GENERATE_SINGLE_SET
The ABAP code below is a full code listing to execute function module G_GENERATE_SINGLE_SET including all data declarations. The code uses 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 original method of declaring data variables up front. 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).
| it_set_lines | TYPE STANDARD TABLE OF RGSB1,"TABLES PARAM |
| wa_set_lines | LIKE LINE OF it_set_lines , |
| it_set_lines_basic | TYPE STANDARD TABLE OF RGSBV,"TABLES PARAM |
| wa_set_lines_basic | LIKE LINE OF it_set_lines_basic , |
| it_formula_lines | TYPE STANDARD TABLE OF RGSBF,"TABLES PARAM |
| wa_formula_lines | LIKE LINE OF it_formula_lines . |
The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.
DATA:
| it_set_lines | TYPE STANDARD TABLE OF RGSB1 , |
| wa_set_lines | LIKE LINE OF it_set_lines, |
| ld_client | TYPE SY-MANDT , |
| ld_langu | TYPE SY-LANGU , |
| it_set_lines_basic | TYPE STANDARD TABLE OF RGSBV , |
| wa_set_lines_basic | LIKE LINE OF it_set_lines_basic, |
| ld_set_header | TYPE RGSBS , |
| it_formula_lines | TYPE STANDARD TABLE OF RGSBF , |
| wa_formula_lines | LIKE LINE OF it_formula_lines, |
| ld_ref_set | TYPE RGSBS-SETNR , |
| ld_tolerate_ambiguity | TYPE SY-DATAR , |
| ld_nothing_changed | TYPE SY-DATAR , |
| ld_flag_use_rgsbs_user | TYPE SY-DATAR . |
The function module G_GENERATE_SINGLE_SET creates a single set or
changes an existing one.
...See here for full SAP fm documentation
Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name G_GENERATE_SINGLE_SET or its description.