SAP Reports / Programs | Financial Accounting | Localization(FI-LOC) SAP FI

RFQSCI01 SAP ABAP Report - Withholding Tax Report (Chile)







RFQSCI01 is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). It is used for You use this report to prepare withholding tax certificates for the following, in accordance with Chilean legal requirements: Self-employed persons/company directors Mining businesses Farmers Additional tax You can also use it to: Save the certificates to disk Print out your withholding tax ledger Each entry in the list consists of a header and line items...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 RFQSCI01 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 RFQSCI01. "Basic submit
SUBMIT RFQSCI01 AND RETURN. "Return to original report after report execution complete
SUBMIT RFQSCI01 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: FULL = Print Withholding Tax Ledger
Selection Text: F_CODEI = Withholding Tax Code
Selection Text: INDX = Inflation Index
Selection Text: PAR_DAT = Key Date
Selection Text: P_BAS = TBE Variant
Selection Text: P_VARI = Variant
Selection Text: QKZ3 = Fees
Selection Text: QKZ4 = Shares
Selection Text: S_BELNR = Document Number
Selection Text: S_BUDAT = Posting Date
Selection Text: S_BUSA = Business Area
Selection Text: S_COMPY = Company Code
Selection Text: S_KRED = Vendor Number
Selection Text: S_QSSKZ1 = Withholding Tax Type
Selection Text: S_QSSKZ2 = Withholding Tax Type
Selection Text: S_QSSKZ3 = Withholding Tax Type
Selection Text: S_QSSKZ5 = Withholding Tax Type
Selection Text: S_YEAR = Fiscal Year
Selection Text: W_CODEI = Withholding Tax Code
Title: Withholding Tax Report (Chile)
Text Symbol: 055 = WH Tax Ledger
Text Symbol: 054 = Withholding Tax Ledger
Text Symbol: 053 = Withholding Tax Collected from Mining Businesses
Text Symbol: 052 = Withholding Tax Collected from Farmers
Text Symbol: 051 = Withholding Tax Collected from Self-Employed/Directors
Text Symbol: 049 = Additional Tax Withholdings
Text Symbol: 010 = Company Code
Text Symbol: 004 = Mining Businesses
Text Symbol: 003 = Self-Empl./Directors
Text Symbol: 002 = Farmers
Text Symbol: 104 = Official Name
Text Symbol: 105 = Name
Text Symbol: 110 = Adjustment Amt
Text Symbol: 112 = Adj. Withholding Tax
Text Symbol: 113 = Adjusted Withholding Tax/Period
Text Symbol: 115 = Month
Text Symbol: 117 = Adjusted Amount/Period
Text Symbol: 118 = Adj. WH Tax to Appear on Cert./Period





Text Symbol: 119 = Adjusted WH tax to Appear on Certificate/Period
Text Symbol: 120 = Certificate Form
Text Symbol: 121 = Business Area
Text Symbol: 153 = Tax Number:
Text Symbol: 199 = Shares
Text Symbol: 201 = Amt/Period
Text Symbol: 202 = Amt/Period
Text Symbol: 203 = Amount/Period
Text Symbol: 221 = C Amt/Period
Text Symbol: 222 = Cert. Amount/Period
Text Symbol: 223 = Certificate Amount/Period
Text Symbol: 299 = Additional Tax
Text Symbol: 060 = Period:
Text Symbol: INF = Inflation Data
Text Symbol: 916 = Cert. Adj. Amt/Per.
Text Symbol: 915 = Adjusted Amt/Per.
Text Symbol: 914 = C Adj. WH Tax/Per.
Text Symbol: 913 = Adj. WH Tax/Per.
Text Symbol: 912 = Adjusted WH Tax
Text Symbol: 910 = Adj. Amount
Text Symbol: 816 = Cert. Adj. Amt/Per.
Text Symbol: 815 = Adj. Amt/Period
Text Symbol: 814 = C Adj. WH Tax/P
Text Symbol: 813 = Adj. Tax/Per.
Text Symbol: 812 = Adj. WH Tax
Text Symbol: 810 = Adj. Amt
Text Symbol: 399 = Expenses
Text Symbol: 337 = Withholding Tax Certificate
Text Symbol: 323 = Certificate Withholding Tax/Period
Text Symbol: 322 = Cert. WH Tax/Period
Text Symbol: 321 = C WH Tax/Per.
Text Symbol: 303 = WH Tax/Period
Text Symbol: 302 = WH Tax/Period
Text Symbol: 301 = Tax/Per.
Text Symbol: 103 = Page
Text Symbol: 102 = Date:
Text Symbol: 101 = Company Code
Text Symbol: 099 = WH Tax Codes: Fees
Text Symbol: 066 = Additional Tax





