SAP Reports / Programs

RKERV002 SAP ABAP Report - Transfer SD Billing Documents to CO-PA







RKERV002 is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). Below is the basic information available for this SAP report including which OBJECTS it interacts with such as TABLES, FUNCTION MODULES, INCLUDES ETC. Also check out the submitted Comments related to this SAP report or see any standard documentation available.

If you would like to execute this report or see the full code listing simply enter RKERV002 into the relevant SAP transactions such as SE38 or SE80


Transaction Code(s):

Below is a list of transaction codes which are relevant to this SAP report

KE4S - Post billing documents to CO-PA
KE4ST - Simulation billg docs transfer CO-PA


ABAP code to call this SAP report using the submit statement

This report can be called from another progam/report simply by using the ABAP SUBMIT statement, see below for example ABAP code snipts of how to do this.






SUBMIT RKERV002. "Basic submit
SUBMIT RKERV002 AND RETURN. "Return to original report after report execution complete
SUBMIT RKERV002 VIA SELECTION-SCREEN. "Display selection screen of submitted report to user
    See more syntax options for the ABAP SUBMIT statement


Text pool values


Selection Text: P_CREORG = D .
Selection Text: BUKRS = D .
Selection Text: ERDAT = D .
Selection Text: FKART = D .
Selection Text: FKDAT = D .
Selection Text: GJAHR = D .
Selection Text: POPER = D .
Selection Text: PROTFLAG = D .
Selection Text: PRUEFEN = D .
Selection Text: P_DELOBJ = D .
Selection Text: P_DIRECT = D .
Selection Text: P_REV = D .
Selection Text: REORG_DT = D .
Selection Text: SPART = D .
Selection Text: TESTLAUF = D .
Selection Text: VBELN = D .
Selection Text: VKORG = D .
Selection Text: VTWEG = D .
Title: Transfer SD Billing Documents to CO-PA
Text Symbol: 310 = Name
Text Symbol: 320 = Characteristic value
Text Symbol: 330 = Display Derivation Analysis
Text Symbol: 340 = Currency type: operating concern currency
Text Symbol: 350 = Valuation view: legal valuation
Text Symbol: 360 = Currency type: Company code currency
Text Symbol: 370 = Valuation view: Profit center valuation
Text Symbol: 380 = Check value field assignment
Text Symbol: 390 = Check Customizing Settings
Text Symbol: 400 = Check value flow in billing doc.transfer
Text Symbol: 401 = Simulate Billing Document Transfer
Text Symbol: 402 = Simulated line items
Text Symbol: 403 = Report simulation
Text Symbol: 300 = Field name
Text Symbol: 001 = Document
Text Symbol: 003 = Update Control
Text Symbol: 005 = Control Parameters
Text Symbol: 010 = Number of billing documents read:
Text Symbol: 020 = Number of line items written:





Text Symbol: 021 = Number of line items to be transferred:
Text Symbol: 025 = No. of billing doc. items already transferred:
Text Symbol: 030 = Number of billing docs with errors:
Text Symbol: 040 = Bill.docs.
Text Symbol: 050 = Error text
Text Symbol: 060 = Billing Document Item
Text Symbol: 069 = Canceled COPAdoc
Text Symbol: 070 = CO-PA document number
Text Symbol: 071 = Operating concern
Text Symbol: 080 = Test run:
Text Symbol: 090 = Update:
Text Symbol: 100 = Valuation
Text Symbol: 105 = Message
Text Symbol: 110 = Billing documents containing errors
Text Symbol: 115 = Billing docs already transf.
Text Symbol: 120 = Transferred billing items
Text Symbol: 121 = Billing items to be transferred
Text Symbol: 122 = Simulation data
Text Symbol: 125 = Selected billing items
Text Symbol: 130 = Characteristics
Text Symbol: 135 = Value fields
Text Symbol: 200 = Condition
Text Symbol: 210 = Account
Text Symbol: 220 = Stat. KF
Text Symbol: 230 = Value
Text Symbol: 240 = Val. field
Text Symbol: 250 = Analysis of value flow: SD ==> CO-PA


INCLUDES used within this REPORT RKERV002

