SAP POST_DOCUMENT Function Module for Post Document









POST_DOCUMENT is a standard post document SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Post 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 post document FM, simply by entering the name POST_DOCUMENT into the relevant SAP transaction such as SE37 or SE38.

Function Group: F005
Program Name: SAPLF005
Main Program: SAPLF005
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update: 1



Function POST_DOCUMENT 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 'POST_DOCUMENT'"Post Document
EXPORTING
* I_BKDF = "Recurring entry data
* I_UF05A = "
* XBKPU = "
* I_GENER = "Generation of transaction
* SPLIT_DATA = "Checkbox

TABLES
* T_AUSZ1 = "
T_BSET = "
T_BSEU = "Additional information (per line)
* T_BSEGC = "Payment Card Data
* T_CCARDEC = "
* T_PYORDKEY = "
* T_VBSIP = "Index of Duplicated Vendor Documents (Insert, Delete)
* T_AUSZ2 = "
* T_AUSZ3 = "Assign Clearing Item to Cleared Items
* T_AUSZ4 = "Assgt of Clrg Items - Cleared Items with Acct Assignment
T_BKP1 = "Additional information (per document header)
T_BKPF = "Document headers
T_BSEC = "One-time account data
T_BSED = "Bill of exchange data
T_BSEG = "Document Line Items
.



IMPORTING Parameters details for POST_DOCUMENT

I_BKDF - Recurring entry data

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

I_UF05A -

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

XBKPU -

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

I_GENER - Generation of transaction

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

SPLIT_DATA - Checkbox

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

TABLES Parameters details for POST_DOCUMENT

T_AUSZ1 -

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

T_BSET -

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

T_BSEU - Additional information (per line)

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

T_BSEGC - Payment Card Data

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

T_CCARDEC -

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

T_PYORDKEY -

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

T_VBSIP - Index of Duplicated Vendor Documents (Insert, Delete)

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

T_AUSZ2 -

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

T_AUSZ3 - Assign Clearing Item to Cleared Items

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

T_AUSZ4 - Assgt of Clrg Items - Cleared Items with Acct Assignment

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

T_BKP1 - Additional information (per document header)

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

T_BKPF - Document headers

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

T_BSEC - One-time account data

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

T_BSED - Bill of exchange data

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

T_BSEG - Document Line Items

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

Copy and paste ABAP code example for POST_DOCUMENT 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_bkdf  TYPE BKDF, "   
lt_t_ausz1  TYPE STANDARD TABLE OF AUSZ1, "   
lt_t_bset  TYPE STANDARD TABLE OF BSET, "   
lt_t_bseu  TYPE STANDARD TABLE OF BSEU, "   
lt_t_bsegc  TYPE STANDARD TABLE OF BSEGC, "   
lt_t_ccardec  TYPE STANDARD TABLE OF CCARDEC, "   
lt_t_pyordkey  TYPE STANDARD TABLE OF PYORDKEY, "   
lt_t_vbsip  TYPE STANDARD TABLE OF VBSIP, "   
lv_i_uf05a  TYPE UF05A, "   
lt_t_ausz2  TYPE STANDARD TABLE OF AUSZ2, "   
lv_xbkpu  TYPE VBSEG-XZANF, "   
lt_t_ausz3  TYPE STANDARD TABLE OF AUSZ_CLR, "   
lv_i_gener  TYPE T020-GENER, "   
lt_t_ausz4  TYPE STANDARD TABLE OF AUSZ_CLR_ASGMT, "   
lt_t_bkp1  TYPE STANDARD TABLE OF BKP1, "   
lv_split_data  TYPE XFELD, "   
lt_t_bkpf  TYPE STANDARD TABLE OF BKPF, "   
lt_t_bsec  TYPE STANDARD TABLE OF BSEC, "   
lt_t_bsed  TYPE STANDARD TABLE OF BSED, "   
lt_t_bseg  TYPE STANDARD TABLE OF BSEG. "   

  CALL FUNCTION 'POST_DOCUMENT'  "Post Document
    EXPORTING
         I_BKDF = lv_i_bkdf
         I_UF05A = lv_i_uf05a
         XBKPU = lv_xbkpu
         I_GENER = lv_i_gener
         SPLIT_DATA = lv_split_data
    TABLES
         T_AUSZ1 = lt_t_ausz1
         T_BSET = lt_t_bset
         T_BSEU = lt_t_bseu
         T_BSEGC = lt_t_bsegc
         T_CCARDEC = lt_t_ccardec
         T_PYORDKEY = lt_t_pyordkey
         T_VBSIP = lt_t_vbsip
         T_AUSZ2 = lt_t_ausz2
         T_AUSZ3 = lt_t_ausz3
         T_AUSZ4 = lt_t_ausz4
         T_BKP1 = lt_t_bkp1
         T_BKPF = lt_t_bkpf
         T_BSEC = lt_t_bsec
         T_BSED = lt_t_bsed
         T_BSEG = lt_t_bseg
. " POST_DOCUMENT




ABAP code using 7.40 inline data declarations to call FM POST_DOCUMENT

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 XZANF FROM VBSEG INTO @DATA(ld_xbkpu).
 
 
"SELECT single GENER FROM T020 INTO @DATA(ld_i_gener).
 
 
 
 
 
 
 
 


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!