SAP Tables

PRELIMINARY_POSTING_FB01 SAP Function module




PRELIMINARY_POSTING_FB01is a standard SAP function module available within R/3 SAPsystems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import/export parameters, exceptions etc as well as any documentation contributions specific to the object. See here to view full function module documentation and code listing, simply by entering the name PRELIMINARY_POSTING_FB01 into the relevant SAP transaction such as SE37 or SE80.

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 PRELIMINARY_POSTING_FB01 or its description.


Pattern for FM PRELIMINARY_POSTING_FB01 - PRELIMINARY POSTING FB01
Associated Function Group: F040
Released Date: Not Released
CALL FUNCTION 'PRELIMINARY_POSTING_FB01' "
* EXPORTING
*   text_item_update = SPACE    " boole-boole   Data Element for BOOLE Domain: TRUE (='X') and FALSE (=' ')
*   i_xcmpl = SPACE             " xfeld         Checkbox
*   i_tcode = 'FB01'            " t020-tcode    ABAP Program, Current Transaction Code
*   i_pargb =                   " rf05a-pargb   Business Partner's Business Area
*   i_tcode_int =               " tcode         Transaction Code
  IMPORTING
    xepbbp =                    " xfeld         Checkbox
* TABLES
*   t_bkorm =                   " bkorm         Accounting correspondence requests
*   t_thead =                   " thead         SAPscript: Text Header
*   t_splttab =                 " acsplt        Carrier for Split Information re: Current Account Line Items
*   t_spltwt =                  " with_itemx    Auxiliary structure for table WITH_ITEM
    .  "  PRELIMINARY_POSTING_FB01

ABAP code example for Function Module PRELIMINARY_POSTING_FB01

The ABAP code below is a full code listing to execute function module PRELIMINARY_POSTING_FB01 including all data declarations. The code uses the latest in-line data declaration syntax but I have included an abap code snipet 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_xepbbp   TYPE XFELD,
it_t_bkorm   TYPE STANDARD TABLE OF BKORM,"tables param
wa_t_bkorm LIKE LINE OF it_t_bkorm  ,
it_t_thead   TYPE STANDARD TABLE OF THEAD,"tables param
wa_t_thead LIKE LINE OF it_t_thead  ,
it_t_splttab   TYPE STANDARD TABLE OF ACSPLT,"tables param
wa_t_splttab LIKE LINE OF it_t_splttab  ,
it_t_spltwt   TYPE STANDARD TABLE OF WITH_ITEMX,"tables param
wa_t_spltwt LIKE LINE OF it_t_spltwt  .


DATA(ld_text_item_update). = 'some text here'
DATA(ld_i_xcmpl) = 'Check type of data required'.

SELECT single TCODE
FROM T020
INTO @DATA(ld_i_tcode).


DATA(ld_i_pargb). = 'some text here'
DATA(ld_i_tcode_int) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_bkorm to it_t_bkorm.

"populate fields of struture and append to itab
append wa_t_thead to it_t_thead.

"populate fields of struture and append to itab
append wa_t_splttab to it_t_splttab.

"populate fields of struture and append to itab
append wa_t_spltwt to it_t_spltwt.. CALL FUNCTION 'PRELIMINARY_POSTING_FB01' * EXPORTING * text_item_update = ld_text_item_update * i_xcmpl = ld_i_xcmpl * i_tcode = ld_i_tcode * i_pargb = ld_i_pargb * i_tcode_int = ld_i_tcode_int IMPORTING xepbbp = ld_xepbbp * TABLES * t_bkorm = it_t_bkorm * t_thead = it_t_thead * t_splttab = it_t_splttab * t_spltwt = it_t_spltwt . " PRELIMINARY_POSTING_FB01
IF SY-SUBRC EQ 0.   "All OK 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_xepbbp TYPE XFELD ,
ld_text_item_update TYPE BOOLE-BOOLE ,
ld_i_xcmpl TYPE XFELD ,
ld_i_tcode TYPE T020-TCODE ,
it_t_bkorm TYPE STANDARD TABLE OF BKORM ,
wa_t_bkorm LIKE LINE OF it_t_bkorm,
ld_i_pargb TYPE RF05A-PARGB ,
it_t_thead TYPE STANDARD TABLE OF THEAD ,
wa_t_thead LIKE LINE OF it_t_thead,
ld_i_tcode_int TYPE TCODE ,
it_t_splttab TYPE STANDARD TABLE OF ACSPLT ,
wa_t_splttab LIKE LINE OF it_t_splttab,
it_t_spltwt TYPE STANDARD TABLE OF WITH_ITEMX ,
wa_t_spltwt LIKE LINE OF it_t_spltwt.

ld_xepbbp = 'Check type of data required'.

DATA(ld_text_item_update). = 'some text here'
ld_i_xcmpl = 'Check type of data required'.

SELECT single TCODE
FROM T020
INTO ld_i_tcode.


"populate fields of struture and append to itab
append wa_t_bkorm to it_t_bkorm.

DATA(ld_i_pargb). = 'some text here'

"populate fields of struture and append to itab
append wa_t_thead to it_t_thead.
ld_i_tcode_int = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_splttab to it_t_splttab.

"populate fields of struture and append to itab
append wa_t_spltwt to it_t_spltwt..