Text Symbol: 065 = Report
Text Symbol: 064 = General Selections
Text Symbol: 063 = List Output
Text Symbol: 061 = to


INCLUDES used within this REPORT RFQSCI01

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:

DISPLAY_FORM_TREE_F4 CALL FUNCTION 'DISPLAY_FORM_TREE_F4' EXPORTING p_tree_name = 'FI-12' * P_DISPLAY_MODE = ' ' * I_FORM_NAME = IMPORTING p_form_name = hp_form_name * P_FORM_LANGUAGE = EXCEPTIONS * CANCELLED = 1 * PARAMETER_ERROR = 2 * NOT_FOUND = 3 OTHERS = 4.

DISPLAY_FORM_TREE_F4 CALL FUNCTION 'DISPLAY_FORM_TREE_F4' EXPORTING p_tree_name = 'FI-12' * P_DISPLAY_MODE = ' ' * I_FORM_NAME = IMPORTING p_form_name = hp_form_name * P_FORM_LANGUAGE = EXCEPTIONS * CANCELLED = 1 * PARAMETER_ERROR = 2 * NOT_FOUND = 3 OTHERS = 4.

DISPLAY_FORM_TREE_F4 CALL FUNCTION 'DISPLAY_FORM_TREE_F4' EXPORTING p_tree_name = 'FI-12' * P_DISPLAY_MODE = ' ' * I_FORM_NAME = IMPORTING p_form_name = hp_form_name * P_FORM_LANGUAGE = EXCEPTIONS * CANCELLED = 1 * PARAMETER_ERROR = 2 * NOT_FOUND = 3 OTHERS = 4.

DISPLAY_FORM_TREE_F4 CALL FUNCTION 'DISPLAY_FORM_TREE_F4' EXPORTING p_tree_name = 'FI-12' * P_DISPLAY_MODE = ' ' * I_FORM_NAME = IMPORTING p_form_name = hp_form_name * P_FORM_LANGUAGE = EXCEPTIONS * CANCELLED = 1 * PARAMETER_ERROR = 2 * NOT_FOUND = 3 OTHERS = 4.

POPUP_DISPLAY_TEXT CALL FUNCTION 'POPUP_DISPLAY_TEXT' EXPORTING language = sy-langu popup_title = text-120 * START_COLUMN = 10 * START_ROW = 3 text_object = 'RFCLLIB_XX_QSZ' * HELP_MODAL = 'X' * IMPORTING * CANCELLED = EXCEPTIONS text_not_found = 1 OTHERS = 2 .

POPUP_DISPLAY_TEXT CALL FUNCTION 'POPUP_DISPLAY_TEXT' EXPORTING language = sy-langu popup_title = text-120 * START_COLUMN = 10 * START_ROW = 3 text_object = 'RFCLLIB_XX_QSZ' * HELP_MODAL = 'X' * IMPORTING * CANCELLED = EXCEPTIONS text_not_found = 1 OTHERS = 2 .

POPUP_DISPLAY_TEXT CALL FUNCTION 'POPUP_DISPLAY_TEXT' EXPORTING language = sy-langu popup_title = text-120 * START_COLUMN = 10 * START_ROW = 3 text_object = 'RFCLLIB_XX_QSZ' * HELP_MODAL = 'X' * IMPORTING * CANCELLED = EXCEPTIONS text_not_found = 1 OTHERS = 2 .

POPUP_DISPLAY_TEXT CALL FUNCTION 'POPUP_DISPLAY_TEXT' EXPORTING language = sy-langu popup_title = text-120 * START_COLUMN = 10 * START_ROW = 3 text_object = 'RFCLLIB_XX_QSZ' * HELP_MODAL = 'X' * IMPORTING * CANCELLED = EXCEPTIONS text_not_found = 1 OTHERS = 2 .

