SAP FVD_REVERSE_OL_MULT_DOC Function Module for Object Layer for Posting Reversals
FVD_REVERSE_OL_MULT_DOC is a standard fvd reverse ol mult doc SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Object Layer for Posting Reversals 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 fvd reverse ol mult doc FM, simply by entering the name FVD_REVERSE_OL_MULT_DOC into the relevant SAP transaction such as SE37 or SE38.
Function Group: FVD_REVERSE_OL
Program Name: SAPLFVD_REVERSE_OL
Main Program: SAPLFVD_REVERSE_OL
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function FVD_REVERSE_OL_MULT_DOC 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 'FVD_REVERSE_OL_MULT_DOC'"Object Layer for Posting Reversals.
EXPORTING
I_STR_VDARL = "Loan
I_POSTING_DATE = "Posting Date in the Document
I_REVERSAL_REASON = "Reason for Reversal
I_PERIOD = "Fiscal Period
* I_DOC_HEADER_TEXT = "Name of Company Code or Company
* I_TAB_LOAN_DOCS = "Loan Document Numbers
* I_FLG_REVACCOUNT_PAYED_DISB = "Boolean Value for 'True'
* I_FLG_SIMULATION = "Posting Simulation
* I_REVACC_CLEARED_POST = "Account Selection for Posting - Reversal or Acc. Receivable
IMPORTING
E_TAB_NEW_LOAN_DOC_HEADERS = "Flow Data: Document Header for Actual Record
E_TAB_NEW_LOAN_DOC_ITEMS = "Posted line items for document header
E_STR_NEW_LOAN = "Loan
E_TAB_ACCT_DOC = "Accounting Document Segment
E_TAB_BAPIRET2 = "Table with BAPI Return Information
EXCEPTIONS
NO_AUTH_CNCL_LOAN = 1 SUPER_PRIMANOTA_GEN_ERROR = 10 CANNOT_LOCK_FI_DOC = 11 POSTING_IMPOSSIBLE = 12 POSTING_DATE_MISSING = 13 REVERSAL_REASON_MISSING = 14 CONTRACT_DATA_NOT_FOUND = 15 ERROR_POSTING_PREPARATION = 16 ERROR_COMPLETE_POSTING = 17 POST_INFO_INVALID = 18 UNKNOWN_ERROR = 19 AUTH_LOAN = 2 AUTH_LOAN_PROD_TYP = 3 ACT_DONE = 4 STATE_NOT_FOUND = 5 DOC_HEADER_NOT_FOUND = 6 DOC_ITEM_NOT_FOUND = 7 NONE_REVERSIBLE = 8 SUPER_PRIMANOTA_NR_ERROR = 9
IMPORTING Parameters details for FVD_REVERSE_OL_MULT_DOC
I_STR_VDARL - Loan
Data type: VDARLOptional: No
Call by Reference: No ( called with pass by value option)
I_POSTING_DATE - Posting Date in the Document
Data type: BUDATOptional: No
Call by Reference: No ( called with pass by value option)
I_REVERSAL_REASON - Reason for Reversal
Data type: SSTOGRDOptional: No
Call by Reference: No ( called with pass by value option)
I_PERIOD - Fiscal Period
Data type: MONATOptional: No
Call by Reference: No ( called with pass by value option)
I_DOC_HEADER_TEXT - Name of Company Code or Company
Data type: BUTXTOptional: Yes
Call by Reference: No ( called with pass by value option)
I_TAB_LOAN_DOCS - Loan Document Numbers
Data type: TRTY_RBELKPFDOptional: Yes
Call by Reference: No ( called with pass by value option)
I_FLG_REVACCOUNT_PAYED_DISB - Boolean Value for 'True'
Data type: TRUEOptional: Yes
Call by Reference: No ( called with pass by value option)
I_FLG_SIMULATION - Posting Simulation
Data type: TB_FLG_SIMULATEOptional: Yes
Call by Reference: No ( called with pass by value option)
I_REVACC_CLEARED_POST - Account Selection for Posting - Reversal or Acc. Receivable
Data type: TB_REVACC_CLEARED_POSTOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for FVD_REVERSE_OL_MULT_DOC
E_TAB_NEW_LOAN_DOC_HEADERS - Flow Data: Document Header for Actual Record
Data type: TRTY_VDBEKIOptional: No
Call by Reference: No ( called with pass by value option)
E_TAB_NEW_LOAN_DOC_ITEMS - Posted line items for document header
Data type: TRTY_VDBEPIOptional: No
Call by Reference: No ( called with pass by value option)
E_STR_NEW_LOAN - Loan
Data type: VDARLOptional: No
Call by Reference: No ( called with pass by value option)
E_TAB_ACCT_DOC - Accounting Document Segment
Data type: TRTY_BSEGOptional: No
Call by Reference: No ( called with pass by value option)
E_TAB_BAPIRET2 - Table with BAPI Return Information
Data type: BAPIRETTABOptional: No
Call by Reference: Yes
EXCEPTIONS details
NO_AUTH_CNCL_LOAN - No authorization to reverse loan postings
Data type:Optional: No
Call by Reference: Yes
SUPER_PRIMANOTA_GEN_ERROR - Error when generating super-primanota number
Data type:Optional: No
Call by Reference: Yes
CANNOT_LOCK_FI_DOC - Fi document could not be locked
Data type:Optional: No
Call by Reference: Yes
POSTING_IMPOSSIBLE - Posting Impossible
Data type:Optional: No
Call by Reference: Yes
POSTING_DATE_MISSING - Posting date is missing
Data type:Optional: No
Call by Reference: Yes
REVERSAL_REASON_MISSING - Reversal reason is missing
Data type:Optional: No
Call by Reference: Yes
CONTRACT_DATA_NOT_FOUND - Contract data is not found
Data type:Optional: No
Call by Reference: Yes
ERROR_POSTING_PREPARATION - Error during posting preparation
Data type:Optional: No
Call by Reference: Yes
ERROR_COMPLETE_POSTING - Error during completion of posting
Data type:Optional: No
Call by Reference: Yes
POST_INFO_INVALID - Invalid posting information
Data type:Optional: No
Call by Reference: Yes
UNKNOWN_ERROR - Unknown Error
Data type:Optional: No
Call by Reference: Yes
AUTH_LOAN - No authorization for the loan
Data type:Optional: No
Call by Reference: Yes
AUTH_LOAN_PROD_TYP - No authorization for the loan for this product type
Data type:Optional: No
Call by Reference: Yes
ACT_DONE - Contract Status is Actual Completed
Data type:Optional: No
Call by Reference: Yes
STATE_NOT_FOUND - Contract Status not found
Data type:Optional: No
Call by Reference: Yes
DOC_HEADER_NOT_FOUND - Document header details not found
Data type:Optional: No
Call by Reference: Yes
DOC_ITEM_NOT_FOUND - Document item details not found
Data type:Optional: No
Call by Reference: Yes
NONE_REVERSIBLE - None of the documents are reversible
Data type:Optional: No
Call by Reference: Yes
SUPER_PRIMANOTA_NR_ERROR - Error in super-primanota number range
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for FVD_REVERSE_OL_MULT_DOC 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_i_str_vdarl | TYPE VDARL, " | |||
| lv_no_auth_cncl_loan | TYPE VDARL, " | |||
| lv_e_tab_new_loan_doc_headers | TYPE TRTY_VDBEKI, " | |||
| lv_super_primanota_gen_error | TYPE TRTY_VDBEKI, " | |||
| lv_cannot_lock_fi_doc | TYPE TRTY_VDBEKI, " | |||
| lv_posting_impossible | TYPE TRTY_VDBEKI, " | |||
| lv_posting_date_missing | TYPE TRTY_VDBEKI, " | |||
| lv_reversal_reason_missing | TYPE TRTY_VDBEKI, " | |||
| lv_contract_data_not_found | TYPE TRTY_VDBEKI, " | |||
| lv_error_posting_preparation | TYPE TRTY_VDBEKI, " | |||
| lv_error_complete_posting | TYPE TRTY_VDBEKI, " | |||
| lv_post_info_invalid | TYPE TRTY_VDBEKI, " | |||
| lv_unknown_error | TYPE TRTY_VDBEKI, " | |||
| lv_auth_loan | TYPE TRTY_VDBEKI, " | |||
| lv_i_posting_date | TYPE BUDAT, " | |||
| lv_e_tab_new_loan_doc_items | TYPE TRTY_VDBEPI, " | |||
| lv_e_str_new_loan | TYPE VDARL, " | |||
| lv_i_reversal_reason | TYPE SSTOGRD, " | |||
| lv_auth_loan_prod_typ | TYPE SSTOGRD, " | |||
| lv_act_done | TYPE SSTOGRD, " | |||
| lv_i_period | TYPE MONAT, " | |||
| lv_e_tab_acct_doc | TYPE TRTY_BSEG, " | |||
| lv_e_tab_bapiret2 | TYPE BAPIRETTAB, " | |||
| lv_state_not_found | TYPE BAPIRETTAB, " | |||
| lv_i_doc_header_text | TYPE BUTXT, " | |||
| lv_i_tab_loan_docs | TYPE TRTY_RBELKPFD, " | |||
| lv_doc_header_not_found | TYPE TRTY_RBELKPFD, " | |||
| lv_doc_item_not_found | TYPE TRTY_RBELKPFD, " | |||
| lv_i_flg_revaccount_payed_disb | TYPE TRUE, " | |||
| lv_none_reversible | TYPE TRUE, " | |||
| lv_i_flg_simulation | TYPE TB_FLG_SIMULATE, " | |||
| lv_i_revacc_cleared_post | TYPE TB_REVACC_CLEARED_POST, " | |||
| lv_super_primanota_nr_error | TYPE TB_REVACC_CLEARED_POST. " |
|   CALL FUNCTION 'FVD_REVERSE_OL_MULT_DOC' "Object Layer for Posting Reversals |
| EXPORTING | ||
| I_STR_VDARL | = lv_i_str_vdarl | |
| I_POSTING_DATE | = lv_i_posting_date | |
| I_REVERSAL_REASON | = lv_i_reversal_reason | |
| I_PERIOD | = lv_i_period | |
| I_DOC_HEADER_TEXT | = lv_i_doc_header_text | |
| I_TAB_LOAN_DOCS | = lv_i_tab_loan_docs | |
| I_FLG_REVACCOUNT_PAYED_DISB | = lv_i_flg_revaccount_payed_disb | |
| I_FLG_SIMULATION | = lv_i_flg_simulation | |
| I_REVACC_CLEARED_POST | = lv_i_revacc_cleared_post | |
| IMPORTING | ||
| E_TAB_NEW_LOAN_DOC_HEADERS | = lv_e_tab_new_loan_doc_headers | |
| E_TAB_NEW_LOAN_DOC_ITEMS | = lv_e_tab_new_loan_doc_items | |
| E_STR_NEW_LOAN | = lv_e_str_new_loan | |
| E_TAB_ACCT_DOC | = lv_e_tab_acct_doc | |
| E_TAB_BAPIRET2 | = lv_e_tab_bapiret2 | |
| EXCEPTIONS | ||
| NO_AUTH_CNCL_LOAN = 1 | ||
| SUPER_PRIMANOTA_GEN_ERROR = 10 | ||
| CANNOT_LOCK_FI_DOC = 11 | ||
| POSTING_IMPOSSIBLE = 12 | ||
| POSTING_DATE_MISSING = 13 | ||
| REVERSAL_REASON_MISSING = 14 | ||
| CONTRACT_DATA_NOT_FOUND = 15 | ||
| ERROR_POSTING_PREPARATION = 16 | ||
| ERROR_COMPLETE_POSTING = 17 | ||
| POST_INFO_INVALID = 18 | ||
| UNKNOWN_ERROR = 19 | ||
| AUTH_LOAN = 2 | ||
| AUTH_LOAN_PROD_TYP = 3 | ||
| ACT_DONE = 4 | ||
| STATE_NOT_FOUND = 5 | ||
| DOC_HEADER_NOT_FOUND = 6 | ||
| DOC_ITEM_NOT_FOUND = 7 | ||
| NONE_REVERSIBLE = 8 | ||
| SUPER_PRIMANOTA_NR_ERROR = 9 | ||
| . " FVD_REVERSE_OL_MULT_DOC | ||
ABAP code using 7.40 inline data declarations to call FM FVD_REVERSE_OL_MULT_DOC
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.Search for further information about these or an SAP related objects