SAP Function Modules

BCW_BI_TEMPLATECLASS_COPY SAP Function module







BCW_BI_TEMPLATECLASS_COPY is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name BCW_BI_TEMPLATECLASS_COPY into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: BVW_BATCHINPUT
Released Date: Not Released
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM BCW_BI_TEMPLATECLASS_COPY - BCW BI TEMPLATECLASS COPY





CALL FUNCTION 'BCW_BI_TEMPLATECLASS_COPY' "
  EXPORTING
*   ctu = 'X'                   " apqi-putactive
*   mode = 'N'                  " apqi-putactive
*   update = 'L'                " apqi-putactive
*   group =                     " apqi-groupid
*   user =                      " apqi-userid
*   keep =                      " apqi-qerase
*   holddate =                  " apqi-startdate
*   nodata = '/'                " apqi-putactive
    clsname_001 = 'cl_bvw_template'  " bdcdata-fval
    value_02_002 = 'CL_BVW_PAYMORDER14'  " bdcdata-fval
    clsname_003 = 'CL_BVW_PAYMORDER14'  " bdcdata-fval
    type_04_004 = 'char1'       " bdcdata-fval
    type_05_005 = 'char1'       " bdcdata-fval
    type_06_006 = 'char1'       " bdcdata-fval
    clsname_007 = 'CL_BVW_PAYMORDER14'  " bdcdata-fval
  IMPORTING
    subrc =                     " syst-subrc
* TABLES
*   messtab =                   " bdcmsgcoll
    .  "  BCW_BI_TEMPLATECLASS_COPY

ABAP code example for Function Module BCW_BI_TEMPLATECLASS_COPY





The ABAP code below is a full code listing to execute function module BCW_BI_TEMPLATECLASS_COPY including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
ld_subrc  TYPE SYST-SUBRC ,
it_messtab  TYPE STANDARD TABLE OF BDCMSGCOLL,"TABLES PARAM
wa_messtab  LIKE LINE OF it_messtab .


SELECT single PUTACTIVE
FROM APQI
INTO @DATA(ld_ctu).


SELECT single PUTACTIVE
FROM APQI
INTO @DATA(ld_mode).


SELECT single PUTACTIVE
FROM APQI
INTO @DATA(ld_update).


SELECT single GROUPID
FROM APQI
INTO @DATA(ld_group).


SELECT single USERID
FROM APQI
INTO @DATA(ld_user).


SELECT single QERASE
FROM APQI
INTO @DATA(ld_keep).


SELECT single STARTDATE
FROM APQI
INTO @DATA(ld_holddate).


SELECT single PUTACTIVE
FROM APQI
INTO @DATA(ld_nodata).


DATA(ld_clsname_001) = some text here

DATA(ld_value_02_002) = some text here

DATA(ld_clsname_003) = some text here

DATA(ld_type_04_004) = some text here

DATA(ld_type_05_005) = some text here

DATA(ld_type_06_006) = some text here

DATA(ld_clsname_007) = some text here

"populate fields of struture and append to itab
append wa_messtab to it_messtab. . CALL FUNCTION 'BCW_BI_TEMPLATECLASS_COPY' EXPORTING * ctu = ld_ctu * mode = ld_mode * update = ld_update * group = ld_group * user = ld_user * keep = ld_keep * holddate = ld_holddate * nodata = ld_nodata clsname_001 = ld_clsname_001 value_02_002 = ld_value_02_002 clsname_003 = ld_clsname_003 type_04_004 = ld_type_04_004 type_05_005 = ld_type_05_005 type_06_006 = ld_type_06_006 clsname_007 = ld_clsname_007 IMPORTING subrc = ld_subrc * TABLES * messtab = it_messtab . " BCW_BI_TEMPLATECLASS_COPY
IF SY-SUBRC EQ 0. "All OK ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_subrc  TYPE SYST-SUBRC ,
ld_ctu  TYPE APQI-PUTACTIVE ,
it_messtab  TYPE STANDARD TABLE OF BDCMSGCOLL ,
wa_messtab  LIKE LINE OF it_messtab,
ld_mode  TYPE APQI-PUTACTIVE ,
ld_update  TYPE APQI-PUTACTIVE ,
ld_group  TYPE APQI-GROUPID ,
ld_user  TYPE APQI-USERID ,
ld_keep  TYPE APQI-QERASE ,
ld_holddate  TYPE APQI-STARTDATE ,
ld_nodata  TYPE APQI-PUTACTIVE ,
ld_clsname_001  TYPE BDCDATA-FVAL ,
ld_value_02_002  TYPE BDCDATA-FVAL ,
ld_clsname_003  TYPE BDCDATA-FVAL ,
ld_type_04_004  TYPE BDCDATA-FVAL ,
ld_type_05_005  TYPE BDCDATA-FVAL ,
ld_type_06_006  TYPE BDCDATA-FVAL ,
ld_clsname_007  TYPE BDCDATA-FVAL .


SELECT single PUTACTIVE
FROM APQI
INTO ld_ctu.


"populate fields of struture and append to itab
append wa_messtab to it_messtab.

SELECT single PUTACTIVE
FROM APQI
INTO ld_mode.


SELECT single PUTACTIVE
FROM APQI
INTO ld_update.


SELECT single GROUPID
FROM APQI
INTO ld_group.


SELECT single USERID
FROM APQI
INTO ld_user.


SELECT single QERASE
FROM APQI
INTO ld_keep.


SELECT single STARTDATE
FROM APQI
INTO ld_holddate.


SELECT single PUTACTIVE
FROM APQI
INTO ld_nodata.


ld_clsname_001 = some text here

ld_value_02_002 = some text here

ld_clsname_003 = some text here

ld_type_04_004 = some text here

ld_type_05_005 = some text here

ld_type_06_006 = some text here

ld_clsname_007 = some text here

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name BCW_BI_TEMPLATECLASS_COPY or its description.