POPUP_DISPLAY_TEXT CALL FUNCTION 'POPUP_DISPLAY_TEXT' EXPORTING language = sy-langu popup_title = text-054 * START_COLUMN = 10 * START_ROW = 3 text_object = 'RFCLLIB_XX_QSB' * HELP_MODAL = 'X' * IMPORTING * CANCELLED = EXCEPTIONS text_not_found = 1 OTHERS = 2 .

REUSE_ALV_VARIANT_DEFAULT_GET CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET' EXPORTING i_save = g_save CHANGING cs_variant = gx_variant EXCEPTIONS wrong_input = 1 not_found = 2 program_error = 3 OTHERS = 4.

REUSE_ALV_HIERSEQ_LIST_DISPLAY CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY' EXPORTING * I_INTERFACE_CHECK = ' ' i_callback_program = g_repid i_callback_pf_status_set = 'SET_PF_STATUS' i_callback_user_command = 'USER_COMMAND' is_layout = gs_layout it_fieldcat = gt_fieldcat[] * IT_EXCLUDING = * IT_SPECIAL_GROUPS = it_sort = gt_sort[] * IT_FILTER = * IS_SEL_HIDE = * I_SCREEN_START_COLUMN = 0 * I_SCREEN_START_LINE = 0 * I_SCREEN_END_COLUMN = 0 * I_SCREEN_END_LINE = 0 * I_DEFAULT = 'X' i_save = g_save is_variant = g_variant it_events = gt_events[] * IT_EVENT_EXIT = i_tabname_header = g_tabname_header i_tabname_item = g_tabname_item * I_STRUCTURE_NAME_HEADER = * I_STRUCTURE_NAME_ITEM = is_keyinfo = gs_keyinfo * IS_PRINT = * IS_REPREP_ID = * IMPORTING * E_EXIT_CAUSED_BY_CALLER = * ES_EXIT_CAUSED_BY_USER = TABLES t_outtab_header = output_header_table t_outtab_item = output_list EXCEPTIONS program_error = 1 OTHERS = 2 .

REUSE_ALV_EVENTS_GET CALL FUNCTION 'REUSE_ALV_EVENTS_GET' EXPORTING i_list_type = 0 IMPORTING et_events = lt_events.

CONVERT_DATE_TO_EXTERNAL CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL' EXPORTING date_internal = s_budat-low IMPORTING date_external = date_str_l EXCEPTIONS date_internal_is_invalid = 1 OTHERS = 2.

CONVERT_DATE_TO_EXTERNAL CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL' EXPORTING date_internal = s_budat-high IMPORTING date_external = date_str_h EXCEPTIONS date_internal_is_invalid = 1 OTHERS = 2.

REUSE_ALV_COMMENTARY_WRITE CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE' EXPORTING it_list_commentary = gt_list_top_of_page.

REUSE_ALV_VARIANT_F4 CALL FUNCTION 'REUSE_ALV_VARIANT_F4' EXPORTING is_variant = g_variant i_save = g_save IMPORTING e_exit = g_exit es_variant = gx_variant EXCEPTIONS not_found = 2.




REUSE_ALV_VARIANT_EXISTENCE CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE' EXPORTING i_save = g_save CHANGING cs_variant = gx_variant.

ADDR_GET CALL FUNCTION 'ADDR_GET' EXPORTING address_selection = adr_sele * ADDRESS_GROUP = * READ_SADR_ONLY = ' ' * READ_TEXTS = ' ' IMPORTING address_value = adr * ADDRESS_ADDITIONAL_INFO = * RETURNCODE = * ADDRESS_TEXT = * SADR = * TABLES * ADDRESS_GROUPS = * ERROR_TABLE = * VERSIONS = EXCEPTIONS parameter_error = 1 address_not_exist = 2 version_not_exist = 3 internal_error = 4 OTHERS = 5.

J_1A_INFLATION_CALCULATION_FI CALL FUNCTION 'J_1A_INFLATION_CALCULATION_FI' EXPORTING amount = output_list-dmbtr origin_tbep = ibas origin_date = output_list-budat final_tbep = ibas final_date = maxbdt specific_index = indx *cs specific_version = vers IMPORTING adj_amount = output_list-imbtr EXCEPTIONS time_base_data_not_found = 1 exposure_date_not_found = 2 index_definition_not_found = 3 index_values_not_found = 4 definitive_values_not_found = 5.

