Enterprise Resource Planning Blogs by SAP
Get insights and updates about cloud ERP and RISE with SAP, SAP S/4HANA and SAP S/4HANA Cloud, and more enterprise management capabilities with SAP blog posts.
cancel
Showing results for 
Search instead for 
Did you mean: 
E-Invoice or E-Bill in India was introduced in SAP Business One FP2102 and described in the Note 2902401 and in How_to_Work_with_Electronic_Billing. This blog is about what values from marketing document contain different fields of JSON file.

JSON schema can be found on  National Informatics Centre: Goods And Services Tax  and its version 1.03 has several blocks and fields. What value, from what field of SAP Business One is taken for every tag is described in this article.

So, file have several blocks:

  1. Header Details: this section contains tax scheme, version and invoice reference no.

  2. Transaction Details: this section is about transaction details.

  3. Document Details: this section has the document details like date, number, date.

  4. Seller Details: this section contains seller details like GSTIN, tradename, address etc.

  5. Buyer Details: this section is about buyer details like GSTIN, tradename, address etc.

  6. Dispatch Details: this section contains dispatch details like GSTIN, tradename, address etc. This is optional block and not mapped in SAP Business One.

  7. Ship To Details: this section has Sip to details again like GSTIN, tradename, address etc.

  8. Item Details: this section contains details of Line Items and is repetitive.

  9. Batch Details: this is an optional block and not mapped in SAP Business One

  10. Document Total: the name of this section tells what about it, 😉: tax totals, line totals etc. can be found here.

  11. Payment Details (format C&D) – this and further sections are not mapped in SAP Business One.

  12. Reference Details (format C&D).

  13. Document Period Details (format C&D).

  14. Preceding Document Reference (format C&D).

  15. Contract Reference Number (format C&D).

  16. Additional Supporting Document details (format C&D).

  17. Export Details.

  18. E way bill Details.


