{"id":34144,"date":"2025-11-27T09:55:44","date_gmt":"2025-11-27T09:55:44","guid":{"rendered":"https:\/\/tenthplanet.in\/odoo\/?p=34144"},"modified":"2026-07-07T06:10:05","modified_gmt":"2026-07-07T06:10:05","slug":"how-b2b-invoice-sync-with-sap","status":"publish","type":"post","link":"https:\/\/tenthplanet.in\/odoo\/product\/integration\/how-b2b-invoice-sync-with-sap\/","title":{"rendered":"How B2B Invoice Sync with SAP"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The B2B invoice sync feature helps send GST invoices from Odoo POS directly to SAP. This makes accounting, GST filing, and financial tracking easier and error-free. Once an invoice is generated in POS, the system automatically sends it to SAP through an API.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">SAP processes the invoice and returns a response showing whether the sync was successful or if any errors occurred. Each invoice\u2019s status is recorded in the SAP API log, where successful records appear as \u201cParked,\u201d and failures show the error message for troubleshooting.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Integration Workflow for B2B Invoice with SAP<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The integration workflow for B2B invoices with SAP begins when a POS order is completed for a <strong>GST-registered custome<\/strong>r who is already synced with SAP. After the order is finished, the system automatically generates an invoice, which can be viewed in the Invoicing module under the list of B2B invoices.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Only completed invoices are eligible for syncing, and the system sends them to SAP in real time for processing. SAP receives the invoice, processes it, and returns a response that may show <strong>Success, Parked, or Failed.<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"249\" src=\"https:\/\/tenthplanet.in\/odoo\/wp-content\/uploads\/sites\/8\/2025\/11\/Tenthplanet-Odoo-B2B-Invoice-1024x249.png\" alt=\"Odoo B2B Invoice\" class=\"wp-image-34147\" title=\"\" srcset=\"https:\/\/tenthplanet.in\/odoo\/wp-content\/uploads\/sites\/8\/2025\/11\/Tenthplanet-Odoo-B2B-Invoice-1024x249.png 1024w, https:\/\/tenthplanet.in\/odoo\/wp-content\/uploads\/sites\/8\/2025\/11\/Tenthplanet-Odoo-B2B-Invoice-300x73.png 300w, https:\/\/tenthplanet.in\/odoo\/wp-content\/uploads\/sites\/8\/2025\/11\/Tenthplanet-Odoo-B2B-Invoice-768x187.png 768w, https:\/\/tenthplanet.in\/odoo\/wp-content\/uploads\/sites\/8\/2025\/11\/Tenthplanet-Odoo-B2B-Invoice.png 1363w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">When the response is successful, SAP generates an Invoice Number, which is automatically saved in the SAPInvoiceNumber field inside the invoice. This number can be viewed directly by opening the invoice record. Finally, the full <strong>SAP response<\/strong> is saved as a log entry within the invoice, allowing users to track the transaction and its status for future reference.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"512\" src=\"https:\/\/tenthplanet.in\/odoo\/wp-content\/uploads\/sites\/8\/2025\/11\/Tenthplanet-Odoo-B2B-Customer-Invoice-1024x512.png\" alt=\"Odoo B2B Customer Invoice\" class=\"wp-image-34148\" title=\"\" srcset=\"https:\/\/tenthplanet.in\/odoo\/wp-content\/uploads\/sites\/8\/2025\/11\/Tenthplanet-Odoo-B2B-Customer-Invoice-1024x512.png 1024w, https:\/\/tenthplanet.in\/odoo\/wp-content\/uploads\/sites\/8\/2025\/11\/Tenthplanet-Odoo-B2B-Customer-Invoice-300x150.png 300w, https:\/\/tenthplanet.in\/odoo\/wp-content\/uploads\/sites\/8\/2025\/11\/Tenthplanet-Odoo-B2B-Customer-Invoice-768x384.png 768w, https:\/\/tenthplanet.in\/odoo\/wp-content\/uploads\/sites\/8\/2025\/11\/Tenthplanet-Odoo-B2B-Customer-Invoice.png 1363w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>SAP Log Details for B2B Invoice<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To view SAP log details for B2B invoices, you can navigate from the main dashboard to the Inventory module,<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">open the Configuration menu, and then select <strong>SAP API \u2192 SAP Logs<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"730\" height=\"239\" src=\"https:\/\/tenthplanet.in\/odoo\/wp-content\/uploads\/sites\/8\/2025\/11\/Tenthplanet-Odoo-B2B-Invoice-Navigation.png\" alt=\"Odoo B2B Invoice Navigation\" class=\"wp-image-34150\" title=\"\" srcset=\"https:\/\/tenthplanet.in\/odoo\/wp-content\/uploads\/sites\/8\/2025\/11\/Tenthplanet-Odoo-B2B-Invoice-Navigation.png 730w, https:\/\/tenthplanet.in\/odoo\/wp-content\/uploads\/sites\/8\/2025\/11\/Tenthplanet-Odoo-B2B-Invoice-Navigation-300x98.png 300w\" sizes=\"auto, (max-width: 730px) 100vw, 730px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">In this log screen, you can see detailed technical information related to each B2B invoice sent to SAP. The <strong>Invoice\/Bill<\/strong> field shows both the invoice number and the related POS order number in a single format. The <strong>Status<\/strong> field displays whether the invoice was successfully processed or failed; when SAP returns a \u201cParked\u201d response, the status appears as \u201cSuccess,\u201d and when the response is \u201cError,\u201d the status shows \u201cFailed.\u201d<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong>Type<\/strong> field always identifies the document as a B2B Invoice, while the <strong>API Name<\/strong> appears as \u201cCustomer,\u201d indicating that the log is related to the customer linked with the invoice. The <strong>Created Date<\/strong> shows when the log entry was generated, helping track when the system recorded the transaction.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong>Request Field<\/strong> section contains all key data sent to SAP, including company details, fiscal year, invoice references, customer information, accounting values, taxes, and other financial details required for SAP processing.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The SAP API log displays several important fields for each B2B invoice, showing all the data sent to SAP during invoice processing. It starts with the <strong>Company Code<\/strong>, such as PRPL, which identifies the company in SAP, followed by the <strong>Fiscal Year<\/strong>, which helps record the transaction in the correct financial period. The <strong>External Reference<\/strong> shows the exact B2B invoice number issued to the customer.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong>Document Date<\/strong> is the date printed on the invoice, while the <strong>Posting Date<\/strong> shows when the invoice was officially recorded in SAP, which may differ if the entry is posted later. The <strong>Customer Invoice Number<\/strong> represents the last part of the POS order number, such as 000266 from CHNLST3\/24-25\/000266. The <strong>Document Type<\/strong> indicates the kind of document being processed, and if it appears as DR, it means a Customer Invoice or Debit Memo.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong>Business Place<\/strong> field shows the state-specific code like TN33, PY34, KL32, or KA29 based on the region. The <strong>Customer Number<\/strong> identifies the SAP customer linked to the invoice, while the <strong>Customer Amount<\/strong> shows the total amount the customer has to pay after discounts and offers. The <strong>Header Text<\/strong> provides extra information such as \u201cAR Invoice Indirect \u2013 GST,\u201d indicating a GST-based AR invoice.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong>NavCustomerInvPark<\/strong> section contains details of each item sold in the invoice, listing every product separately along with its quantity. For each item, the system shows the <strong>ItemNumber<\/strong>, <strong>GLAccount<\/strong> (the SAP profit account used to record sales and taxes), <strong>HSNCode<\/strong>, and <strong>GL Amount<\/strong>, which represents the taxable value of the item. If a GL account is not configured, it appears as \u201cfalse.\u201d The <strong>Tax Code<\/strong> reflects the tax type set in the Tax configuration, and if not defined, it displays an empty value.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong>Base Quantity<\/strong> and <strong>Base Unit<\/strong> indicate how many units were sold and the measurement type, such as PC for pieces, KG for kilograms, or CV for cases. The <strong>ItemText<\/strong> shows the product name, while the <strong>DebitCreditInd<\/strong> indicates whether the value is recorded as a debit or credit. The <strong>CostCenter<\/strong> identifies the department responsible for the cost, and the <strong>ProfitCenter<\/strong> shows which part of the company made the profit from the sale.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Example Request Format<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n\"CompanyCode\": \"PRPL\",                                                \/\/ SAP Company Code\n\"FiscalYear\": \"2025\",                                                        \/\/ Fiscal year for posting\n\"ExternalReference\": \"INV\/2025\/00114\",                        \/\/ External system reference (Invoice Receipt Number)\n\"DocumentDate\": \"2025-06-25T00:00:00\",                    \/\/ Invoice document date\n\"PostingDate\": \"2025-06-25T00:00:00\",                         \/\/ Date of posting to SAP\n \"BusinessPlace\": \"AP\",                                                   \/\/ Business location code\n\"CustomerInvoiceNumber\": \"000268\",\t\t      \/\/ Represents the last segment of the POS order number\t\n \"DocumentType\": \"DR\", \t\t\t\t      \/\/ Document Type\n\"CustomerNumber\": \"400004\",                                       \/\/ SAP Customer Number \n\"CustomerAmount\": \"55.4\", \t\t\t\t       \/\/ Total amount payable by customer\n\"HeaderText\": \"AR Invoice Indirect \u2013 GST\",\t       \/\/ Description for header level\n \"NavCustomerInvPark\": &#091;\n\t{\n\t\"ItemNumber\": \"\",                                                 \t\/\/ Line item number (optional)\n\t\"GLAccount\": \"70010809\",                                    \t\/\/ SAP GL account to debit\/credit\n\t\"HSNCode\": \"73239390\",                              \t\/\/ HSN code\n\t\"GLAmount\": \"49.46\",\t\t\t\t\/\/ Amount posted to GL\n\t \"TaxCode\": \"O2\", \t\t\t\t\t\/\/ Tax code (used to determine GST applicability)\n\t\"BaseQuantity\": \"1.0\", \t\t\t\t\/\/ Quantity of goods\/services\n\t\"BaseUnit\": \"PC\", \t\t\t\t\t \/\/ Unit of measure (e.g., PC = pieces)\n\t\"ItemText\": \"ALU APPACHATTI\",\t\t\t\/\/ Line item description\n\t \"DebitCreditInd\": \"-\", \t\t\t\t\/\/ '+' for debit, '-' for credit\n\t\"CostCenter\": \"\",\t\t\t\t\t\/\/ SAP cost center (optional)\n \t\"ProfitCenter\": \"134000112\"\t\t\t\t\/\/ Profit center (optional)\n\t}\n\t]\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Response Field<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The response fields in the SAP API log provide important information about the status of a B2B customer invoice processed in SAP. The <strong>Document Date<\/strong> shows the official date recorded for the invoice, while the <strong>Business Place<\/strong> indicates the business location code linked to the transaction. The <strong>Status<\/strong> field tells whether the invoice was processed successfully or if an error occurred, with common statuses such as \u201cParked\u201d for successful syncing and \u201cError\u201d when processing fails.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong>Message<\/strong> gives a clear description of the result, such as \u201cDocument 2200000730 Successfully Parked,\u201d or an error message if something went wrong. The <strong>SAP Invoice Number<\/strong> is the unique number assigned by SAP to the invoice, used for tracking future processes. The <strong>Customer Number<\/strong> identifies the SAP customer associated with that invoice, helping link the transaction to the correct account for billing and accounting.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Example Response Format <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  \"DocumentDate\": \"2025-06-25T00:00:00\",       \/\/ Date when the document was created\n  \"BusinessPlace\": \"AP\",                       \t       \/\/ Business location code \n  \"Status\": \"Parked\",                                            \/\/ Status display either Parked or Failed\n  \"Message\": \"Document 3040000638 Successfully Parked\",  \n\t\t\t\t\t\t      \/\/ Message confirming successful parking in SAP\n  \"SAPInvoiceNumber\": \"3040000638\",            \/\/ Invoice number assigned by SAP\n  \"CustomerNumber\": \"400004\"                        \/\/ SAP Customer Number \n}<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"375\" src=\"https:\/\/tenthplanet.in\/odoo\/wp-content\/uploads\/sites\/8\/2025\/11\/Tenthplanet-Odoo-B2B-Invoice-Request-Response-1024x375.png\" alt=\"Odoo B2B Invoice Request Response\" class=\"wp-image-34153\" title=\"\" srcset=\"https:\/\/tenthplanet.in\/odoo\/wp-content\/uploads\/sites\/8\/2025\/11\/Tenthplanet-Odoo-B2B-Invoice-Request-Response-1024x375.png 1024w, https:\/\/tenthplanet.in\/odoo\/wp-content\/uploads\/sites\/8\/2025\/11\/Tenthplanet-Odoo-B2B-Invoice-Request-Response-300x110.png 300w, https:\/\/tenthplanet.in\/odoo\/wp-content\/uploads\/sites\/8\/2025\/11\/Tenthplanet-Odoo-B2B-Invoice-Request-Response-768x281.png 768w, https:\/\/tenthplanet.in\/odoo\/wp-content\/uploads\/sites\/8\/2025\/11\/Tenthplanet-Odoo-B2B-Invoice-Request-Response.png 1363w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>The B2B invoice sync feature helps send GST invoices from Odoo POS directly to SAP. This makes accounting, GST filing, [&hellip;]<\/p>\n","protected":false},"author":21,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[635],"tags":[649,630,627],"class_list":["post-34144","post","type-post","status-publish","format-standard","hentry","category-integration","tag-b2b-invoice","tag-integration","tag-sap-sync"],"acf":[],"_links":{"self":[{"href":"https:\/\/tenthplanet.in\/odoo\/wp-json\/wp\/v2\/posts\/34144","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tenthplanet.in\/odoo\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tenthplanet.in\/odoo\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tenthplanet.in\/odoo\/wp-json\/wp\/v2\/users\/21"}],"replies":[{"embeddable":true,"href":"https:\/\/tenthplanet.in\/odoo\/wp-json\/wp\/v2\/comments?post=34144"}],"version-history":[{"count":1,"href":"https:\/\/tenthplanet.in\/odoo\/wp-json\/wp\/v2\/posts\/34144\/revisions"}],"predecessor-version":[{"id":36968,"href":"https:\/\/tenthplanet.in\/odoo\/wp-json\/wp\/v2\/posts\/34144\/revisions\/36968"}],"wp:attachment":[{"href":"https:\/\/tenthplanet.in\/odoo\/wp-json\/wp\/v2\/media?parent=34144"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tenthplanet.in\/odoo\/wp-json\/wp\/v2\/categories?post=34144"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tenthplanet.in\/odoo\/wp-json\/wp\/v2\/tags?post=34144"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}