SAP Function Modules

FMRPF_SQL_GET_CLAUSE SAP Function module - Get SQL Clauses (Standard Selection)







FMRPF_SQL_GET_CLAUSE 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 FMRPF_SQL_GET_CLAUSE into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: FMRPF_PUBLIC
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM FMRPF_SQL_GET_CLAUSE - FMRPF SQL GET CLAUSE





CALL FUNCTION 'FMRPF_SQL_GET_CLAUSE' "Get SQL Clauses (Standard Selection)
  EXPORTING
    i_reporting_structure =     " fmrpf_reporting_structure  FMRPF Reporting Structure
    it_seltab =                 " rsds_frange_t
    it_and_seltab =             " fmrpf_trange_t  Table of Table Ranges
    it_column_short =           " fmrpf_column_short_t  Table of Columns in Report Output
    it_column_long =            " fmrpf_column_long_t  Table of Columns in Report Output
    i_tabname =                 " tabname       Table Name
*   i_sql_alias =               " char2         SQL alias for table (add '~' too!)
    ut_fieldmap =               " fmrpf_fieldmap_t  Field Mapping: Reporting Structure x DB Table
  IMPORTING
    et_select =                 " table
    et_group_by =               " table
    et_trange =                 " rsds_trange
    et_trange_and =             " rsds_trange
    .  "  FMRPF_SQL_GET_CLAUSE

ABAP code example for Function Module FMRPF_SQL_GET_CLAUSE





The ABAP code below is a full code listing to execute function module FMRPF_SQL_GET_CLAUSE 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).

DATA:
ld_et_select  TYPE TABLE ,
ld_et_group_by  TYPE TABLE ,
ld_et_trange  TYPE RSDS_TRANGE ,
ld_et_trange_and  TYPE RSDS_TRANGE .

DATA(ld_i_reporting_structure) = 'Check type of data required'.
DATA(ld_it_seltab) = 'Check type of data required'.
DATA(ld_it_and_seltab) = 'Check type of data required'.
DATA(ld_it_column_short) = 'Check type of data required'.
DATA(ld_it_column_long) = 'Check type of data required'.
DATA(ld_i_tabname) = 'Check type of data required'.
DATA(ld_i_sql_alias) = 'Check type of data required'.
DATA(ld_ut_fieldmap) = 'Check type of data required'. . CALL FUNCTION 'FMRPF_SQL_GET_CLAUSE' EXPORTING i_reporting_structure = ld_i_reporting_structure it_seltab = ld_it_seltab it_and_seltab = ld_it_and_seltab it_column_short = ld_it_column_short it_column_long = ld_it_column_long i_tabname = ld_i_tabname * i_sql_alias = ld_i_sql_alias ut_fieldmap = ld_ut_fieldmap IMPORTING et_select = ld_et_select et_group_by = ld_et_group_by et_trange = ld_et_trange et_trange_and = ld_et_trange_and . " FMRPF_SQL_GET_CLAUSE
IF SY-SUBRC EQ 0. "All OK ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

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:
ld_et_select  TYPE TABLE ,
ld_i_reporting_structure  TYPE FMRPF_REPORTING_STRUCTURE ,
ld_et_group_by  TYPE TABLE ,
ld_it_seltab  TYPE RSDS_FRANGE_T ,
ld_et_trange  TYPE RSDS_TRANGE ,
ld_it_and_seltab  TYPE FMRPF_TRANGE_T ,
ld_et_trange_and  TYPE RSDS_TRANGE ,
ld_it_column_short  TYPE FMRPF_COLUMN_SHORT_T ,
ld_it_column_long  TYPE FMRPF_COLUMN_LONG_T ,
ld_i_tabname  TYPE TABNAME ,
ld_i_sql_alias  TYPE CHAR2 ,
ld_ut_fieldmap  TYPE FMRPF_FIELDMAP_T .

ld_i_reporting_structure = 'Check type of data required'.
ld_it_seltab = 'Check type of data required'.
ld_it_and_seltab = 'Check type of data required'.
ld_it_column_short = 'Check type of data required'.
ld_it_column_long = 'Check type of data required'.
ld_i_tabname = 'Check type of data required'.
ld_i_sql_alias = 'Check type of data required'.
ld_ut_fieldmap = 'Check type of data required'.

Contribute (Add Comments)

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 FMRPF_SQL_GET_CLAUSE or its description.