SAP COPCA_BEST_RW_AUFBAUEN Function Module for EC-PCA: Create FI/CO document for posting balance sheet items









COPCA_BEST_RW_AUFBAUEN is a standard copca best rw aufbauen SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for EC-PCA: Create FI/CO document for posting balance sheet items 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 copca best rw aufbauen FM, simply by entering the name COPCA_BEST_RW_AUFBAUEN into the relevant SAP transaction such as SE37 or SE38.

Function Group: PC12
Program Name: SAPLPC12
Main Program:
Appliation area: K
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function COPCA_BEST_RW_AUFBAUEN 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 'COPCA_BEST_RW_AUFBAUEN'"EC-PCA: Create FI/CO document for posting balance sheet items
EXPORTING
* TEXT = ' ' "
* PSWBT = 0 "
* HKONT = ' ' "
* MATNR = ' ' "
* MENGE = 0 "
* MEINS = ' ' "
* WERKS = ' ' "
* PRCTR = ' ' "
* BWKEY = ' ' "
* BWTAR = ' ' "
* BKLAS = ' ' "
* GLVOR = ' ' "
* CURT2 = ' ' "
* WAER2 = ' ' "
* WERT2 = 0 "
* CURT3 = ' ' "
* WAER3 = ' ' "
* WERT3 = 0 "
HOART = "
* KDAUF = "
* KDPOS = "
* PS_PSP_PNR = "
AWTYP = "
BUKRS = "
* KOKRS = ' ' "
GJAHR = "
* MONAT = ' ' "
* KTOSL = ' ' "
* PSWSL = ' ' "

TABLES
T_ACCHD = "
T_ACCIT = "
T_ACCCR = "
.



IMPORTING Parameters details for COPCA_BEST_RW_AUFBAUEN

TEXT -

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

PSWBT -

Data type: ACCIT-PSWBT
Optional: Yes
Call by Reference: No ( called with pass by value option)

HKONT -

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

MATNR -

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

MENGE -

Data type: ACCIT-MENGE
Optional: Yes
Call by Reference: No ( called with pass by value option)

MEINS -

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

WERKS -

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

PRCTR -

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

BWKEY -

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

BWTAR -

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

BKLAS -

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

GLVOR -

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

CURT2 -

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

WAER2 -

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

WERT2 -

Data type: ACCCR-WRBTR
Optional: Yes
Call by Reference: No ( called with pass by value option)

CURT3 -

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

WAER3 -

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

WERT3 -

Data type: ACCCR-WRBTR
Optional: Yes
Call by Reference: No ( called with pass by value option)

HOART -

Data type: ACCIT-HOART
Optional: No
Call by Reference: No ( called with pass by value option)

KDAUF -

Data type: ACCIT-KDAUF
Optional: Yes
Call by Reference: No ( called with pass by value option)

KDPOS -

Data type: ACCIT-KDPOS
Optional: Yes
Call by Reference: No ( called with pass by value option)

PS_PSP_PNR -

Data type: ACCIT-PS_PSP_PNR
Optional: Yes
Call by Reference: No ( called with pass by value option)

AWTYP -

Data type: ACCHD-AWTYP
Optional: No
Call by Reference: No ( called with pass by value option)

BUKRS -

Data type: ACCIT-BUKRS
Optional: No
Call by Reference: No ( called with pass by value option)

KOKRS -

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

GJAHR -

Data type: ACCIT-GJAHR
Optional: No
Call by Reference: No ( called with pass by value option)

MONAT -

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

KTOSL -

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

PSWSL -

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

TABLES Parameters details for COPCA_BEST_RW_AUFBAUEN

T_ACCHD -

Data type: ACCHD
Optional: No
Call by Reference: No ( called with pass by value option)

T_ACCIT -

Data type: ACCIT
Optional: No
Call by Reference: No ( called with pass by value option)

T_ACCCR -