INCLUDE RMCSSU01.
INCLUDE KONVDATA.
INCLUDE THEADDAT.
INCLUDE VBRKDATA.
INCLUDE VBRPDATA.
INCLUDE VBRLDATA.
INCLUDE VBPADATA.
INCLUDE VBUVDATA.
INCLUDE SADRDATA.
INCLUDE VBFSDATA.
INCLUDE VBUKDATA.
INCLUDE VBUPDATA.





INCLUDE VBFADATA.


TABLES used within REPORT and the associated SELECT statement:

No SAP DATABASE tables are accessed within this REPORT code!


Function Modules used within report and the associated call statement:

COPA_DOCUMENT_LOG call function 'COPA_DOCUMENT_LOG' exporting i_action = 'S'.

COPA_DOCUMENT_LOG call function 'COPA_DOCUMENT_LOG' exporting i_action = 'ST'.

COPA_DOCUMENT_LOG call function 'COPA_DOCUMENT_LOG' exporting i_action = 'SE'.

RS_SET_SELSCREEN_STATUS call function 'RS_SET_SELSCREEN_STATUS' exporting p_status = 'KECA' p_program = 'COPA_COPY' tables p_exclude = lt_exclude.

COPA_SD_DOCUMENT_CONTROL call function 'COPA_SD_DOCUMENT_CONTROL' exporting i_action = 'C' i_variable = 'TEST_RUN'.

COPA_DOCUMENT_TRACE call function 'COPA_DOCUMENT_TRACE' exporting i_action = 'IZ'.

COPA_DOCUMENT_LOG call function 'COPA_DOCUMENT_LOG' exporting i_action = 'C' exceptions log_error = 1 others = 2.

K_COIN_SUBSEQUENT_POSTING_SET call function 'K_COIN_SUBSEQUENT_POSTING_SET' exporting i_activate = 'X'.

RV_MESSAGES_REFRESH call function 'RV_MESSAGES_REFRESH'.

RV_INVOICE_REFRESH call function 'RV_INVOICE_REFRESH' tables xkomfk = xkomfk xkomv = xkomv xthead = xthead xvbfs = xvbfs xvbpa = xvbpa xvbrk = xvbrk xvbrp = xvbrp xvbss = xvbss exceptions others = 0.

PRICING_REFRESH call function 'PRICING_REFRESH' tables tkomk = tkomk tkomv = xkomv.

RV_PARTNER_REFRESH call function 'RV_PARTNER_REFRESH'.

RV_TEXT_COPY_REFRESH call function 'RV_TEXT_COPY_REFRESH'.

EXPIMP_TABLES_REFRESH call function 'EXPIMP_TABLES_REFRESH'.

RV_INVOICE_DOCUMENT_READ call function 'RV_INVOICE_DOCUMENT_READ' exporting konv_read = 'X' vbrk_i = vbrk activity = '03' "Faktura anzeigen oia_unzip_fees = 'X' "only used in IS-Oil systems, 4.70

ENQUEUE_EVVBRKE call function 'ENQUEUE_EVVBRKE' exporting vbeln = vbrk-vbeln.

RV_ACCOUNTING_DOCUMENT_CREATE call function 'RV_ACCOUNTING_DOCUMENT_CREATE' exporting invoice_header = vbrk i_comp = g_comp i_comp_check = g_comp tables xkomv = xkomv xvbrp = xvbrp exceptions error_01 = 01 no_document_required = 02.

COPA_DOCUMENT_CANCEL_ITEM call function 'COPA_DOCUMENT_CANCEL_ITEM' exporting i_accrev = gs_accrev exceptions error_copa = 1 error_message = 2.




COPA_DOCUMENT_LOG call function 'COPA_DOCUMENT_LOG' exporting i_action = 'S'.

AC_DOCUMENT_POST call function 'AC_DOCUMENT_POST' exporting i_awtyp = g_awtyp i_awref = g_awref i_comp = g_comp.

DEQUEUE_EVVBRKE call function 'DEQUEUE_EVVBRKE' exporting vbeln = gt_dequeue.

