SAP CACS_READ_DATA_SAMPLE Function Module for NOTRANSL: Provision: Datenbeschaffung; Beispiel für einen speziellen Daten
CACS_READ_DATA_SAMPLE is a standard cacs read data sample SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Provision: Datenbeschaffung; Beispiel für einen speziellen Daten 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 cacs read data sample FM, simply by entering the name CACS_READ_DATA_SAMPLE into the relevant SAP transaction such as SE37 or SE38.
Function Group: CACSIS_S
Program Name: SAPLCACSIS_S
Main Program: SAPLCACSIS_S
Appliation area: E
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CACS_READ_DATA_SAMPLE 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 'CACS_READ_DATA_SAMPLE'"NOTRANSL: Provision: Datenbeschaffung; Beispiel für einen speziellen Daten.
EXPORTING
RKB1X = "Application-specific fields in drill-down reporting
* S_FORM_NAME = "Name of ABAP form
* S_PROGRAM_NAME = "ABAP Program Name
* I_RECHERCHE = 'X' "Indicator: Object is Used for Drilldown
* I_BUILD_CONVEX_HULL = 'X' "Ind.: Apply Convex Maximum Number of Selection Criteria?
* I_OUTPUT_STRUCTURE = "Output Structure
* I_AUTH_CHECK = ' ' "Authorization Check?
TABLES
* SELECTED_FIELDS = "Table of Errors to be Selected
SELECTION_TABLE = "Selection Conditions Table
* ADD_SEL_TAB = "Structure of selection table for segment table/level
* SELECTED_HIERAS = "Table of hierarchies used
* E_CACS_EXTR_DATA = "DE-EN-LANG-SWITCH-NO-TRANSLATION
EXCEPTIONS
NO_RECORD_FOUND = 1
IMPORTING Parameters details for CACS_READ_DATA_SAMPLE
RKB1X - Application-specific fields in drill-down reporting
Data type: RKB1XOptional: No
Call by Reference: No ( called with pass by value option)
S_FORM_NAME - Name of ABAP form
Data type: DD27V-EFORMOptional: Yes
Call by Reference: No ( called with pass by value option)
S_PROGRAM_NAME - ABAP Program Name
Data type: RS38M-PROGRAMMOptional: Yes
Call by Reference: No ( called with pass by value option)
I_RECHERCHE - Indicator: Object is Used for Drilldown
Data type: CACSRECHFLAGDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_BUILD_CONVEX_HULL - Ind.: Apply Convex Maximum Number of Selection Criteria?
Data type: CACSHULLFLAGDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_OUTPUT_STRUCTURE - Output Structure
Data type: CACSOUTSTRUCTOptional: Yes
Call by Reference: No ( called with pass by value option)
I_AUTH_CHECK - Authorization Check?
Data type: CACSRECHFLAGDefault: ' '
Optional: No
Call by Reference: Yes
TABLES Parameters details for CACS_READ_DATA_SAMPLE
SELECTED_FIELDS - Table of Errors to be Selected
Data type: CFBSF01Optional: Yes
Call by Reference: No ( called with pass by value option)
SELECTION_TABLE - Selection Conditions Table
Data type: CEDSTOptional: No
Call by Reference: No ( called with pass by value option)
ADD_SEL_TAB - Structure of selection table for segment table/level
Data type: CEDSTOptional: Yes
Call by Reference: No ( called with pass by value option)
SELECTED_HIERAS - Table of hierarchies used
Data type: CFBSH01Optional: Yes
Call by Reference: No ( called with pass by value option)
E_CACS_EXTR_DATA - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_RECORD_FOUND - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CACS_READ_DATA_SAMPLE 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_rkb1x | TYPE RKB1X, " | |||
| lv_no_record_found | TYPE RKB1X, " | |||
| lt_selected_fields | TYPE STANDARD TABLE OF CFBSF01, " | |||
| lv_s_form_name | TYPE DD27V-EFORM, " | |||
| lt_selection_table | TYPE STANDARD TABLE OF CEDST, " | |||
| lt_add_sel_tab | TYPE STANDARD TABLE OF CEDST, " | |||
| lv_s_program_name | TYPE RS38M-PROGRAMM, " | |||
| lv_i_recherche | TYPE CACSRECHFLAG, " 'X' | |||
| lt_selected_hieras | TYPE STANDARD TABLE OF CFBSH01, " | |||
| lt_e_cacs_extr_data | TYPE STANDARD TABLE OF CFBSH01, " | |||
| lv_i_build_convex_hull | TYPE CACSHULLFLAG, " 'X' | |||
| lv_i_output_structure | TYPE CACSOUTSTRUCT, " | |||
| lv_i_auth_check | TYPE CACSRECHFLAG. " ' ' |
|   CALL FUNCTION 'CACS_READ_DATA_SAMPLE' "NOTRANSL: Provision: Datenbeschaffung; Beispiel für einen speziellen Daten |
| EXPORTING | ||
| RKB1X | = lv_rkb1x | |
| S_FORM_NAME | = lv_s_form_name | |
| S_PROGRAM_NAME | = lv_s_program_name | |
| I_RECHERCHE | = lv_i_recherche | |
| I_BUILD_CONVEX_HULL | = lv_i_build_convex_hull | |
| I_OUTPUT_STRUCTURE | = lv_i_output_structure | |
| I_AUTH_CHECK | = lv_i_auth_check | |
| TABLES | ||
| SELECTED_FIELDS | = lt_selected_fields | |
| SELECTION_TABLE | = lt_selection_table | |
| ADD_SEL_TAB | = lt_add_sel_tab | |
| SELECTED_HIERAS | = lt_selected_hieras | |
| E_CACS_EXTR_DATA | = lt_e_cacs_extr_data | |
| EXCEPTIONS | ||
| NO_RECORD_FOUND = 1 | ||
| . " CACS_READ_DATA_SAMPLE | ||
ABAP code using 7.40 inline data declarations to call FM CACS_READ_DATA_SAMPLE
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 EFORM FROM DD27V INTO @DATA(ld_s_form_name). | ||||
| "SELECT single PROGRAMM FROM RS38M INTO @DATA(ld_s_program_name). | ||||
| DATA(ld_i_recherche) | = 'X'. | |||
| DATA(ld_i_build_convex_hull) | = 'X'. | |||
| DATA(ld_i_auth_check) | = ' '. | |||
Search for further information about these or an SAP related objects