SAP CORRESPONDENCE_REQUEST_POSTING Function Module for
CORRESPONDENCE_REQUEST_POSTING is a standard correspondence request posting SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 correspondence request posting FM, simply by entering the name CORRESPONDENCE_REQUEST_POSTING into the relevant SAP transaction such as SE37 or SE38.
Function Group: F022
Program Name: SAPLF022
Main Program: SAPLF022
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CORRESPONDENCE_REQUEST_POSTING 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 'CORRESPONDENCE_REQUEST_POSTING'".
EXPORTING
* I_ACCOUNT = ' ' "Proposal for correspondence: account number
* I_ACCOUNT_TYPE = ' ' "Proposal for correspondence: account type
* I_COMPANY_CODE = ' ' "Proposal for correspondence: company code
* I_DOCUMENT = ' ' "Proposal for correspondence: document number
* I_MESSAGE = ' ' "Indicator: receipt message is required
* I_OVERWRITE_ACC = ' ' "Indicator: account from proposal can be changed
* I_OVERWRITE_DOC = ' ' "Indicator: document from proposal can be changed
I_PROCESS = "Process ID for choosing possible correspondences
* I_YEAR = 0000 "Fiscal year
IMPORTING
E_BKORM = "Correspondence request
E_TEXT = "Description of the correspondence type
E_THEAD = "Header for individual text
TABLES
T_BKORM = "Table of the correspondence already requested
T_TLINE = "Lines for individual text
EXCEPTIONS
NO_EVENT_FOUND = 1 NO_EVENT_SELECTED = 2
IMPORTING Parameters details for CORRESPONDENCE_REQUEST_POSTING
I_ACCOUNT - Proposal for correspondence: account number
Data type: RF05A-KONTODefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_ACCOUNT_TYPE - Proposal for correspondence: account type
Data type: BSEG-XUMSWDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_COMPANY_CODE - Proposal for correspondence: company code
Data type: BKPF-BUKRSDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_DOCUMENT - Proposal for correspondence: document number
Data type: BKPF-BELNRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_MESSAGE - Indicator: receipt message is required
Data type: BSEG-XUMSWDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_OVERWRITE_ACC - Indicator: account from proposal can be changed
Data type: BSEG-XUMSWDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_OVERWRITE_DOC - Indicator: document from proposal can be changed
Data type: BSEG-XUMSWDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_PROCESS - Process ID for choosing possible correspondences
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
I_YEAR - Fiscal year
Data type: BKPF-GJAHRDefault: 0000
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CORRESPONDENCE_REQUEST_POSTING
E_BKORM - Correspondence request
Data type: BKORMOptional: No
Call by Reference: No ( called with pass by value option)
E_TEXT - Description of the correspondence type
Data type: T048T-LTEXTOptional: No
Call by Reference: No ( called with pass by value option)
E_THEAD - Header for individual text
Data type: THEADOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for CORRESPONDENCE_REQUEST_POSTING
T_BKORM - Table of the correspondence already requested
Data type: BKORMOptional: No
Call by Reference: No ( called with pass by value option)
T_TLINE - Lines for individual text
Data type: TLINEOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_EVENT_FOUND - No allowed correspondence type exists
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_EVENT_SELECTED - No correspondence type chosen
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CORRESPONDENCE_REQUEST_POSTING 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_bkorm | TYPE BKORM, " | |||
| lt_t_bkorm | TYPE STANDARD TABLE OF BKORM, " | |||
| lv_i_account | TYPE RF05A-KONTO, " SPACE | |||
| lv_no_event_found | TYPE RF05A, " | |||
| lv_e_text | TYPE T048T-LTEXT, " | |||
| lt_t_tline | TYPE STANDARD TABLE OF TLINE, " | |||
| lv_i_account_type | TYPE BSEG-XUMSW, " SPACE | |||
| lv_no_event_selected | TYPE BSEG, " | |||
| lv_e_thead | TYPE THEAD, " | |||
| lv_i_company_code | TYPE BKPF-BUKRS, " SPACE | |||
| lv_i_document | TYPE BKPF-BELNR, " SPACE | |||
| lv_i_message | TYPE BSEG-XUMSW, " SPACE | |||
| lv_i_overwrite_acc | TYPE BSEG-XUMSW, " SPACE | |||
| lv_i_overwrite_doc | TYPE BSEG-XUMSW, " SPACE | |||
| lv_i_process | TYPE BSEG, " | |||
| lv_i_year | TYPE BKPF-GJAHR. " 0000 |
|   CALL FUNCTION 'CORRESPONDENCE_REQUEST_POSTING' " |
| EXPORTING | ||
| I_ACCOUNT | = lv_i_account | |
| I_ACCOUNT_TYPE | = lv_i_account_type | |
| I_COMPANY_CODE | = lv_i_company_code | |
| I_DOCUMENT | = lv_i_document | |
| I_MESSAGE | = lv_i_message | |
| I_OVERWRITE_ACC | = lv_i_overwrite_acc | |
| I_OVERWRITE_DOC | = lv_i_overwrite_doc | |
| I_PROCESS | = lv_i_process | |
| I_YEAR | = lv_i_year | |
| IMPORTING | ||
| E_BKORM | = lv_e_bkorm | |
| E_TEXT | = lv_e_text | |
| E_THEAD | = lv_e_thead | |
| TABLES | ||
| T_BKORM | = lt_t_bkorm | |
| T_TLINE | = lt_t_tline | |
| EXCEPTIONS | ||
| NO_EVENT_FOUND = 1 | ||
| NO_EVENT_SELECTED = 2 | ||
| . " CORRESPONDENCE_REQUEST_POSTING | ||
ABAP code using 7.40 inline data declarations to call FM CORRESPONDENCE_REQUEST_POSTING
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 KONTO FROM RF05A INTO @DATA(ld_i_account). | ||||
| DATA(ld_i_account) | = ' '. | |||
| "SELECT single LTEXT FROM T048T INTO @DATA(ld_e_text). | ||||
| "SELECT single XUMSW FROM BSEG INTO @DATA(ld_i_account_type). | ||||
| DATA(ld_i_account_type) | = ' '. | |||
| "SELECT single BUKRS FROM BKPF INTO @DATA(ld_i_company_code). | ||||
| DATA(ld_i_company_code) | = ' '. | |||
| "SELECT single BELNR FROM BKPF INTO @DATA(ld_i_document). | ||||
| DATA(ld_i_document) | = ' '. | |||
| "SELECT single XUMSW FROM BSEG INTO @DATA(ld_i_message). | ||||
| DATA(ld_i_message) | = ' '. | |||
| "SELECT single XUMSW FROM BSEG INTO @DATA(ld_i_overwrite_acc). | ||||
| DATA(ld_i_overwrite_acc) | = ' '. | |||
| "SELECT single XUMSW FROM BSEG INTO @DATA(ld_i_overwrite_doc). | ||||
| DATA(ld_i_overwrite_doc) | = ' '. | |||
| "SELECT single GJAHR FROM BKPF INTO @DATA(ld_i_year). | ||||
| DATA(ld_i_year) | = 0000. | |||
Search for further information about these or an SAP related objects