SAP Reports / Programs

RF0KQST5 SAP ABAP Report - Withholding tax report for Italy : Modello 770







RF0KQST5 is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). It is used for This report has been devised specifically to manage record type H in modello 770, reporting the activities A and B only...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 RF0KQST5 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 RF0KQST5. "Basic submit
SUBMIT RF0KQST5 AND RETURN. "Return to original report after report execution complete
SUBMIT RF0KQST5 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: AUGDAT = Clearing date
Selection Text: BUCHDT = Clearing date
Selection Text: KANTIVA = Advance - VAT
Selection Text: NLAMWSKZ = VAT codes not subject
Selection Text: NLAQSTKZ = WT codes for exemption
Selection Text: P_ALCUR =
Selection Text: P_CDFDIC = Tx cd/VAT No of declaring subj
Selection Text: P_CN = Credit memos managt w/t offset
Selection Text: P_COMTY = Withholding Tax Type
Selection Text: P_EXCDT =
Selection Text: P_EXT = Activate USER-EXIT
Selection Text: P_FILE = Create file
Selection Text: P_GJAHR = Year of presentation
Selection Text: P_IMPES = Use 'WT exemption' as default
Selection Text: P_LOG = Detailed log
Selection Text: P_OUTPUT = file path
Selection Text: P_PC = Export to PC
Selection Text: WITHT = WT type
Selection Text: S_WITHT = WT type for base amt determin.
Selection Text: S_HKNBA = Accts excluded from paid tot
Selection Text: S_HKASP = Advance - Expenditures
Selection Text: S_BELNO = Doc.without calculated WT amt.
Selection Text: S_BELNC = Credit memos w/t offsetting
Selection Text: ST_NULLI = List also null amounts
Selection Text: QSTKZ = WT code
Selection Text: P_WRKTY = Withholding Tax Type
Selection Text: P_TRUNC = Truncated amounts
Selection Text: P_SWID = Software prod. ID (tax code)
Selection Text: P_SSCWRK = Withholding Tax Type
Selection Text: P_SSCCOM = Withholding Tax Type
Selection Text: P_PROTOC = Ref.No for banks and POs
Selection Text: P_PGM = USER-EXIT program name
Title: Withholding tax report for Italy : Modello 770
Text Symbol: 905 = ........SSC Company.........SSC Worker
Text Symbol: 904 = Conversion rate is missing in table TCURR for the entry EURO
Text Symbol: 903 = Table T059Q
Text Symbol: 902 = Table T059Z
Text Symbol: 901 = Only one company code can be selected





Text Symbol: 811 = One file is created
Text Symbol: 810 = Created file is empty
Text Symbol: 809 = File cannot be opened, check entered file path
Text Symbol: 001 = Alternative currency
Text Symbol: 002 = Conversion date
Text Symbol: 003 = Social Security Contribution - In Charge of Company
Text Symbol: 004 = Enter a file name
Text Symbol: 005 = Social Security Contribution - In Charge of Worker
Text Symbol: 006 = 'In Charge of the Company' can not be blank.
Text Symbol: 007 = 'In Charge of the Worker' can not be blank.
Text Symbol: 008 = 'In Charge of the Company' should be blank.
Text Symbol: 009 = 'In Charge of the Worker' should be blank.
Text Symbol: 011 = Withholding Tax Type
Text Symbol: 012 = Withholding Tax Type
Text Symbol: 013 = Withholding Tax Code
Text Symbol: 014 = WT Code In charge of the Worker
Text Symbol: 100 = This vendor is flagged as 'social contribution exempted' in RF07: the field 31 and 32 will not be reported
Text Symbol: 500 = 500 - ***** VENDOR &1 &2 - GENERAL DATA CHECKS
Text Symbol: 501 = 501 - MISSING SURNAME
Text Symbol: 502 = 502 - MISSING NAME
Text Symbol: 503 = 503 - UNDEFINED COMMUNICATION LANGUAGE
Text Symbol: 504 = 504 - FISCAL DOMICILE ABROAD
Text Symbol: 505 = 505 - MISSING ADDRESS
Text Symbol: 506 = 506 - MISSING CITY
Text Symbol: 507 = 507 - MISSING FISCAL DOMICILE PROVINCE
Text Symbol: 508 = 508 - MISSING PLACE OF BIRTH
Text Symbol: 509 = 509 - MISSING DATE OF BIRTH
Text Symbol: 510 = 510 - MISSING SEX
Text Symbol: 511 = 511 - MISSING TAX CODE
Text Symbol: 512 = 512 - MISSING TAX DATA
Text Symbol: 513 = 513 - CHECK TOTOAL AMOUNT NOT SUBJECT ON THE BASIS OF CONVENTIONAL SYSTEM
Text Symbol: 598 = 598 - ERROR WITHIN GENERAL DATA
Text Symbol: 599 = 599 - GENERAL DATA ARE CORRECT
Text Symbol: 600 = 600 - DATA FROM SECTION SA ARE EXCLUDED FORM SELECTION
Text Symbol: 800 = &1 - &2 DATA SELECTION FOR MODELLO 770 PAG. &3
Text Symbol: 801 = TR R DOCUMENT YEAR PK CLG.DT. PAYMT.DT. TOT. AMOUNT BASE AMOUNT TAX WITHHELD NOT SUBJECT AMT PROVISION
Text Symbol: 802 = TR R TAX REFERENCE... VENDOR NO. SURNAME............................ NAME...............................
Text Symbol: 803 = STREET............................. CITY............................. PR..BIRTH DATE...BIRTH PR. AND PLACE......
Text Symbol: 804 = ....GROSS AMOUNT.....BASE AMOUNT.... WITHHELD TAX........WT TYPE N....EXP.NOT SUBJ..EXP.NOT SUBJ.SS......PROVISION..TAX NOT WITHHELD