COPA_DOCUMENT_LOG call function 'COPA_DOCUMENT_LOG' exporting i_action = 'F' importing es_cnt = gs_log_cnt tables log_table = gt_log[] log_table_err = gt_log_err[] exceptions log_error = 1 others = 2.

COPA_DOCUMENT_TRACE call function 'COPA_DOCUMENT_TRACE' exporting i_action = 'R' importing et_ad_trace = gt_log_bean exceptions trace_error = 1 others = 2.

COPA_DOCUMENT_LOG call function 'COPA_DOCUMENT_LOG' exporting i_action = 'X' i_tabname = g_tabname.

COPA_SDTRACE_LOG_CREATE call function 'COPA_SDTRACE_LOG_CREATE' exporting show_detail = protflag document_type = 'F' mode = g_mode tcode = g_tcode importing batch_log_handle = g_batch_log_handle tables document_messages = gt_document_messages valuation_messages = gt_log_bean.

COPA_SDTRACE_LOG_SHOW call function 'COPA_SDTRACE_LOG_SHOW' exporting document_type = 'F' show_detail = protflag mode = g_mode batch_log_handle = g_batch_log_handle i_tcode = g_tcode tables document_messages = gt_document_messages valuation_messages = gt_log_bean.

COPA_KEAB_TRACE_WRITE * call function 'COPA_KEAB_TRACE_WRITE' * exporting * i_trace_handle = gs_log_bean-trace_vaan.

HELPSCREEN_NA_CREATE * call function 'HELPSCREEN_NA_CREATE' * exporting * meldung = gs_help-text * meld_id = gs_help-msgid * meld_nr = gs_help-msgno * msgv1 = gt_log_err-msgv1 * msgv2 = gt_log_err-msgv2 * msgv3 = gt_log_err-msgv3 * msgv4 = gt_log_err-msgv4 * titel = g_title.

KEDR_TRACE_WRITE * call function 'KEDR_TRACE_WRITE' * exporting * i_trace_handle = gs_log_bean-trace_deri.

DOKU_OBJECT_SHOW * call function 'DOKU_OBJECT_SHOW' * exporting * dokclass = 'DE' "Allgemeiner Text * dokname = 'LEDBO' * tables * links = gt_links * exceptions * object_not_found = 1 * sapscript_error = 2 * others = 3.

FI_PERIOD_DETERMINE call function 'FI_PERIOD_DETERMINE' exporting i_budat = xvbrk-fkdat i_bukrs = xvbrk-bukrs importing e_gjahr = l_gjahr e_poper = l_poper exceptions fiscal_year = 01 period = 02 period_version = 03 posting_period = 04 special_period = 05 version = 06 posting_date = 07 error_message = 08 others = 08.

COPA_ERKRS_FIND call function 'COPA_ERKRS_FIND' exporting bukrs = it_documents-bukrs importing erkrs = l_erkrs exceptions others = 1.

COPA_DOCUMENT_RECORD call function 'COPA_DOCUMENT_RECORD' exporting i_awtyp = i_dup_awtyp i_awref = i_dup_awref i_aworg = i_dup_aworg i_bukrs = i_dup_bukrs tables t_documents = lt_documents.

COPA_ERKRS_FIND call function 'COPA_ERKRS_FIND' exporting bukrs = pa_vbrk-bukrs gsber = pa_vbrp-gsber importing erkrs = g_erkrs kokrs = i_kokrs exceptions error_kokrs_find = 01 no_erkrs_defined = 02 no_erkrs_for_kokrs = 03 error_message = 04 others = 05.

RKE_EXIT call function 'RKE_EXIT' exporting i_exit_id = keex_c_exit_id-ke4s_set_psg i_count_params = 3 changing x_param_1 = pa_vbpa[] x_param_2 = pa_vbrp x_param_3 = i_cobl.

FI_PERIOD_DETERMINE call function 'FI_PERIOD_DETERMINE' exporting i_budat = xvbrk-fkdat i_bukrs = xvbrk-bukrs importing e_gjahr = i_cobl-gjahr exceptions fiscal_year = 01 period = 02 period_version = 03 posting_period = 04 special_period = 05 version = 06 posting_date = 07 error_message = 08 others = 08.

