SAP DOCUMENT_CREATE_REVERSE Function Module for NOTRANSL: FB Buchung und Stornierung der Verzinsung im PS









DOCUMENT_CREATE_REVERSE is a standard document create reverse SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: FB Buchung und Stornierung der Verzinsung im PS processing and below is the pattern details for this FM, 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 document create reverse FM, simply by entering the name DOCUMENT_CREATE_REVERSE into the relevant SAP transaction such as SE37 or SE38.

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



Function DOCUMENT_CREATE_REVERSE 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 'DOCUMENT_CREATE_REVERSE'"NOTRANSL: FB Buchung und Stornierung der Verzinsung im PS
EXPORTING
* I_KOKRS = "Controlling Area
* I_KTOPL = "Chart of Accounts
* I_BLART = "Document Category
* I_WWERT = "Value Date
* I_LOGSYS = "Logical System
* I_FLG_STORNO = "DE-EN-LANG-SWITCH-NO-TRANSLATION
* I_FLG_TEST = "DE-EN-LANG-SWITCH-NO-TRANSLATION
* IT_ZISUM = "DE-EN-LANG-SWITCH-NO-TRANSLATION
* I_BUPERIO = "Posting Period
* I_BUKRS = "Company Code
* I_GSBER = "Business Area
I_OBJNR = "Object number
* I_CPUDT = "Day On Which Accounting Document Was Entered
* I_CPUTM = "Time of Entry
* I_BISDT = "Posting Date in the Document
* I_BUDAT = 00000000 "Posting Date in the Document
* I_FACDT = "CO object: date of first posting

IMPORTING
E_BELNR = "Document Number
E_KSTAR = "Cost Element

CHANGING
* CT_OBJECT = "
* T_ZISUM_STORNO = "
* I_TMP_BELNR = "Predefined Type
T_TZIN1 = "
T_TZIN2 = "
T_TZIN3 = "
T_TZIN4 = "

TABLES
* T_KSTAR_VZSKZ = "PS Interest Calculation: Interest Calc.Ind. - Cost Element
* T_ACCHD = "Interface to Accounting: Header Information
* T_ACCIT = "Accounting Interface: Item Information
* T_ACCCR = "Accounting Interface: Currency Information

EXCEPTIONS
ACCOUNT_DETERMINATION_FAULT = 1 CHECK_DATA_FAULT3 = 10 FILL_TABLES2_FAULT = 11 GET_CURTP_FAULT = 12 NOT_RELEVANT_FOR_REVERSAL = 13 OBJECT_KEY_GET_FAULT = 2 FILL_TABLES1_FAULT = 3 CREATE_AC_DOCUMENT_FAULT = 4 DOCUMENT_READ_FAULT1 = 5 DOCUMENT_READ_FAULT2 = 6 DOCUMENT_READ_FAULT3 = 7 CHECK_DATA_FAULT1 = 8 CHECK_DATA_FAULT2 = 9
.



IMPORTING Parameters details for DOCUMENT_CREATE_REVERSE

I_KOKRS - Controlling Area

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

I_KTOPL - Chart of Accounts

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

I_BLART - Document Category

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

I_WWERT - Value Date

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

I_LOGSYS - Logical System

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

I_FLG_STORNO - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

I_FLG_TEST - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

IT_ZISUM - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

I_BUPERIO - Posting Period

Data type: COVP-PERIO
Optional: Yes
Call by Reference: Yes

I_BUKRS - Company Code

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

I_GSBER - Business Area

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

I_OBJNR - Object number

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

I_CPUDT - Day On Which Accounting Document Was Entered

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

I_CPUTM - Time of Entry

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

I_BISDT - Posting Date in the Document

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

I_BUDAT - Posting Date in the Document

Data type: ACCIT-BUDAT
Default: 00000000
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_FACDT - CO object: date of first posting

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

EXPORTING Parameters details for DOCUMENT_CREATE_REVERSE

E_BELNR - Document Number

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

E_KSTAR - Cost Element

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

CHANGING Parameters details for DOCUMENT_CREATE_REVERSE

CT_OBJECT -

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

T_ZISUM_STORNO -

Data type: PSVZ_TYPE_T_ZISUM
Optional: Yes
Call by Reference: Yes

I_TMP_BELNR - Predefined Type

Data type: I
Optional: Yes
Call by Reference: Yes

T_TZIN1 -

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

T_TZIN2 -

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

T_TZIN3 -

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

