SAP CACS00_DOC_POST2 Function Module for Comm.: Commission Documents Update (Even in FI)









CACS00_DOC_POST2 is a standard cacs00 doc post2 SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Comm.: Commission Documents Update (Even in FI) processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for cacs00 doc post2 FM, simply by entering the name CACS00_DOC_POST2 into the relevant SAP transaction such as SE37 or SE38.

Function Group: CACS00_ACCT
Program Name: SAPLCACS00_ACCT
Main Program: SAPLCACS00_ACCT
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function CACS00_DOC_POST2 pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'CACS00_DOC_POST2'"Comm.: Commission Documents Update (Even in FI)
EXPORTING
* I_NR_RANGE_NR = '01' "Number Range Interval for Document Numbers
* IFLG_UPDATE_TASK = ' ' "Execution in Update Mode (x=true, space=false)
* IB_CORRECT_DOCRE_DUE = ' ' "Adjust DUE_.. Fields of DOCRE (X=true, space=false)

TABLES
T_DOCHDM = "Commission Document Header (Meta Object)
* T_DOCREL = "Commission Document: Relationships Between Participants
* T_DOCACT = "Commission Document: Activities
* T_DOCOBJ = "Commission Document: Object Data
* T_DOC_TO_CLEAR = "Cleared Due Date Items
* T_DOCSEDT = "Line Item Detail Line
* T_DOCSEM_INACTIVE = "Due Dates to be Disabled (Currently used only in ELT)
* T_DOCREM = "Remuneration Lines Meta Structure
* T_DOCSEM = "Due Line Items Meta Structure
* T_DOCVAM = "Valuation Lines Meta Structure
* T_DOCDTM = "Detail Items for Remuneration Lines (Meta)
* T_DOCREM_CORR = "Corrected Remuneration Lines Meta Structure
* T_DOC_ID_MAP = "Matching Table temporary/ final Document Numbers
* T_DOCPAR = "Participation of Commission Document
* T_DOCINV = "Participant in Commission Document
.



IMPORTING Parameters details for CACS00_DOC_POST2

I_NR_RANGE_NR - Number Range Interval for Document Numbers

Data type: INRI-NRRANGENR
Default: '01'
Optional: Yes
Call by Reference: No ( called with pass by value option)

IFLG_UPDATE_TASK - Execution in Update Mode (x=true, space=false)

Data type: BOOLEAN_FLG
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

IB_CORRECT_DOCRE_DUE - Adjust DUE_.. Fields of DOCRE (X=true, space=false)

Data type: BOOLEAN_FLG
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for CACS00_DOC_POST2

T_DOCHDM - Commission Document Header (Meta Object)

Data type: CACS00_S_DOCHDM
Optional: No
Call by Reference: Yes

T_DOCREL - Commission Document: Relationships Between Participants

Data type: CACS00_DOCREL
Optional: Yes
Call by Reference: Yes

T_DOCACT - Commission Document: Activities

Data type: CACS00_DOCACT
Optional: Yes
Call by Reference: Yes

T_DOCOBJ - Commission Document: Object Data

Data type: CACS00_DOCOBJ
Optional: Yes
Call by Reference: Yes

T_DOC_TO_CLEAR - Cleared Due Date Items

Data type: CACS00_S_DOC_CLEARED_SE
Optional: Yes
Call by Reference: Yes

T_DOCSEDT - Line Item Detail Line

Data type: CACS00_DOCSEDT
Optional: Yes
Call by Reference: Yes

T_DOCSEM_INACTIVE - Due Dates to be Disabled (Currently used only in ELT)

Data type: CACS00_S_DOCSEM
Optional: Yes
Call by Reference: Yes

T_DOCREM - Remuneration Lines Meta Structure

Data type: CACS00_S_DOCREM
Optional: Yes
Call by Reference: Yes

T_DOCSEM - Due Line Items Meta Structure

Data type: CACS00_S_DOCSEM
Optional: Yes
Call by Reference: Yes

T_DOCVAM - Valuation Lines Meta Structure

Data type: CACS00_S_DOCVAM
Optional: Yes
Call by Reference: Yes

T_DOCDTM - Detail Items for Remuneration Lines (Meta)

Data type: CACS00_S_DOCDTM
Optional: Yes
Call by Reference: Yes

