SAP Reports / Programs | Royalty Reporting | Industry Solution Oil | Royalty Reporting(IS-OIL-PRA-REP-ROY) SAP IS

ROIUY1_UPLOAD_HISTORY SAP ABAP Report - History table migration from old to generic royalty reporting tables







ROIUY1_UPLOAD_HISTORY 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 ROIUY1_UPLOAD_HISTORY into the relevant SAP transactions such as SE38 or SE80


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 ROIUY1_UPLOAD_HISTORY. "Basic submit
SUBMIT ROIUY1_UPLOAD_HISTORY AND RETURN. "Return to original report after report execution complete
SUBMIT ROIUY1_UPLOAD_HISTORY 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: AGENCY = D .
Selection Text: COMPANY = D .
Selection Text: EFF_FRM = Effective from
Selection Text: OIL_IND = D .
Selection Text: ROY_FILE = Royalty file
Selection Text: VOL_FILE = Volume file
Title: History table migration from old to generic royalty reporting tables
Text Symbol: 001 = Company code does not match
Text Symbol: 002 = Agency does not match
Text Symbol: 003 = Agency product code is not defined
Text Symbol: 004 = Agency volume type code is not defined
Text Symbol: 005 = Oil/gas indicator does not match
Text Symbol: 006 = Execution statistics already exist for these reporting parameters
Text Symbol: 007 = Royalty transactional data migration
Text Symbol: 008 = Yes
Text Symbol: 009 = No
Text Symbol: 010 = Data already exists in the history tables. It will be overwritten. Do you want to continue?
Text Symbol: 011 = No reporting year and month for following sys numbers in OIUH_RV_ROYH
Text Symbol: 012 = Following sys numbers are not uploaded
Text Symbol: 013 = *BLR System Numbers


INCLUDES used within this REPORT ROIUY1_UPLOAD_HISTORY

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:

F4_FILENAME * CALL FUNCTION 'F4_FILENAME' "allows user to select path/file * EXPORTING * program_name = 'ROIUY1_UPLOAD_HISTORY' * dynpro_number = syst-dynnr * field_name = 'roy_file' * IMPORTING * file_name = roy_file.

F4_FILENAME * CALL FUNCTION 'F4_FILENAME' "allows user to select path/file * EXPORTING * program_name = 'ROIUY1_UPLOAD_HISTORY' * dynpro_number = syst-dynnr * field_name = 'vol_file' * IMPORTING * file_name = vol_file.

OIUREP_CONVERT_COMPANY_ORG1 CALL FUNCTION 'OIUREP_CONVERT_COMPANY_ORG1' CHANGING comp_org1 = l_roiurep_company_org1.

POPUP_TO_CONFIRM CALL FUNCTION 'POPUP_TO_CONFIRM' EXPORTING titlebar = text-007 text_question = text-010 text_button_1 = text-008 text_button_2 = text-009 display_cancel_button = space IMPORTING answer = l_answer EXCEPTIONS text_not_found = 1 OTHERS = 2.

OIUREP_CONVERT_VENTURE_PROP CALL FUNCTION 'OIUREP_CONVERT_VENTURE_PROP' CHANGING vent_prop = l_venture_prop.

OIUREP_CONVERT_EPWLWC_RZWLWC CALL FUNCTION 'OIUREP_CONVERT_EPWLWC_RZWLWC' CHANGING epwlwc_rzwlwc = l_ep_wlwc.

OIUREP_CONVERT_EPMP_RZMP CALL FUNCTION 'OIUREP_CONVERT_EPMP_RZMP' CHANGING epmp_rzmp = l_ep_mp.

OIUREP_CONVERT_VENTURE_PROP CALL FUNCTION 'OIUREP_CONVERT_VENTURE_PROP' CHANGING vent_prop = l_venture_prop.

OIUREP_CONVERT_EPWLWC_RZWLWC CALL FUNCTION 'OIUREP_CONVERT_EPWLWC_RZWLWC' CHANGING epwlwc_rzwlwc = l_ep_wlwc.

OIUREP_CONVERT_EPMP_RZMP CALL FUNCTION 'OIUREP_CONVERT_EPMP_RZMP' CHANGING epmp_rzmp = l_ep_mp.