T_TZIN4 -

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

TABLES Parameters details for DOCUMENT_CREATE_REVERSE

T_KSTAR_VZSKZ - PS Interest Calculation: Interest Calc.Ind. - Cost Element

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

T_ACCHD - Interface to Accounting: Header Information

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

T_ACCIT - Accounting Interface: Item Information

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

T_ACCCR - Accounting Interface: Currency Information

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

EXCEPTIONS details

ACCOUNT_DETERMINATION_FAULT - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

CHECK_DATA_FAULT3 - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

FILL_TABLES2_FAULT - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

GET_CURTP_FAULT - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

NOT_RELEVANT_FOR_REVERSAL - DE-EN-LANG-SWITCH-NO-TRANSLATION

Data type:
Optional: No
Call by Reference: Yes

OBJECT_KEY_GET_FAULT - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

FILL_TABLES1_FAULT - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

CREATE_AC_DOCUMENT_FAULT - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

DOCUMENT_READ_FAULT1 - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

DOCUMENT_READ_FAULT2 - Document cannot be cancelled

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

DOCUMENT_READ_FAULT3 - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

CHECK_DATA_FAULT1 - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

CHECK_DATA_FAULT2 - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

Copy and paste ABAP code example for DOCUMENT_CREATE_REVERSE 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_e_belnr  TYPE COBK-BELNR, "   
lv_i_kokrs  TYPE TKA01-KOKRS, "   
lv_ct_object  TYPE PSVZ_TYPE_T_OBJECT, "   
lt_t_kstar_vzskz  TYPE STANDARD TABLE OF VZSKZ_KSTAR, "   
lv_account_determination_fault  TYPE VZSKZ_KSTAR, "   
lv_i_ktopl  TYPE TKA01-KTOPL, "   
lv_check_data_fault3  TYPE TKA01, "   
lv_i_blart  TYPE T033E-BLART, "   
lv_fill_tables2_fault  TYPE T033E, "   
lv_i_wwert  TYPE ACCIT-WWERT, "   
lv_get_curtp_fault  TYPE ACCIT, "   
lv_i_logsys  TYPE T000-LOGSYS, "   
lv_not_relevant_for_reversal  TYPE T000, "   
lv_i_flg_storno  TYPE PSVZ_TYPE_FLG, "   
lv_i_flg_test  TYPE PSVZ_TYPE_FLG, "   
lv_it_zisum  TYPE PSVZ_TYPE_T_ZISUM, "   
lv_i_buperio  TYPE COVP-PERIO, "   
lv_e_kstar  TYPE CSKBZ-KSTAR, "   
lv_i_bukrs  TYPE T001-BUKRS, "   
lt_t_acchd  TYPE STANDARD TABLE OF ACCHD, "   
lv_t_zisum_storno  TYPE PSVZ_TYPE_T_ZISUM, "   
lv_object_key_get_fault  TYPE PSVZ_TYPE_T_ZISUM, "   
lv_i_gsber  TYPE TGSB-GSBER, "   
lt_t_accit  TYPE STANDARD TABLE OF ACCIT, "   
lv_i_tmp_belnr  TYPE I, "   
lv_fill_tables1_fault  TYPE I, "   
lv_i_objnr  TYPE ONR00-OBJNR, "   
lt_t_acccr  TYPE STANDARD TABLE OF ACCCR, "   
lv_t_tzin1  TYPE PSVZ_TYPE_T_TZIN1, "   
lv_create_ac_document_fault  TYPE PSVZ_TYPE_T_TZIN1, "   
lv_i_cpudt  TYPE ACCHD-CPUDT, "   
lv_t_tzin2  TYPE PSVZ_TYPE_T_TZIN2, "   
lv_document_read_fault1  TYPE PSVZ_TYPE_T_TZIN2, "   
lv_i_cputm  TYPE ACCHD-CPUTM, "   
lv_t_tzin3  TYPE PSVZ_TYPE_T_TZIN3, "   
lv_document_read_fault2  TYPE PSVZ_TYPE_T_TZIN3, "   
lv_i_bisdt  TYPE ACCIT-BUDAT, "   
lv_t_tzin4  TYPE PSVZ_TYPE_T_TZIN4, "   
lv_document_read_fault3  TYPE PSVZ_TYPE_T_TZIN4, "   
lv_i_budat  TYPE ACCIT-BUDAT, "   00000000
lv_check_data_fault1  TYPE ACCIT, "   
lv_i_facdt  TYPE TPI03-FACDT, "   
lv_check_data_fault2  TYPE TPI03. "   

  CALL FUNCTION 'DOCUMENT_CREATE_REVERSE'  "NOTRANSL: FB Buchung und Stornierung der Verzinsung im PS
    EXPORTING
         I_KOKRS = lv_i_kokrs
         I_KTOPL = lv_i_ktopl
         I_BLART = lv_i_blart
         I_WWERT = lv_i_wwert
         I_LOGSYS = lv_i_logsys
         I_FLG_STORNO = lv_i_flg_storno
         I_FLG_TEST = lv_i_flg_test
         IT_ZISUM = lv_it_zisum
         I_BUPERIO = lv_i_buperio
         I_BUKRS = lv_i_bukrs
         I_GSBER = lv_i_gsber
         I_OBJNR = lv_i_objnr
         I_CPUDT = lv_i_cpudt
         I_CPUTM = lv_i_cputm
         I_BISDT = lv_i_bisdt
         I_BUDAT = lv_i_budat
         I_FACDT = lv_i_facdt
    IMPORTING
         E_BELNR = lv_e_belnr
         E_KSTAR = lv_e_kstar
    CHANGING
         CT_OBJECT = lv_ct_object
         T_ZISUM_STORNO = lv_t_zisum_storno
         I_TMP_BELNR = lv_i_tmp_belnr
         T_TZIN1 = lv_t_tzin1
         T_TZIN2 = lv_t_tzin2
         T_TZIN3 = lv_t_tzin3
         T_TZIN4 = lv_t_tzin4
    TABLES
         T_KSTAR_VZSKZ = lt_t_kstar_vzskz
         T_ACCHD = lt_t_acchd
         T_ACCIT = lt_t_accit
         T_ACCCR = lt_t_acccr
    EXCEPTIONS
        ACCOUNT_DETERMINATION_FAULT = 1
        CHECK_DATA_FAULT3 = 10
        FILL_TABLES2_FAULT = 11
        GET_CURTP_FAULT = 12
        NOT_RELEVANT_FOR_REVERSAL = 13
        OBJECT_KEY_GET_FAULT = 2
        FILL_TABLES1_FAULT = 3
        CREATE_AC_DOCUMENT_FAULT = 4
        DOCUMENT_READ_FAULT1 = 5
        DOCUMENT_READ_FAULT2 = 6
        DOCUMENT_READ_FAULT3 = 7
        CHECK_DATA_FAULT1 = 8
        CHECK_DATA_FAULT2 = 9
