SAP Function Modules

SAVE_VZZKOPA SAP Function module







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

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


Pattern for FM SAVE_VZZKOPA - SAVE VZZKOPA





CALL FUNCTION 'SAVE_VZZKOPA' "
* EXPORTING
*   i_ohne_verbucher = SPACE    " c
*   i_rkey1 = SPACE             " vzzkopa-rkey1
*   i_rkey2 = SPACE             " vzzkopa-rkey2
*   i_rkey3 = SPACE             " vzzkopa-rkey3
  IMPORTING
    e_result =                  " c
  TABLES
    new_kopa =                  "
    old_kopa =                  "
  EXCEPTIONS
    UPDATE_ERROR = 1            "
    .  "  SAVE_VZZKOPA

ABAP code example for Function Module SAVE_VZZKOPA





The ABAP code below is a full code listing to execute function module SAVE_VZZKOPA 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_result  TYPE C ,
it_new_kopa  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_new_kopa  LIKE LINE OF it_new_kopa ,
it_old_kopa  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_old_kopa  LIKE LINE OF it_old_kopa .

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

SELECT single RKEY1
FROM VZZKOPA
INTO @DATA(ld_i_rkey1).


SELECT single RKEY2
FROM VZZKOPA
INTO @DATA(ld_i_rkey2).


SELECT single RKEY3
FROM VZZKOPA
INTO @DATA(ld_i_rkey3).


"populate fields of struture and append to itab
append wa_new_kopa to it_new_kopa.

"populate fields of struture and append to itab
append wa_old_kopa to it_old_kopa. . CALL FUNCTION 'SAVE_VZZKOPA' * EXPORTING * i_ohne_verbucher = ld_i_ohne_verbucher * i_rkey1 = ld_i_rkey1 * i_rkey2 = ld_i_rkey2 * i_rkey3 = ld_i_rkey3 IMPORTING e_result = ld_e_result TABLES new_kopa = it_new_kopa old_kopa = it_old_kopa EXCEPTIONS UPDATE_ERROR = 1 . " SAVE_VZZKOPA
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here 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_result  TYPE C ,
ld_i_ohne_verbucher  TYPE C ,
it_new_kopa  TYPE STANDARD TABLE OF STRING ,
wa_new_kopa  LIKE LINE OF it_new_kopa,
ld_i_rkey1  TYPE VZZKOPA-RKEY1 ,
it_old_kopa  TYPE STANDARD TABLE OF STRING ,
wa_old_kopa  LIKE LINE OF it_old_kopa,
ld_i_rkey2  TYPE VZZKOPA-RKEY2 ,
ld_i_rkey3  TYPE VZZKOPA-RKEY3 .

ld_i_ohne_verbucher = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_new_kopa to it_new_kopa.

SELECT single RKEY1
FROM VZZKOPA
INTO ld_i_rkey1.


"populate fields of struture and append to itab
append wa_old_kopa to it_old_kopa.

SELECT single RKEY2
FROM VZZKOPA
INTO ld_i_rkey2.


SELECT single RKEY3
FROM VZZKOPA
INTO ld_i_rkey3.

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