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

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
IB_CORRECT_DOCRE_DUE BOOLEAN_FLG C 1 SPACE X Adjust DUE_.. Fields of DOCRE (X=true, space=false)
IFLG_UPDATE_TASK BOOLEAN_FLG C 1 ' ' X Execution in Update Mode (x=true, space=false)
I_NR_RANGE_NR INRI-NRRANGENR C 2 '01' X Number Range Interval for Document Numbers

Paramètre Reférence Long. Facultatif Description
T_DOCACT CACS00_DOCACT 42 X Commission Document: Activities
T_DOCDTM CACS00_S_DOCDTM 124 X Detail Items for Remuneration Lines (Meta)
T_DOCHDM CACS00_S_DOCHDM 597 Commission Document Header (Meta Object)
T_DOCINV CACS00_DOCINV 77 X Participant in Commission Document
T_DOCOBJ CACS00_DOCOBJ 109 X Commission Document: Object Data
T_DOCPAR CACS00_DOCPAR 38 X Participation of Commission Document
T_DOCREL CACS00_DOCREL 78 X Commission Document: Relationships Between Participants
T_DOCREM CACS00_S_DOCREM 772 X Remuneration Lines Meta Structure
T_DOCREM_CORR CACS00_S_DOCREM_CORR 776 X Corrected Remuneration Lines Meta Structure
T_DOCSEDT CACS00_DOCSEDT 81 X Due Date Details
T_DOCSEM CACS00_S_DOCSEM 472 X Due Line Items Meta Structure
T_DOCSEM_INACTIVE CACS00_S_DOCSEM 472 X Due Dates to be Disabled (Currently used only in ELT)
T_DOCVAM CACS00_S_DOCVAM 400 X Valuation Lines Meta Structure
T_DOC_ID_MAP CACS_S_DOC_ID_MAP 34 X Matching Table temporary/ final Document Numbers
T_DOC_TO_CLEAR CACS00_S_DOC_CLEARED_SE 212 X Cleared Due Date Items

Posting commission documents
After formatting the document headers and the related line items, thedata to be updated is sent to the update function module CACS0
0_POST_DOCUMENTS. The update can take place in an update work processdepending upon the flag IFLG_UPDATE_TASK, which is transferred to moduleCACS00_DOC_POST2.
Along with the line items, their supplementation tables are alsoupdated. In addition, the linked totals tables are also updated.
As the assignment of final document number takes place only in theupdate function module CACS00_POST_DOCUMENTS, references to the documentnumber 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 ofsettlement 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 thenew 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 ofdocument number. A preliminary (with prefix
,,'$') document number identifies the remuneration line, which is stillnot there in the database.
,,Remuneration lines still not there in the database must also beavailable in the table 'remuneration lines' ,,otherwise these are notupdated.
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 functiongroup memory
2.,,Transfer of document assignments to the special internal table,,FORMsave_doc_mapping
3.,,Reading function module names required during update
,,Reading and buffering function module names required for writing theextension tables to the
,,remuneration lines, settlement items and valuation lines.,,FORMread_extension_modules
,,Reading and buffering the names of function modules, which arerequired 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 isinitial
,,,,-,,Derive month and year from the posting date
,,,,-,,Transfer document number from transfer table, in casecorresponding entry available;
,,,,,,otherwise use the document number from number range interval (s.parameter).
,,,,- ,,Mark the new document number with the corresponding temporarydocument 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 theinternal mapping table, s.a.
,,,,-,,In all the related detail lines, replace the temporary documentnumber and posting year by the
,,,,,,above document number or posting year
,,,,-,,In all the detail lines, replace references, which appear on thecurrent remuneration line (via
,,,,,,temporary document number) with the henceforth final documentnumbers and the respective
,,,,,,posting year
,,,,-,,Replace the correction information (reference to correctedremuneration line) in the current ,,,,
,,,,,,remuneration line, in case the reference contains temporarydocument number.
,,,,-,,Replace information via a correcting remuneration line('corrected by') in the current
,,,,,,remuneration line, in case the reference contains temporarydocument number.
,,,,-,,Set flag 'reversed', in case an entry is available on acorrecting remuneration line.
,,Complete the settlement items,,FORM complete_due
,,,,-,,Determine document number, posting year and month from theinternal mapping table, s.a.
,,Complete the valuation lines,,FORM complete_valuation
,,,,-,,Determine document number, posting year and month from theinternal mapping table, s.a.
,,Complete the corrected remuneration lines,,FORMcomplete_corrected_remun
,,,,-,,Determine document number, posting year and month from theinternal mapping table, s.a.
,,,,-,,Replace correction information (reference to correctedremuneration line) in the current ,,,,
,,,,,,remuneration line, in case the reference contains temporarydocument number.
,,,,-,,Replace information about a correcting remuneration line('corrected by') in the current
,,,,,,remuneration line, in case the reference contains temporarydocument 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 tableCACS00_DOCHD.
,,Post remuneration lines,,FORM post_remun
,,Remuneration lines are, at first, individually written to the databasetable CACS00_DOCRE.
,,Subsequently, the line is updated in the related supplementationtables. 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 databasebefore the update are indicated as reversed using
,,mass update, and the totals tables are corrected.
,,