Ansicht
Dokumentation

CACS00_DOC_POST2 - Comm.: Commission Documents Update (Even in FI)

CACS00_DOC_POST2 - Comm.: Commission Documents Update (Even in FI)

CPI1466 during Backup   ROGBILLS - Synchronize billing plans  
This documentation is copyright by SAP AG.
SAP E-Book

Posting commission documents

After formatting the document headers and the related line items, the data to be updated is sent to the update function module CACS00_POST_DOCUMENTS. The update can take place in an update work process depending upon the flag IFLG_UPDATE_TASK, which is transferred to module CACS00_DOC_POST2.

Along with the line items, their supplementation tables are also updated. In addition, the linked totals tables are also updated.

As the assignment of final document number takes place only in the update function module CACS00_POST_DOCUMENTS, references to the document number can also be updated in this module (after assigning DOC_ID).

Document posting process flow:

Following are expected as input parameters:

1.,,Document headers as internal table in meta structure

2.,,Remuneration lines as internal table in meta structure

3.,,Settlement items as internal table in meta structure

4.,,Valuation lines as internal table in meta structure

5.,,Detail lines as internal table in meta structure

6.,,Corrected remuneration lines as internal table in meta structure
,,Corrected remuneration lines can, e.g., emerge as a result of settlement runs. They are corrected by other
,,remuneration lines. Corresponding references run via fields CORRTO... and CORRBY...
,,Remuneration lines already available in the database as well as the new remuneration lines ,,sent with the current update can be corrected. Decision, whether a corrected remuneration line
,,is already there in the database or not, is taken with the help of document number. A preliminary (with prefix
,,'$') document number identifies the remuneration line, which is still not there in the database.
,,Remuneration lines still not there in the database must also be available in the table 'remuneration lines' ,,otherwise these are not updated.

7.,,Assignment of temporary to final document number as internal table

8.,,Number range interval

Document posting is divided in the following steps:

1.,,Initialization,,FUNCTION 'CACS_DOC_INITIALIZE'

,,Initialization of internal tables, which are kept in the function group memory

2.,,Transfer of document assignments to the special internal table,,FORM save_doc_mapping

3.,,Reading function module names required during update

,,Reading and buffering function module names required for writing the extension tables to the
,,remuneration lines, settlement items and valuation lines.,,FORM read_extension_modules

,,Reading and buffering the names of function modules, which are required for updating the
,,totals tables.,, ,,FORM read_sum_update_modules

4.,,Complete the transferred documents

,,Complete the document headers,,FORM complete_header
,,,,-,,Use the system date (SY-DATUM), in case the posting date is initial
,,,,-,,Derive month and year from the posting date
,,,,-,,Transfer document number from transfer table, in case corresponding entry available;
,,,,,,otherwise use the document number from number range interval (s. parameter).
,,,,- ,,Mark the new document number with the corresponding temporary document number
,,,,-,,Use the current transaction code
,,,,-,,Use the current user as last modifier

,,Complete the remuneration lines,,FORM complete_remun
,,,,-,,Determine document number, posting year and month from the internal mapping table, s.a.
,,,,-,,In all the related detail lines, replace the temporary document number and posting year by the
,,,,,,above document number or posting year
,,,,-,,In all the detail lines, replace references, which appear on the current remuneration line (via
,,,,,,temporary document number) with the henceforth final document numbers and the respective
,,,,,,posting year
,,,,-,,Replace the correction information (reference to corrected remuneration line) in the current ,,,,
,,,,,,remuneration line, in case the reference contains temporary document number.
,,,,-,,Replace information via a correcting remuneration line ('corrected by') in the current
,,,,,,remuneration line, in case the reference contains temporary document number.
,,,,-,,Set flag 'reversed', in case an entry is available on a correcting remuneration line.

,,Complete the settlement items,,FORM complete_due
,,,,-,,Determine document number, posting year and month from the internal mapping table, s.a.

,,Complete the valuation lines,,FORM complete_valuation
,,,,-,,Determine document number, posting year and month from the internal mapping table, s.a.

,,Complete the corrected remuneration lines,,FORM complete_corrected_remun
,,,,-,,Determine document number, posting year and month from the internal mapping table, s.a.
,,,,-,,Replace correction information (reference to corrected remuneration line) in the current ,,,,
,,,,,,remuneration line, in case the reference contains temporary document number.
,,,,-,,Replace information about a correcting remuneration line ('corrected by') in the current
,,,,,,remuneration line, in case the reference contains temporary document numbers.

5.,,Post the transferred documents,,FORM post_doc

,,Post the document headers,,FORM post_header
,,Document headers are written via mass insert to the database table CACS00_DOCHD.

,,Post remuneration lines,,FORM post_remun
,,Remuneration lines are, at first, individually written to the database table CACS00_DOCRE.
,,Subsequently, the line is updated in the related supplementation tables. Finally, the
,,totals tables are updated.

,,Posting the detail lines,,FORM post_detail
,,Detail lines are written via a mass insert to the database.

,,Posting the settlement items,,FORM post_due
,,similar to 'posting the remuneration lines'

,,Posting the valuation lines,,FORM post_valuation
,,similar to 'posting the valuation lines'
,,
,,Update the corrected remuneration lines,,FORM update_corrected_remun
,,The corrected remuneration lines already available in the database before the update are indicated as reversed using
,,mass update, and the totals tables are corrected.

,,





Parameters

IB_CORRECT_DOCRE_DUE
IFLG_UPDATE_TASK
I_NR_RANGE_NR
I_SES_RUN
T_DOCACT
T_DOCDTM
T_DOCHDM
T_DOCINV
T_DOCOBJ
T_DOCPAR
T_DOCREL
T_DOCREM
T_DOCREM_CORR
T_DOCSEDT
T_DOCSEM
T_DOCSEM_INACTIVE
T_DOCVAM
T_DOC_ID_MAP
T_DOC_TO_CLEAR

Exceptions

Function Group

CACS00_ACCT

ABAP Short Reference   ROGBILLS - Synchronize billing plans  
This documentation is copyright by SAP AG.

Length: 7036 Date: 20240523 Time: 061339     sap01-206 ( 79 ms )