SAP CHVW_BATCH_WHERE_USED_LIST Function Module for NOTRANSL: Aufbau und Darstellung der Chargenverwendung als Baum









CHVW_BATCH_WHERE_USED_LIST is a standard chvw batch where used list 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: Aufbau und Darstellung der Chargenverwendung als Baum 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 batch where used list FM, simply by entering the name CHVW_BATCH_WHERE_USED_LIST 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_BATCH_WHERE_USED_LIST 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_BATCH_WHERE_USED_LIST'"NOTRANSL: Aufbau und Darstellung der Chargenverwendung  als Baum
EXPORTING
I_MATNR = "Material Number
* I_BATCH_TYPE = "Original/Process Batch etc.
* I_ORIG_MANDT = "Client ID of Current User
* I_ORIG_SYSID = "Name of the SAP System
* I_WERKS = "Plant
I_CHARG = "Batch Number
* I_DFCHVW = '00 X T T' "Screen Fields for Batch Where-Used List Transactions
I_CONTAINER_CTRL = "
* I_NO_CALL_TA = "No Jumps via CALL TA
* I_NO_HTML_HEADER = "Do Not Generate Header
* I_LEGEND = "
* I_SUPPORT_DRAGGING = "Support Drag Function

TABLES
* T_PLANTS = "

EXCEPTIONS
WRONG_DFCHVW = 1 NO_PLANT = 2 NO_MATNR = 3 NO_BATCH = 4
.




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_BATCH_WHERE_USED_LIST

I_MATNR - Material Number

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

I_BATCH_TYPE - Original/Process Batch etc.

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

I_ORIG_MANDT - Client ID of Current User

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

I_ORIG_SYSID - Name of the SAP System

Data type: ORIG_SYSID
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 Number

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

I_DFCHVW - Screen Fields for Batch Where-Used List Transactions

Data type: DFCHVW
Default: '00 X T T'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_CONTAINER_CTRL -

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

I_NO_CALL_TA - No Jumps via CALL TA

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

I_NO_HTML_HEADER - Do Not Generate Header

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

I_LEGEND -

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

I_SUPPORT_DRAGGING - Support Drag Function

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

TABLES Parameters details for CHVW_BATCH_WHERE_USED_LIST

T_PLANTS -

Data type: WERKS_RANG
Optional: Yes
Call by Reference: Yes

EXCEPTIONS details

WRONG_DFCHVW -

Data type:
Optional: No
Call by Reference: Yes

NO_PLANT -

Data type:
Optional: No
Call by Reference: Yes

NO_MATNR -

Data type:
Optional: No
Call by Reference: Yes

NO_BATCH -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for CHVW_BATCH_WHERE_USED_LIST 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_i_matnr  TYPE MCHA-MATNR, "   
lt_t_plants  TYPE STANDARD TABLE OF WERKS_RANG, "   
lv_wrong_dfchvw  TYPE WERKS_RANG, "   
lv_i_batch_type  TYPE SEU_TYPE, "   
lv_i_orig_mandt  TYPE ORIG_MANDT, "   
lv_i_orig_sysid  TYPE ORIG_SYSID, "   
lv_i_werks  TYPE MCHA-WERKS, "   
lv_no_plant  TYPE MCHA, "   
lv_i_charg  TYPE MCHA-CHARG, "   
lv_no_matnr  TYPE MCHA, "   
lv_i_dfchvw  TYPE DFCHVW, "   '00 X T T'
lv_no_batch  TYPE DFCHVW, "   
lv_i_container_ctrl  TYPE CL_GUI_CONTAINER, "   
lv_i_no_call_ta  TYPE AS4FLAG, "   
lv_i_no_html_header  TYPE AS4FLAG, "   
lv_i_legend  TYPE AS4FLAG, "   
lv_i_support_dragging  TYPE AS4FLAG. "   

  CALL FUNCTION 'CHVW_BATCH_WHERE_USED_LIST'  "NOTRANSL: Aufbau und Darstellung der Chargenverwendung als Baum
    EXPORTING
         I_MATNR = lv_i_matnr
         I_BATCH_TYPE = lv_i_batch_type
         I_ORIG_MANDT = lv_i_orig_mandt
         I_ORIG_SYSID = lv_i_orig_sysid
         I_WERKS = lv_i_werks
         I_CHARG = lv_i_charg
         I_DFCHVW = lv_i_dfchvw
         I_CONTAINER_CTRL = lv_i_container_ctrl
         I_NO_CALL_TA = lv_i_no_call_ta
         I_NO_HTML_HEADER = lv_i_no_html_header
         I_LEGEND = lv_i_legend
         I_SUPPORT_DRAGGING = lv_i_support_dragging
    TABLES
         T_PLANTS = lt_t_plants
    EXCEPTIONS
        WRONG_DFCHVW = 1
        NO_PLANT = 2
        NO_MATNR = 3
        NO_BATCH = 4
. " CHVW_BATCH_WHERE_USED_LIST




ABAP code using 7.40 inline data declarations to call FM CHVW_BATCH_WHERE_USED_LIST

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 WERKS FROM MCHA INTO @DATA(ld_i_werks).
 
 
"SELECT single CHARG FROM MCHA INTO @DATA(ld_i_charg).
 
 
DATA(ld_i_dfchvw) = '00 X T T'.
 
 
 
 
 
 
 


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!