SAP C1F2_SUBSTANCES_USED Function Module for NOTRANSL: EHS: Verwendungsnachweis für Spezifikationen
C1F2_SUBSTANCES_USED is a standard c1f2 substances used 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: EHS: Verwendungsnachweis für Spezifikationen 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 c1f2 substances used FM, simply by entering the name C1F2_SUBSTANCES_USED into the relevant SAP transaction such as SE37 or SE38.
Function Group: C1F2
Program Name: SAPLC1F2
Main Program: SAPLC1F2
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function C1F2_SUBSTANCES_USED 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 'C1F2_SUBSTANCES_USED'"NOTRANSL: EHS: Verwendungsnachweis für Spezifikationen.
EXPORTING
* I_SEARCHMODE = ESP1_SRCHMD_INIT "Search mode for historical search
* I_FLG_IGNORE_REF = ESP1_FALSE "= 'X': Ignore dependencies via ref.
* I_FLG_TRANS_CLOSURE = ESP1_FALSE "= 'X': Transitive conclusion of rel. specified
* I_FLG_INHERITANCE = ESP1_FALSE "Usage in inheritance
* IV_FLG_INH_DIRECT = ESP1_FALSE "
* IV_FLG_CHARACTERISTIC = ESP1_FALSE "
* I_FLG_REPORT = ESP1_FALSE "Usage directly to a report
* I_FLG_REPORT_DIRECT = ESP1_FALSE "Usage directly to a report
* I_FLG_EXECUTE_USER_EXIT = ESP1_FALSE "
* I_FLG_BUF_RESET = ESP1_FALSE "
* I_FLG_EXCLUDE_PROPERTIES = ESP1_FALSE "
* I_VALDAT = SY-DATUM "Key date
* I_FLG_SIMPLE_USAGE_TAB = ESP1_FALSE "
* I_FLG_EVAL_INH_POINTER = ESP1_FALSE "
* I_DATERANGE = "Period for Historical Search
* I_OBJTYPE = "Specification Category
* I_FLG_INCLUDING = ESP1_TRUE "Type of usage (see module documentation)
* I_FLG_INCL_DIRECT = ESP1_FALSE "= TRUE: Search for DIRECT components only
* I_FLG_REFERENCE = ESP1_FALSE "Usage as reference
* I_FLG_TRANSPORT = ESP1_FALSE "Usage in transport classification
* I_FLG_NO_AUTH_CHECK = ESP1_FALSE "= TRUE: Do not carry out authorization checks
TABLES
I_RECN_TAB = "Specifications to be examined
E_USAGE_TAB = "Result of key date search
* E_FRTO_USAGE_TAB = "Result of the Historical Search
* E_REPORTS_TAB = "Result of report search
* I_ESTCAT_TAB = "EHS: Table with Value Assignments
* IT_TEMPLATE_TAB = "
EXCEPTIONS
ILLEGAL_INPUT = 1 INCL_SUBS_FIND_ERROR = 2 REF_SUBS_FIND_ERROR = 3 RECNTRH_AUTH_CHECK_ERROR = 4 ESTCAT_AUTH_CHECK_ERROR = 5 USER_EXIT_ERROR = 6
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLC1F2_001 EHS: Saving Additional Data in the Database
IMPORTING Parameters details for C1F2_SUBSTANCES_USED
I_SEARCHMODE - Search mode for historical search
Data type: RCGSELSCR-SEARCHMODEDefault: ESP1_SRCHMD_INIT
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_FLG_IGNORE_REF - = 'X': Ignore dependencies via ref.
Data type: ESP1_BOOLEANDefault: ESP1_FALSE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_FLG_TRANS_CLOSURE - = 'X': Transitive conclusion of rel. specified
Data type: ESP1_BOOLEANDefault: ESP1_FALSE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_FLG_INHERITANCE - Usage in inheritance
Data type: ESP1_BOOLEANDefault: ESP1_FALSE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_FLG_INH_DIRECT -
Data type: ESP1_BOOLEANDefault: ESP1_FALSE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_FLG_CHARACTERISTIC -
Data type: ESP1_BOOLEANDefault: ESP1_FALSE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_FLG_REPORT - Usage directly to a report
Data type: ESP1_BOOLEANDefault: ESP1_FALSE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_FLG_REPORT_DIRECT - Usage directly to a report
Data type: ESP1_BOOLEANDefault: ESP1_FALSE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_FLG_EXECUTE_USER_EXIT -
Data type: ESP1_BOOLEANDefault: ESP1_FALSE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_FLG_BUF_RESET -
Data type: ESP1_BOOLEANDefault: ESP1_FALSE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_FLG_EXCLUDE_PROPERTIES -
Data type: ESP1_BOOLEANDefault: ESP1_FALSE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_VALDAT - Key date
Data type: SY-DATUMDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_FLG_SIMPLE_USAGE_TAB -
Data type: ESP1_BOOLEANDefault: ESP1_FALSE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_FLG_EVAL_INH_POINTER -
Data type: ESP1_BOOLEANDefault: ESP1_FALSE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_DATERANGE - Period for Historical Search
Data type: RCGDATERANGEOptional: Yes
Call by Reference: No ( called with pass by value option)
I_OBJTYPE - Specification Category
Data type: TCGUEFU-OBJTYPEOptional: Yes
Call by Reference: No ( called with pass by value option)
I_FLG_INCLUDING - Type of usage (see module documentation)
Data type: ESP1_BOOLEANDefault: ESP1_TRUE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_FLG_INCL_DIRECT - = TRUE: Search for DIRECT components only
Data type: ESP1_BOOLEANDefault: ESP1_FALSE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_FLG_REFERENCE - Usage as reference
Data type: ESP1_BOOLEANDefault: ESP1_FALSE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_FLG_TRANSPORT - Usage in transport classification
Data type: ESP1_BOOLEANDefault: ESP1_FALSE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_FLG_NO_AUTH_CHECK - = TRUE: Do not carry out authorization checks
Data type: ESP1_BOOLEANDefault: ESP1_FALSE
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for C1F2_SUBSTANCES_USED
I_RECN_TAB - Specifications to be examined
Data type: RCGSTDRECNOptional: No
Call by Reference: No ( called with pass by value option)
E_USAGE_TAB - Result of key date search
Data type: ESPRH_USAGE_TAB_TYPEOptional: No
Call by Reference: No ( called with pass by value option)
E_FRTO_USAGE_TAB - Result of the Historical Search
Data type: ESPRH_FRTO_USAGE_TAB_TYPEOptional: Yes
Call by Reference: No ( called with pass by value option)
E_REPORTS_TAB - Result of report search
Data type: RCGAPIDHOptional: Yes
Call by Reference: No ( called with pass by value option)
I_ESTCAT_TAB - EHS: Table with Value Assignments
Data type: RCG_ESTCAT_TAB_TYPEOptional: Yes
Call by Reference: Yes
IT_TEMPLATE_TAB -
Data type: ESY_TT_RECNOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
ILLEGAL_INPUT - Invalid Entry
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INCL_SUBS_FIND_ERROR - Error searching via component relationship
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
REF_SUBS_FIND_ERROR - Error searching via reference relationship
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
RECNTRH_AUTH_CHECK_ERROR - System error during authorization check for specifications
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ESTCAT_AUTH_CHECK_ERROR - System error during authorization check for value assignment types
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
USER_EXIT_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for C1F2_SUBSTANCES_USED 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: | ||||
lt_i_recn_tab | TYPE STANDARD TABLE OF RCGSTDRECN, " | |||
lv_i_searchmode | TYPE RCGSELSCR-SEARCHMODE, " ESP1_SRCHMD_INIT | |||
lv_illegal_input | TYPE RCGSELSCR, " | |||
lv_i_flg_ignore_ref | TYPE ESP1_BOOLEAN, " ESP1_FALSE | |||
lv_i_flg_trans_closure | TYPE ESP1_BOOLEAN, " ESP1_FALSE | |||
lv_i_flg_inheritance | TYPE ESP1_BOOLEAN, " ESP1_FALSE | |||
lv_iv_flg_inh_direct | TYPE ESP1_BOOLEAN, " ESP1_FALSE | |||
lv_iv_flg_characteristic | TYPE ESP1_BOOLEAN, " ESP1_FALSE | |||
lv_i_flg_report | TYPE ESP1_BOOLEAN, " ESP1_FALSE | |||
lv_i_flg_report_direct | TYPE ESP1_BOOLEAN, " ESP1_FALSE | |||
lv_i_flg_execute_user_exit | TYPE ESP1_BOOLEAN, " ESP1_FALSE | |||
lv_i_flg_buf_reset | TYPE ESP1_BOOLEAN, " ESP1_FALSE | |||
lv_i_flg_exclude_properties | TYPE ESP1_BOOLEAN, " ESP1_FALSE | |||
lv_i_valdat | TYPE SY-DATUM, " SY-DATUM | |||
lt_e_usage_tab | TYPE STANDARD TABLE OF ESPRH_USAGE_TAB_TYPE, " | |||
lv_incl_subs_find_error | TYPE ESPRH_USAGE_TAB_TYPE, " | |||
lv_i_flg_simple_usage_tab | TYPE ESP1_BOOLEAN, " ESP1_FALSE | |||
lv_i_flg_eval_inh_pointer | TYPE ESP1_BOOLEAN, " ESP1_FALSE | |||
lv_i_daterange | TYPE RCGDATERANGE, " | |||
lt_e_frto_usage_tab | TYPE STANDARD TABLE OF ESPRH_FRTO_USAGE_TAB_TYPE, " | |||
lv_ref_subs_find_error | TYPE ESPRH_FRTO_USAGE_TAB_TYPE, " | |||
lv_i_objtype | TYPE TCGUEFU-OBJTYPE, " | |||
lt_e_reports_tab | TYPE STANDARD TABLE OF RCGAPIDH, " | |||
lv_recntrh_auth_check_error | TYPE RCGAPIDH, " | |||
lt_i_estcat_tab | TYPE STANDARD TABLE OF RCG_ESTCAT_TAB_TYPE, " | |||
lv_i_flg_including | TYPE ESP1_BOOLEAN, " ESP1_TRUE | |||
lv_estcat_auth_check_error | TYPE ESP1_BOOLEAN, " | |||
lt_it_template_tab | TYPE STANDARD TABLE OF ESY_TT_RECN, " | |||
lv_user_exit_error | TYPE ESY_TT_RECN, " | |||
lv_i_flg_incl_direct | TYPE ESP1_BOOLEAN, " ESP1_FALSE | |||
lv_i_flg_reference | TYPE ESP1_BOOLEAN, " ESP1_FALSE | |||
lv_i_flg_transport | TYPE ESP1_BOOLEAN, " ESP1_FALSE | |||
lv_i_flg_no_auth_check | TYPE ESP1_BOOLEAN. " ESP1_FALSE |
  CALL FUNCTION 'C1F2_SUBSTANCES_USED' "NOTRANSL: EHS: Verwendungsnachweis für Spezifikationen |