RV_INVOICE_PRICING_PREPARE call function 'RV_INVOICE_PRICING_PREPARE' exporting vbrk_i = i_vbrk vbrp_i = i_vbrp importing komk_e = i_komk komp_e = i_komp tables xkomfk = i_komfk xvbfs = i_vbfs xvbpa = pa_vbpa xvbrk = pa_vbrk xvbrp = pa_vbrp exceptions no_t001w = 1 no_tvap = 2 no_tvko = 3 no_tvta = 4 others = 5.

COPA_GET_PAOBJNR call function 'COPA_GET_PAOBJNR' exporting i_cobl = i_cobl i_komk = i_komk i_komp = i_komp importing e_cobl = i_cobl exceptions others = 1.

COPA_DOCUMENT_LOG call function 'COPA_DOCUMENT_LOG' exporting i_action = 'AE' i_log_item = ls_log_item.

RKE_FILL_FIELD_TABLE call function 'RKE_FILL_FIELD_TABLE' exporting erkrs = i_erkrs tabname = l_ce0tabname tables fieldtab = lt_fieldtab exceptions ledger_not_def = 01 ledger_not_found = 02 table_not_found = 03.

RKE_FILL_FIELD_TABLE call function 'RKE_FILL_FIELD_TABLE' exporting erkrs = i_erkrs tabname = l_ce0tabname tables fieldtab = lt_fieldtab exceptions ledger_not_def = 01 ledger_not_found = 02 table_not_found = 03.

G_CONVERT_OUTPUT call function 'G_CONVERT_OUTPUT' exporting convexit = lt_fieldtab-convexit datatype = lt_fieldtab-datatype length_to_convert = lt_fieldtab-leng output_length = lt_fieldtab-outputlen value_to_convert = l_internal_value importing output_value = l_external_value.

S_CUS_IMG_ENTRY_VIA_ACTIVITY call function 'S_CUS_IMG_ENTRY_VIA_ACTIVITY' tables img_activities = lt_img_activities exceptions others = 1.

COPA_DOCUMENT_LOG call function 'COPA_DOCUMENT_LOG' exporting i_action = 'Y' i_tabname = l_tabname importing et_item = lt_log exceptions log_error = 1 others = 2.

RKE_REPORT_EXECUTE_WITH_DATA call function 'RKE_REPORT_EXECUTE_WITH_DATA' exporting i_erkrs = i_erkrs i_patype = c_patype_costing_based i_t_ce0 = i_start_in_new_window = 'X' i_skip_first_screen = ' ' exceptions others = 1.

KPEP_MONI_INIT_RECORD call function 'KPEP_MONI_INIT_RECORD' exporting ls_detail = l_detail ls_witem = l_witem ls_appl = l_appl_param * LD_WORKLIST_FLAG = ' ' importing ls_key = e_schedman_key tables lt_selkrit = lt_selkrit.

KPEP_MONI_CLOSE_RECORD call function 'KPEP_MONI_CLOSE_RECORD' exporting ls_key = i_schedman_key ls_message = l_message changing ld_aplstat = l_state.

AIP01_T001W_EXT_READ CALL FUNCTION 'AIP01_T001W_EXT_READ' EXPORTING I_WERKS = XVBRP-WERKS IMPORTING ES_T001W_EXT = S_T001W_EXT EXCEPTIONS PLANT_NOT_FOUND = 1 OTHERS = 2.

READ_CUSTOMIZED_MESSAGE CALL FUNCTION 'READ_CUSTOMIZED_MESSAGE' EXPORTING I_ARBGB = ARBGB I_DTYPE = DTYPE I_MSGNR = MSGNR IMPORTING E_MSGTY = MSGTY.



Contribute (Add Comments)

Although this basic information may have limited use it does provide an easy to find location to store any knowledge about this program/report.

The contribute/comments section below therefore offer's an opportunity for anyone to add additional information. This can be anything from useful hints, tips and screen shots to relevant SAP notes or anything else you feel is relevant to this report.

This will then be available for everyone to easily find by simply searching on the report name RKERV002 or its description.