SAP CO_ZF_ACCOUNT_FIND Function Module for NOTRANSL: Ermitteln eines Vorschlagssachkontos zur Komponente
CO_ZF_ACCOUNT_FIND is a standard co zf account find 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: Ermitteln eines Vorschlagssachkontos zur Komponente 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 co zf account find FM, simply by entering the name CO_ZF_ACCOUNT_FIND into the relevant SAP transaction such as SE37 or SE38.
Function Group: COZF
Program Name: SAPLCOZF
Main Program: SAPLCOZF
Appliation area: C
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CO_ZF_ACCOUNT_FIND 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 'CO_ZF_ACCOUNT_FIND'"NOTRANSL: Ermitteln eines Vorschlagssachkontos zur Komponente.
EXPORTING
* BWTAR_IMP = "
* MATKL_IMP = "Material Group
* SOBKZ_IMP = "Special Stock Indicator
* CONSU_IMP = ' ' "
KNTTP_IMP = "
MATNR_IMP = "
SHKZG_IMP = "
WERKS_IMP = "
* WE = "
* MTART_IMP = "
* BEWEG_IMP = "
* VORSL_IMP = 'GBB' "
IMPORTING
BCLAS_EXP = "
SAKNR_EXP = "
HKMAT_EXP = "
HRKFT_EXP = "
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_SAPLCOZF_001 Customer Exits in Function Group COZF
EXIT_SAPLCOZF_002 Customer Exits in Function Group COZF
EXIT_SAPLCOZF_003 Exit for Predefining Fields in the Order Header
IMPORTING Parameters details for CO_ZF_ACCOUNT_FIND
BWTAR_IMP -
Data type: MBEW-BWTAROptional: Yes
Call by Reference: No ( called with pass by value option)
MATKL_IMP - Material Group
Data type: RESB-MATKLOptional: Yes
Call by Reference: No ( called with pass by value option)
SOBKZ_IMP - Special Stock Indicator
Data type: RESB-SOBKZOptional: Yes
Call by Reference: No ( called with pass by value option)
CONSU_IMP -
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
KNTTP_IMP -
Data type: RESB-KNTTPOptional: No
Call by Reference: No ( called with pass by value option)
MATNR_IMP -
Data type: RESB-MATNROptional: No
Call by Reference: No ( called with pass by value option)
SHKZG_IMP -
Data type: RESB-SHKZGOptional: No
Call by Reference: No ( called with pass by value option)
WERKS_IMP -
Data type: RESB-WERKSOptional: No
Call by Reference: No ( called with pass by value option)
WE -
Data type: RC27X-FLG_SELOptional: Yes
Call by Reference: No ( called with pass by value option)
MTART_IMP -
Data type: MARA-MTARTOptional: Yes
Call by Reference: No ( called with pass by value option)
BEWEG_IMP -
Data type: T156-BWARTOptional: Yes
Call by Reference: No ( called with pass by value option)
VORSL_IMP -
Data type: T030-KTOSLDefault: 'GBB'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CO_ZF_ACCOUNT_FIND
BCLAS_EXP -
Data type: MBEW-BKLASOptional: No
Call by Reference: No ( called with pass by value option)
SAKNR_EXP -
Data type: RESB-SAKNROptional: No
Call by Reference: No ( called with pass by value option)
HKMAT_EXP -
Data type: HKMATOptional: No
Call by Reference: No ( called with pass by value option)
HRKFT_EXP -
Data type: HRKFTOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CO_ZF_ACCOUNT_FIND 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_bclas_exp | TYPE MBEW-BKLAS, " | |||
| lv_bwtar_imp | TYPE MBEW-BWTAR, " | |||
| lv_matkl_imp | TYPE RESB-MATKL, " | |||
| lv_sobkz_imp | TYPE RESB-SOBKZ, " | |||
| lv_consu_imp | TYPE C, " SPACE | |||
| lv_knttp_imp | TYPE RESB-KNTTP, " | |||
| lv_saknr_exp | TYPE RESB-SAKNR, " | |||
| lv_hkmat_exp | TYPE HKMAT, " | |||
| lv_matnr_imp | TYPE RESB-MATNR, " | |||
| lv_hrkft_exp | TYPE HRKFT, " | |||
| lv_shkzg_imp | TYPE RESB-SHKZG, " | |||
| lv_werks_imp | TYPE RESB-WERKS, " | |||
| lv_we | TYPE RC27X-FLG_SEL, " | |||
| lv_mtart_imp | TYPE MARA-MTART, " | |||
| lv_beweg_imp | TYPE T156-BWART, " | |||
| lv_vorsl_imp | TYPE T030-KTOSL. " 'GBB' |
|   CALL FUNCTION 'CO_ZF_ACCOUNT_FIND' "NOTRANSL: Ermitteln eines Vorschlagssachkontos zur Komponente |
| EXPORTING | ||
| BWTAR_IMP | = lv_bwtar_imp | |
| MATKL_IMP | = lv_matkl_imp | |
| SOBKZ_IMP | = lv_sobkz_imp | |
| CONSU_IMP | = lv_consu_imp | |
| KNTTP_IMP | = lv_knttp_imp | |
| MATNR_IMP | = lv_matnr_imp | |
| SHKZG_IMP | = lv_shkzg_imp | |
| WERKS_IMP | = lv_werks_imp | |
| WE | = lv_we | |
| MTART_IMP | = lv_mtart_imp | |
| BEWEG_IMP | = lv_beweg_imp | |
| VORSL_IMP | = lv_vorsl_imp | |
| IMPORTING | ||
| BCLAS_EXP | = lv_bclas_exp | |
| SAKNR_EXP | = lv_saknr_exp | |
| HKMAT_EXP | = lv_hkmat_exp | |
| HRKFT_EXP | = lv_hrkft_exp | |
| . " CO_ZF_ACCOUNT_FIND | ||
ABAP code using 7.40 inline data declarations to call FM CO_ZF_ACCOUNT_FIND
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 BKLAS FROM MBEW INTO @DATA(ld_bclas_exp). | ||||
| "SELECT single BWTAR FROM MBEW INTO @DATA(ld_bwtar_imp). | ||||
| "SELECT single MATKL FROM RESB INTO @DATA(ld_matkl_imp). | ||||
| "SELECT single SOBKZ FROM RESB INTO @DATA(ld_sobkz_imp). | ||||
| DATA(ld_consu_imp) | = ' '. | |||
| "SELECT single KNTTP FROM RESB INTO @DATA(ld_knttp_imp). | ||||
| "SELECT single SAKNR FROM RESB INTO @DATA(ld_saknr_exp). | ||||
| "SELECT single MATNR FROM RESB INTO @DATA(ld_matnr_imp). | ||||
| "SELECT single SHKZG FROM RESB INTO @DATA(ld_shkzg_imp). | ||||
| "SELECT single WERKS FROM RESB INTO @DATA(ld_werks_imp). | ||||
| "SELECT single FLG_SEL FROM RC27X INTO @DATA(ld_we). | ||||
| "SELECT single MTART FROM MARA INTO @DATA(ld_mtart_imp). | ||||
| "SELECT single BWART FROM T156 INTO @DATA(ld_beweg_imp). | ||||
| "SELECT single KTOSL FROM T030 INTO @DATA(ld_vorsl_imp). | ||||
| DATA(ld_vorsl_imp) | = 'GBB'. | |||
Search for further information about these or an SAP related objects