SAP SAMPLE_INTERFACE_00004201 Function Module for









SAMPLE_INTERFACE_00004201 is a standard sample interface 00004201 SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 sample interface 00004201 FM, simply by entering the name SAMPLE_INTERFACE_00004201 into the relevant SAP transaction such as SE37 or SE38.

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



Function SAMPLE_INTERFACE_00004201 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 'SAMPLE_INTERFACE_00004201'"
EXPORTING
I_ACTIVITY_TYPE = "Change Type (U, I, E, D)

TABLES
I_VTAB_BASIC_DATA = "Variant table basic data
* I_VTAB_LINE_TA = "Line object of variant table
* I_VTAB_VALUE_C = "CHAR format values for variant table
* I_VTAB_VALUE_N = "NON-CHAR format variant table values
I_VTAB_ECM_NO = "Engineering Change Management Help Structure
.



IMPORTING Parameters details for SAMPLE_INTERFACE_00004201

I_ACTIVITY_TYPE - Change Type (U, I, E, D)

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

TABLES Parameters details for SAMPLE_INTERFACE_00004201

I_VTAB_BASIC_DATA - Variant table basic data

Data type: CUVTAB
Optional: No
Call by Reference: Yes

I_VTAB_LINE_TA - Line object of variant table

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

I_VTAB_VALUE_C - CHAR format values for variant table

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

I_VTAB_VALUE_N - NON-CHAR format variant table values

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

I_VTAB_ECM_NO - Engineering Change Management Help Structure

Data type: RCTAE
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for SAMPLE_INTERFACE_00004201 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_activity_type  TYPE CDPOS-CHNGIND, "   
lt_i_vtab_basic_data  TYPE STANDARD TABLE OF CUVTAB, "   
lt_i_vtab_line_ta  TYPE STANDARD TABLE OF CUVTLN, "   
lt_i_vtab_value_c  TYPE STANDARD TABLE OF CUVTAB_VALC, "   
lt_i_vtab_value_n  TYPE STANDARD TABLE OF CUVTAB_VALN, "   
lt_i_vtab_ecm_no  TYPE STANDARD TABLE OF RCTAE. "   

  CALL FUNCTION 'SAMPLE_INTERFACE_00004201'  "
    EXPORTING
         I_ACTIVITY_TYPE = lv_i_activity_type
    TABLES
         I_VTAB_BASIC_DATA = lt_i_vtab_basic_data
         I_VTAB_LINE_TA = lt_i_vtab_line_ta
         I_VTAB_VALUE_C = lt_i_vtab_value_c
         I_VTAB_VALUE_N = lt_i_vtab_value_n
         I_VTAB_ECM_NO = lt_i_vtab_ecm_no
. " SAMPLE_INTERFACE_00004201




ABAP code using 7.40 inline data declarations to call FM SAMPLE_INTERFACE_00004201

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 CHNGIND FROM CDPOS INTO @DATA(ld_i_activity_type).
 
 
 
 
 
 


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!