Data type: ACCCR
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for COPCA_BEST_RW_AUFBAUEN 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:
lv_text  TYPE ACCHD-BKTXT, "   ' '
lt_t_acchd  TYPE STANDARD TABLE OF ACCHD, "   
lv_pswbt  TYPE ACCIT-PSWBT, "   0
lv_hkont  TYPE ACCIT-HKONT, "   ' '
lv_matnr  TYPE ACCIT-MATNR, "   ' '
lv_menge  TYPE ACCIT-MENGE, "   0
lv_meins  TYPE ACCIT-MEINS, "   ' '
lv_werks  TYPE ACCIT-WERKS, "   ' '
lv_prctr  TYPE ACCIT-PRCTR, "   ' '
lv_bwkey  TYPE ACCIT-BWKEY, "   ' '
lv_bwtar  TYPE ACCIT-BWTAR, "   ' '
lv_bklas  TYPE ACCIT-BKLAS, "   ' '
lv_glvor  TYPE ACCHD-GLVOR, "   ' '
lt_t_accit  TYPE STANDARD TABLE OF ACCIT, "   
lv_curt2  TYPE ACCCR-CURTP, "   ' '
lv_waer2  TYPE ACCCR-WAERS, "   ' '
lv_wert2  TYPE ACCCR-WRBTR, "   0
lv_curt3  TYPE ACCCR-CURTP, "   ' '
lv_waer3  TYPE ACCCR-WAERS, "   ' '
lv_wert3  TYPE ACCCR-WRBTR, "   0
lv_hoart  TYPE ACCIT-HOART, "   
lv_kdauf  TYPE ACCIT-KDAUF, "   
lv_kdpos  TYPE ACCIT-KDPOS, "   
lv_ps_psp_pnr  TYPE ACCIT-PS_PSP_PNR, "   
lv_awtyp  TYPE ACCHD-AWTYP, "   
lt_t_acccr  TYPE STANDARD TABLE OF ACCCR, "   
lv_bukrs  TYPE ACCIT-BUKRS, "   
lv_kokrs  TYPE ACCIT-KOKRS, "   ' '
lv_gjahr  TYPE ACCIT-GJAHR, "   
lv_monat  TYPE ACCIT-MONAT, "   ' '
lv_ktosl  TYPE ACCIT-KTOSL, "   ' '
lv_pswsl  TYPE ACCIT-PSWSL. "   ' '

  CALL FUNCTION 'COPCA_BEST_RW_AUFBAUEN'  "EC-PCA: Create FI/CO document for posting balance sheet items
    EXPORTING
         TEXT = lv_text
         PSWBT = lv_pswbt
         HKONT = lv_hkont
         MATNR = lv_matnr
         MENGE = lv_menge
         MEINS = lv_meins
         WERKS = lv_werks
         PRCTR = lv_prctr
         BWKEY = lv_bwkey
         BWTAR = lv_bwtar
         BKLAS = lv_bklas
         GLVOR = lv_glvor
         CURT2 = lv_curt2
         WAER2 = lv_waer2
         WERT2 = lv_wert2
         CURT3 = lv_curt3
         WAER3 = lv_waer3
         WERT3 = lv_wert3
         HOART = lv_hoart
         KDAUF = lv_kdauf
         KDPOS = lv_kdpos
         PS_PSP_PNR = lv_ps_psp_pnr
         AWTYP = lv_awtyp
         BUKRS = lv_bukrs
         KOKRS = lv_kokrs
         GJAHR = lv_gjahr
         MONAT = lv_monat
         KTOSL = lv_ktosl
         PSWSL = lv_pswsl
    TABLES
         T_ACCHD = lt_t_acchd
         T_ACCIT = lt_t_accit
         T_ACCCR = lt_t_acccr
. " COPCA_BEST_RW_AUFBAUEN




ABAP code using 7.40 inline data declarations to call FM COPCA_BEST_RW_AUFBAUEN

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 BKTXT FROM ACCHD INTO @DATA(ld_text).
DATA(ld_text) = ' '.
 
 
"SELECT single PSWBT FROM ACCIT INTO @DATA(ld_pswbt).
 
"SELECT single HKONT FROM ACCIT INTO @DATA(ld_hkont).
DATA(ld_hkont) = ' '.
 
"SELECT single MATNR FROM ACCIT INTO @DATA(ld_matnr).
DATA(ld_matnr) = ' '.
 
"SELECT single MENGE FROM ACCIT INTO @DATA(ld_menge).
 
"SELECT single MEINS FROM ACCIT INTO @DATA(ld_meins).
DATA(ld_meins) = ' '.
 
"SELECT single WERKS FROM ACCIT INTO @DATA(ld_werks).
DATA(ld_werks) = ' '.
 
"SELECT single PRCTR FROM ACCIT INTO @DATA(ld_prctr).
DATA(ld_prctr) = ' '.
 
"SELECT single BWKEY FROM ACCIT INTO @DATA(ld_bwkey).
DATA(ld_bwkey) = ' '.
 
"SELECT single BWTAR FROM ACCIT INTO @DATA(ld_bwtar).
DATA(ld_bwtar) = ' '.
 
"SELECT single BKLAS FROM ACCIT INTO @DATA(ld_bklas).
DATA(ld_bklas) = ' '.
 
"SELECT single GLVOR FROM ACCHD INTO @DATA(ld_glvor).
DATA(ld_glvor) = ' '.
 
 
"SELECT single CURTP FROM ACCCR INTO @DATA(ld_curt2).
DATA(ld_curt2) = ' '.
 
"SELECT single WAERS FROM ACCCR INTO @DATA(ld_waer2).
DATA(ld_waer2) = ' '.
 
"SELECT single WRBTR FROM ACCCR INTO @DATA(ld_wert2).
 
"SELECT single CURTP FROM ACCCR INTO @DATA(ld_curt3).
DATA(ld_curt3) = ' '.
 
"SELECT single WAERS FROM ACCCR INTO @DATA(ld_waer3).
DATA(ld_waer3) = ' '.
 
"SELECT single WRBTR FROM ACCCR INTO @DATA(ld_wert3).
 
"SELECT single HOART FROM ACCIT INTO @DATA(ld_hoart).
 
"SELECT single KDAUF FROM ACCIT INTO @DATA(ld_kdauf).
 
"SELECT single KDPOS FROM ACCIT INTO @DATA(ld_kdpos).
 
"SELECT single PS_PSP_PNR FROM ACCIT INTO @DATA(ld_ps_psp_pnr).
 
"SELECT single AWTYP FROM ACCHD INTO @DATA(ld_awtyp).
 
 
"SELECT single BUKRS FROM ACCIT INTO @DATA(ld_bukrs).
 
"SELECT single KOKRS FROM ACCIT INTO @DATA(ld_kokrs).
DATA(ld_kokrs) = ' '.
 
"SELECT single GJAHR FROM ACCIT INTO @DATA(ld_gjahr).
 
"SELECT single MONAT FROM ACCIT INTO @DATA(ld_monat).
DATA(ld_monat) = ' '.
 
"SELECT single KTOSL FROM ACCIT INTO @DATA(ld_ktosl).
DATA(ld_ktosl) = ' '.
 
"SELECT single PSWSL FROM ACCIT INTO @DATA(ld_pswsl).
DATA(ld_pswsl) = ' '.
 


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!