Skip to Content

ACCOUNT ASSIGNMENT AND ACCOUNT DETERMINATION

This file records the Tcode and break points that used for AARef and account in Treasury.

Account assignment and account determination

Account assignment

Customizing for AAREF determination -> TPM30, TPM31, TPM32

Determined dynamically

To check determination SE16:

  • TRACC_OPTIONS set AA_REF to “1“ or
  • Test button im customizing

AAREF is stored in position indicator.

TPM_PIN_APPL function pool for position indicator:

  1. e.g. funtions TPM_PIN_CREATE, *_CHANGE, *_DISPLAY

When deal will be created it also creates position indicator. AAREF will be assigned to TRAC.

CL_POSITION_INDICATOR_MGT_PIN-> CREATE_TRAC_POSITION

* get accounting reference (if initial)

  IF re_position_trac->aa_ref IS INITIAL AND

     im_flg_migr IS INITIAL.

CL_POSITIONCONTEXT_TRAC->CLS_DETERMINE_AA_REF_ADTL

* Activate tracing ?

Input data for creation in methods CLS_COMPLETE_ADTL*, e.g. CLS_COMPLETE_ADTL_OC for OTCs

Function KEDR_DERIVE_CHARACTERISTICS derives AAREF dynamically from customizing according to derivation rules/moves/enhancements

BAdI TPM_POS_IND_TRAC to manipulate AAREF

 
 

Posting

Posting transactions: TBB1, TPM10, TPM18, TPM1, TPM44 etc.

CL_DISTRIBUTOR_SLD->PREPARE_ASYNC_POSTING

Prepares posting, so it sets the BUSTRANS_STATE to “5” (“to fix”)

CL_ADAPTOR_TRAC

->PROCESS_TRANSACTION

Takes relevant BUSTRANSID and checks if it needs to be posted

->CREATE_PLANNED_DOCUMENT

CL_DOCUMENT_TRAC

-> IF_DOCUMENT_TRAC~INITIALIZEFORPOSTING

-> SETATTRIBUTES

In the first run the BUSTRANS_STATE has status “5”, so it sets document_state to “1” (“planned”)

->DETERMINE_RELEVANCE

Document_state is “2”, so it sets relevance for TRAC to not relevant.

->POST_DOCUMENTS

Loops over _PostDocuments, but doesn’t have any yet

CL_DISTRIBUTOR_SLD->ASYNC_POSTING

Does actual posting, so BUSTRANS_STATE is “2” (“fixed”)

CL_ADAPTOR_TRAC

->PROCESS_TRANSACTION

->CREATEADAPTORDOCUMENTS

Creates persistent TRAC_DOCUMENTS

CL_DOCUMENT_TRAC

-> IF_DOCUMENT_TRAC~INITIALIZEFORPOSTING

-> SETATTRIBUTES

Gets transaction and flows to be posted; now document_state changed to “2”

-> ADDFLOWS

Creates TRAC flows and checks for posting relevance

-> SETACCASSREFTOFLOWS

Assigns AAREF (from the PIN manager, i.e. position context)

->DETERMINE_RELEVANCE

Now it is relevant for posting, because documents_state = “2”

->PREPARE_DOCUMENT_HEADER

->DETERMINELEDGER

Checks customizing (TRGC_TAC_VA)

-> CREATEACCINTERFACEOBJECTS

Creates accounting items (ACCITEMS)

     CL_FLOW_TRAC

->PREPARE_ACCOUNT_DETERMINATION

CL_ACCOUNT_DETERMINATION_TRAC

->START_DETERMINATION

->FIND_POSTING_RULE

GL Account determination for one flow from customizing (TRAC_POSTRULE)

Currency swap in case currencies for debit and credit side are different (position currency, payment currency)

If payment request required, replaces bank clearing account – calls FI-BL-PT interface

(function FIBL_GET_PAYRQ_CLEARING_ACCT)

Determines if posting to G/L account or customer

Prepare dates, texts, position and local currency amounts, public sector data (funds, grants), fills additional data (e.g. KOSTL, GSBER, some fields in the table KNA1, BP data)

->POST_DOCUMENTS

CL_DOCUMENT_TRAC

->IF_DOCUMENT_TRAC~POST

Does actual postings, fill tables ACCIT and ACCCR

Function IDCFM_GENERATE_TAX_INFORMATION

If needed, create tax generation

Function AC_DOCUMENT_CREATE

SAPLRWCL            FORM DOCUMENT_CREATE

Calls interfaces with FI and CO and creates accounting interface (FI, CO) documents

Function AC_DOCUMENT_POST  (only in real run)

SAPLRWCL            FORM DOCUMENT_POST

Calls interfaces with FI and CO and does real postings into accounting interface (FI, CO) documents

CL_POSTING_PROTOCOL_TRAC->ADD_NEW_PROTOCOL

Writes protocol (log)

Function CASH_FORECAST_TREASURY_POST

Posts into cash management

BAdI               TPM_ACCIF_TRAC to manipulate postings

                                    TPM_EXT_PAYMENT_TRPR to manipulate payments

 
 

Reversal

CL_ADAPTOR_TRAC

->PROCESS_TRANSACTION

CL_DOCUMENT_TRAC

->IF_DOCUMENT_TRAC~INITIALIZEFORREVERSAL

->REVERSE_DOCUMENT

CL_DOCUMENT_TRAC

->IF_DOCUMENT_TRAC~REVERSE

1 Comment
You must be Logged on to comment or reply to a post.