T_DOCREM_CORR - Corrected Remuneration Lines Meta Structure

Data type: CACS00_S_DOCREM_CORR
Optional: Yes
Call by Reference: Yes

T_DOC_ID_MAP - Matching Table temporary/ final Document Numbers

Data type: CACS_S_DOC_ID_MAP
Optional: Yes
Call by Reference: Yes

T_DOCPAR - Participation of Commission Document

Data type: CACS00_DOCPAR
Optional: Yes
Call by Reference: Yes

T_DOCINV - Participant in Commission Document

Data type: CACS00_DOCINV
Optional: Yes
Call by Reference: Yes

Copy and paste ABAP code example for CACS00_DOC_POST2 Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.

DATA:
lt_t_dochdm  TYPE STANDARD TABLE OF CACS00_S_DOCHDM, "   
lv_i_nr_range_nr  TYPE INRI-NRRANGENR, "   '01'
lt_t_docrel  TYPE STANDARD TABLE OF CACS00_DOCREL, "   
lt_t_docact  TYPE STANDARD TABLE OF CACS00_DOCACT, "   
lt_t_docobj  TYPE STANDARD TABLE OF CACS00_DOCOBJ, "   
lt_t_doc_to_clear  TYPE STANDARD TABLE OF CACS00_S_DOC_CLEARED_SE, "   
lt_t_docsedt  TYPE STANDARD TABLE OF CACS00_DOCSEDT, "   
lt_t_docsem_inactive  TYPE STANDARD TABLE OF CACS00_S_DOCSEM, "   
lt_t_docrem  TYPE STANDARD TABLE OF CACS00_S_DOCREM, "   
lv_iflg_update_task  TYPE BOOLEAN_FLG, "   ' '
lt_t_docsem  TYPE STANDARD TABLE OF CACS00_S_DOCSEM, "   
lv_ib_correct_docre_due  TYPE BOOLEAN_FLG, "   SPACE
lt_t_docvam  TYPE STANDARD TABLE OF CACS00_S_DOCVAM, "   
lt_t_docdtm  TYPE STANDARD TABLE OF CACS00_S_DOCDTM, "   
lt_t_docrem_corr  TYPE STANDARD TABLE OF CACS00_S_DOCREM_CORR, "   
lt_t_doc_id_map  TYPE STANDARD TABLE OF CACS_S_DOC_ID_MAP, "   
lt_t_docpar  TYPE STANDARD TABLE OF CACS00_DOCPAR, "   
lt_t_docinv  TYPE STANDARD TABLE OF CACS00_DOCINV. "   

  CALL FUNCTION 'CACS00_DOC_POST2'  "Comm.: Commission Documents Update (Even in FI)
    EXPORTING
         I_NR_RANGE_NR = lv_i_nr_range_nr
         IFLG_UPDATE_TASK = lv_iflg_update_task
         IB_CORRECT_DOCRE_DUE = lv_ib_correct_docre_due
    TABLES
         T_DOCHDM = lt_t_dochdm
         T_DOCREL = lt_t_docrel
         T_DOCACT = lt_t_docact
         T_DOCOBJ = lt_t_docobj
         T_DOC_TO_CLEAR = lt_t_doc_to_clear
         T_DOCSEDT = lt_t_docsedt
         T_DOCSEM_INACTIVE = lt_t_docsem_inactive
         T_DOCREM = lt_t_docrem
         T_DOCSEM = lt_t_docsem
         T_DOCVAM = lt_t_docvam
         T_DOCDTM = lt_t_docdtm
         T_DOCREM_CORR = lt_t_docrem_corr
         T_DOC_ID_MAP = lt_t_doc_id_map
         T_DOCPAR = lt_t_docpar
         T_DOCINV = lt_t_docinv
. " CACS00_DOC_POST2




ABAP code using 7.40 inline data declarations to call FM CACS00_DOC_POST2

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

 
"SELECT single NRRANGENR FROM INRI INTO @DATA(ld_i_nr_range_nr).
DATA(ld_i_nr_range_nr) = '01'.
 
 
 
 
 
 
 
 
DATA(ld_iflg_update_task) = ' '.
 
 
DATA(ld_ib_correct_docre_due) = ' '.
 
 
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!