COPCA_BEST_VORTRAG 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 COPCA_BEST_VORTRAG into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
PC17
Released Date:
Not Released
Processing type: Normal fucntion module
CALL FUNCTION 'COPCA_BEST_VORTRAG' "EC-PCA: Carry forward stocks by period
EXPORTING
i_rldnr = " glpct-rldnr
i_rrcty = " glpct-rrcty
i_rvers = " glpct-rvers
i_ryear = " glpct-ryear
* i_rtcur = ' ' " glpct-rtcur
* i_runit = ' ' " glpct-runit
* i_drcrk = ' ' " glpct-drcrk
i_bukrs = " glpco-bukrs
* i_prctr = ' ' " glpco-prctr
i_hoart = " glpco-hoart
* i_racct = ' ' " glpcc-racct
* i_activ = ' ' " glpcc-activ
* i_afabe = ' ' " glpcc-afabe
* i_versa = ' ' " glpcc-versa
i_von_perio = " glpca-poper
i_nach_perio = " glpca-poper
i_nach_gjahr = " glpct-ryear
. " COPCA_BEST_VORTRAG
The ABAP code below is a full code listing to execute function module COPCA_BEST_VORTRAG 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).
SELECT single RLDNR
FROM GLPCT
INTO @DATA(ld_i_rldnr).
SELECT single RRCTY
FROM GLPCT
INTO @DATA(ld_i_rrcty).
SELECT single RVERS
FROM GLPCT
INTO @DATA(ld_i_rvers).
SELECT single RYEAR
FROM GLPCT
INTO @DATA(ld_i_ryear).
SELECT single RTCUR
FROM GLPCT
INTO @DATA(ld_i_rtcur).
SELECT single RUNIT
FROM GLPCT
INTO @DATA(ld_i_runit).
SELECT single DRCRK
FROM GLPCT
INTO @DATA(ld_i_drcrk).
SELECT single BUKRS
FROM GLPCO
INTO @DATA(ld_i_bukrs).
SELECT single PRCTR
FROM GLPCO
INTO @DATA(ld_i_prctr).
SELECT single HOART
FROM GLPCO
INTO @DATA(ld_i_hoart).
SELECT single RACCT
FROM GLPCC
INTO @DATA(ld_i_racct).
SELECT single ACTIV
FROM GLPCC
INTO @DATA(ld_i_activ).
SELECT single AFABE
FROM GLPCC
INTO @DATA(ld_i_afabe).
SELECT single VERSA
FROM GLPCC
INTO @DATA(ld_i_versa).
SELECT single POPER
FROM GLPCA
INTO @DATA(ld_i_von_perio).
SELECT single POPER
FROM GLPCA
INTO @DATA(ld_i_nach_perio).
SELECT single RYEAR
FROM GLPCT
INTO @DATA(ld_i_nach_gjahr).
. CALL FUNCTION 'COPCA_BEST_VORTRAG' EXPORTING i_rldnr = ld_i_rldnr i_rrcty = ld_i_rrcty i_rvers = ld_i_rvers i_ryear = ld_i_ryear * i_rtcur = ld_i_rtcur * i_runit = ld_i_runit * i_drcrk = ld_i_drcrk i_bukrs = ld_i_bukrs * i_prctr = ld_i_prctr i_hoart = ld_i_hoart * i_racct = ld_i_racct * i_activ = ld_i_activ * i_afabe = ld_i_afabe * i_versa = ld_i_versa i_von_perio = ld_i_von_perio i_nach_perio = ld_i_nach_perio i_nach_gjahr = ld_i_nach_gjahr . " COPCA_BEST_VORTRAG
IF SY-SUBRC EQ 0. "All OK ENDIF.
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_rldnr | TYPE GLPCT-RLDNR , |
| ld_i_rrcty | TYPE GLPCT-RRCTY , |
| ld_i_rvers | TYPE GLPCT-RVERS , |
| ld_i_ryear | TYPE GLPCT-RYEAR , |
| ld_i_rtcur | TYPE GLPCT-RTCUR , |
| ld_i_runit | TYPE GLPCT-RUNIT , |
| ld_i_drcrk | TYPE GLPCT-DRCRK , |
| ld_i_bukrs | TYPE GLPCO-BUKRS , |
| ld_i_prctr | TYPE GLPCO-PRCTR , |
| ld_i_hoart | TYPE GLPCO-HOART , |
| ld_i_racct | TYPE GLPCC-RACCT , |
| ld_i_activ | TYPE GLPCC-ACTIV , |
| ld_i_afabe | TYPE GLPCC-AFABE , |
| ld_i_versa | TYPE GLPCC-VERSA , |
| ld_i_von_perio | TYPE GLPCA-POPER , |
| ld_i_nach_perio | TYPE GLPCA-POPER , |
| ld_i_nach_gjahr | TYPE GLPCT-RYEAR . |
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 COPCA_BEST_VORTRAG or its description.