IDOC_CREATE_COPCPA 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 IDOC_CREATE_COPCPA into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
KS07
Released Date:
Not Released
Processing type: Normal fucntion module
CALL FUNCTION 'IDOC_CREATE_COPCPA' "
EXPORTING
rcvpfc = " bdaledc-rcvpfc Recipient - Partner function
rcvprn = " bdaledc-rcvprn Recipient - Partner number
rcvprt = " bdaledc-rcvprt Recipient - Partner type
sndpfc = " bdaledc-sndpfc Sender - Partner function
sndprn = " bdaledc-sndprn Sender - Partner number
sndprt = " bdaledc-sndprt Sender - Partner type
* flg_no_commit = SPACE " xflag
IMPORTING
count = " sy-tabix Number of basic IDocs generated
created_comm_idocs = " sy-tabix Number of communication IDocs generated
TABLES
t_matnr = " Range for materials
t_werks = " Range for plants
t_klvar = " Range for costing variants
t_tvers = " Range for costing version
t_status = " Range for status
t_kadat = " Range for costing date (from)
t_bidat = " Range for expiry date
t_kkzma = " Range for maual costing
t_kalkl = " Range for on-going standard costing
t_kalaid = "
t_kaladat = "
* t_keko_extern = " keko
* et_comm_docum = " tswotobjid
. " IDOC_CREATE_COPCPA
The ABAP code below is a full code listing to execute function module IDOC_CREATE_COPCPA 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).
| ld_count | TYPE SY-TABIX , |
| ld_created_comm_idocs | TYPE SY-TABIX , |
| it_t_matnr | TYPE STANDARD TABLE OF STRING,"TABLES PARAM |
| wa_t_matnr | LIKE LINE OF it_t_matnr , |
| it_t_werks | TYPE STANDARD TABLE OF STRING,"TABLES PARAM |
| wa_t_werks | LIKE LINE OF it_t_werks , |
| it_t_klvar | TYPE STANDARD TABLE OF STRING,"TABLES PARAM |
| wa_t_klvar | LIKE LINE OF it_t_klvar , |
| it_t_tvers | TYPE STANDARD TABLE OF STRING,"TABLES PARAM |
| wa_t_tvers | LIKE LINE OF it_t_tvers , |
| it_t_status | TYPE STANDARD TABLE OF STRING,"TABLES PARAM |
| wa_t_status | LIKE LINE OF it_t_status , |
| it_t_kadat | TYPE STANDARD TABLE OF STRING,"TABLES PARAM |
| wa_t_kadat | LIKE LINE OF it_t_kadat , |
| it_t_bidat | TYPE STANDARD TABLE OF STRING,"TABLES PARAM |
| wa_t_bidat | LIKE LINE OF it_t_bidat , |
| it_t_kkzma | TYPE STANDARD TABLE OF STRING,"TABLES PARAM |
| wa_t_kkzma | LIKE LINE OF it_t_kkzma , |
| it_t_kalkl | TYPE STANDARD TABLE OF STRING,"TABLES PARAM |
| wa_t_kalkl | LIKE LINE OF it_t_kalkl , |
| it_t_kalaid | TYPE STANDARD TABLE OF STRING,"TABLES PARAM |
| wa_t_kalaid | LIKE LINE OF it_t_kalaid , |
| it_t_kaladat | TYPE STANDARD TABLE OF STRING,"TABLES PARAM |
| wa_t_kaladat | LIKE LINE OF it_t_kaladat , |
| it_t_keko_extern | TYPE STANDARD TABLE OF KEKO,"TABLES PARAM |
| wa_t_keko_extern | LIKE LINE OF it_t_keko_extern , |
| it_et_comm_docum | TYPE STANDARD TABLE OF TSWOTOBJID,"TABLES PARAM |
| wa_et_comm_docum | LIKE LINE OF it_et_comm_docum . |
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_count | TYPE SY-TABIX , |
| ld_rcvpfc | TYPE BDALEDC-RCVPFC , |
| it_t_matnr | TYPE STANDARD TABLE OF STRING , |
| wa_t_matnr | LIKE LINE OF it_t_matnr, |
| it_t_werks | TYPE STANDARD TABLE OF STRING , |
| wa_t_werks | LIKE LINE OF it_t_werks, |
| ld_rcvprn | TYPE BDALEDC-RCVPRN , |
| ld_created_comm_idocs | TYPE SY-TABIX , |
| ld_rcvprt | TYPE BDALEDC-RCVPRT , |
| it_t_klvar | TYPE STANDARD TABLE OF STRING , |
| wa_t_klvar | LIKE LINE OF it_t_klvar, |
| ld_sndpfc | TYPE BDALEDC-SNDPFC , |
| it_t_tvers | TYPE STANDARD TABLE OF STRING , |
| wa_t_tvers | LIKE LINE OF it_t_tvers, |
| ld_sndprn | TYPE BDALEDC-SNDPRN , |
| it_t_status | TYPE STANDARD TABLE OF STRING , |
| wa_t_status | LIKE LINE OF it_t_status, |
| ld_sndprt | TYPE BDALEDC-SNDPRT , |
| it_t_kadat | TYPE STANDARD TABLE OF STRING , |
| wa_t_kadat | LIKE LINE OF it_t_kadat, |
| ld_flg_no_commit | TYPE XFLAG , |
| it_t_bidat | TYPE STANDARD TABLE OF STRING , |
| wa_t_bidat | LIKE LINE OF it_t_bidat, |
| it_t_kkzma | TYPE STANDARD TABLE OF STRING , |
| wa_t_kkzma | LIKE LINE OF it_t_kkzma, |
| it_t_kalkl | TYPE STANDARD TABLE OF STRING , |
| wa_t_kalkl | LIKE LINE OF it_t_kalkl, |
| it_t_kalaid | TYPE STANDARD TABLE OF STRING , |
| wa_t_kalaid | LIKE LINE OF it_t_kalaid, |
| it_t_kaladat | TYPE STANDARD TABLE OF STRING , |
| wa_t_kaladat | LIKE LINE OF it_t_kaladat, |
| it_t_keko_extern | TYPE STANDARD TABLE OF KEKO , |
| wa_t_keko_extern | LIKE LINE OF it_t_keko_extern, |
| it_et_comm_docum | TYPE STANDARD TABLE OF TSWOTOBJID , |
| wa_et_comm_docum | LIKE LINE OF it_et_comm_docum. |
The corresponding costings are sought for the given ranges. Using the
given costing values, the corresponding IDOCs are generated and
...See here for full SAP fm documentation
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 IDOC_CREATE_COPCPA or its description.
IDOC_CREATE_COPCPA - IDOC_COPY_TRIGGER_CREATE - POS Download: Set Trigger for PSE Converter Program IDOC_COPY_FILENAMES_GET - Determine IDoc File Names for Transfer of IDocs to SCS IDOC_CONVERSION_OILDEB - IDoc Conversion DEBMAS02 to OILDEB02 IDOC_CONTROL_OUTBOUND_CONVERT - IDOC_CONTROL_DATA_CHECK -