SAP Function Modules

FCJ_POST_ALL SAP Function module







FCJ_POST_ALL is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name FCJ_POST_ALL into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: SAPLFCJ_MAIN_FORM
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM FCJ_POST_ALL - FCJ POST ALL





CALL FUNCTION 'FCJ_POST_ALL' "
  EXPORTING
    i_comp_code =               " tcj_c_journals-comp_code
    i_cajo_number =             " tcj_c_journals-cajo_number
    i_currency =                " tcj_documents-currency
    i_typ =                     " cjtranstyp
    i_display_period_lo =       " sy-datum      Date and Time, Current (Application Server) Date
    i_display_period_hi =       " sy-datum      Date and Time, Current (Application Server) Date
  IMPORTING
    e_error_number =            " tcj_documents-posting_number
  TABLES
    itcj_postings =             " iscj_postings  Cash Journal Structure Screen 0100 SAPMFCJ0
    itcj_wtax_items =           " tcj_wtax_items  Withholding Tax Items for Cash Journal Document Items
    itcj_split_postings =       " iscj_postings  Cash Journal Structure Screen 0100 SAPMFCJ0
    itcj_cpd =                  " tcj_cpd       FBCJ: One-Time Account Data of Cash Journal Document Items
  CHANGING
    p_beg_balance =             " cjamount      Cash Journal Amount Field with +/- Sign
    p_total_receipts =          " cjamount      Cash Journal Amount Field with +/- Sign
    p_total_payments =          " cjamount      Cash Journal Amount Field with +/- Sign
    p_total_checks =            " cjamount      Cash Journal Amount Field with +/- Sign
    p_run_balance =             " cjamount      Cash Journal Amount Field with +/- Sign
    p_run_cash_balance =        " cjamount      Cash Journal Amount Field with +/- Sign
    p_numb_of_rec =             " i
    p_numb_of_paym =            " i
    p_numb_of_checks =          " i
    .  "  FCJ_POST_ALL

ABAP code example for Function Module FCJ_POST_ALL





The ABAP code below is a full code listing to execute function module FCJ_POST_ALL including all data declarations. The code uses 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 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_e_error_number  TYPE TCJ_DOCUMENTS-POSTING_NUMBER ,
it_itcj_postings  TYPE STANDARD TABLE OF ISCJ_POSTINGS,"TABLES PARAM
wa_itcj_postings  LIKE LINE OF it_itcj_postings ,
it_itcj_wtax_items  TYPE STANDARD TABLE OF TCJ_WTAX_ITEMS,"TABLES PARAM
wa_itcj_wtax_items  LIKE LINE OF it_itcj_wtax_items ,
it_itcj_split_postings  TYPE STANDARD TABLE OF ISCJ_POSTINGS,"TABLES PARAM
wa_itcj_split_postings  LIKE LINE OF it_itcj_split_postings ,
it_itcj_cpd  TYPE STANDARD TABLE OF TCJ_CPD,"TABLES PARAM
wa_itcj_cpd  LIKE LINE OF it_itcj_cpd .

DATA(ld_p_beg_balance) = 'Check type of data required'.
DATA(ld_p_total_receipts) = 'Check type of data required'.
DATA(ld_p_total_payments) = 'Check type of data required'.
DATA(ld_p_total_checks) = 'Check type of data required'.
DATA(ld_p_run_balance) = 'Check type of data required'.
DATA(ld_p_run_cash_balance) = 'Check type of data required'.
DATA(ld_p_numb_of_rec) = 'Check type of data required'.
DATA(ld_p_numb_of_paym) = 'Check type of data required'.
DATA(ld_p_numb_of_checks) = 'Check type of data required'.

SELECT single COMP_CODE
FROM TCJ_C_JOURNALS
INTO @DATA(ld_i_comp_code).


SELECT single CAJO_NUMBER
FROM TCJ_C_JOURNALS
INTO @DATA(ld_i_cajo_number).


SELECT single CURRENCY
FROM TCJ_DOCUMENTS
INTO @DATA(ld_i_currency).

DATA(ld_i_typ) = 'Check type of data required'.
DATA(ld_i_display_period_lo) = '20210129'.
DATA(ld_i_display_period_hi) = '20210129'.

"populate fields of struture and append to itab
append wa_itcj_postings to it_itcj_postings.

"populate fields of struture and append to itab
append wa_itcj_wtax_items to it_itcj_wtax_items.

