SAP Function Modules

FI_PAYMENT_REQUEST_REVERSE SAP Function module







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

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


Pattern for FM FI_PAYMENT_REQUEST_REVERSE - FI PAYMENT REQUEST REVERSE





CALL FUNCTION 'FI_PAYMENT_REQUEST_REVERSE' "
* EXPORTING
*   i_awkey =                   " payrq-awkey
*   i_awsys =                   " payrq-awsys
*   i_awtyp =                   " payrq-awtyp
*   i_belnr =                   " payrq-belnr
*   i_bukrs =                   " payrq-bukrs
*   i_buzei =                   " payrq-buzei
*   i_gjahr =                   " payrq-gjahr
*   i_keyno =                   " payrq-keyno   Key number for payment request
*   i_reverse_date =            " bkpf-budat    Reverse Doc. Posting Date
*   i_reverse_period =          " bkpf-monat    Reverse Doc. Posting Period
*   i_reverse_reason =          " bkpf-stgrd    Reason for Reversal
*   i_reverse_fi_doc = SPACE    " boole-boole
*   i_rnum =                    " payrq_origin-prqnum
*   i_xcommit =                 " boole-boole
*   i_x_update_task =           " boole-boole
*   i_x_message = 'X'           " boole-boole
*   i_x_check_only =            " boole-boole   Data Element for BOOLE Domain: TRUE (='X') and FALSE (=' ')
  IMPORTING
    e_return =                  " bapiret2      Return Parameter(s)
  EXCEPTIONS
    IMPORT_PARAMETER = 1        "
    PRQ_NOT_REVERSABLE = 2      "               Other error
    ACCOUNT_LOCKED = 3          "
    ERROR_FB08 = 4              "
    .  "  FI_PAYMENT_REQUEST_REVERSE

ABAP code example for Function Module FI_PAYMENT_REQUEST_REVERSE





The ABAP code below is a full code listing to execute function module FI_PAYMENT_REQUEST_REVERSE 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_return  TYPE BAPIRET2 .


SELECT single AWKEY
FROM PAYRQ
INTO @DATA(ld_i_awkey).


SELECT single AWSYS
FROM PAYRQ
INTO @DATA(ld_i_awsys).


SELECT single AWTYP
FROM PAYRQ
INTO @DATA(ld_i_awtyp).


SELECT single BELNR
FROM PAYRQ
INTO @DATA(ld_i_belnr).


SELECT single BUKRS
FROM PAYRQ
INTO @DATA(ld_i_bukrs).


SELECT single BUZEI
FROM PAYRQ
INTO @DATA(ld_i_buzei).


SELECT single GJAHR
FROM PAYRQ
INTO @DATA(ld_i_gjahr).


SELECT single KEYNO
FROM PAYRQ
INTO @DATA(ld_i_keyno).


SELECT single BUDAT
FROM BKPF
INTO @DATA(ld_i_reverse_date).


SELECT single MONAT
FROM BKPF
INTO @DATA(ld_i_reverse_period).


SELECT single STGRD
FROM BKPF
INTO @DATA(ld_i_reverse_reason).


DATA(ld_i_reverse_fi_doc) = some text here

DATA(ld_i_rnum) = Check type of data required

DATA(ld_i_xcommit) = some text here

DATA(ld_i_x_update_task) = some text here

DATA(ld_i_x_message) = some text here

DATA(ld_i_x_check_only) = some text here . CALL FUNCTION 'FI_PAYMENT_REQUEST_REVERSE' * EXPORTING * i_awkey = ld_i_awkey * i_awsys = ld_i_awsys * i_awtyp = ld_i_awtyp * i_belnr = ld_i_belnr * i_bukrs = ld_i_bukrs * i_buzei = ld_i_buzei * i_gjahr = ld_i_gjahr * i_keyno = ld_i_keyno * i_reverse_date = ld_i_reverse_date * i_reverse_period = ld_i_reverse_period * i_reverse_reason = ld_i_reverse_reason * i_reverse_fi_doc = ld_i_reverse_fi_doc * i_rnum = ld_i_rnum * i_xcommit = ld_i_xcommit * i_x_update_task = ld_i_x_update_task * i_x_message = ld_i_x_message * i_x_check_only = ld_i_x_check_only IMPORTING e_return = ld_e_return EXCEPTIONS IMPORT_PARAMETER = 1 PRQ_NOT_REVERSABLE = 2 ACCOUNT_LOCKED = 3 ERROR_FB08 = 4 . " FI_PAYMENT_REQUEST_REVERSE
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "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_return  TYPE BAPIRET2 ,
ld_i_awkey  TYPE PAYRQ-AWKEY ,
ld_i_awsys  TYPE PAYRQ-AWSYS ,
ld_i_awtyp  TYPE PAYRQ-AWTYP ,
ld_i_belnr  TYPE PAYRQ-BELNR ,
ld_i_bukrs  TYPE PAYRQ-BUKRS ,
ld_i_buzei  TYPE PAYRQ-BUZEI ,
ld_i_gjahr  TYPE PAYRQ-GJAHR ,
ld_i_keyno  TYPE PAYRQ-KEYNO ,
ld_i_reverse_date  TYPE BKPF-BUDAT ,
ld_i_reverse_period  TYPE BKPF-MONAT ,
ld_i_reverse_reason  TYPE BKPF-STGRD ,
ld_i_reverse_fi_doc  TYPE BOOLE-BOOLE ,
ld_i_rnum  TYPE PAYRQ_ORIGIN-PRQNUM ,
ld_i_xcommit  TYPE BOOLE-BOOLE ,
ld_i_x_update_task  TYPE BOOLE-BOOLE ,
ld_i_x_message  TYPE BOOLE-BOOLE ,
ld_i_x_check_only  TYPE BOOLE-BOOLE .


SELECT single AWKEY
FROM PAYRQ
INTO ld_i_awkey.


SELECT single AWSYS
FROM PAYRQ
INTO ld_i_awsys.


SELECT single AWTYP
FROM PAYRQ
INTO ld_i_awtyp.


SELECT single BELNR
FROM PAYRQ
INTO ld_i_belnr.


SELECT single BUKRS
FROM PAYRQ
INTO ld_i_bukrs.


SELECT single BUZEI
FROM PAYRQ
INTO ld_i_buzei.


SELECT single GJAHR
FROM PAYRQ
INTO ld_i_gjahr.


SELECT single KEYNO
FROM PAYRQ
INTO ld_i_keyno.


SELECT single BUDAT
FROM BKPF
INTO ld_i_reverse_date.


SELECT single MONAT
FROM BKPF
INTO ld_i_reverse_period.


SELECT single STGRD
FROM BKPF
INTO ld_i_reverse_reason.


ld_i_reverse_fi_doc = some text here

ld_i_rnum = Check type of data required

ld_i_xcommit = some text here

ld_i_x_update_task = some text here

ld_i_x_message = some text here

ld_i_x_check_only = 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 FI_PAYMENT_REQUEST_REVERSE or its description.