GET_PERIOD_TEXTS_BASIS CALL FUNCTION 'GET_PERIOD_TEXTS_BASIS' EXPORTING i_spras = sy-langu i_periv = periv i_poper = output_list-poper I_BDATJ = bdatj IMPORTING * E_KTEXT = e_ltext = periodtext-ltext * E_T009C = EXCEPTIONS period_version_not_found = 1 period_texts_not_found = 2 period_version_year_dependent = 3 version_not_year_dependent = 4 OTHERS = 5.

WS_ULDL_PATH CALL FUNCTION 'WS_ULDL_PATH' IMPORTING * download_path = filename.

OPEN_FORM CALL FUNCTION 'OPEN_FORM' EXPORTING form = actform device = 'PRINTER' * LANGUAGE = _SPRAS OPTIONS = itcpo dialog = 'X' EXCEPTIONS form = 1.

CLOSE_FORM CALL FUNCTION 'CLOSE_FORM' IMPORTING RESULT = itcpp.

CLOSE_FORM CALL FUNCTION 'CLOSE_FORM' IMPORTING RESULT = itcpp.

NUMBER_GET_NEXT CALL FUNCTION 'NUMBER_GET_NEXT' EXPORTING nr_range_nr = '01' object = 'RF_CERTIFY' * QUANTITY = 1 subobject = s_compy toyear = year * IGNORE_BUFFER = ' ' IMPORTING number = number returncode = rc2.

CLOSE_FORM CALL FUNCTION 'CLOSE_FORM' IMPORTING RESULT = itcpp.

CLOSE_FORM CALL FUNCTION 'CLOSE_FORM' IMPORTING RESULT = itcpp.

CLOSE_FORM CALL FUNCTION 'CLOSE_FORM' IMPORTING RESULT = itcpp.

WRITE_FORM CALL FUNCTION 'WRITE_FORM' EXPORTING window = 'SUMS' element = '532' function = 'APPEND' EXCEPTIONS window = 1 element = 2.

WRITE_FORM CALL FUNCTION 'WRITE_FORM' EXPORTING window = 'SUMS' element = '533' function = 'APPEND' EXCEPTIONS window = 1 element = 2.

CLOSE_FORM CALL FUNCTION 'CLOSE_FORM' IMPORTING RESULT = itcpp.

END_FORM CALL FUNCTION 'END_FORM'.

CLOSE_FORM CALL FUNCTION 'CLOSE_FORM' IMPORTING RESULT = itcpp.

GUI_DOWNLOAD CALL FUNCTION 'GUI_DOWNLOAD' " begin of UNICODE - modifications EXPORTING filename = hlp_file TABLES data_tab = writerec EXCEPTIONS file_write_error = 1 no_batch = 2 gui_refuse_filetransfer = 3 invalid_type = 4 no_authority = 5 unknown_error = 6 header_not_allowed = 7 separator_not_allowed = 8 filesize_not_allowed = 9 header_too_long = 10 dp_error_create = 11 dp_error_send = 12 dp_error_write = 13 unknown_dp_error = 14 access_denied = 15 dp_out_of_memory = 16 disk_full = 17 dp_timeout = 18 file_not_found = 19 dataprovider_exception = 20 control_flush_error = 21 OTHERS = 22.

WS_DOWNLOAD * CALL FUNCTION 'WS_DOWNLOAD' * EXPORTING * FILENAME = FILENAME * TABLES * DATA_TAB = WRITEREC * EXCEPTIONS * FILE_OPEN_ERROR = 1 * FILE_WRITE_ERROR = 2 * INVALID_FILESIZE = 3 * INVALID_TABLE_WIDTH = 4 * INVALID_TYPE = 5 * NO_BATCH = 6 * UNKNOWN_ERROR = 7 * OTHERS = 8. " end of UNICODE - modifications

FILE_VALIDATE_NAME CALL FUNCTION 'FILE_VALIDATE_NAME' EXPORTING * CLIENT = SY-MANDT LOGICAL_FILENAME = gc_filename CHANGING PHYSICAL_FILENAME = filename EXCEPTIONS LOGICAL_FILENAME_NOT_FOUND = 1 VALIDATION_FAILED = 2 OTHERS = 3.

