SAP CO_SF_AFVG_READ Function Module for Lesen Auftragsvorgang aus AFVx_TAB mit logischem Key
CO_SF_AFVG_READ is a standard co sf afvg read SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Lesen Auftragsvorgang aus AFVx_TAB mit logischem Key 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 sf afvg read FM, simply by entering the name CO_SF_AFVG_READ into the relevant SAP transaction such as SE37 or SE38.
Function Group: COSF
Program Name: SAPLCOSF
Main Program: SAPLCOSF
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CO_SF_AFVG_READ 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_SF_AFVG_READ'"Lesen Auftragsvorgang aus AFVx_TAB mit logischem Key.
EXPORTING
* AUFNR_IMP = "Order Number
* VORNR_IMP = "Operation Number
* APLZL_IMP = "General Counter for Order
* AUFPL_IMP = "Task list number of operations in the order
* VSNMR_IMP = "Number or description of a version
IMPORTING
AFVC_EXP = "Operation within an order
AFVV_EXP = "DB structure of the quantities/dates/values in the operation
TABLES
* TAFVC_EXP = "
* TAFVV_EXP = "
EXCEPTIONS
NOT_FOUND = 1 MISSING_PARAMETER = 2
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_SAPLCOSF_001 Customer Exit: Goods Receipt for Production Order
IMPORTING Parameters details for CO_SF_AFVG_READ
AUFNR_IMP - Order Number
Data type: CAUFV-AUFNROptional: Yes
Call by Reference: No ( called with pass by value option)
VORNR_IMP - Operation Number
Data type: AFVC-VORNROptional: Yes
Call by Reference: No ( called with pass by value option)
APLZL_IMP - General Counter for Order
Data type: AFVC-APLZLOptional: Yes
Call by Reference: No ( called with pass by value option)
AUFPL_IMP - Task list number of operations in the order
Data type: AFVC-AUFPLOptional: Yes
Call by Reference: No ( called with pass by value option)
VSNMR_IMP - Number or description of a version
Data type: VSKOPF-VSNMROptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CO_SF_AFVG_READ
AFVC_EXP - Operation within an order
Data type: AFVCOptional: No
Call by Reference: No ( called with pass by value option)
AFVV_EXP - DB structure of the quantities/dates/values in the operation
Data type: AFVVOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for CO_SF_AFVG_READ
TAFVC_EXP -
Data type: AFVCOptional: Yes
Call by Reference: No ( called with pass by value option)
TAFVV_EXP -
Data type: AFVVOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
MISSING_PARAMETER -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CO_SF_AFVG_READ 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_afvc_exp | TYPE AFVC, " | |||
| lv_aufnr_imp | TYPE CAUFV-AUFNR, " | |||
| lv_not_found | TYPE CAUFV, " | |||
| lt_tafvc_exp | TYPE STANDARD TABLE OF AFVC, " | |||
| lv_afvv_exp | TYPE AFVV, " | |||
| lt_tafvv_exp | TYPE STANDARD TABLE OF AFVV, " | |||
| lv_vornr_imp | TYPE AFVC-VORNR, " | |||
| lv_missing_parameter | TYPE AFVC, " | |||
| lv_aplzl_imp | TYPE AFVC-APLZL, " | |||
| lv_aufpl_imp | TYPE AFVC-AUFPL, " | |||
| lv_vsnmr_imp | TYPE VSKOPF-VSNMR. " |
|   CALL FUNCTION 'CO_SF_AFVG_READ' "Lesen Auftragsvorgang aus AFVx_TAB mit logischem Key |
| EXPORTING | ||
| AUFNR_IMP | = lv_aufnr_imp | |
| VORNR_IMP | = lv_vornr_imp | |
| APLZL_IMP | = lv_aplzl_imp | |
| AUFPL_IMP | = lv_aufpl_imp | |
| VSNMR_IMP | = lv_vsnmr_imp | |
| IMPORTING | ||
| AFVC_EXP | = lv_afvc_exp | |
| AFVV_EXP | = lv_afvv_exp | |
| TABLES | ||
| TAFVC_EXP | = lt_tafvc_exp | |
| TAFVV_EXP | = lt_tafvv_exp | |
| EXCEPTIONS | ||
| NOT_FOUND = 1 | ||
| MISSING_PARAMETER = 2 | ||
| . " CO_SF_AFVG_READ | ||
ABAP code using 7.40 inline data declarations to call FM CO_SF_AFVG_READ
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 AUFNR FROM CAUFV INTO @DATA(ld_aufnr_imp). | ||||
| "SELECT single VORNR FROM AFVC INTO @DATA(ld_vornr_imp). | ||||
| "SELECT single APLZL FROM AFVC INTO @DATA(ld_aplzl_imp). | ||||
| "SELECT single AUFPL FROM AFVC INTO @DATA(ld_aufpl_imp). | ||||
| "SELECT single VSNMR FROM VSKOPF INTO @DATA(ld_vsnmr_imp). | ||||
Search for further information about these or an SAP related objects