SAP Reports / Programs

RCOPCA00 SAP ABAP Report - EC-PCA: Delete Profit Center Master Data







RCOPCA00 is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). It is used for Deleting Profit Center Master Data ..see full standard documentation available for this report. Also check out the submitted Comments related to this SAP report and the details below to see which OBJECTS it interacts with such as TABLES, FUNCTION MODULES, INCLUDES ETC.

If you would like to execute this report or see the full code listing simply enter RCOPCA00 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

0KE2 - EC-PCA: Del. Profit Ctr Master Data


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 RCOPCA00. "Basic submit
SUBMIT RCOPCA00 AND RETURN. "Return to original report after report execution complete
SUBMIT RCOPCA00 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_TEST = D .
Selection Text: PRCTR = D .
Selection Text: KOKRS = D .
Selection Text: DATBI = D .
Selection Text: DATAB = D .
Selection Text: P_CHECK = Execute checks
Selection Text: KHINR = Profit center group
Title: EC-PCA: Delete Profit Center Master Data
Text Symbol: 501 = Or
Text Symbol: 102 = Processing Options
Text Symbol: 101 = Period
Text Symbol: 100 = Selection Conditions
Text Symbol: 036 = Deactivated
Text Symbol: 035 = Active
Text Symbol: 033 = Controlling area:
Text Symbol: 032 = Checks:
Text Symbol: 031 = Deletion log
Text Symbol: 030 = Result of the test run
Text Symbol: 024 = Errors in mast.record
Text Symbol: 023 = Deletion test run successful.
Text Symbol: 022 = No checks were carried out.
Text Symbol: 021 = SystemMessage
Text Symbol: 020 = Status
Text Symbol: 004 = Do you really want to delete the selected profit center(s)?
Text Symbol: 003 = Do you really want to start the test run with carrying out checks?
Text Symbol: 002 = Do you want to start checks on the deletion(s)?
Text Symbol: 001 = Delete profit centers
002 | Center From To Deleted Note |
001 | Profit |


INCLUDES used within this REPORT RCOPCA00

No INCLUDES are used within this REPORT code!


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:

G_BUFFER_RESET CALL FUNCTION 'G_BUFFER_RESET'.

G_SET_ENCRYPT_SETID CALL FUNCTION 'G_SET_ENCRYPT_SETID' EXPORTING setclass = gsetc_profitcenter_setclass shortname = khinr kokrs = kokrs IMPORTING setid = set_id.

G_SET_GET_INFO CALL FUNCTION 'G_SET_GET_INFO' EXPORTING setname = set_id IMPORTING info = set_info EXCEPTIONS set_not_found = 1 OTHERS = 2.

DYNP_VALUES_READ CALL FUNCTION 'DYNP_VALUES_READ' EXPORTING dyname = dyname dynumb = dynumb TABLES dynpfields = t_dynpread.

K_GROUP_SELECT CALL FUNCTION 'K_GROUP_SELECT' EXPORTING buttons = 'X' * class = setclass "RDI_SETS_4.0

K_EO_PRCTR_READ_PAR CALL FUNCTION 'K_EO_PRCTR_READ_PAR' EXPORTING controllingarea = kokrs date_from = datab date_to = datbi TABLES it_cosel = lt_cosel it_result = lt_result EXCEPTIONS no_record_found = 1 OTHERS = 2.

K_EO_PRCTR_READ_PAR CALL FUNCTION 'K_EO_PRCTR_READ_PAR' EXPORTING controllingarea = kokrs date_from = min_datum date_to = max_datum with_text = space inactive_version = 'X' TABLES it_cosel = lt_cosel it_result = lt_result_inactive EXCEPTIONS no_record_found = 1 OTHERS = 2.

REUSE_ALV_GRID_DISPLAY CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' EXPORTING i_callback_program = ld_repid i_callback_top_of_page = 'TITLE_FORM' is_layout = ls_layout it_fieldcat = lt_fieldcat[] IMPORTING es_exit_caused_by_user = ls_exit_caused_by_user TABLES t_outtab = lt_outtab EXCEPTIONS program_error = 1 OTHERS = 2.

ENQUEUE_EKCEPCE CALL FUNCTION 'ENQUEUE_EKCEPCE' EXCEPTIONS foreign_lock = 1 system_failure = 2.

REUSE_ALV_GRID_DISPLAY CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' EXPORTING i_callback_program = ld_repid i_callback_top_of_page = 'TITLE_FORM' is_layout = ls_layout it_fieldcat = lt_fieldcat[] IMPORTING es_exit_caused_by_user = ls_exit_caused_by_user TABLES t_outtab = lt_outtab EXCEPTIONS program_error = 1 OTHERS = 2.

