What Is HSN/SAC Code Table And Field Name In SAP ABAP

HSN Code and SAC Code both are store in same table and same field in sap abap. The table name is MARC and Field name is STEUC. If you show the HSN or SAC code in output, Then follow the below example.

What is HSN Code:

Full form of HSN Code is Harmonized System of Nomenclature, It means divide the product in a systematic manner. HSN Code is used in invoices, bills in GST or TAX purposes. HSN Code are different digits not a single length of digit, Normally different digits of HSN Code are used in different purposes, That are follows in below.

hsn-sac-code-table-field-name-sap-abap-decoderp


Length of Code Purpose of Code
Those businesses that have a turnover of less than Rs 1.5 crore, They do not need to use HSN Code
2 Digit Those businesses that have a turnover of more than Rs 1.5 crore, But less than Rs 5 crore
4 Digit Those businesses that have a turnover of more than Rs 5 crore
6 Digit or 8 Digit Those businesses that deal with imports and exports

What is SAC Code:

Full form of SAC Code is Servicing Accounting Code, It means divide the service in a systematic manner. HSN code and SAC code both are as like same but HSN code classify the product and SAC code classify the service. Which code start with 99 number then that is SAC code, If not then HSN code.

In SAP HSN code and SAC code both are store in same table MARC and same field STEUC. If you find HSN code or SAC code, Then use material number MATNR and plant code WERKS, In MARC table pass MATNR AND WERKS then find STEUC as a HSN/SAC code.

Simple Example to Display HSC/SAC Code in SAP ABAP

In this example required user input is Purchasing Document Number EBELN and output is display HSC/SAC Code.

Code:

TABLES EKPO.

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS P_EBELN TYPE EKPO-EBELN.
SELECTION-SCREEN END OF BLOCK B1.

SELECT SINGLE
  EBELN,
  EBELP,
  MATNR,
  WERKS
  INTO @DATA(WA_EKPO) FROM EKPO
  WHERE EBELN = @P_EBELN.

SELECT single
  MATNR,
  WERKS,
  STEUC
  INTO @DATA(WA_MARC) FROM MARC
  WHERE MATNR = @WA_EKPO-MATNR
  AND WERKS = @WA_EKPO-WERKS.

WRITE: 'Purchasing Document Number: ',WA_EKPO-EBELN,/,'HSN/SAC Code: ',WA_MARC-STEUC.

Explanation:

In this code use EBELN as a user input field, Both user input and output is single value then use SELECT SINGLE. First user input pass EKPO table and fetch the field MATNR Material Number and WERKS plant code and these two fields are pass MARC table and fetch the field STEUC, That is HSC/SAC code.

Post a Comment

0 Comments