OIUREP_GET_RPT_ENTTY CALL FUNCTION 'OIUREP_GET_RPT_ENTTY' EXPORTING roy_exec_param = ls_exec_param rpt_entty_key = s_key for_yyyymm = it_oiurep_roy_data-year_month_amnd TABLES rpt_entty = lt_rpt_entty EXCEPTIONS duplicate_insert = 1 invalid_delete = 2 invalid_update = 3 no_base_yyyymm = 4 OTHERS = 5.

OIUY1_GET_VKEY CALL FUNCTION 'OIUY1_GET_VKEY' EXPORTING agency = it_oiurep_roy_data-agency pdind = 'D' * ct_type_cd = it_ct-ct_no IMPORTING varkey = varkey CHANGING purchaser = it_purchasers-ctpty_no.

OIUREP_CONVERT_VENTURE_PROP CALL FUNCTION 'OIUREP_CONVERT_VENTURE_PROP' CHANGING vent_prop = l_venture_prop.

OIUREP_CONVERT_EPWLWC_RZWLWC CALL FUNCTION 'OIUREP_CONVERT_EPWLWC_RZWLWC' CHANGING epwlwc_rzwlwc = l_ep_wlwc.

OIUREP_CONVERT_EPMP_RZMP CALL FUNCTION 'OIUREP_CONVERT_EPMP_RZMP' CHANGING epmp_rzmp = l_ep_mp.

OIUREP_GET_RPT_ENTTY CALL FUNCTION 'OIUREP_GET_RPT_ENTTY' EXPORTING roy_exec_param = ls_exec_param rpt_entty_key = s_key for_yyyymm = it_oiurep_roy_data-year_month_amnd TABLES rpt_entty = lt_rpt_entty EXCEPTIONS duplicate_insert = 1 invalid_delete = 2 invalid_update = 3 no_base_yyyymm = 4 OTHERS = 5.

OIUY1_GET_VKEY * CALL FUNCTION 'OIUY1_GET_VKEY' "MT SOGK037154 * EXPORTING * agency = it_oiurep_roy_data-agency * pdind = 'P' * IMPORTING * varkey = varkey * CHANGING * purchaser = it_purchasers-ctpty_no.

OIUREP_ROY_AMND_STAT_CREATE CALL FUNCTION 'OIUREP_ROY_AMND_STAT_CREATE' EXPORTING roy_exec_param = ls_exec_param EXCEPTIONS invalid_rpt_yyyymm = 1 finalized = 2 no_first_yyyymm = 3 status_create_error = 4 OTHERS = 5.

OIUREP_ROY_EXEC_STAT_CREATE





CALL FUNCTION 'OIUREP_ROY_EXEC_STAT_CREATE' EXPORTING roy_exec_param = ls_exec_param stat_ind = 'F' EXCEPTIONS no_status_exists = 1 invalid_stat_ind = 2 status_create_error = 3 finalized = 4 OTHERS = 5.

OIUREP_CREATE_ROYHIST CALL FUNCTION 'OIUREP_CREATE_ROYHIST' EXPORTING roy_exec_param = ls_exec_param EXCEPTIONS get_data_error = 1 hist_create_error = 2 no_first_yyyymm = 3 OTHERS = 4.

OIUREP_CREATE_VOLHIST CALL FUNCTION 'OIUREP_CREATE_VOLHIST' EXPORTING roy_exec_param = ls_exec_param EXCEPTIONS get_data_error = 1 hist_create_error = 2 no_first_yyyymm = 3 OTHERS = 4.

OIUREP_BUILD_ROY_LOG * CALL FUNCTION 'OIUREP_BUILD_ROY_LOG' * EXPORTING * roy_exec_param = ls_exec_param * EXCEPTIONS * log_create_error = 1 * OTHERS = 2.

WS_UPLOAD ** call function 'WS_UPLOAD' ** exporting ** filename = roy_file ** filetype = 'ASC' ** tables ** data_tab = lt_file ** exceptions ** conversion_error = 1 ** file_open_error = 2 ** file_read_error = 3 ** invalid_type = 4 ** no_batch = 5 ** unknown_error = 6 ** invalid_table_width = 7 ** gui_refuse_filetransfer = 8 ** customer_error = 9 ** others = 10.