K_PCA_RESP_AUTHORITY_CHECK CALL FUNCTION 'K_PCA_RESP_AUTHORITY_CHECK' EXPORTING i_kokrs = auc_kokrs i_pcgrp = pcgrp i_vorgn = 'STDT' "Stammdaten i_actvt = auc_actvt EXCEPTIONS no_authority = 1 data_missing = 2 OTHERS = 3.

K_PCA_RESP_AUTHORITY_CHECK CALL FUNCTION 'K_PCA_RESP_AUTHORITY_CHECK' EXPORTING i_kokrs = auc_kokrs i_prctr = prctr-low i_vorgn = 'STDT' i_actvt = auc_actvt EXCEPTIONS no_authority = 1 data_missing = 2 OTHERS = 3.

PCA_LOG_INIT CALL FUNCTION 'PCA_LOG_INIT' EXPORTING object = 'COP1' subobject = 'DELETE' EXCEPTIONS object_not_found = 01.

PCA_LOG_INIT_HEADER CALL FUNCTION 'PCA_LOG_INIT_HEADER' EXPORTING extnumber = 'PrCtr.'

PCA_LOG_INIT_MESSAGES CALL FUNCTION 'PCA_LOG_INIT_MESSAGES' EXPORTING msgid = 'KM' m_detlevel = '2' m_probclass = '2'.

PCA_LOG_SET_MESSAGE CALL FUNCTION 'PCA_LOG_SET_MESSAGE' EXPORTING msgty = 'I' msgno = 423 "Report gestartet v1 = v1. "Reportname

PCA_LOG_APPEND_PARAMS CALL FUNCTION 'PCA_LOG_APPEND_PARAMS' EXPORTING para = 'KOKRS' value = value refresh = 'X'.

PCA_LOG_APPEND_PARAMS CALL FUNCTION 'PCA_LOG_APPEND_PARAMS' EXPORTING para = 'RPRCTR' value = value.

PCA_LOG_APPEND_PARAMS





CALL FUNCTION 'PCA_LOG_APPEND_PARAMS' EXPORTING * PARA = ' ' "US46a para = 'PRCTRRANGE' "US46a value = value.

PCA_LOG_APPEND_PARAMS CALL FUNCTION 'PCA_LOG_APPEND_PARAMS' EXPORTING para = 'KHINR' value = value.

PCA_LOG_APPEND_PARAMS CALL FUNCTION 'PCA_LOG_APPEND_PARAMS' EXPORTING para = 'DATAB' value = value.

PCA_LOG_APPEND_PARAMS CALL FUNCTION 'PCA_LOG_APPEND_PARAMS' EXPORTING para = 'DATBI' value = value.

PCA_LOG_APPEND_PARAMS CALL FUNCTION 'PCA_LOG_APPEND_PARAMS' EXPORTING para = 'NO_CHECKS' value = value.

PCA_LOG_WRITE_MESSAGE CALL FUNCTION 'PCA_LOG_WRITE_MESSAGE' EXPORTING update_or_insert = 'I' EXCEPTIONS object_not_found = 01.

PCA_LOG_WRITE_DB CALL FUNCTION 'PCA_LOG_WRITE_DB'.

FI_PERIOD_DETERMINE CALL FUNCTION 'FI_PERIOD_DETERMINE' "KBP45K004594 EXPORTING "KBP45K004594 i_budat = sy-datum "KBP45K004594 IMPORTING "KBP45K004594 e_gjahr = gjahr "KBP45K004594 EXCEPTIONS "KBP45K004594 fiscal_year = 1 "KBP45K004594 period = 2 "KBP45K004594 period_version = 3 "KBP45K004594 posting_period = 4 "KBP45K004594 special_period = 5 "KBP45K004594 version = 6 "KBP45K004594 posting_date = 7 "KBP45K004594 OTHERS = 8. "KBP45K004594

COPCA_ACTIVE_ACT CALL FUNCTION 'COPCA_ACTIVE_ACT' "KBP45K004594 EXPORTING "KBP45K004594 gjahr = gjahr "KBP45K004594 kokrs = kokrs "KBP45K004594 pcrch = '2' "KBP45K004594 IMPORTING "KBP45K004594 dprct = dummy_prctr "KBP45K004594 EXCEPTIONS "KBP45K004594 copca_not_active = 1"KBP45K004594 kokrs_not_found = 2"KBP45K004594 wrong_parameter_pcrch = 3"KBP45K004594 no_currency_found = 4"KBP45K004594 OTHERS = 5. "KBP45K004594