Text Symbol: 805 = File created on PC : &1
Text Symbol: 806 = File created on UNIX: &1
Text Symbol: 807 = File name:
Text Symbol: 808 = An error occured during file dowload. Return code =


INCLUDES used within this REPORT RF0KQST5

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:

FILE_VALIDATE_NAME CALL FUNCTION 'FILE_VALIDATE_NAME' EXPORTING logical_filename = gc_filename parameter_1 = sy-cprog CHANGING physical_filename = p_output EXCEPTIONS OTHERS = 1.

FI_WT_READ_WT_INFO CALL FUNCTION 'FI_WT_READ_WT_INFO' EXPORTING i_bukrs = bsik-bukrs i_belnr = bsik-belnr i_gjahr = bsik-gjahr i_buzei = bsik-buzei TABLES t_with_item = x_with_item EXCEPTIONS not_found = 1 OTHERS = 2.

FILE_VALIDATE_NAME CALL FUNCTION 'FILE_VALIDATE_NAME' EXPORTING logical_filename = gc_filename parameter_1 = sy-cprog CHANGING physical_filename = p_output EXCEPTIONS OTHERS = 1.

DOWNLOAD * CALL FUNCTION 'DOWNLOAD' * EXPORTING * bin_filesize = ' ' * codepage = ' ' * filename = p_output * filetype = 'ASC' * filemask_mask = ' ' * filemask_text = ' ' * filetype_no_change = ' ' * filemask_all = ' ' * IMPORTING * act_filename = p_output * TABLES * data_tab = xfile * EXCEPTIONS * invalid_filesize = 1 * invalid_table_width = 2 * invalid_type = 3 * no_batch = 4 * unknown_error = 5 * OTHERS = 6.

GUI_DOWNLOAD CALL FUNCTION 'GUI_DOWNLOAD' EXPORTING * BIN_FILESIZE = filename = filename filetype = 'ASC' * APPEND = ' ' * WRITE_FIELD_SEPARATOR = ' ' * HEADER = '00' * TRUNC_TRAILING_BLANKS = ' ' * WRITE_LF = 'X' * COL_SELECT = ' ' * COL_SELECT_MASK = ' ' * DAT_MODE = ' ' * IMPORTING * FILELENGTH = TABLES data_tab = xfile 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 .

FI_WITHHOLDING_TAX_CALCULATION CALL FUNCTION 'FI_WITHHOLDING_TAX_CALCULATION' EXPORTING i_land1 = t001-land1 i_qland = ' ' i_qsshb = bsik-qsshb i_qsshh = bsik-qsshb i_qsskz = bsik-qsskz i_waers = t001-waers reduced_tax_rate = ' ' IMPORTING e_qbshb = i_qbshb.

CALCULATE_TAX_FROM_GROSSAMOUNT CALL FUNCTION 'CALCULATE_TAX_FROM_GROSSAMOUNT' EXPORTING i_bukrs = bkpf-bukrs i_mwskz = bseg-mwskz i_waers = bkpf-waers i_wrbtr = bseg-dmbtr IMPORTING e_fwste = lv_fwste.

CURRENCY_CODE_ISO_TO_SAP CALL FUNCTION 'CURRENCY_CODE_ISO_TO_SAP' EXPORTING iso_code = 'ITL' IMPORTING sap_code = h_waers * UNIQUE = EXCEPTIONS not_found = 1 OTHERS = 2.

CURRENCY_CODE_ISO_TO_SAP CALL FUNCTION 'CURRENCY_CODE_ISO_TO_SAP' EXPORTING iso_code = 'EUR' IMPORTING sap_code = h_waers * UNIQUE = EXCEPTIONS not_found = 1 OTHERS = 2.

CONVERT_TO_FOREIGN_CURRENCY CALL FUNCTION 'CONVERT_TO_FOREIGN_CURRENCY' EXPORTING date = p_excdt foreign_currency = p_alcur local_amount = p_amount local_currency = t001-waers * RATE = 0 * TYPE_OF_RATE = 'M' IMPORTING * EXCHANGE_RATE = foreign_amount = p_amount.

CONVERT_TO_LOCAL_CURRENCY CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY' EXPORTING date = p_excdt foreign_amount = p_amount foreign_currency = bsik-waers local_currency = t001-waers * rate = 0 * type_of_rate = 'M' IMPORTING * exchange_rate = * foreign_factor = local_amount = p_amount.



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