. " DOCUMENT_CREATE_REVERSE




ABAP code using 7.40 inline data declarations to call FM DOCUMENT_CREATE_REVERSE

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 BELNR FROM COBK INTO @DATA(ld_e_belnr).
 
"SELECT single KOKRS FROM TKA01 INTO @DATA(ld_i_kokrs).
 
 
 
 
"SELECT single KTOPL FROM TKA01 INTO @DATA(ld_i_ktopl).
 
 
"SELECT single BLART FROM T033E INTO @DATA(ld_i_blart).
 
 
"SELECT single WWERT FROM ACCIT INTO @DATA(ld_i_wwert).
 
 
"SELECT single LOGSYS FROM T000 INTO @DATA(ld_i_logsys).
 
 
 
 
 
"SELECT single PERIO FROM COVP INTO @DATA(ld_i_buperio).
 
"SELECT single KSTAR FROM CSKBZ INTO @DATA(ld_e_kstar).
 
"SELECT single BUKRS FROM T001 INTO @DATA(ld_i_bukrs).
 
 
 
 
"SELECT single GSBER FROM TGSB INTO @DATA(ld_i_gsber).
 
 
 
 
"SELECT single OBJNR FROM ONR00 INTO @DATA(ld_i_objnr).
 
 
 
 
"SELECT single CPUDT FROM ACCHD INTO @DATA(ld_i_cpudt).
 
 
 
"SELECT single CPUTM FROM ACCHD INTO @DATA(ld_i_cputm).
 
 
 
"SELECT single BUDAT FROM ACCIT INTO @DATA(ld_i_bisdt).
 
 
 
"SELECT single BUDAT FROM ACCIT INTO @DATA(ld_i_budat).
DATA(ld_i_budat) = 00000000.
 
 
"SELECT single FACDT FROM TPI03 INTO @DATA(ld_i_facdt).
 
 


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!