COPCA_DUMMY_PRCTR_GET CALL FUNCTION 'COPCA_DUMMY_PRCTR_GET' EXPORTING ikokrs = kokrs IMPORTING edprct = dummy_prctr EXCEPTIONS kokrs_not_found = 1 OTHERS = 2.

PROFITCENTER_DELETE CALL FUNCTION 'PROFITCENTER_DELETE' EXPORTING iprctr = p_del_tab-prctr ikokrs = p_del_tab-kokrs idatab = p_del_tab-datab idatbi = p_del_tab-datbi ino_checks = p_no_checks * writing own appl log in customizing ino_appl_log = 'X' itestrun = p_testrun IMPORTING return = ls_msg * TABLES * ET_PRCT1 = EXCEPTIONS invalid_prctr = 1 invalid_interval = 2 dummy_prctr = 3 data_posted = 4 object_assigned = 5 newgl_active = 6 "note 1097234 OTHERS = 7.

BALW_BAPIRETURN_GET2 CALL FUNCTION 'BALW_BAPIRETURN_GET2' EXPORTING type = ls_msg-type cl = ls_msg-id number = ls_msg-number IMPORTING return = p_msg.

PROFITCENTER_DELETE CALL FUNCTION 'PROFITCENTER_DELETE' EXPORTING iprctr = p_del_tab-prctr ikokrs = p_del_tab-kokrs ino_checks = 'X' EXCEPTIONS OTHERS = 5.

REUSE_ALV_COMMENTARY_WRITE CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE' EXPORTING it_list_commentary = lt_list_commentary[] * I_LOGO = * I_END_OF_LIST_GRID = .

G_SET_ENCRYPT_SETID CALL FUNCTION 'G_SET_ENCRYPT_SETID' EXPORTING setclass = gsetc_profitcenter_setclass shortname = khinr kokrs = kokrs IMPORTING setid = set_id.

G_SET_INSERT CALL FUNCTION 'G_SET_INSERT' EXPORTING setname = set_id maintenance = 'X' IMPORTING index = set_index EXCEPTIONS set_not_found = 1.

G_INTERVAL_GET_NEXT CALL FUNCTION 'G_INTERVAL_GET_NEXT' EXPORTING control_block = 1 index = set_index IMPORTING entry = set_entry EXCEPTIONS end_of_intervals = 1.

POPUP_TO_CONFIRM CALL FUNCTION 'POPUP_TO_CONFIRM' EXPORTING titlebar = text-001 diagnose_object = 'EC_PCA_MD_DELETE_INFO1' text_question = text-002 default_button = '2' display_cancel_button = space userdefined_f1_help = 'EC_PCA_MD_DELETE_INFO2' popup_type = 'ICON_MESSAGE_WARNING' IMPORTING answer = p_answer EXCEPTIONS OTHERS = 1.

POPUP_TO_CONFIRM CALL FUNCTION 'POPUP_TO_CONFIRM' EXPORTING titlebar = text-001 diagnose_object = 'EC_PCA_MD_DELETE_INFO4' text_question = text-003 default_button = '2' display_cancel_button = space userdefined_f1_help = 'EC_PCA_MD_DELETE_INFO2' popup_type = 'ICON_MESSAGE_WARNING' IMPORTING answer = p_answer EXCEPTIONS OTHERS = 1.

POPUP_TO_CONFIRM CALL FUNCTION 'POPUP_TO_CONFIRM' EXPORTING titlebar = text-001 diagnose_object = 'EC_PCA_MD_DELETE_INFO1' text_question = text-004 default_button = '2' display_cancel_button = space userdefined_f1_help = 'EC_PCA_MD_DELETE_INFO2' popup_type = 'ICON_MESSAGE_WARNING' IMPORTING answer = p_answer EXCEPTIONS OTHERS = 1.




POPUP_TO_CONFIRM CALL FUNCTION 'POPUP_TO_CONFIRM' EXPORTING titlebar = text-001 diagnose_object = 'EC_PCA_MD_DELETE_INFO4' text_question = text-004 default_button = '2' display_cancel_button = space userdefined_f1_help = 'EC_PCA_MD_DELETE_INFO2' popup_type = 'ICON_MESSAGE_CRITICAL' IMPORTING answer = p_answer EXCEPTIONS OTHERS = 1.



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