SAP Function Modules

CACS00_DOCUMENT_SET_TABLES SAP Function module







CACS00_DOCUMENT_SET_TABLES is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name CACS00_DOCUMENT_SET_TABLES into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: CACS00_DOCUMENT
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM CACS00_DOCUMENT_SET_TABLES - CACS00 DOCUMENT SET TABLES





CALL FUNCTION 'CACS00_DOCUMENT_SET_TABLES' "
  EXPORTING
    i_dochd =                   " cacs00_dochd  Comn Document Header
*   i_target =                  " cacs_s_bdti-target_d  Processing Target of Triggering Method
  TABLES
    i_doc_valuation =           " cacs00_docva  Commission Document, Valuation
    i_doc_remuneration =        " cacs00_docre  Commission Document, Remuneration and Liability
    i_doc_remdetail =           " cacs00_docdt  Comn: Detail Items for Remuneration Rows
    i_doc_settlement =          " cacs00_docse  Commission Document: Due Dates
    .  "  CACS00_DOCUMENT_SET_TABLES

ABAP code example for Function Module CACS00_DOCUMENT_SET_TABLES





The ABAP code below is a full code listing to execute function module CACS00_DOCUMENT_SET_TABLES including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
it_i_doc_valuation  TYPE STANDARD TABLE OF CACS00_DOCVA,"TABLES PARAM
wa_i_doc_valuation  LIKE LINE OF it_i_doc_valuation ,
it_i_doc_remuneration  TYPE STANDARD TABLE OF CACS00_DOCRE,"TABLES PARAM
wa_i_doc_remuneration  LIKE LINE OF it_i_doc_remuneration ,
it_i_doc_remdetail  TYPE STANDARD TABLE OF CACS00_DOCDT,"TABLES PARAM
wa_i_doc_remdetail  LIKE LINE OF it_i_doc_remdetail ,
it_i_doc_settlement  TYPE STANDARD TABLE OF CACS00_DOCSE,"TABLES PARAM
wa_i_doc_settlement  LIKE LINE OF it_i_doc_settlement .

DATA(ld_i_dochd) = 'Check type of data required'.

DATA(ld_i_target) = some text here

"populate fields of struture and append to itab
append wa_i_doc_valuation to it_i_doc_valuation.

"populate fields of struture and append to itab
append wa_i_doc_remuneration to it_i_doc_remuneration.

"populate fields of struture and append to itab
append wa_i_doc_remdetail to it_i_doc_remdetail.

"populate fields of struture and append to itab
append wa_i_doc_settlement to it_i_doc_settlement. . CALL FUNCTION 'CACS00_DOCUMENT_SET_TABLES' EXPORTING i_dochd = ld_i_dochd * i_target = ld_i_target TABLES i_doc_valuation = it_i_doc_valuation i_doc_remuneration = it_i_doc_remuneration i_doc_remdetail = it_i_doc_remdetail i_doc_settlement = it_i_doc_settlement . " CACS00_DOCUMENT_SET_TABLES
IF SY-SUBRC EQ 0. "All OK ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_i_dochd  TYPE CACS00_DOCHD ,
it_i_doc_valuation  TYPE STANDARD TABLE OF CACS00_DOCVA ,
wa_i_doc_valuation  LIKE LINE OF it_i_doc_valuation,
ld_i_target  TYPE CACS_S_BDTI-TARGET_D ,
it_i_doc_remuneration  TYPE STANDARD TABLE OF CACS00_DOCRE ,
wa_i_doc_remuneration  LIKE LINE OF it_i_doc_remuneration,
it_i_doc_remdetail  TYPE STANDARD TABLE OF CACS00_DOCDT ,
wa_i_doc_remdetail  LIKE LINE OF it_i_doc_remdetail,
it_i_doc_settlement  TYPE STANDARD TABLE OF CACS00_DOCSE ,
wa_i_doc_settlement  LIKE LINE OF it_i_doc_settlement.

ld_i_dochd = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_i_doc_valuation to it_i_doc_valuation.

ld_i_target = some text here

"populate fields of struture and append to itab
append wa_i_doc_remuneration to it_i_doc_remuneration.

"populate fields of struture and append to itab
append wa_i_doc_remdetail to it_i_doc_remdetail.

"populate fields of struture and append to itab
append wa_i_doc_settlement to it_i_doc_settlement.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name CACS00_DOCUMENT_SET_TABLES or its description.