SAP Function Modules

MLCCS_APPEND_NEXT_PERIOD SAP Function module







MLCCS_APPEND_NEXT_PERIOD 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 MLCCS_APPEND_NEXT_PERIOD into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM MLCCS_APPEND_NEXT_PERIOD - MLCCS APPEND NEXT PERIOD





CALL FUNCTION 'MLCCS_APPEND_NEXT_PERIOD' "
  EXPORTING
    bwkey =                     " ckmlhd-bwkey  Valuation Area
    next_poper =                " ckmlpp-poper  Posting Period
    next_bdatj =                " ckmlpp-bdatj  Posting date YYYY
  TABLES
    it_ckmlcr =                 " ckmlcr        Material Ledger: Period Totals Records Values
  CHANGING
    ct_prkeph =                 " mlccs_t_prkeph  Table Type CKMLPRKEPH (sorted)
    ct_prkeko =                 " mlccs_t_prkeko  Table Type  CKMLPRKEKO (sorted)
    .  "  MLCCS_APPEND_NEXT_PERIOD

ABAP code example for Function Module MLCCS_APPEND_NEXT_PERIOD





The ABAP code below is a full code listing to execute function module MLCCS_APPEND_NEXT_PERIOD 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_it_ckmlcr  TYPE STANDARD TABLE OF CKMLCR,"TABLES PARAM
wa_it_ckmlcr  LIKE LINE OF it_it_ckmlcr .

DATA(ld_ct_prkeph) = 'Check type of data required'.
DATA(ld_ct_prkeko) = 'Check type of data required'.

SELECT single BWKEY
FROM CKMLHD
INTO @DATA(ld_bwkey).


SELECT single POPER
FROM CKMLPP
INTO @DATA(ld_next_poper).


SELECT single BDATJ
FROM CKMLPP
INTO @DATA(ld_next_bdatj).


"populate fields of struture and append to itab
append wa_it_ckmlcr to it_it_ckmlcr. . CALL FUNCTION 'MLCCS_APPEND_NEXT_PERIOD' EXPORTING bwkey = ld_bwkey next_poper = ld_next_poper next_bdatj = ld_next_bdatj TABLES it_ckmlcr = it_it_ckmlcr CHANGING ct_prkeph = ld_ct_prkeph ct_prkeko = ld_ct_prkeko . " MLCCS_APPEND_NEXT_PERIOD
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_ct_prkeph  TYPE MLCCS_T_PRKEPH ,
ld_bwkey  TYPE CKMLHD-BWKEY ,
it_it_ckmlcr  TYPE STANDARD TABLE OF CKMLCR ,
wa_it_ckmlcr  LIKE LINE OF it_it_ckmlcr,
ld_ct_prkeko  TYPE MLCCS_T_PRKEKO ,
ld_next_poper  TYPE CKMLPP-POPER ,
ld_next_bdatj  TYPE CKMLPP-BDATJ .

ld_ct_prkeph = 'Check type of data required'.

SELECT single BWKEY
FROM CKMLHD
INTO ld_bwkey.


"populate fields of struture and append to itab
append wa_it_ckmlcr to it_it_ckmlcr.
ld_ct_prkeko = 'Check type of data required'.

SELECT single POPER
FROM CKMLPP
INTO ld_next_poper.


SELECT single BDATJ
FROM CKMLPP
INTO ld_next_bdatj.

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 MLCCS_APPEND_NEXT_PERIOD or its description.