Fonction SAP BAPI_CASHJOURNALDOC_CREATE - Save FI Cash Journal Documents

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
HEADER BAPI_CJ_HEADER u 304 Document Header
TESTRUN BAPI2021_HELP-TESTRUN C 1 X Indicator for Test Run with No Posting

Paramètre Reférence Type Long. Description
CASH_JOURNAL_DOC_NO BAPI_CJ_KEY-POSTING_NUMBER C 10 Cash journal document number
CASH_JOURNAL_NUMBER BAPI_CJ_HEADER-CAJO_NUMBER C 4 Cash Journal Number
COMPANY_CODE BAPI_CJ_HEADER-COMP_CODE C 4 Company Code
FISCAL_YEAR BAPI_CJ_KEY-FISC_YEAR N 4 Fiscal Year

Paramètre Reférence Long. Facultatif Description
CPD_ITEMS BAPI_CJ_CPD_ITEMS 488 X One-Time Account Data of Cash Journal Document Items for Transfer to BAPI
EXTENSION_IN BAPIPAREX 990 X Container for 'Customer Exit' Parameter
ITEMS BAPI_CJ_ITEMS 539 Cash Journal Document Items for Transfer to BAPI
RETURN BAPIRET2 548 Return Parameters
TAX_ITEMS BAPI_CJ_TAX_ITEMS 41 X Cash Journal Tax Items for Transfer to BAPI
WTAX_ITEMS BAPI_CJ_WTAX_ITEMS 41 X Withholding Tax in Cash Journal Document for Transer to BAPI


trados = docu -> fi -> fibl

Functionality
Using the BAPI BAPI_CASHJOURNALDOC_CREATE, you can ensure that during arun, a document in the FI cash journal is saved in the same way as whenyou enter it via the interface transaction.
If the field TESTRUN is set, then the system only carries out the checksand not the actual save process with update to the database.
If you want to save a cash journal document, the program that calls theBAPI must run COMMIT WORK in order for the document to be updated.
A document can have several split items.
For each document, you can post either expenses or receipts; this meansthat in all line items, either the field ITEMS-P_PAYMENTS orITEMS-P_RECEIPTS must be filled.
If the document has several line items or entries in the tax table, anynet or tax base amounts that you enter are deleted.
The calling application must enter the item number(ITEMS-POSITION_NUMBER) for either all line items or none.
If the calling application specifies one-time account data, the itemnumbers (CPD_ITEMS-POSITION_NUMBER) must correspond to the relevant lineitems (ITEMS-POSITION_NUMBER). This item number must only be used in oneone-time account item.
If extended withholding tax is active in the company code being used,you can only enter one line item for vendors and customers relevant forwithholding tax, and no split documents.
The vendor must be filled for all withholding tax information itemsspecified (table WTAX_ITEMS).
If withholding tax information is to be specified, the indicator for thewithholding tax type (WTAX_ITEMS-WTAXTYPE) must have a value that isdefined in the vendor master. This same indicator for the withholdingtax type must only be specified in one line of the table WTAX_ITEMS. Theexternal item number for withholding tax information is not taken intoaccount.
In table TAX_ITEMS, the same tax code must only be specified in oneline.
If there are entries in the table TAX_ITEMS, each tax code orjurisdiction code of this table must be specified in at least one lineof the table ITEMS, or must be derivable from the Customizing for thebusiness transaction.
If accounts and tax codes for interface transactions are designated asnot ready for input in Customizing, the BAPI derives values that aretransferred in table CJ_ITEMS again and overwrites them if necessary.
The system recognizes a check because the field HEADER-CHECK_NUMBER isfilled when the BAPI is called.
A document cannot be saved in a cash journal using this BAPI if thiscash journal is locked by another user or another BAPI callingapplication at the same time. When you run the BAPI, a lock is set forother users.
Using the table EXTENSIONIN, the application calling the BAPI cantransfer additional field values and process them further in a BAdI thatis called in the subprogram customer_function.
You cannot change saved documents or present checks.

Description
The parameter 'CASH_JOURNAL_DOC_NO' contains the internal documentnumber of the cash journal document saved.

Description
The parameter 'CASH_JOURNAL_NUMBER' contains the cash journal of thecash journal document saved.

Description
The parameter 'COMPANY_CODE' contains the company code of the cashjournal document saved.

Description
The parameter 'FISCAL_YEAR' contains the fiscal year of the cash journaldocument saved, but this is only provided for check totals documents.
trados = docu -> fi -> fibl

Description
If the field TESTRUN is set, the external structures that aretransferred when you call the BAPI are assigned to the internal cashjournal structures. The relevant checks are also executed. However,there is no update to save the document to the database.
trados = docu -> fi -> fibl

Description
In the parameter EXTENSION_IN, you can transfer parameters that can befurther processed in the BADI CJ_DOCUMENT. This BADI must be implementedby the user of the BAPI BAPI_CASH_JOURNAL_CREATE.
For example, you can provide table TCJ_POSITIONS with data in the formof the include CI_COBL, or provide information for profitabilitysegments or Real Estate.

Description
The program messages are returned to the calling program of the BAPI inthe table RETURN.

722101FBCJ: F5893 when using a BAPI