EXPORTING | ||
I_SEARCHMODE | = lv_i_searchmode | |
I_FLG_IGNORE_REF | = lv_i_flg_ignore_ref | |
I_FLG_TRANS_CLOSURE | = lv_i_flg_trans_closure | |
I_FLG_INHERITANCE | = lv_i_flg_inheritance | |
IV_FLG_INH_DIRECT | = lv_iv_flg_inh_direct | |
IV_FLG_CHARACTERISTIC | = lv_iv_flg_characteristic | |
I_FLG_REPORT | = lv_i_flg_report | |
I_FLG_REPORT_DIRECT | = lv_i_flg_report_direct | |
I_FLG_EXECUTE_USER_EXIT | = lv_i_flg_execute_user_exit | |
I_FLG_BUF_RESET | = lv_i_flg_buf_reset | |
I_FLG_EXCLUDE_PROPERTIES | = lv_i_flg_exclude_properties | |
I_VALDAT | = lv_i_valdat | |
I_FLG_SIMPLE_USAGE_TAB | = lv_i_flg_simple_usage_tab | |
I_FLG_EVAL_INH_POINTER | = lv_i_flg_eval_inh_pointer | |
I_DATERANGE | = lv_i_daterange | |
I_OBJTYPE | = lv_i_objtype | |
I_FLG_INCLUDING | = lv_i_flg_including | |
I_FLG_INCL_DIRECT | = lv_i_flg_incl_direct | |
I_FLG_REFERENCE | = lv_i_flg_reference | |
I_FLG_TRANSPORT | = lv_i_flg_transport | |
I_FLG_NO_AUTH_CHECK | = lv_i_flg_no_auth_check | |
TABLES | ||
I_RECN_TAB | = lt_i_recn_tab | |
E_USAGE_TAB | = lt_e_usage_tab | |
E_FRTO_USAGE_TAB | = lt_e_frto_usage_tab | |
E_REPORTS_TAB | = lt_e_reports_tab | |
I_ESTCAT_TAB | = lt_i_estcat_tab | |
IT_TEMPLATE_TAB | = lt_it_template_tab | |
EXCEPTIONS | ||
ILLEGAL_INPUT = 1 | ||
INCL_SUBS_FIND_ERROR = 2 | ||
REF_SUBS_FIND_ERROR = 3 | ||
RECNTRH_AUTH_CHECK_ERROR = 4 | ||
ESTCAT_AUTH_CHECK_ERROR = 5 | ||
USER_EXIT_ERROR = 6 | ||
. " C1F2_SUBSTANCES_USED |
ABAP code using 7.40 inline data declarations to call FM C1F2_SUBSTANCES_USED
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 SEARCHMODE FROM RCGSELSCR INTO @DATA(ld_i_searchmode). | ||||
DATA(ld_i_searchmode) | = ESP1_SRCHMD_INIT. | |||
DATA(ld_i_flg_ignore_ref) | = ESP1_FALSE. | |||
DATA(ld_i_flg_trans_closure) | = ESP1_FALSE. | |||
DATA(ld_i_flg_inheritance) | = ESP1_FALSE. | |||
DATA(ld_iv_flg_inh_direct) | = ESP1_FALSE. | |||
DATA(ld_iv_flg_characteristic) | = ESP1_FALSE. | |||
DATA(ld_i_flg_report) | = ESP1_FALSE. | |||
DATA(ld_i_flg_report_direct) | = ESP1_FALSE. | |||
DATA(ld_i_flg_execute_user_exit) | = ESP1_FALSE. | |||
DATA(ld_i_flg_buf_reset) | = ESP1_FALSE. | |||
DATA(ld_i_flg_exclude_properties) | = ESP1_FALSE. | |||
"SELECT single DATUM FROM SY INTO @DATA(ld_i_valdat). | ||||
DATA(ld_i_valdat) | = SY-DATUM. | |||
DATA(ld_i_flg_simple_usage_tab) | = ESP1_FALSE. | |||
DATA(ld_i_flg_eval_inh_pointer) | = ESP1_FALSE. | |||
"SELECT single OBJTYPE FROM TCGUEFU INTO @DATA(ld_i_objtype). | ||||
DATA(ld_i_flg_including) | = ESP1_TRUE. | |||
DATA(ld_i_flg_incl_direct) | = ESP1_FALSE. | |||
DATA(ld_i_flg_reference) | = ESP1_FALSE. | |||
DATA(ld_i_flg_transport) | = ESP1_FALSE. | |||
DATA(ld_i_flg_no_auth_check) | = ESP1_FALSE. | |||
Search for further information about these or an SAP related objects