WS_QUERY CALL FUNCTION 'WS_QUERY' EXPORTING query = 'FE' filename = filename IMPORTING return = rc.

NUMBER_GET_INFO CALL FUNCTION 'NUMBER_GET_INFO' EXPORTING nr_range_nr = '01' object = 'RF_CERTIFY' subobject = s_compy toyear = s_year IMPORTING interval = inft EXCEPTIONS interval_not_found = 1 object_not_found = 2 OTHERS = 3.

START_FORM CALL FUNCTION 'START_FORM' EXPORTING startpage = 'FIRST' EXCEPTIONS form = 1 format = 2 unended = 3 unopened = 4 unused = 5.

CLOSE_FORM CALL FUNCTION 'CLOSE_FORM' IMPORTING RESULT = itcpp EXCEPTIONS unopened = 1 bad_pageformat_for_print = 2 send_error = 3 spool_error = 4 codepage = 5.

WRITE_FORM CALL FUNCTION 'WRITE_FORM' EXPORTING window = 'ADDRESS' element = '560' EXCEPTIONS window = 1 element = 2.

CLOSE_FORM CALL FUNCTION 'CLOSE_FORM' IMPORTING RESULT = itcpp.

WRITE_FORM CALL FUNCTION 'WRITE_FORM' EXPORTING window = 'INFO1' element = '500' EXCEPTIONS window = 1 element = 2.

CLOSE_FORM CALL FUNCTION 'CLOSE_FORM' IMPORTING RESULT = itcpp.

WRITE_FORM CALL FUNCTION 'WRITE_FORM' EXPORTING window = 'MAIN' element = '512' EXCEPTIONS window = 1 element = 2.

CLOSE_FORM CALL FUNCTION 'CLOSE_FORM' IMPORTING RESULT = itcpp.

WRITE_FORM CALL FUNCTION 'WRITE_FORM' EXPORTING window = 'MAIN' element = '530' EXCEPTIONS window = 1 element = 2.

CLOSE_FORM CALL FUNCTION 'CLOSE_FORM' IMPORTING RESULT = itcpp.

OPEN_FORM CALL FUNCTION 'OPEN_FORM' EXPORTING form = actform device = 'PRINTER' * LANGUAGE = _SPRAS OPTIONS = itcpo dialog = 'X' EXCEPTIONS form = 1.

CLOSE_FORM CALL FUNCTION 'CLOSE_FORM' IMPORTING RESULT = itcpp.

CLOSE_FORM CALL FUNCTION 'CLOSE_FORM' IMPORTING RESULT = itcpp.

CLOSE_FORM CALL FUNCTION 'CLOSE_FORM' IMPORTING RESULT = itcpp.

CLOSE_FORM CALL FUNCTION 'CLOSE_FORM' IMPORTING RESULT = itcpp.

WRITE_FORM CALL FUNCTION 'WRITE_FORM' EXPORTING window = 'SUMS' element = '532' function = 'APPEND' EXCEPTIONS window = 1 element = 2.

WRITE_FORM CALL FUNCTION 'WRITE_FORM' EXPORTING window = 'SUMS' element = '533' function = 'APPEND' EXCEPTIONS window = 1 element = 2.

CLOSE_FORM CALL FUNCTION 'CLOSE_FORM' IMPORTING RESULT = itcpp.

END_FORM CALL FUNCTION 'END_FORM' EXCEPTIONS unopened = 1 bad_pageformat_for_print = 2.

CLOSE_FORM CALL FUNCTION 'CLOSE_FORM' IMPORTING RESULT = itcpp EXCEPTIONS unopened = 1 bad_pageformat_for_print = 2.

WRITE_FORM CALL FUNCTION 'WRITE_FORM' EXPORTING window = 'MAIN' element = '531' function = 'APPEND' EXCEPTIONS window = 1 element = 2.

CLOSE_FORM CALL FUNCTION 'CLOSE_FORM' IMPORTING RESULT = itcpp.

WRITE_FORM CALL FUNCTION 'WRITE_FORM' EXPORTING window = 'MAIN' element = '532' function = 'APPEND' EXCEPTIONS window = 1 element = 2.

CLOSE_FORM CALL FUNCTION 'CLOSE_FORM' IMPORTING RESULT = itcpp.



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