Let’s now describe every block and attribute that is filled by SAP Business One.

  1. Header Details has only one attribute Version and has fixed value 1

  2. Transactions Details (TranDtls)has following attributes and mapping in SAP Business One:























    JSON Element Valid Values And Mapping
    2.1 TaxSch Tax Scheme has fixed value GST
    2.2 SupType Type of Supply or Transaction Category and can have following values:

    • B2B - Business to Business,

    • SEZWP - SEZ with payment,

    • SEZWOP - SEZ without payment,

    • EXPWP - Export with Payment,

    • EXPWOP - Export without payment,

    • DEXP - Deemed Export


    SAP Business One takes the value according setup of the Export field and the Duty Status  in the Tax tab of the marketing document:




    • B2B  - in case the Export check box is not ticked;

    • SEZWP - Export checkbox ticked on and its value is SEZ Developer or SEZ Unit and Duty Status value is With Payment of Duty

    • SEZWOP - Export checkbox ticked on and its value is SEZ Developer or SEZ Unit and Duty Status value is Without Payment of Duty

    • EXPWP - Export checkbox ticked on and its value is Imports/Exports and Duty Status value is With Payment of Duty

    • EXPWOP - Export checkbox ticked on and its value is Imports/Exports and Duty Status value is Without Payment of Duty

    • DEXP - Export checkbox ticked on and value is Deemed Imports/Exports


    2.3 RegRev

    Reverse Charge with values Y – Yes/N – No.

    SAP Business One takes value Y if any used tax code in the marketing document includes the tax type that “Reverse Charge %” has value:


    SAP Business One takes value N In case A/R Invoice has Export checkbox is ticked on and the value selected in dropdown is Import/Export or Deemed Import/Export

    Attributes TranDtls.EcmGstin and TranDtls.IgstOnIntra are optional and are not mapped in SAP Business One.

  3. Document Details (DocDtls) has following attributes and mapping in SAP Business One:























    JSON Element Valid Values And Mapping
    3.1 Typ

    Document Type and can have following values:

    INV - AR Invoice (Transaction Type as GST Tax Invoice);
    CRN - AR Credit Memo (Transaction Type as GST Tax Invoice);
    DBN - AR Invoice (Transaction Type as GST Debit Memo😞
     3.2 No Document Number (no prefix and suffix, marketing document No.):
     3.3 Dt

    Document Date:


     

     

  4. Seller Details (SellerDtls) has following attributes and mapping in SAP Business One:











































    JSON Element Valid Values And Mapping
    4.1 Gstin

    GSTIN – this value is taken from Location in the Marketing Document lines:


     4.2 LglNm

    Legal Name  - this is B1 company name:


     4.3 TrdNm Trade Name – this is the same as Legal Name
     4.4 Addr1 Address 1 – this information is taken from Company Details -> General Tab -> Address. Value is limited to 100 characters.
     4.5 Loc

    Location – this value corresponds to the City in Location - Setup from document line:


     4.6 Pin PIN  - this value corresponds to the ZIP Code in Location - Setup from document line.
     4.7 Stcd

    State Code - this value corresponds to the State -> GST County Code in Location - Setup from document line:



     

    Attributes SellerDtls.Ph and SellerDtls.Em are optional and are not mapped in SAP Business One.


  5.  Buyer Details  (BuyerDtls) has following attributes and mapping in SAP Business One:














































    5.1 Gstin GSTIN - following values are possible:

    1)      GSTIN from Marketing Document Tax Information table:


    2)      URP if no GSTIN is provided or in case of EXWP or EXWOP as SupRtype (see 2.2)
     5.2 LglNm Legal Name – this is a BP name from marketing document header. It is simple, isn’t it, 😊?
     5.3 TrdNm Trade Name – the same as Legal Name from above
     5.4 Pos Place of Supply – following values are possible:

    1)      GST County Code of BP that corresponds to the State -> GST County Code:


    2)      96  in case of EXWP or EXWOP as SupRtype (see 2.2)
     5.5 Addr1 Address 1 – and again 1 of 2 values are possible and is cut to 100 symbols :

    1. Ship To address from marketing document.

    2. But, If the Use Bill to Address to Determine Tax  checkbox is ticked on then Bill To address.


     5.6 Loc Location – corresponds to City from Ship To or Bill To address. The logic of choice is the same as for Addr1 (5.5) attribute.
     5.7 Pin Pin –  this time 1 of 3 values are possible:

    1. Zip Code from Ship To address or

    2. Or Zip Code from Bill To address - guess when?, yes – when the Use Bill to Address to Determine Tax  checkbox is ticked

    3. And 999999 for case of EXWP or EXWOP as SupRtype (see 2.2)


     5.8   Stcd State Code – value is very similar to one used for Pos (5.4) attribute, BUT! In case the Use Bill to Address to Determine Tax  checkbox is ticked then State from  Bill To is used. However, for case of EXWP or EXWOP as SupRtype (see 2.2) value 96 is used!

    Attributes BuyerDtls.Ph and BuyerDtls.Em are optional and are not mapped in SAP Business One.

    1. Ship To Details (ShipDtls) – this block is reported by SAP Business One only in case the Use Bill to Address to Determine Tax checkbox is ticked on:


     






































    7.1 Gstin It is the same  as BuyersDtls.Gstin from 5.1 in SAP Business One
     7.2 LglNm

    Legal Name corresponds to the Address ID in the Ship To field in the marketing Document:


     7.3 TrdNm Trade Name duplicates the Legal Name
     7.4 Addr1 Address takes value of Ship To address in the marketing document
     7.5 Loc Location – corresponds to City from Ship To address from marketing document
     7.6 Pin Pin –  corresponds to Zip Code from Ship To address. However, for case of EXWP or EXWOP as SupType (see 2.2) the value is 999999
     7.7 Stcd State Code – repeats value BuyerDtls.Stcd (5.8) but from Ship To address only

    Attribute ShipDtls.Add2 is not mapped in SAP Business One.

    1. Item List (ItemList)































































































    8.1 SlNo SL no – order number
     8.2 IsServc

    Is Service can have values Y or N.

    In case marketing document is of Service type, then value for all lines is Y. Also this value used for Freight expenses, for other cases (items) value is N.
     8.3 HsnCd

    HSN Code for item lines or SAC for service items:


     8.4 Qty Quantity: value from marketing document line. For service items this value is 1.
     8.5 Unit

    Unit of Measure for service items is OTH.  For Items this attribute is filled with value from EWB Unit for UoM code:


     8.6 UnitPrice

    Unit price is calculated value for non service items as

    (marketing document line tax base amount +marketing document line freight tax base amount (with same GST tax code)) / quantity

    For service items this value is net total in local currency.
     8.7 TotAmt

     Total Amount is calculated for non-service items as

    (marketing document line tax base amount +marketing document line freight tax base amount (with same GST tax code))
    Total Amount for service items is the same value as UnitPrice (8.6) attribute.
     8.8 AssAmt Assessable Amount repeats value of TotAmt (8.7) attribute.
     8.9 GstRt

    GST Rate: this rate is a sum of GST tax types rates.

    However, when Without Payment of Duty  is set in the Duty Status field this rate is set to 0 with exception of the freight expenses for the document. Also for the case of EXWP  SupType (2.2) and Tax Code is Reverse Tax Code  ( see pic. for 2.3) the rate is reported as 0 as well.
     8.10 IgstAmt

    Tax Amount for IGST. This amount includes row also line freight IGST amount.

    However, again, when Without Payment of Duty  is set in the Duty Status field this rate is set to 0 with exception of the freight expenses for the document. Also for the case of EXWP  SupType (2.2) and Tax Code is Reverse Tax Code  ( see pic. for 2.3) the rate is reported as 0 as well.
     8.11 CgstAmt

    Tax Amount for CGST. This amount includes row also line freight CGST amount.

    However, again, 😊, when Without Payment of Duty  is set in the Duty Status field this rate is set to 0 with exception of the freight expenses for the document. Also for the case of EXWP  SupType (2.2) and Tax Code is Reverse Tax Code  ( see pic. for 2.3) the rate is reported as 0 as well.
     8.12 SgstAmt

    Tax Amount for SGST and UTGST. This amount includes row also line freight CGST and UTGST amount.

    And again, 😊, when Without Payment of Duty  is set in the Duty Status field this rate is set to 0 with exception of the freight expenses for the document. Also for the case of EXWP  SupType (2.2) and Tax Code is Reverse Tax Code  ( see pic. for 2.3) the rate is reported as 0 as well.
     8.13 CesRt This is GST Cess rate.
    Sorry for annoying, but when Without Payment of Duty  is set in the Duty Status field this rate is set to 0 with exception of the freight expenses for the document. Also for the case of EXWP  SupType (2.2) and Tax Code is Reverse Tax Code  ( see pic. for 2.3) the rate is reported as 0 as well.
    Cess tax should not be used for the document freight.
     8.14 CesAmt

    Tax Amount for Cess tax. This amount includes row also line freight Cess amount.

    The same However as in 8.13, 😊
     8.15 StateCesRt

    State Cess tax Rate

    This s the same as 8.13 in SAP Buisness One
     8.16 StateCesAmt Tax amount for State Cess Tax types, in SAP Business One it is the same as 8.14.
     8.17 OthChrg

    Other Charges

    We put here all no GST amounts, freights with no GST taxes.
     8.18 TotItemVal

    Total Item Value.

    The value is calculated as Taxable Amount + IGST Amount + CGST Amount + Cess Amount + Other charges.

    Following attributes Free Quantity, UQC, Discount, PreTax Value, Cess Non Advol Amount, State Cess Non Advol, Order line Referencee, Origin Country, Serial Number, Attribute Name and Attribute value are not mapped in SAP Business One.

    1. Document Total (ValDtls)























































    10.1 AssVal Assessable Value of all Items. This is the sum of ItemList.TotAmt (values from 8.8)
     10.2 CgstVal Total CGST Values of all items. This is the sum of Tax Amount in local currency for CGST (values from 8.11)
     10.3 SgstVal Total SGST Values of all items. This is the sum of Tax Amount in local currency for SGST and UTGST  (values from 8.12)
     10.4 IgstVal Total IGST Values of all items. This is the sum of Tax Amount in local currency for IGST  (values from 8.10)
     10.5 CesVal Total Cess Values of all items. This is the sum of Tax Amount in local currency for Cess  (values from 8.14)
     10.6 StCesVal Total Cess Values of all items. This is the sum of Tax Amount in local currency for Cess  (values from 8.14)
     10.7 Discount

    Invoice Discount

    This value is calculated as sum of ItemList.TotItemVal (8.18) for each line, ValDtls.OthChrg (10.8) + ValDtls.RndOffAmt (10.9) - B1 Document Total – downpayment.
     10.8 OthChrg

    Invoice other charges

    This amount is include document freight and TCS amount or negative result of calculated amount for Discount in 10.7 😉
     10.9 RndOffAmt

    Round off amount – this is easy – it is the document rounding amount:


    10.10 TotInvVal

     Total Invoice Value: if no down payment used, this value will always equals to SAP B1 document total:


    In case down payment used then this amount also includes down payment amount with taxes (Attention!  This amount is not equal to the value of Total Down Payment field that you can see in this picture).
    This amount should be equal to the sum of ItemList.TotItemVal (8.18) for each line + ValDtls.OthChrg (10.8) + ValDtls.RndOffAmt (10.9)  - ValDtls.Discount (10.7).

    Attribute Final Invoice Value in Additional Currency is not mapped, so all values are reported in the local currency for all blocks.

    In case you need other blocks or attributes to be reported in the E-Invoice you need to create a query and save it under the E-Billing category (the same you used when saved SAP Business One queries under the Note Notes 2902401) and using EFM tool (Generating Electronic Reports  ) update mapping.

    I would like to invite you to provide feedback or ask clarifying questions regarding the topic in the comments section. It is also possible to submit the improvement requests for this feature (and others as well!) on the Customer Influence site: https://influence.sap.com/SAPBusinessOne

2 Comments