"populate fields of struture and append to itab
append wa_itcj_split_postings to it_itcj_split_postings.

"populate fields of struture and append to itab
append wa_itcj_cpd to it_itcj_cpd. . CALL FUNCTION 'FCJ_POST_ALL' EXPORTING i_comp_code = ld_i_comp_code i_cajo_number = ld_i_cajo_number i_currency = ld_i_currency i_typ = ld_i_typ i_display_period_lo = ld_i_display_period_lo i_display_period_hi = ld_i_display_period_hi IMPORTING e_error_number = ld_e_error_number TABLES itcj_postings = it_itcj_postings itcj_wtax_items = it_itcj_wtax_items itcj_split_postings = it_itcj_split_postings itcj_cpd = it_itcj_cpd CHANGING p_beg_balance = ld_p_beg_balance p_total_receipts = ld_p_total_receipts p_total_payments = ld_p_total_payments p_total_checks = ld_p_total_checks p_run_balance = ld_p_run_balance p_run_cash_balance = ld_p_run_cash_balance p_numb_of_rec = ld_p_numb_of_rec p_numb_of_paym = ld_p_numb_of_paym p_numb_of_checks = ld_p_numb_of_checks . " FCJ_POST_ALL
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_p_beg_balance  TYPE CJAMOUNT ,
ld_e_error_number  TYPE TCJ_DOCUMENTS-POSTING_NUMBER ,
ld_i_comp_code  TYPE TCJ_C_JOURNALS-COMP_CODE ,
it_itcj_postings  TYPE STANDARD TABLE OF ISCJ_POSTINGS ,
wa_itcj_postings  LIKE LINE OF it_itcj_postings,
ld_p_total_receipts  TYPE CJAMOUNT ,
ld_i_cajo_number  TYPE TCJ_C_JOURNALS-CAJO_NUMBER ,
it_itcj_wtax_items  TYPE STANDARD TABLE OF TCJ_WTAX_ITEMS ,
wa_itcj_wtax_items  LIKE LINE OF it_itcj_wtax_items,
ld_p_total_payments  TYPE CJAMOUNT ,
ld_i_currency  TYPE TCJ_DOCUMENTS-CURRENCY ,
it_itcj_split_postings  TYPE STANDARD TABLE OF ISCJ_POSTINGS ,
wa_itcj_split_postings  LIKE LINE OF it_itcj_split_postings,
ld_p_total_checks  TYPE CJAMOUNT ,
ld_i_typ  TYPE CJTRANSTYP ,
it_itcj_cpd  TYPE STANDARD TABLE OF TCJ_CPD ,
wa_itcj_cpd  LIKE LINE OF it_itcj_cpd,
ld_p_run_balance  TYPE CJAMOUNT ,
ld_i_display_period_lo  TYPE SY-DATUM ,
ld_p_run_cash_balance  TYPE CJAMOUNT ,
ld_i_display_period_hi  TYPE SY-DATUM ,
ld_p_numb_of_rec  TYPE I ,
ld_p_numb_of_paym  TYPE I ,
ld_p_numb_of_checks  TYPE I .

ld_p_beg_balance = '20210129'.

SELECT single COMP_CODE
FROM TCJ_C_JOURNALS
INTO ld_i_comp_code.


"populate fields of struture and append to itab
append wa_itcj_postings to it_itcj_postings.
ld_p_total_receipts = '20210129'.

SELECT single CAJO_NUMBER
FROM TCJ_C_JOURNALS
INTO ld_i_cajo_number.


"populate fields of struture and append to itab
append wa_itcj_wtax_items to it_itcj_wtax_items.
ld_p_total_payments = '20210129'.

SELECT single CURRENCY
FROM TCJ_DOCUMENTS
INTO ld_i_currency.


"populate fields of struture and append to itab
append wa_itcj_split_postings to it_itcj_split_postings.
ld_p_total_checks = '20210129'.
ld_i_typ = '20210129'.

"populate fields of struture and append to itab
append wa_itcj_cpd to it_itcj_cpd.
ld_p_run_balance = '20210129'.
ld_i_display_period_lo = '20210129'.
ld_p_run_cash_balance = '20210129'.
ld_i_display_period_hi = '20210129'.
ld_p_numb_of_rec = '20210129'.
ld_p_numb_of_paym = '20210129'.
ld_p_numb_of_checks = '20210129'.

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