SAP J_1B_READ_DYNAMIC_TABLE Function Module for Read Dynamic Tax Exception Table
J_1B_READ_DYNAMIC_TABLE is a standard j 1b read dynamic table SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Read Dynamic Tax Exception Table processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for j 1b read dynamic table FM, simply by entering the name J_1B_READ_DYNAMIC_TABLE into the relevant SAP transaction such as SE37 or SE38.
Function Group: J1BR
Program Name: SAPLJ1BR
Main Program: SAPLJ1BR
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function J_1B_READ_DYNAMIC_TABLE pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'J_1B_READ_DYNAMIC_TABLE'"Read Dynamic Tax Exception Table.
EXPORTING
* CALLER = "Calling Application
* VENDOR = "Account Number of Vendor or Creditor
* CUSTOMER = "Customer Number 1
* NCM = "Control code for consumption taxes in foreign trade
* INDUSTRY_KEY = "Industry key
* GROUP_KEY = "Group key
* CITY_CODE = "City Code
* TXJCD_PR = "Tax Jurisdiction Code for Location of Service Provider
* TXJCD_SE = "Tax Jurisdiction Code of Location Where Service Is Provided
* SUB_TRIB_GROUP = "Customer group for Substituiçao Tributária calculation
* DATE = "Date from which the tax rule is valid
* COUNTRY = "Tax departure country
* ICMS = "Checkbox
* IPI = "Checkbox
* ISS = "Checkbox
* COFINS = "Checkbox
* PIS = "Checkbox
* SUB_TRIB = "Checkbox
I_BUKRS = "Company Code
I_WERKS = "Plant
* CNAE = "CNAE
* CRTN = "CRT Number
* STATE_FROM = "Tax Region
* ICMSTAXPAY = "ICMS Taxpayer
* INDTYP = "Industry Main Type
* TDT = "Tax Declaration Type
* COMSIZE = "Company Size
* DECREGPC = "Declaration Regimen for PIS/COFINS
* LEGALNAT = "Legal Nature
* EXTWG = "External Material Group
* PRDHA = "Product hierarchy
* STATE_TO = "Tax Region
* MATERIAL = "Material Number
* MATERIAL_GROUP = "Material group
* MATERIAL_USAGE = "Usage of the material
* MATERIAL_ORIG = "Origin of the material
* MWSKZ = "Tax on sales/purchases code
IMPORTING
RATE = "Tax rate
SUR_TYPE = "Sub.Trib. calculation rule
PRICE = "Sub.Trib. fixed price per unit
BASERED1 = "Sub.Trib. Base Reduction 1 (Federal) (in %)
BASERED2 = "Sub.Trib. Base Reduction 2 (State) (in %)
ICMSBASER = "ICMS Reduction for Sub.Trib. (in %)
MINPRICE = "Minimum Price Per Item Is Basis for Substituição Tributária
NUMBER_KEYS = "Number of Key fields used for the successful access
TAX_GROUP = "Tax Group of the successful access
BASE = "Tax base (%)
EXEMPT = "No ICMS calculation - Other base
TAXLAW = "Tax law: ICMS
CONVEN100 = "Product Subject to Convenio 100
AMOUNT = "IPI rate per unit (pauta)
FACTOR = "IPI Number of units
UNIT = "IPI Pauta Unit
WAERS = "Currency Key
IMPORTING Parameters details for J_1B_READ_DYNAMIC_TABLE
CALLER - Calling Application
Data type: J_1BTXGRUOP-CALLEROptional: Yes
Call by Reference: No ( called with pass by value option)
VENDOR - Account Number of Vendor or Creditor
Data type: LFA1-LIFNROptional: Yes
Call by Reference: No ( called with pass by value option)
CUSTOMER - Customer Number 1
Data type: KNA1-KUNNROptional: Yes
Call by Reference: No ( called with pass by value option)
NCM - Control code for consumption taxes in foreign trade
Data type: MARC-STEUCOptional: Yes
Call by Reference: No ( called with pass by value option)
INDUSTRY_KEY - Industry key
Data type: LFA1-BRSCHOptional: Yes
Call by Reference: No ( called with pass by value option)
GROUP_KEY - Group key
Data type: LFA1-KONZSOptional: Yes
Call by Reference: No ( called with pass by value option)
CITY_CODE - City Code
Data type: KNA1-CITYCOptional: Yes
Call by Reference: No ( called with pass by value option)
TXJCD_PR - Tax Jurisdiction Code for Location of Service Provider
Data type: J_1BTXJCD_PROptional: Yes
Call by Reference: No ( called with pass by value option)
TXJCD_SE - Tax Jurisdiction Code of Location Where Service Is Provided
Data type: J_1BTXJCD_SEOptional: Yes
Call by Reference: No ( called with pass by value option)
SUB_TRIB_GROUP - Customer group for Substituiçao Tributária calculation
Data type: J_1BTXST3-STGRPOptional: Yes
Call by Reference: No ( called with pass by value option)
DATE - Date from which the tax rule is valid
Data type: J_1BTXIC1-VALIDFROMOptional: Yes
Call by Reference: No ( called with pass by value option)
COUNTRY - Tax departure country
Data type: COM_TAX-COUNTRYOptional: Yes
Call by Reference: No ( called with pass by value option)
ICMS - Checkbox
Data type: XFELDOptional: Yes
Call by Reference: No ( called with pass by value option)
IPI - Checkbox
Data type: XFELDOptional: Yes
Call by Reference: No ( called with pass by value option)
ISS - Checkbox
Data type: XFELDOptional: Yes
Call by Reference: No ( called with pass by value option)
COFINS - Checkbox
Data type: XFELDOptional: Yes
Call by Reference: No ( called with pass by value option)
PIS - Checkbox
Data type: XFELDOptional: Yes
Call by Reference: No ( called with pass by value option)
SUB_TRIB - Checkbox
Data type: XFELDOptional: Yes
Call by Reference: No ( called with pass by value option)
I_BUKRS - Company Code
Data type: BUKRSOptional: No
Call by Reference: Yes
I_WERKS - Plant
Data type: WERKS_DOptional: No
Call by Reference: Yes
CNAE - CNAE
Data type: J_1BCNAEOptional: Yes
Call by Reference: No ( called with pass by value option)
CRTN - CRT Number
Data type: J_1BCRTNOptional: Yes
Call by Reference: No ( called with pass by value option)
STATE_FROM - Tax Region
Data type: J_1BTAXJUR-STATEOptional: Yes
Call by Reference: No ( called with pass by value option)
ICMSTAXPAY - ICMS Taxpayer
Data type: J_1BICMSTAXPAYOptional: Yes
Call by Reference: No ( called with pass by value option)
INDTYP - Industry Main Type
Data type: J_1BINDTYPOptional: Yes
Call by Reference: No ( called with pass by value option)
TDT - Tax Declaration Type
Data type: J_1BTDTOptional: Yes
Call by Reference: No ( called with pass by value option)
COMSIZE - Company Size
Data type: J_1BCOMSIZEOptional: Yes
Call by Reference: No ( called with pass by value option)
DECREGPC - Declaration Regimen for PIS/COFINS
Data type: J_1BDECREGPCOptional: Yes
Call by Reference: No ( called with pass by value option)
LEGALNAT - Legal Nature
Data type: J_1BLEGALNATOptional: Yes
Call by Reference: No ( called with pass by value option)
EXTWG - External Material Group
Data type: EXTWGOptional: Yes
Call by Reference: No ( called with pass by value option)
PRDHA - Product hierarchy
Data type: PRODH_DOptional: Yes
Call by Reference: No ( called with pass by value option)
STATE_TO - Tax Region
Data type: J_1BTAXJUR-STATEOptional: Yes
Call by Reference: No ( called with pass by value option)
MATERIAL - Material Number
Data type: MARA-MATNROptional: Yes
Call by Reference: No ( called with pass by value option)
MATERIAL_GROUP - Material group
Data type: MARA-MATKLOptional: Yes
Call by Reference: No ( called with pass by value option)
MATERIAL_USAGE - Usage of the material
Data type: J_1BMATUSEOptional: Yes
Call by Reference: No ( called with pass by value option)
MATERIAL_ORIG - Origin of the material
Data type: J_1BMATORGOptional: Yes
Call by Reference: No ( called with pass by value option)
MWSKZ - Tax on sales/purchases code
Data type: T007A-MWSKZOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for J_1B_READ_DYNAMIC_TABLE
RATE - Tax rate
Data type: J_1BTXIC3-RATEOptional: No
Call by Reference: No ( called with pass by value option)
SUR_TYPE - Sub.Trib. calculation rule
Data type: J_1BTXST3-SUR_TYPEOptional: No
Call by Reference: No ( called with pass by value option)
PRICE - Sub.Trib. fixed price per unit
Data type: J_1BTXST3-PRICEOptional: No
Call by Reference: No ( called with pass by value option)
BASERED1 - Sub.Trib. Base Reduction 1 (Federal) (in %)
Data type: J_1BTXST3-BASERED1Optional: No
Call by Reference: No ( called with pass by value option)
BASERED2 - Sub.Trib. Base Reduction 2 (State) (in %)
Data type: J_1BTXST3-BASERED2Optional: No
Call by Reference: No ( called with pass by value option)
ICMSBASER - ICMS Reduction for Sub.Trib. (in %)
Data type: J_1BTXST3-ICMSBASEROptional: No
Call by Reference: No ( called with pass by value option)
MINPRICE - Minimum Price Per Item Is Basis for Substituição Tributária
Data type: J_1BTXST3-MINPRICEOptional: No
Call by Reference: No ( called with pass by value option)
NUMBER_KEYS - Number of Key fields used for the successful access
Data type: IOptional: No
Call by Reference: No ( called with pass by value option)
TAX_GROUP - Tax Group of the successful access
Data type: J_1BTXGRUOP-GRUOPOptional: No
Call by Reference: No ( called with pass by value option)
BASE - Tax base (%)
Data type: J_1BTXIC3-BASEOptional: No
Call by Reference: No ( called with pass by value option)
EXEMPT - No ICMS calculation - Other base
Data type: J_1BTXIC3-EXEMPTOptional: No
Call by Reference: No ( called with pass by value option)
TAXLAW - Tax law: ICMS
Data type: J_1BTXIC3-TAXLAWOptional: No
Call by Reference: No ( called with pass by value option)
CONVEN100 - Product Subject to Convenio 100
Data type: J_1BTXIC3-CONVEN100Optional: No
Call by Reference: No ( called with pass by value option)
AMOUNT - IPI rate per unit (pauta)
Data type: J_1BTXIP3-AMOUNTOptional: No
Call by Reference: No ( called with pass by value option)
FACTOR - IPI Number of units
Data type: J_1BTXIP3-FACTOROptional: No
Call by Reference: No ( called with pass by value option)
UNIT - IPI Pauta Unit
Data type: J_1BTXIP3-UNITOptional: No
Call by Reference: No ( called with pass by value option)
WAERS - Currency Key
Data type: J_1BTXIP3-WAERSOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for J_1B_READ_DYNAMIC_TABLE Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.DATA: | ||||
lv_rate | TYPE J_1BTXIC3-RATE, " | |||
lv_caller | TYPE J_1BTXGRUOP-CALLER, " | |||
lv_vendor | TYPE LFA1-LIFNR, " | |||
lv_sur_type | TYPE J_1BTXST3-SUR_TYPE, " | |||
lv_price | TYPE J_1BTXST3-PRICE, " | |||
lv_customer | TYPE KNA1-KUNNR, " | |||
lv_ncm | TYPE MARC-STEUC, " | |||
lv_basered1 | TYPE J_1BTXST3-BASERED1, " | |||
lv_basered2 | TYPE J_1BTXST3-BASERED2, " | |||
lv_industry_key | TYPE LFA1-BRSCH, " | |||
lv_group_key | TYPE LFA1-KONZS, " | |||
lv_icmsbaser | TYPE J_1BTXST3-ICMSBASER, " | |||
lv_minprice | TYPE J_1BTXST3-MINPRICE, " | |||
lv_city_code | TYPE KNA1-CITYC, " | |||
lv_txjcd_pr | TYPE J_1BTXJCD_PR, " | |||
lv_number_keys | TYPE I, " | |||
lv_txjcd_se | TYPE J_1BTXJCD_SE, " | |||
lv_tax_group | TYPE J_1BTXGRUOP-GRUOP, " | |||
lv_sub_trib_group | TYPE J_1BTXST3-STGRP, " | |||
lv_date | TYPE J_1BTXIC1-VALIDFROM, " | |||
lv_base | TYPE J_1BTXIC3-BASE, " | |||
lv_country | TYPE COM_TAX-COUNTRY, " | |||
lv_icms | TYPE XFELD, " | |||
lv_ipi | TYPE XFELD, " | |||
lv_iss | TYPE XFELD, " | |||
lv_cofins | TYPE XFELD, " | |||
lv_pis | TYPE XFELD, " | |||
lv_sub_trib | TYPE XFELD, " | |||
lv_i_bukrs | TYPE BUKRS, " | |||
lv_i_werks | TYPE WERKS_D, " | |||
lv_cnae | TYPE J_1BCNAE, " | |||
lv_crtn | TYPE J_1BCRTN, " | |||
lv_exempt | TYPE J_1BTXIC3-EXEMPT, " | |||
lv_state_from | TYPE J_1BTAXJUR-STATE, " | |||
lv_icmstaxpay | TYPE J_1BICMSTAXPAY, " | |||
lv_indtyp | TYPE J_1BINDTYP, " | |||
lv_tdt | TYPE J_1BTDT, " | |||
lv_comsize | TYPE J_1BCOMSIZE, " | |||
lv_decregpc | TYPE J_1BDECREGPC, " | |||
lv_legalnat | TYPE J_1BLEGALNAT, " | |||
lv_extwg | TYPE EXTWG, " | |||
lv_prdha | TYPE PRODH_D, " | |||
lv_taxlaw | TYPE J_1BTXIC3-TAXLAW, " | |||
lv_state_to | TYPE J_1BTAXJUR-STATE, " | |||
lv_material | TYPE MARA-MATNR, " | |||
lv_conven100 | TYPE J_1BTXIC3-CONVEN100, " | |||
lv_amount | TYPE J_1BTXIP3-AMOUNT, " | |||
lv_material_group | TYPE MARA-MATKL, " | |||
lv_factor | TYPE J_1BTXIP3-FACTOR, " | |||
lv_material_usage | TYPE J_1BMATUSE, " | |||
lv_unit | TYPE J_1BTXIP3-UNIT, " | |||
lv_material_orig | TYPE J_1BMATORG, " | |||
lv_mwskz | TYPE T007A-MWSKZ, " | |||
lv_waers | TYPE J_1BTXIP3-WAERS. " |
  CALL FUNCTION 'J_1B_READ_DYNAMIC_TABLE' "Read Dynamic Tax Exception Table |
