SAP Function Modules

SD_DOCUMENT_COPY_ONE_STEP SAP Function module







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

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


Pattern for FM SD_DOCUMENT_COPY_ONE_STEP - SD DOCUMENT COPY ONE STEP





CALL FUNCTION 'SD_DOCUMENT_COPY_ONE_STEP' "
  EXPORTING
    i_auarn =                   " vbak-auart
    i_vbeln =                   " vbak-vbeln
*   is_enhancement =            " isi_sd_document_copy_one_step  IS Enhancement Structure - FM Import Parameter
  IMPORTING
    es_enhancement =            " isx_sd_document_copy_one_step  IS Enhancement Structure - FM Export Parameter
* CHANGING
*   cs_enhancement =            " isc_sd_document_copy_one_step  IS Enhancement Structure - FM Change Parameter
    .  "  SD_DOCUMENT_COPY_ONE_STEP

ABAP code example for Function Module SD_DOCUMENT_COPY_ONE_STEP





The ABAP code below is a full code listing to execute function module SD_DOCUMENT_COPY_ONE_STEP 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_es_enhancement  TYPE ISX_SD_DOCUMENT_COPY_ONE_STEP .

DATA(ld_cs_enhancement) = 'Check type of data required'.

SELECT single AUART
FROM VBAK
INTO @DATA(ld_i_auarn).


SELECT single VBELN
FROM VBAK
INTO @DATA(ld_i_vbeln).

DATA(ld_is_enhancement) = 'Check type of data required'. . CALL FUNCTION 'SD_DOCUMENT_COPY_ONE_STEP' EXPORTING i_auarn = ld_i_auarn i_vbeln = ld_i_vbeln * is_enhancement = ld_is_enhancement IMPORTING es_enhancement = ld_es_enhancement * CHANGING * cs_enhancement = ld_cs_enhancement . " SD_DOCUMENT_COPY_ONE_STEP
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_cs_enhancement  TYPE ISC_SD_DOCUMENT_COPY_ONE_STEP ,
ld_es_enhancement  TYPE ISX_SD_DOCUMENT_COPY_ONE_STEP ,
ld_i_auarn  TYPE VBAK-AUART ,
ld_i_vbeln  TYPE VBAK-VBELN ,
ld_is_enhancement  TYPE ISI_SD_DOCUMENT_COPY_ONE_STEP .

ld_cs_enhancement = 'Check type of data required'.

SELECT single AUART
FROM VBAK
INTO ld_i_auarn.


SELECT single VBELN
FROM VBAK
INTO ld_i_vbeln.

ld_is_enhancement = '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 SD_DOCUMENT_COPY_ONE_STEP or its description.