SAP Function Modules

RRMX_DOC_COPY SAP Function module - Copy all the documents of one workbook object to another







RRMX_DOC_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 RRMX_DOC_COPY into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: RRMX
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM RRMX_DOC_COPY - RRMX DOC COPY





CALL FUNCTION 'RRMX_DOC_COPY' "Copy all the documents of one workbook object to another
  EXPORTING
    i_wbid_from =               " rsrwbindex-workbookid  ID of source workbook
    i_wbid_to =                 " rsrwbindex-workbookid  ID of target workbook
*   i_objvers_from = RS_C_OBJVERS-ACTIVE  " rsrwbindex-objvers  Object Version
*   i_objvers_to = RS_C_OBJVERS-ACTIVE  " rsrwbindex-objvers  Object Version
    i_with_cts = RS_C_TRUE      " rs_bool       Boolean
  IMPORTING
    e_subrc =                   " sy-subrc      Return Value, Return Value After ABAP Statements
    .  "  RRMX_DOC_COPY

ABAP code example for Function Module RRMX_DOC_COPY





The ABAP code below is a full code listing to execute function module RRMX_DOC_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_e_subrc  TYPE SY-SUBRC .


SELECT single WORKBOOKID
FROM RSRWBINDEX
INTO @DATA(ld_i_wbid_from).


SELECT single WORKBOOKID
FROM RSRWBINDEX
INTO @DATA(ld_i_wbid_to).


SELECT single OBJVERS
FROM RSRWBINDEX
INTO @DATA(ld_i_objvers_from).


SELECT single OBJVERS
FROM RSRWBINDEX
INTO @DATA(ld_i_objvers_to).

DATA(ld_i_with_cts) = 'Check type of data required'. . CALL FUNCTION 'RRMX_DOC_COPY' EXPORTING i_wbid_from = ld_i_wbid_from i_wbid_to = ld_i_wbid_to * i_objvers_from = ld_i_objvers_from * i_objvers_to = ld_i_objvers_to i_with_cts = ld_i_with_cts IMPORTING e_subrc = ld_e_subrc . " RRMX_DOC_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_e_subrc  TYPE SY-SUBRC ,
ld_i_wbid_from  TYPE RSRWBINDEX-WORKBOOKID ,
ld_i_wbid_to  TYPE RSRWBINDEX-WORKBOOKID ,
ld_i_objvers_from  TYPE RSRWBINDEX-OBJVERS ,
ld_i_objvers_to  TYPE RSRWBINDEX-OBJVERS ,
ld_i_with_cts  TYPE RS_BOOL .


SELECT single WORKBOOKID
FROM RSRWBINDEX
INTO ld_i_wbid_from.


SELECT single WORKBOOKID
FROM RSRWBINDEX
INTO ld_i_wbid_to.


SELECT single OBJVERS
FROM RSRWBINDEX
INTO ld_i_objvers_from.


SELECT single OBJVERS
FROM RSRWBINDEX
INTO ld_i_objvers_to.

ld_i_with_cts = 'Check type of data required'.

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 RRMX_DOC_COPY or its description.