SAP TR_SE_POSTING_DOCUMENT_CREATE Function Module for TR-TM-SE: Initialize New Security Posting Document
TR_SE_POSTING_DOCUMENT_CREATE is a standard tr se posting document create SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for TR-TM-SE: Initialize New Security Posting Document 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 tr se posting document create FM, simply by entering the name TR_SE_POSTING_DOCUMENT_CREATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: FWF2
Program Name: SAPLFWF2
Main Program:
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function TR_SE_POSTING_DOCUMENT_CREATE 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 'TR_SE_POSTING_DOCUMENT_CREATE'"TR-TM-SE: Initialize New Security Posting Document.
EXPORTING
I_BUKRS = "
I_GJAHR = "
I_PRIMANOTA = "
* I_BUDAT = "
* I_BLDAT = "
* I_PERIOD = "
* I_DOCNRFI = "
* I_GJAHRFI = "
* I_SAPPLICATION = ' ' "Erzeugende TR-Anwendung
IMPORTING
E_VWPOSTDOC = "
EXCEPTIONS
ERROR_NUMBER_RANGE = 1 I_BUKRS_INITIAL = 2 I_GJAHR_INITIAL = 3
IMPORTING Parameters details for TR_SE_POSTING_DOCUMENT_CREATE
I_BUKRS -
Data type: VWPOSTDOC-BUKRSOptional: No
Call by Reference: No ( called with pass by value option)
I_GJAHR -
Data type: VWPOSTDOC-GJAHROptional: No
Call by Reference: No ( called with pass by value option)
I_PRIMANOTA -
Data type: VWPOSTDOC-RPNNROptional: No
Call by Reference: No ( called with pass by value option)
I_BUDAT -
Data type: VWPOSTDOC-BUDATOptional: Yes
Call by Reference: No ( called with pass by value option)
I_BLDAT -
Data type: VWPOSTDOC-BLDATOptional: Yes
Call by Reference: No ( called with pass by value option)
I_PERIOD -
Data type: VWPOSTDOC-PERIODOptional: Yes
Call by Reference: No ( called with pass by value option)
I_DOCNRFI -
Data type: VWPOSTDOC-DOCNRFIOptional: Yes
Call by Reference: No ( called with pass by value option)
I_GJAHRFI -
Data type: VWPOSTDOC-GJAHRFIOptional: Yes
Call by Reference: No ( called with pass by value option)
I_SAPPLICATION - Erzeugende TR-Anwendung
Data type: VWPOSTDOC-SAPPLICATIONDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for TR_SE_POSTING_DOCUMENT_CREATE
E_VWPOSTDOC -
Data type: VWPOSTDOCOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
ERROR_NUMBER_RANGE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
I_BUKRS_INITIAL -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
I_GJAHR_INITIAL -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for TR_SE_POSTING_DOCUMENT_CREATE 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_bukrs | TYPE VWPOSTDOC-BUKRS, " | |||
| lv_e_vwpostdoc | TYPE VWPOSTDOC, " | |||
| lv_error_number_range | TYPE VWPOSTDOC, " | |||
| lv_i_gjahr | TYPE VWPOSTDOC-GJAHR, " | |||
| lv_i_bukrs_initial | TYPE VWPOSTDOC, " | |||
| lv_i_primanota | TYPE VWPOSTDOC-RPNNR, " | |||
| lv_i_gjahr_initial | TYPE VWPOSTDOC, " | |||
| lv_i_budat | TYPE VWPOSTDOC-BUDAT, " | |||
| lv_i_bldat | TYPE VWPOSTDOC-BLDAT, " | |||
| lv_i_period | TYPE VWPOSTDOC-PERIOD, " | |||
| lv_i_docnrfi | TYPE VWPOSTDOC-DOCNRFI, " | |||
| lv_i_gjahrfi | TYPE VWPOSTDOC-GJAHRFI, " | |||
| lv_i_sapplication | TYPE VWPOSTDOC-SAPPLICATION. " SPACE |
|   CALL FUNCTION 'TR_SE_POSTING_DOCUMENT_CREATE' "TR-TM-SE: Initialize New Security Posting Document |
| EXPORTING | ||
| I_BUKRS | = lv_i_bukrs | |
| I_GJAHR | = lv_i_gjahr | |
| I_PRIMANOTA | = lv_i_primanota | |
| I_BUDAT | = lv_i_budat | |
| I_BLDAT | = lv_i_bldat | |
| I_PERIOD | = lv_i_period | |
| I_DOCNRFI | = lv_i_docnrfi | |
| I_GJAHRFI | = lv_i_gjahrfi | |
| I_SAPPLICATION | = lv_i_sapplication | |
| IMPORTING | ||
| E_VWPOSTDOC | = lv_e_vwpostdoc | |
| EXCEPTIONS | ||
| ERROR_NUMBER_RANGE = 1 | ||
| I_BUKRS_INITIAL = 2 | ||
| I_GJAHR_INITIAL = 3 | ||
| . " TR_SE_POSTING_DOCUMENT_CREATE | ||
ABAP code using 7.40 inline data declarations to call FM TR_SE_POSTING_DOCUMENT_CREATE
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 BUKRS FROM VWPOSTDOC INTO @DATA(ld_i_bukrs). | ||||
| "SELECT single GJAHR FROM VWPOSTDOC INTO @DATA(ld_i_gjahr). | ||||
| "SELECT single RPNNR FROM VWPOSTDOC INTO @DATA(ld_i_primanota). | ||||
| "SELECT single BUDAT FROM VWPOSTDOC INTO @DATA(ld_i_budat). | ||||
| "SELECT single BLDAT FROM VWPOSTDOC INTO @DATA(ld_i_bldat). | ||||
| "SELECT single PERIOD FROM VWPOSTDOC INTO @DATA(ld_i_period). | ||||
| "SELECT single DOCNRFI FROM VWPOSTDOC INTO @DATA(ld_i_docnrfi). | ||||
| "SELECT single GJAHRFI FROM VWPOSTDOC INTO @DATA(ld_i_gjahrfi). | ||||
| "SELECT single SAPPLICATION FROM VWPOSTDOC INTO @DATA(ld_i_sapplication). | ||||
| DATA(ld_i_sapplication) | = ' '. | |||
Search for further information about these or an SAP related objects