SAP Reports / Programs | Payroll | Thailand(PY-TH) SAP PY

PCTAXTH6 SAP ABAP INCLUDE - Local Routines for Income Tax 1 - Monthly Tax Report Thailand







PCTAXTH6 is a standard ABAP INCLUDE 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 PCTAXTH6 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 PCTAXTH6. "Basic submit
SUBMIT PCTAXTH6 AND RETURN. "Return to original report after report execution complete
SUBMIT PCTAXTH6 VIA SELECTION-SCREEN. "Display selection screen of submitted report to user
    See more syntax options for the ABAP SUBMIT statement


Text pool values


Title: Local Routines for Income Tax 1 - Monthly Tax Report Thailand


INCLUDES used within this REPORT PCTAXTH6

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:

CD_READ_LAST *CALL FUNCTION 'CD_READ_LAST' * EXPORTING * BEGIN_DATE = PYEAR_BEGDA * END_DATE = PYEAR_ENDDA * IMPORTING * OUT_SEQNR = LCP_SEQNR * TABLES * RGDIR = RGDIR * EXCEPTIONS * NO_RECORD_FOUND = 1 * OTHERS = 2.

SAPGUI_PROGRESS_INDICATOR CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR' EXPORTING PERCENTAGE = PERCENT TEXT = TEXT-005.

RP_BEGDA_ENDDA_PAYROLL_YEAR_TH CALL FUNCTION 'RP_BEGDA_ENDDA_PAYROLL_YEAR_TH' EXPORTING ABKRS = P0001-ABKRS YEAR = P_YEAR IMPORTING BEGDA = P_BEGDA ENDDA = PYEAR_ENDDA EXCEPTIONS TABLE_ENTRY_NOT_FOUND = 1 OTHERS = 2.

RP_HIRE_FIRE CALL FUNCTION 'RP_HIRE_FIRE' EXPORTING BEG = LOW_DATE END = HIGH_DATE IMPORTING HIRE_DATE = P_TAX_DTLS-HIRE * fire_date = TABLES PP0000 = P0000 "input PP0001 = P0001 "input PPHIFI = PHIFI. "output

HRCA_COMPANYCODE_GETDETAIL CALL FUNCTION 'HRCA_COMPANYCODE_GETDETAIL' EXPORTING COMPANYCODE = P_P0001-BUKRS LANGUAGE = SY-LANGU IMPORTING COMP_NAME = HRCA_COMPANY-COMP_NAME * CITY = * COUNTRY = * CURRENCY = * LANGU = * CHRT_ACCTS = * FY_VARIANT = * FI_MANAGEMENTAREA = * JURISDICTION = * RATE_DEVIATION = * ADDRESS = * TABLES * APPENDIX = EXCEPTIONS NOT_FOUND = 1 OTHERS = 2.

SPELL_AMOUNT CALL FUNCTION 'SPELL_AMOUNT' EXPORTING AMOUNT = TAX_SUM-TOT_TAX_C "AAPL0K022022 CURRENCY = 'THB' FILLER = SPACE LANGUAGE = SY-LANGU IMPORTING IN_WORDS = SPELL EXCEPTIONS NOT_FOUND = 1 TOO_LARGE = 2 OTHERS = 3.

ADDR_GET call function 'ADDR_GET' exporting address_selection = selection address_group = 'CA01' importing address_value = address_value * ADDRESS_ADDITIONAL_INFO = * RETURNCODE = * ADDRESS_TEXT = * sadr = sadr * TABLES * ADDRESS_GROUPS = * ERROR_TABLE = * VERSIONS = exceptions parameter_error = 1 address_not_exist = 2 version_not_exist = 3 internal_error = 4 others = 5.

HR_GET_BUSINESS_ADD_IN CALL FUNCTION 'HR_GET_BUSINESS_ADD_IN' EXPORTING EXIT_NAME = 'HRPAYTH_TAXFORM' * FLT_VAL = IMPORTING IS_IMPLEMENTED = CHECK_IMPL * TABLES * ACTIVE_IMPS = CHANGING INSTANCE = CUST_EXIT.

H99B_OPEN_LFORM_JOB CALL FUNCTION 'H99B_OPEN_LFORM_JOB' EXPORTING i_molga = hr99b_form_sel-molga i_fogroup = hr99b_form_sel-fogroup i_folname = hr99b_form_sel-folname i_fovariant = hr99b_form_sel-fovariant OPTIONS = l_itcpo EXCEPTIONS OTHERS = 99.

SPELL_AMOUNT CALL FUNCTION 'SPELL_AMOUNT' EXPORTING amount = tax_sum-tot_tax_c currency = 'THB' filler = space language = sy-langu IMPORTING in_words = spell EXCEPTIONS not_found = 1 too_large = 2 OTHERS = 3.

H99B_OUTPUT_LFORM CALL FUNCTION 'H99B_OUTPUT_LFORM' EXPORTING i_molga = hr99b_form_sel-molga i_fogroup = hr99b_form_sel-fogroup i_folname = hr99b_form_sel-folname i_fovariant = px_lfvar i_data_struc = gs_pdf_struct EXCEPTIONS OTHERS = 99.

H99B_CLOSE_LFORM_JOB CALL FUNCTION 'H99B_CLOSE_LFORM_JOB' EXCEPTIONS OTHERS = 99.



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