SAP CHVW_READ Function Module for NOTRANSL: Lesen Chargenverwendungssätze aus dem Puffer









CHVW_READ is a standard chvw 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 NOTRANSL: Lesen Chargenverwendungssätze aus dem Puffer 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 chvw read FM, simply by entering the name CHVW_READ into the relevant SAP transaction such as SE37 or SE38.

Function Group: CHVW
Program Name: SAPLCHVW
Main Program: SAPLCHVW
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function CHVW_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 'CHVW_READ'"NOTRANSL: Lesen Chargenverwendungssätze aus dem Puffer
EXPORTING
* I_MATNR = "Material Number
* I_VBELN = "Delivery
* I_POSNR = "Delivery Item
* I_UMMAT = "
* I_UMWRK = "
* I_UMCHA = "
* I_WERKS = "Plant
* I_CHARG = "Batch
* I_XZUGA = "
* I_AUFNR = "
* I_AUFPS = "Order Item
* I_AUTYP = "Order Type
* I_EBELN = "Purchase Order
* I_EBELP = "Item Number of Purchasing Document

TABLES
* T_CHVW = "

EXCEPTIONS
INVALID_INPUT_DATA = 1 NO_ENTRY_FOUND = 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_SAPLCHVW_001 BWUL: Fill fields in append CHVWSHADOW_Z

IMPORTING Parameters details for CHVW_READ

I_MATNR - Material Number

Data type: MCHA-MATNR
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_VBELN - Delivery

Data type: LIPS-VBELN
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_POSNR - Delivery Item

Data type: LIPS-POSNR
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_UMMAT -

Data type: CHVW-UMMAT
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_UMWRK -

Data type: CHVW-UMWRK
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_UMCHA -

Data type: CHVW-UMCHA
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_WERKS - Plant

Data type: MCHA-WERKS
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_CHARG - Batch

Data type: MCHA-CHARG
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_XZUGA -

Data type: CHVW-XZUGA
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_AUFNR -

Data type: CHVW-AUFNR
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_AUFPS - Order Item

Data type: CHVW-AUFPS
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_AUTYP - Order Type

Data type: CHVW-AUTYP
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_EBELN - Purchase Order

Data type: CHVW-EBELN
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_EBELP - Item Number of Purchasing Document

Data type: CHVW-EBELP
Optional: Yes
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for CHVW_READ

T_CHVW -

Data type: CHVW
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

INVALID_INPUT_DATA -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NO_ENTRY_FOUND -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for CHVW_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:
lt_t_chvw  TYPE STANDARD TABLE OF CHVW, "   
lv_i_matnr  TYPE MCHA-MATNR, "   
lv_invalid_input_data  TYPE MCHA, "   
lv_i_vbeln  TYPE LIPS-VBELN, "   
lv_i_posnr  TYPE LIPS-POSNR, "   
lv_i_ummat  TYPE CHVW-UMMAT, "   
lv_i_umwrk  TYPE CHVW-UMWRK, "   
lv_i_umcha  TYPE CHVW-UMCHA, "   
lv_i_werks  TYPE MCHA-WERKS, "   
lv_no_entry_found  TYPE MCHA, "   
lv_i_charg  TYPE MCHA-CHARG, "   
lv_i_xzuga  TYPE CHVW-XZUGA, "   
lv_i_aufnr  TYPE CHVW-AUFNR, "   
lv_i_aufps  TYPE CHVW-AUFPS, "   
lv_i_autyp  TYPE CHVW-AUTYP, "   
lv_i_ebeln  TYPE CHVW-EBELN, "   
lv_i_ebelp  TYPE CHVW-EBELP. "   

  CALL FUNCTION 'CHVW_READ'  "NOTRANSL: Lesen Chargenverwendungssätze aus dem Puffer
    EXPORTING
         I_MATNR = lv_i_matnr
         I_VBELN = lv_i_vbeln
         I_POSNR = lv_i_posnr
         I_UMMAT = lv_i_ummat
         I_UMWRK = lv_i_umwrk
         I_UMCHA = lv_i_umcha
         I_WERKS = lv_i_werks
         I_CHARG = lv_i_charg
         I_XZUGA = lv_i_xzuga
         I_AUFNR = lv_i_aufnr
         I_AUFPS = lv_i_aufps
         I_AUTYP = lv_i_autyp
         I_EBELN = lv_i_ebeln
         I_EBELP = lv_i_ebelp
    TABLES
         T_CHVW = lt_t_chvw
    EXCEPTIONS
        INVALID_INPUT_DATA = 1
        NO_ENTRY_FOUND = 2
. " CHVW_READ




ABAP code using 7.40 inline data declarations to call FM CHVW_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 MATNR FROM MCHA INTO @DATA(ld_i_matnr).
 
 
"SELECT single VBELN FROM LIPS INTO @DATA(ld_i_vbeln).
 
"SELECT single POSNR FROM LIPS INTO @DATA(ld_i_posnr).
 
"SELECT single UMMAT FROM CHVW INTO @DATA(ld_i_ummat).
 
"SELECT single UMWRK FROM CHVW INTO @DATA(ld_i_umwrk).
 
"SELECT single UMCHA FROM CHVW INTO @DATA(ld_i_umcha).
 
"SELECT single WERKS FROM MCHA INTO @DATA(ld_i_werks).
 
 
"SELECT single CHARG FROM MCHA INTO @DATA(ld_i_charg).
 
"SELECT single XZUGA FROM CHVW INTO @DATA(ld_i_xzuga).
 
"SELECT single AUFNR FROM CHVW INTO @DATA(ld_i_aufnr).
 
"SELECT single AUFPS FROM CHVW INTO @DATA(ld_i_aufps).
 
"SELECT single AUTYP FROM CHVW INTO @DATA(ld_i_autyp).
 
"SELECT single EBELN FROM CHVW INTO @DATA(ld_i_ebeln).
 
"SELECT single EBELP FROM CHVW INTO @DATA(ld_i_ebelp).
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!