EXPORTING | ||
CALLER | = lv_caller | |
VENDOR | = lv_vendor | |
CUSTOMER | = lv_customer | |
NCM | = lv_ncm | |
INDUSTRY_KEY | = lv_industry_key | |
GROUP_KEY | = lv_group_key | |
CITY_CODE | = lv_city_code | |
TXJCD_PR | = lv_txjcd_pr | |
TXJCD_SE | = lv_txjcd_se | |
SUB_TRIB_GROUP | = lv_sub_trib_group | |
DATE | = lv_date | |
COUNTRY | = lv_country | |
ICMS | = lv_icms | |
IPI | = lv_ipi | |
ISS | = lv_iss | |
COFINS | = lv_cofins | |
PIS | = lv_pis | |
SUB_TRIB | = lv_sub_trib | |
I_BUKRS | = lv_i_bukrs | |
I_WERKS | = lv_i_werks | |
CNAE | = lv_cnae | |
CRTN | = lv_crtn | |
STATE_FROM | = lv_state_from | |
ICMSTAXPAY | = lv_icmstaxpay | |
INDTYP | = lv_indtyp | |
TDT | = lv_tdt | |
COMSIZE | = lv_comsize | |
DECREGPC | = lv_decregpc | |
LEGALNAT | = lv_legalnat | |
EXTWG | = lv_extwg | |
PRDHA | = lv_prdha | |
STATE_TO | = lv_state_to | |
MATERIAL | = lv_material | |
MATERIAL_GROUP | = lv_material_group | |
MATERIAL_USAGE | = lv_material_usage | |
MATERIAL_ORIG | = lv_material_orig | |
MWSKZ | = lv_mwskz | |
IMPORTING | ||
RATE | = lv_rate | |
SUR_TYPE | = lv_sur_type | |
PRICE | = lv_price | |
BASERED1 | = lv_basered1 | |
BASERED2 | = lv_basered2 | |
ICMSBASER | = lv_icmsbaser | |
MINPRICE | = lv_minprice | |
NUMBER_KEYS | = lv_number_keys | |
TAX_GROUP | = lv_tax_group | |
BASE | = lv_base | |
EXEMPT | = lv_exempt | |
TAXLAW | = lv_taxlaw | |
CONVEN100 | = lv_conven100 | |
AMOUNT | = lv_amount | |
FACTOR | = lv_factor | |
UNIT | = lv_unit | |
WAERS | = lv_waers | |
. " J_1B_READ_DYNAMIC_TABLE |
ABAP code using 7.40 inline data declarations to call FM J_1B_READ_DYNAMIC_TABLE
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8."SELECT single RATE FROM J_1BTXIC3 INTO @DATA(ld_rate). | ||||
"SELECT single CALLER FROM J_1BTXGRUOP INTO @DATA(ld_caller). | ||||
"SELECT single LIFNR FROM LFA1 INTO @DATA(ld_vendor). | ||||
"SELECT single SUR_TYPE FROM J_1BTXST3 INTO @DATA(ld_sur_type). | ||||
"SELECT single PRICE FROM J_1BTXST3 INTO @DATA(ld_price). | ||||
"SELECT single KUNNR FROM KNA1 INTO @DATA(ld_customer). | ||||
"SELECT single STEUC FROM MARC INTO @DATA(ld_ncm). | ||||
"SELECT single BASERED1 FROM J_1BTXST3 INTO @DATA(ld_basered1). | ||||
"SELECT single BASERED2 FROM J_1BTXST3 INTO @DATA(ld_basered2). | ||||
"SELECT single BRSCH FROM LFA1 INTO @DATA(ld_industry_key). | ||||
"SELECT single KONZS FROM LFA1 INTO @DATA(ld_group_key). | ||||
"SELECT single ICMSBASER FROM J_1BTXST3 INTO @DATA(ld_icmsbaser). | ||||
"SELECT single MINPRICE FROM J_1BTXST3 INTO @DATA(ld_minprice). | ||||
"SELECT single CITYC FROM KNA1 INTO @DATA(ld_city_code). | ||||
"SELECT single GRUOP FROM J_1BTXGRUOP INTO @DATA(ld_tax_group). | ||||
"SELECT single STGRP FROM J_1BTXST3 INTO @DATA(ld_sub_trib_group). | ||||
"SELECT single VALIDFROM FROM J_1BTXIC1 INTO @DATA(ld_date). | ||||
"SELECT single BASE FROM J_1BTXIC3 INTO @DATA(ld_base). | ||||
"SELECT single COUNTRY FROM COM_TAX INTO @DATA(ld_country). | ||||
"SELECT single EXEMPT FROM J_1BTXIC3 INTO @DATA(ld_exempt). | ||||
"SELECT single STATE FROM J_1BTAXJUR INTO @DATA(ld_state_from). | ||||
"SELECT single TAXLAW FROM J_1BTXIC3 INTO @DATA(ld_taxlaw). | ||||
"SELECT single STATE FROM J_1BTAXJUR INTO @DATA(ld_state_to). | ||||
"SELECT single MATNR FROM MARA INTO @DATA(ld_material). | ||||
"SELECT single CONVEN100 FROM J_1BTXIC3 INTO @DATA(ld_conven100). | ||||
"SELECT single AMOUNT FROM J_1BTXIP3 INTO @DATA(ld_amount). | ||||
"SELECT single MATKL FROM MARA INTO @DATA(ld_material_group). | ||||
"SELECT single FACTOR FROM J_1BTXIP3 INTO @DATA(ld_factor). | ||||
"SELECT single UNIT FROM J_1BTXIP3 INTO @DATA(ld_unit). | ||||
"SELECT single MWSKZ FROM T007A INTO @DATA(ld_mwskz). | ||||
"SELECT single WAERS FROM J_1BTXIP3 INTO @DATA(ld_waers). | ||||
Search for further information about these or an SAP related objects