GUI_UPLOAD ** CALL FUNCTION 'GUI_UPLOAD' ** EXPORTING ** filename = ld_file ** filetype = 'ASC' ** TABLES ** data_tab = lt_roy_file ** EXCEPTIONS ** file_open_error = 1 ** file_read_error = 2 ** no_batch = 3 ** gui_refuse_filetransfer = 4 ** invalid_type = 5 ** no_authority = 6 ** unknown_error = 7 ** bad_data_format = 8 ** header_not_allowed = 9 ** separator_not_allowed = 10 ** header_too_long = 11 ** unknown_dp_error = 12 ** access_denied = 13 ** dp_out_of_memory = 14 ** disk_full = 15 ** dp_timeout = 16 ** OTHERS = 17.

OIUREP_GET_RPT_ENTTY * CALL FUNCTION 'OIUREP_GET_RPT_ENTTY' * EXPORTING * roy_exec_param = l_exec_param * rpt_entty_key = ls_re_key * for_yyyymm = it_oiurep_roy_data-year_month_amnd * TABLES * rpt_entty = lt_entty * EXCEPTIONS * duplicate_insert = 1 * invalid_delete = 2 * invalid_update = 3 * no_base_yyyymm = 4 * OTHERS = 5.

WS_UPLOAD ** call function 'WS_UPLOAD' ** exporting ** filename = vol_file ** filetype = 'ASC' ** tables ** data_tab = lt_file ** exceptions ** conversion_error = 1 ** file_open_error = 2 ** file_read_error = 3 ** invalid_type = 4 ** no_batch = 5 ** unknown_error = 6 ** invalid_table_width = 7 ** gui_refuse_filetransfer = 8 ** customer_error = 9 ** others = 10.

GUI_UPLOAD * CALL FUNCTION 'GUI_UPLOAD' * EXPORTING * filename = ld_file * filetype = 'ASC' * TABLES * data_tab = lt_vol_file * EXCEPTIONS * file_open_error = 1 * file_read_error = 2 * no_batch = 3 * gui_refuse_filetransfer = 4 * invalid_type = 5 * no_authority = 6 * unknown_error = 7 * bad_data_format = 8 * header_not_allowed = 9 * separator_not_allowed = 10 * header_too_long = 11 * unknown_dp_error = 12 * access_denied = 13 * dp_out_of_memory = 14 * disk_full = 15 * dp_timeout = 16 * OTHERS = 17.

OIUREP_GET_RPT_ENTTY * CALL FUNCTION 'OIUREP_GET_RPT_ENTTY' * EXPORTING * roy_exec_param = l_exec_param * rpt_entty_key = ls_re_key * for_yyyymm = it_oiurep_vol_data-year_month_amnd * TABLES * rpt_entty = lt_entty * EXCEPTIONS * duplicate_insert = 1 * invalid_delete = 2 * invalid_update = 3 * no_base_yyyymm = 4 * OTHERS = 5.

OIUREP_CONVERT_OWNER_BA CALL FUNCTION 'OIUREP_CONVERT_OWNER_BA' CHANGING owner_ba = l_owner_ba.

ENQUEUE_E_OIUREPAMNDSTAT CALL FUNCTION 'ENQUEUE_E_OIUREPAMNDSTAT' EXPORTING mandt = sy-mandt year_month = ls_exec_param-year_month org_level1_no = ls_exec_param-org_level1_no agency = ls_exec_param-agency oil_gas_ind = ls_exec_param-oil_gas_ind EXCEPTIONS foreign_lock = 1 system_failure = 2 OTHERS = 3.

DEQUEUE_E_OIUREPAMNDSTAT CALL FUNCTION 'DEQUEUE_E_OIUREPAMNDSTAT' EXPORTING mandt = sy-mandt year_month = ls_exec_param-year_month org_level1_no = ls_exec_param-org_level1_no agency = ls_exec_param-agency oil_gas_ind = ls_exec_param-oil_gas_ind.

ENQUEUE_E_OIUREPEXECSTAT CALL FUNCTION 'ENQUEUE_E_OIUREPEXECSTAT' EXPORTING mandt = sy-mandt year_month = ls_exec_param-year_month org_level1_no = ls_exec_param-org_level1_no agency = ls_exec_param-agency oil_gas_ind = ls_exec_param-oil_gas_ind EXCEPTIONS foreign_lock = 1 system_failure = 2 OTHERS = 3.

DEQUEUE_E_OIUREPEXECSTAT CALL FUNCTION 'DEQUEUE_E_OIUREPEXECSTAT' EXPORTING mandt = sy-mandt year_month = ls_exec_param-year_month org_level1_no = ls_exec_param-org_level1_no agency = ls_exec_param-agency oil_gas_ind = ls_exec_param-oil_gas_ind.



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