sync4 Docs
sync4.deSupportImpressum
  • Home
  • Funktionen
    • Artikel Verwaltung
      • Shopware: Variantenverwaltung
      • Shopware: Sortierung der Varianten
      • Dateianlage und PDF
      • Bilder bearbeiten
      • Preise
      • Metainfos
      • HTML Vorlage
      • Artikel Verwaltung
      • Shop Artikel
      • WAWI Artikel
    • Bestellungen
      • Nebenkosten als Artikel
      • Shopware: Gutscheine auf eine Artikelnummer bündeln
      • Gutscheine verwalten mit Shopware
      • Gutschein verwalten mit Gambio
      • Bestellungen
      • Bestellungen ohne WAWI
      • Adressen
      • Details
    • Die Menüs
      • Die Menüs
      • Linkes Menü
      • Schnell Menü
      • Kopf Menü
    • Hilfe
      • Ein sync4 Update installieren und mit Shopware verbinden
      • Nach Updates suchen
      • Über sync4
      • Fernwartung
      • Startseite in sync4
    • Kategorien
      • Kategorieansicht
      • Shopware: Artikelsortierung
      • Kategorien löschen (bis Version 9.1.1.1)
      • Kategorien (bis Version 9.1.1.1)
      • Sortierung
      • Kategorie bearbeiten (bis Version 9.1.1.1)
      • Kategorie Übersicht (bis Version 9.1.1.1)
    • Varianten
    • Hersteller
    • Favoriten
    • Benutzerpasswort ändern
    • Administration
    • Lizenz
    • Logs einsehen
    • Benutzerverwaltung
    • Mandantenverwaltung
    • Mandantenauswahl
    • Sonstiges
    • Kundenverwaltung
    • Bilder im Shop löschen
    • Alle Artikel im Shop löschen
    • Shop Sync
    • WAWI Sync
    • Neuen Artikel anlegen
    • Proxy
    • Einstellungen
    • Konfiguration und Installationsassistenten
  • Module
    • Server Dienst
      • Dienst Konfigurieren
      • Dienst installieren
    • Visuelle Bestellfunktion
    • Import Modul
    • Cross Selling
    • Import Modul (alte Version)
    • Kunden spezifische Einzelpreise Modul
    • Visuelle Bestellfunktion (Explosionszeichnung) (bis Version 9.1.1.1)
    • Versandmodul (DHL, UPS, GLS, DPD, Hermes u.v.m.)
  • FAQ
    • Warenwirtschaften
      • COS
        • COS Arista
        • COS: Zahlungsarten übergeben
      • SAP
        • SAP Service Layer Fehlermeldungen
        • SAP: Connection to SAP database failed Error env:Receiver 193 OBserverGeneric
        • SAP Preisberechnung
        • Shopware mit SAP: Gutscheine erstellen
        • SAP: You are not connected to a company
        • SAP: Adress-ID Feld
      • Lexware
        • Lexware eCommerce 2017 – Abweichende Adresse
        • Lexware Backup: sync4 und sync4 Dienst stoppen
        • Lexware eCommerce Übersicht
        • Lexware Versandkosten / Nebenleistungen
        • Lexware – 1und1
      • 42 ERP Connector
      • Wawi-Status verwenden
      • Steuerverteilung bei B+, ERP-complete und Wiso Unternehmer Suite
      • OSS mit 42 ERP und 42 Arthur
      • OSS mit microtech büro+
      • OSS mit blue office
    • Shops
      • Shopware
        • Globales Layout (Produkte) definieren für Shopware 6
        • Shopware 6 - Varianten-Hauptartikel im Listing
        • Shopware 6 - Varianten Arten
        • Globales Layout (Kategorie) definieren für Shopware 6
        • Artikelsortierung Shopware 6
        • Shopware Bestellabruf
        • Shopware: no shopware parent id found
        • Shopware: Staffelpreise für Varianten
        • Shopware – Bilder Varianten zuweisen
        • Shopware Bestellabruf (bis Version 9.1.1.1)
        • Shopware: SEO URLs
        • Shopware Subshop
        • Shopware SteuerID für Digitalartikel erstellen
        • Shopware API einrichten
        • Lieferstatus bei Shopware 5
        • Zeitstempel nicht korrekt beim Bestellstatus ändern bei Shopware 6
        • Günstigster Preis (letzten 30 Tage)
        • Kategorielayout Shopware 6 - Besonderheiten bei zusätzlichen Inhalten
      • Gambio
        • Umlaute Darstellung im Gambio Shop
        • Versand Optionen – Verpackungsleergewicht
        • Gastbestellungen bei Gambio GX2
        • Banner benutzen
        • Gambio Wesentliche Merkmale (Bestellzusammenfassung)
        • Tabs im Gambio Shop
        • Kundengruppen Zugang aktivieren für bestimmte Artikel
      • WooCommerce
      • Shopify
      • Kategorie,- Artikelbefugnisse (nur Gambio & Shopware)
      • xt:Commerce – Gastbestellung muss abgeschaltet werden
      • xt:Commerce Datei und Ordner Berechtigung
      • Vorbereitung osCommerce für sync4
      • Sonderzeichen im sync4 mit os:Commerce
      • Was muss im Shop geändert werden
      • Änderung der Shopbesitzer Daten
      • Zeichensatz im Shop UTF8_general_ci
    • SQL
      • SQL Transaktionsprotokoll verkleinern
      • SQL Sicherung
      • MS SQL Einstellungen
    • Problembehandlung
      • Hersteller konnten nicht aktualisiert werden
      • ERROR: „ARTIKELNUMMER“400: Bad Request – Validation error (Details: [„details[2].number: This value
      • Bestellung konnte nicht in die Datenbank übertragen werden.
      • Integrity constraint violation: ID Duplicate entry ‚ARTIKELNUMMER‘ for key ‚ordernumber
      • Bestellung konnte nicht abgerufen werden. LUA-Ergebnis ist leer (nil)
      • Dienst läuft in Fehler
      • Nummernkreis voll für die Kundenanlage
      • Bestellungen konnten nicht geladen werden – SQL context hasn’t been set.
      • Zahlungsart funktioniert nicht Fehler beheben
      • Mobile Template gambio GX2 – quick_contact Fehler
      • Fehlerbeschreibung
      • Kundenkonto erstellen nur als Deutscher möglich
      • Artikel werden nicht angezeigt – feature index neu erstellen
      • Umlaute fehlerhaft im Shop
      • Fehlerhafte Anzeige von sync4
      • Mögliche Fehler bei Bestellungen
    • Tipps und Tricks
      • Bilder in der Datenbank bereinigen
      • Verpackungseinheiten
      • Praktische Anwendung von Staffelpreislisten
      • Markieren von Artikeln
      • Hilfe auf sync4.de
      • Wann ist ein Artikel als NEU deklariert
    • Kunden
      • Content/Artikel steuern für Kundengruppen
      • Kundengruppen löschen und bearbeiten
      • BüroPlus – E-Mail Suche bei Kundenzuordnung
      • Auslandskunden mit Steuernummer/VAT richtig einstellen
    • Amazon Anbindung (SP-API)
    • Amazon (alte Anbindung)
    • ebay Anbindung
    • HTTPS aktivieren
    • Lieferstatus Matrix
    • Filter
    • Filter Shopware 6
    • Mandantenassistent
    • Skripte anpassen mit Hookpunkten
    • Skripte
    • StockUpdate
    • Brutto – Netto – Preise und Nachkommastellen
    • Categories Drop Down Konfigurationsanleitung
    • Meta Angaben
    • Navigation über die Artikel in sync4
    • System-Scripte wiederherstellen
    • Attribute bei einem Artikel entfernen
    • Versandkosten pro Artikel – aktivieren
    • PayPal ändert automatisch den Status
    • MwSt. im Versand einstellen
    • Umlaute und Sonderzeichen in Verbindung mit SEO beachten.
    • Leere Artikel löschen
    • Umwandeln CSV in XLS
    • Firmenlogo auf Rechnungsdruck neu ausrichten
    • Excelliste bearbeiten für den Import in sync4
    • Benutzerkontensteuerung
    • MS Firewall einstellen
    • Updates
    • Schulung
    • Varianten bei Shopware 6
  • Google Shopping
    • Google Shopping – Datenfeed hochladen
    • Google Shopping – AdWords Kampagne starten
    • Google Shopping – Export erstellen (Gambio GX2.1)
    • Google Produkt Kategorien
  • Installation
    • Client Installation
    • Installationsassistent
      • Datenbankauswahl manuell
      • Registrierung
      • Anmeldung
      • Installationsassistent
      • Konfiguration und Installationsassistenten
    • sync4 installieren
      • Ein sync4 Update installieren und mit dem Shop verbinden
      • Deinstallieren
      • Update installieren
      • Installation von sync4
      • Herunterladen und Entpacken
      • Page 1
    • Sage 100 Schnittstelle
  • Konfiguration
    • Firmendaten
    • Preislisten
    • Zahlungs- und Versandarten
    • Steuerzonen
    • Kundengruppen
    • Sprache und Mehrsprachigkeit
    • Optionen
    • FTP-Skripte übertragen
    • Webshop
    • Warenwirtschaft
  • Shop Einstellungen
    • ePages (1und1, Strato, Hosteurope, Telekom usw.)
    • Shopware Pseudopreis
    • Shop Rechte sync4
    • Bilder für den Shop
    • Artikelnummer und Sonderzeichen im Shop und sync4
    • Shop Umlaute
    • Shop sync Fehler
  • sync4 Infos
    • Zusatzfelder in sync4
    • Definition der Anbindung SAP B1 an Shopware
    • Kundenspezifische Preise mit 42 ERP
    • Startseite in sync4
    • Projektleitfaden
    • Softwarepflege
    • Impressum
    • Beta Test Vertrag
    • Lizenzvereinbarung
    • Voraussetzungen und Freigabe
    • Infos zum Handbuch
    • Das Prinzip
    • EULA
  • sync4 TV
    • Zum Youtube Channel
  • Warenwirtschaft
    • Sage 100 Schnittstelle
    • Nebenkosten als Artikel
    • Lexware eBusiness Auftrag anlegen
    • Keine Warenwirtschaft
    • Weitere ERP Systeme mit openTRANS und BMEcat
    • IN-FORM
    • Lexware Pro und Premium installieren
    • ZDF WISO Unternehmer Suite
    • Microtech büro+ und ERP-complete
    • SKS Warenwirtschaft
    • Lexware Auftrag und Faktura mit eBusiness
    • SAP Business One
    • 42 ERP und 42 Arthur
  • Changelog
Powered by GitBook
On this page
  • Grundsätzliches zu sync4
  • Grundsätzliches zu Shopware
  • Shopware Hosting
  • Shopware Plugins
  • sync4 Voraussetzung
  • Empfohlener Projekt Ablauf
  • Felddefinitionen Shopware
  • Shopware an SAP B1 -> Adresse und Bestellung
  • Preislisten zu Kundengruppen
  • Kundenspezifische Einzelpreise
  • getCustomerPrices
  • getCustomersProductsgroupDiscount
  • getCustomersGroupDiscount
  • Besonderheiten
  • Zusätzliche Anpassungen
  1. sync4 Infos

Definition der Anbindung SAP B1 an Shopware

PreviousZusatzfelder in sync4NextKundenspezifische Preise mit 42 ERP

Last updated 1 year ago

Grundsätzliches zu sync4

sync4® verbindet die Warenwirtschaft SAP B1 mit Ihrem Shopware Shop. Produktinformationen lassen sich so komfortabel aufbereiten und mit der sync4 Schnittstelle an Ihren Shop übertragen. Bestellungen und Kundendaten werden GDPdU-konform synchronisiert. Als Middleware ist sync4® zwischen Ihrer Warenwirtschaft und Ihrem Onlineshop geschaltet, um Ihre Artikelinformationen aufzubereiten und mit dem Onlineshop zu synchronisieren.

Grundsätzliches zu Shopware

Shopware ist ein Shop System der Shopware AG. Die Shopware AG als Hersteller übernimmt für das Shopsystem die Gewährleistung.

Shopware Hosting

Als Hoster wird ein von Shopware zertifizierter Hoster wie z.B. Profihost () empfohlen. Nur mit einem solchem Hoster wird Shopware vollständigen Support übernehmen können. Andernfalls kann es sein, dass der Support von Shopware abgelehnt wird. Bei nicht zertifizierten Hostern sind die Systemvoraussetzungen ( https://community.shopware.com/Systemanforderungen_detail_1840.html ) zu prüfen. Der Hoster bzw. der Betreuer dessen muss die entsprechenden Anpassungen vornehmen. Dies kann hierbei zu einem erhöhtem Aufwand führen.

Shopware Plugins

Für Plugins von Drittanbieter sind die jeweiligen Hersteller verantwortlich. Die empfohlenen Plugins werden vorab nicht auf Funktion getestet. Plugins werden im Standard von sync4 nicht berücksichtigt.

sync4 Voraussetzung

Die Systemvoraussetzungen für die Installation und den Betrieb der sync4 Schnittstelle ist auf folgender Seite notiert:

Empfohlener Projekt Ablauf

Den aktuellen Projekt-Leitfaden zur Einführung von sync4 finden Sie bei uns auf der Homepage:

Felddefinitionen Shopware

SAP B1 an Shopware -> Artikel

Folgende Felder werden bei der Übernahme der Artikel aus SAP B1 zu Shopware 5 übernommen.

SAP B1

sync4

Shopware 6

Shopware

Anmerkung

OITM.ItemCode

products_model

product.productNumber

article.mainDetail.number

Artikelnummer

OITM.ItemName

products_name

product.name

article.name

Artikelname

OITM.OnHand

products_quantity

product.stock

article.inStock

Bestand

OITM.OnOrder

products_ordered

product.stock

article.inStock

– Auftragsbestand

OITM.IsCommited

products_committed

product.stock

article.inStock

+ Bestellbestand

OITM.PictureName

Medien Tabelle

Medien Tabelle

Medien Tabelle

Artikelbild

OITM.SWeight1

products_weight

product.weight

article.weight

Gewicht

OITM.VatGourpSA

products_tax_class

product.taxId

article.tax

Steuersatz

OITM.CodeBars

products_ean

product.ean

article.ean

EAN Nummer

OITM.frozenfor

products_status

product.active

article.active

Artikelstatus

OITM.UserText

products_description

product.description

article.descriptionLong

Artikelbeschreibung

SalPackUn

products_vpe_value

product.purchaseUnit

article.purchaseUnit

VPE-Wert

SalPackMsr

products_vpe_unit

product.unitId

article.unit

VPE

OITM.SuppCatNum

Products_manufacures_number

product.manufacturerNumber

Article.mainDetail.supplierNumber

Herstellernummer

Weitere Felder wie z.B. UDF und UDTs können mit einer Sonderprogrammierung berücksichtigt werden. Dabei ist sehr genau zu definieren, welche Felder wie übertragen werden sollen.

Shopware an SAP B1 -> Adresse und Bestellung

Folgende Felder werden bei der Adresse Übergabe vom Shopware 5 Shop zu SAP verwendet.

Shopware

Shopware 6

sync4

SAP B1

Anmerkung

order.number

order.orderNumber

orders_id

vOrder.NumAtCard

Wenn Bankverbindung vorhanden auch vBP.BPBankAccounts.UserNo2

order.billing.number

order.orderCustomer.customerNumber

customers_id

–

billing.vatId

order.orderCustomer.vatIds[0]

customers_vat_id

vBP.Addresses.FederalTaxID

order.customer.salutation

order.address.salutation.salutationKey

customers_gender

vBP.ContactEmployees.Gender

Nur Frau oder Mann

order.billing.firstName + order.billing.lastName

order.address.firstName + order.address.lastName

customers_name

vBP.ContactPerson + vBP.CardName (Wenn keine Firma) + vBP.ContactEmployees.Name

order.billing.firstName

order.address.firstName

customers_firstname

vBP.ContactEmployees.FirstName

order.billing.lastName

order.address.lastName

customers_lastname

vBP.ContactEmployees.LastName

order.billing.company

order.address.company

customers_company

vBP.CardName

order.billing.street

order.address.street

customers_street_address

–

order.billing.city

order.address.city

customers_city

–

order.billing.zipCode

order.address.zipcode

customers_postcode

–

order.billing.country.isoName

order.address.country.name

customers_country

–

order.billing.phone

order.address.phoneNumber

customers_telephone

vBP.Phone1 + vBP.ContactEmployees.Phone1

order.customer.email

order.orderCustomer.email

customers_email_address

vBP.EmailAddress + vBP.ContactEmployees.E_Mail

order.delivery.firstName + order.delivery.lastName

order.address.firstName + order.address.lastName

delivery_name

vBP.Addresses.AddressName + vBP.Addresses.AddressName2 + wenn Firma (vBP.Addresses.AddressName3)

order.delivery.firstName

order.address.firstName

delivery _firstname

–

order.delivery.lastName

order.address.lastName

delivery _lastname

–

order.delivery.company

order.address.company

delivery_company

vBP.Addresses.AddressName + vBP.Addresses.AddressName2

order.delivery.street

order.address.street

delivery_street_address

vBP.Addresses.Street

order.delivery.city

order.address.city

delivery_city

vBP.Addresses.City

order.delivery.zipCode

order.address.zipcode

delivery_postcode

vBP.Addresses.ZipCode

order.delivery.country.isoName

order.address.country.name

delivery_country

–

order.delivery.country.iso

order.address.country.iso

delivery_country_iso_code_2

vBP.Addresses.Country

order.billing.firstName + order. billing.lastName

order.address.firstName + order.address.lastName

billing_name

vBP.Addresses.AddressName + vBP.Addresses.AddressName2 + wenn Firma (vBP.Addresses.AddressName3)

order.billing.firstName

order.address.firstName

billing_firstname

–

order.billing.lastName

order.address.lastName

billing_lastname

–

order.billing.company

order.address.company

billing_company

vBP.Addresses.AddressName + vBP.Addresses.AddressName2

order.billing.street

order.address.street

billing_street_address

vBP.Addresses.Street

order.billing.city

order.address.city

billing_city

vBP.Addresses.City

order.billing.zipCode

order.address.zipcode

billing_postcode

vBP.Addresses.ZipCode

order.billing.country.isoName

order.address.country.name

billing_country

–

order.billing.country.iso

order.address.country.iso

billing_country_iso_code_2

vBP.Addresses.Country

order.customerComment

order.customerComment

comments

vOrder.Comments

order.orderTime

order.orderDateTime

date_purchased

vOrder.DocDate + vBP.BPBankAccounts.SignatureDate

order.orderStatusId

orders_status

–

order.currency

order.currency.isoCode

currency

–

order.currencyFactor

currency_value

–

order.customer.accountMode

account_type

–

order.payment.name

order.transactions[0].paymentMethod.name

payment_class

vOrder.PaymentGroupCode

order.payment.name

order.transactions[0].paymentMethod.name

payment_method

–

order.dispatch

order.deliveries[0].shippingMethod.name

shipping_method

–

order.dispatch

rder.deliveries[0].shippingMethod.name

shipping_class

vOrder.TransportationCode

order.paymentInstances[0].accountHolder

banktransfer_owner

vBP.BPBankAccounts.AccountName + vBP.BPBankAccounts.UserNo1

order.paymentInstances[0].accountNumber

banktransfer_number

vBP.BPBankAccounts.AccountNo + vBP.DefaultAccount

order.paymentInstances[0].bankName

banktransfer_bankname

–

order.paymentInstances[0].bankCode

banktransfer_blz

vBP.BPBankAccounts.BankCode + vBP.DefaultBankCode

order.paymentInstances[0].iban

IBAN

vBP.BPBankAccounts.IBAN

order.paymentInstances[0].bic

BIC

vBP.BPBankAccounts.BICSwiftCode

–

–

vBP.BPBankAccounts.MandateID

IBAN+“_“+vBP.CardCode

order.transactionId

'swag_paypal_transaction_id' oder 'swag_paypal_resource_id' oder 'swag_paypal_order_id'

transaction_number

–

position.articleNumber

order.lineItem.payload.productNumber

products_model

vOrder.Lines.ItemCode

position.articleName

order.lineItem.label

products_name

–

price

order.lineItem.unitPrice

products_price

?

final_price

final_price

–

position.quantity

order.lineItem.quantity

products_quantity

vOrder.Lines.Quantity

taxRate

lineItem.price.calculatedTaxes[0].taxRate

original_tax

–

price

order.lineItem.unitPrice

price_net

vOrder.Lines.UnitPrice

Wenn SAP-Preismodus aktiv und im Kunden nicht angehakt

price bzw. price_gross

order.lineItem.unitPrice

price_gross

vOrder.Lines.PriceAfterVat

Wenn SAP-Preismodus nicht aktiv ist; Wenn SAP-Preismodus aktiv und im Kunden angehakt dann vOrder.Lines.GrossPrice

order.billing.countryId

geo_zone_id

–

position.tax_shopID

tax_rates_id

–

products_tax

order.lineItem.price.calculatedTaxes.tax

products_tax

Wird verwendet für die Variable Bruttopreise

order.net und order.taxFree

order.taxStatus

allow_tax

Wird verwendet für die Variable Bruttopreise

Weitere Felder können mit einer Sonderprogrammierung berücksichtigt werden. Dabei ist sehr genau zu definieren, welche Felder wie übertragen werden sollen. Sprechen Sie dies auch mit Ihrem SAP B1 Betreuer ab, da die Felder in der weiteren Verarbeitung berücksichtigt werden müssen.

Preislisten zu Kundengruppen

Die Preislisten können zu den Shopware Kundengruppen zugewiesen werden. Dabei kann auch eine Preisliste aus SAP mehrfach verwendet werden. Mit folgendem SQL Befehl werden die Preise ausgelesene. Lassen Sie diesen von Ihrem SAP Betreuer prüfen.

SELECT b.ItemCode AS Artikelnummer, b.PriceList as Preisliste, ‚1‘ as Anzahl,
(
SELECT CASE
WHEN (ISNULL(IsGrossPrc, ‚N‘) = ‚Y‘)
THEN ISNULL(d.Price*(100-c.Discount)/100,ISNULL(c.Price,ISNULL(d.Price*(100-a.Discount)/100,ISNULL(a.Price,b.Price)))) / ((100.0 + (SELECT ISNULL(Rate,0) FROM OVTG WHERE Code = VatGourpSa)) / 100)
ELSE
ISNULL(d.Price*(100-c.Discount)/100,ISNULL(c.Price,ISNULL(d.Price*(100-a.Discount)/100,ISNULL(a.Price,b.Price))))
END
)
AS Preis,
“ as Rabatt
FROM ITM1 AS b
LEFT JOIN SPP1 AS a ON a.ItemCode = b.ItemCode and replace(a.CardCode,’*‘,“) = cast(b.PriceList as nvarchar) and a.FromDate <= GETDATE() and (a.ToDate+1 >= GETDATE() or a.ToDate IS NULL)
LEFT JOIN SPP2 AS c ON a.ItemCode = c.ItemCode and a.CardCode = c.CardCode and a.LINENUM = c.SPP1LNum and c.Amount = 1
LEFT JOIN ITM1 AS d ON a.ItemCode = d.ItemCode and a.ListNum = d.PriceList and ISNULL(d.Currency,“) != “ and ISNULL(d.Price,0) != 0
LEFT JOIN OPLN AS e ON b.PriceList = e.ListNum
LEFT JOIN OITM AS f ON b.ItemCode = f.ItemCode
WHERE b.ItemCode = ‚{0}‘ and (ISNULL(d.Price,0)!=0 or ISNULL(c.Price,0)!=0 or ISNULL(b.Price,0)!=0 or ISNULL(a.Price,0)!=0)
UNION
SELECT b.ItemCode AS Artikelnummer, b.PriceList as Preisliste, c.Amount as Anzahl,
(
SELECT CASE
WHEN (ISNULL(IsGrossPrc, ‚N‘) = ‚Y‘)
THEN ISNULL(d.Price*(100-c.Discount)/100,ISNULL(c.Price,0)) / ((100.0 + (SELECT ISNULL(Rate,0) FROM OVTG WHERE Code = VatGourpSa)) / 100)
ELSE
ISNULL(d.Price*(100-c.Discount)/100,ISNULL(c.Price,0))
END
)
AS Preis,
“ as Rabatt
FROM ITM1 AS b
LEFT JOIN SPP2 AS c ON c.ItemCode = b.ItemCode and replace(c.CardCode,’*‘,“) = cast(b.PriceList as nvarchar)
LEFT JOIN SPP1 AS a ON a.ItemCode = c.ItemCode and c.SPP1LNum = a.LINENUM and c.CardCode = a.CardCode
LEFT JOIN ITM1 AS d ON a.ItemCode = d.ItemCode and a.ListNum = d.PriceList and ISNULL(d.Currency,“) != “ and ISNULL(d.Price,0) != 0
LEFT JOIN OPLN AS e ON b.PriceList = e.ListNum
LEFT JOIN OITM AS f ON b.ItemCode = f.ItemCode
WHERE c.ItemCode = ‚{0}‘ and a.FromDate <= GETDATE() and (a.ToDate+1 >= GETDATE() or a.ToDate IS NULL) and (ISNULL(d.Price,0)!=0 or ISNULL(c.Price,0)!=0) and c.Amount > 1

Kundenspezifische Einzelpreise

getCustomerPrices

SELECT ‚{customers_cid}‘ AS customers_cid, a.ItemCode AS products_model,
ISNULL(b.Discount,ISNULL(c.Discount,ISNULL(a.Discount,0))) AS rabatt,
(
SELECT CASE
WHEN (ISNULL(IsGrossPrc, ‚N‘) = ‚Y‘)
THEN ISNULL(e.Price*(100-b.Discount)/100,ISNULL(b.Price,ISNULL(e.Price*(100-c.Discount)/100,ISNULL(c.Price,ISNULL(d.Price*(100-a.Discount)/100,a.Price))))) / ((100.0 + (SELECT ISNULL(Rate,0) FROM OVTG WHERE Code IN (SELECT VatGourpSa FROM OITM WHERE ItemCode=a.ItemCode))) / 100)
ELSE
ISNULL(e.Price*(100-b.Discount)/100,ISNULL(b.Price,ISNULL(e.Price*(100-c.Discount)/100,ISNULL(c.Price,ISNULL(d.Price*(100-a.Discount)/100,a.Price)))))
END
)
AS products_price,
(
SELECT CASE
WHEN (ISNULL(IsGrossPrc, ‚N‘) = ‚Y‘)
THEN ISNULL(e.Price,ISNULL(b.Price/(100-b.Discount)*100,ISNULL(b.Price,ISNULL(c.Price/(100-c.Discount)*100,ISNULL(c.Price,ISNULL(d.Price,ISNULL(a.Price/(100-a.Discount)*100,a.Price))))))) / ((100.0 + (SELECT ISNULL(Rate,0) FROM OVTG WHERE Code IN (SELECT VatGourpSa FROM OITM WHERE ItemCode=a.ItemCode))) / 100)
ELSE
ISNULL(e.Price,ISNULL(b.Price/(100-b.Discount)*100,ISNULL(b.Price,ISNULL(c.Price/(100-c.Discount)*100,ISNULL(c.Price,ISNULL(d.Price,ISNULL(a.Price/(100-a.Discount)*100,a.Price)))))))
END
)
AS products_original_price,
‚1‘ as amount
FROM OSPP as a
LEFT JOIN ITM1 AS d ON a.ItemCode = d.ItemCode and a.ListNum = d.PriceList and ISNULL(d.Price,0) != 0 and ISNULL(d.Currency,“) != “
LEFT JOIN SPP1 AS c ON a.ItemCode = c.ItemCode and a.CardCode = c.CardCode and (c.FromDate <= GETDATE() or c.FromDate IS NULL) and (c.ToDate+1 >= GETDATE() or c.ToDate IS NULL)
LEFT JOIN SPP2 AS b ON a.ItemCode = b.ItemCode and a.CardCode = b.CardCode and b.SPP1LNum = c.LINENUM and b.Amount = 1
LEFT JOIN ITM1 AS e ON a.ItemCode = e.ItemCode and c.ListNum = e.PriceList and ISNULL(e.Price,0) != 0 and ISNULL(e.Currency,“) != “
LEFT JOIN OPLN AS f ON a.ListNum = f.ListNum
WHERE a.CardCode = ‚{customers_cid}‘
UNION
SELECT a.CardCode AS customer_cid, a.ItemCode AS products_model, b.Discount AS rabatt,
(
SELECT CASE
WHEN (ISNULL(IsGrossPrc, ‚N‘) = ‚Y‘)
THEN ISNULL(e.Price*(100-b.Discount)/100,b.Price) / ((100.0 + (SELECT ISNULL(Rate,0) FROM OVTG WHERE Code IN (SELECT VatGourpSa FROM OITM WHERE ItemCode=a.ItemCode))) / 100)
ELSE
ISNULL(e.Price*(100-b.Discount)/100,b.Price)
END
)
AS products_price,
(
SELECT CASE
WHEN (ISNULL(IsGrossPrc, ‚N‘) = ‚Y‘)
THEN ISNULL(e.Price,ISNULL(b.Price/(100-b.Discount)*100,b.Price)) / ((100.0 + (SELECT ISNULL(Rate,0) FROM OVTG WHERE Code IN (SELECT VatGourpSa FROM OITM WHERE ItemCode=a.ItemCode))) / 100)
ELSE
ISNULL(e.Price,ISNULL(b.Price/(100-b.Discount)*100,b.Price))
END
)
AS products_original_price,
b.Amount as amount
FROM OSPP as a
LEFT JOIN ITM1 AS d ON a.ItemCode = d.ItemCode and a.ListNum = d.PriceList and ISNULL(d.Price,0) != 0 and ISNULL(d.Currency,“) != “
LEFT JOIN SPP1 AS c ON a.ItemCode = c.ItemCode and a.CardCode = c.CardCode
LEFT JOIN SPP2 AS b ON a.ItemCode = b.ItemCode and a.CardCode = b.CardCode and b.SPP1LNum = c.LINENUM and b.Amount > 1
LEFT JOIN ITM1 AS e ON a.ItemCode = e.ItemCode and c.ListNum = e.PriceList and ISNULL(e.Price,0) != 0 and ISNULL(e.Currency,“) != “
LEFT JOIN OPLN AS f ON a.ListNum = f.ListNum
WHERE b.CardCode = ‚{customers_cid}‘ and (c.FromDate <= GETDATE() or c.FromDate IS NULL) and (c.ToDate+1 >= GETDATE() or c.ToDate IS NULL)

getCustomersProductsgroupDiscount

SELECT '{customer_cid}' AS customers_cid, c.ItemCode AS products_model, b.Discount AS rabatt,
	(
		SELECT CASE
			WHEN (ISNULL(IsGrossPrc, 'N') = 'Y')
				THEN ISNULL(e.Price,0) * (100-ISNULL(b.Discount,0)) / 100 / ((100.0  + (SELECT ISNULL(Rate,0) FROM OVTG WHERE Code = VatGourpSa )) / 100)
			ELSE
				ISNULL(e.Price,0) * (100-ISNULL(b.Discount,0)) / 100
		END
	)
	AS products_price,
			
	(
		SELECT CASE
			WHEN (ISNULL(IsGrossPrc, 'N') = 'Y')
				THEN ISNULL(e.Price,0) / ((100.0  + (SELECT ISNULL(Rate,0) FROM OVTG WHERE Code = VatGourpSa)) / 100)
			ELSE
				ISNULL(e.Price,0)
		END
	)
	AS products_original_price,
			
	'1' AS amount
FROM OEDG AS a
LEFT JOIN EDG1 AS b ON a.AbsEntry = b.AbsEntry
LEFT JOIN OITM AS c ON b.ObjKey = c.ItemCode
LEFT JOIN OCRD AS d ON a.ObjCode = d.CardCode
LEFT JOIN ITM1 AS e ON c.ItemCode = e.ItemCode AND d.ListNum = e.PriceList
LEFT JOIN OPLN AS f ON d.ListNum = f.ListNum
WHERE a.ObjType = 2 AND a.ObjCode = '{customer_cid}' AND b.ObjType = 4 AND a.ValidFor = 'Y'
	AND (a.ValidForm <= GETDATE() OR a.ValidForm IS NULL) AND (a.ValidTo+1 >= GETDATE() OR a.ValidTo IS NULL)
	AND e.Currency IS NOT NULL

UNION

SELECT '{customer_cid}' AS customers_cid, c.ItemCode AS products_model, b.Discount AS rabatt,
	(
		SELECT CASE
			WHEN (ISNULL(IsGrossPrc, 'N') = 'Y')
				THEN ISNULL(e.Price,0) * (100-ISNULL(b.Discount,0)) / 100 / ((100.0  + (SELECT ISNULL(Rate,0) FROM OVTG WHERE Code = VatGourpSa )) / 100)
			ELSE
				ISNULL(e.Price,0) * (100-ISNULL(b.Discount,0)) / 100
		END
	)
	AS products_price,
			
	(
		SELECT CASE
			WHEN (ISNULL(IsGrossPrc, 'N') = 'Y')
				THEN ISNULL(e.Price,0) / ((100.0  + (SELECT ISNULL(Rate,0) FROM OVTG WHERE Code = VatGourpSa)) / 100)
			ELSE
				ISNULL(e.Price,0)
		END
	)
	AS products_original_price,
			
	'1' AS amount
FROM OEDG AS a
LEFT JOIN EDG1 AS b ON a.AbsEntry = b.AbsEntry
LEFT JOIN OITM AS c ON b.ObjKey = CAST(c.ItmsGrpCod AS nvarchar) 
LEFT JOIN OCRD AS d ON a.ObjCode = d.CardCode
LEFT JOIN ITM1 AS e ON c.ItemCode = e.ItemCode AND d.ListNum = e.PriceList
LEFT JOIN OPLN AS f ON d.ListNum = f.ListNum
WHERE a.ObjType = 2 AND a.ObjCode = '{customer_cid}' AND b.ObjType = 52 AND a.ValidFor = 'Y'
	AND (a.ValidForm <= GETDATE() OR a.ValidForm IS NULL) AND (a.ValidTo+1 >= GETDATE() OR a.ValidTo IS NULL)
	AND e.Currency IS NOT NULL
	AND NOT EXISTS (SELECT 1 FROM EDG1 WHERE ObjType = 4 AND ObjKey = c.ItemCode AND AbsEntry = a.AbsEntry)

getCustomersGroupDiscount

SELECT '{customer_cid}' AS customers_cid, c.ItemCode AS products_model, b.Discount AS rabatt,
	(
		SELECT CASE
			WHEN (ISNULL(IsGrossPrc, 'N')  = 'Y')
				THEN ISNULL(e.Price,0) * (100-ISNULL(b.Discount,0)) / 100 / ((100.0  + (SELECT ISNULL(Rate,0) FROM OVTG WHERE Code = c.VatGourpSa)) / 100)
			ELSE
				ISNULL(e.Price,0) * (100-ISNULL(b.Discount,0)) / 100
		END
	)
	AS products_price,		
	(
		SELECT CASE
			WHEN (ISNULL(IsGrossPrc, 'N') = 'Y')
				THEN ISNULL(e.Price,0) / ((100.0  + (SELECT ISNULL(Rate,0) FROM OVTG WHERE Code = c.VatGourpSa)) / 100)
			ELSE
				ISNULL(e.Price,0)
		END
	)
	AS products_original_price,
			
	'1' AS amount
FROM OCRD AS d
LEFT JOIN OEDG AS a ON d.GroupCode = a.ObjCode
LEFT JOIN EDG1 AS b ON a.AbsEntry = b.AbsEntry
LEFT JOIN OITM AS c ON b.ObjKey = c.ItemCode
LEFT JOIN ITM1 AS e ON c.ItemCode = e.ItemCode AND d.ListNum = e.PriceList
LEFT JOIN OPLN AS f ON d.ListNum = f.Listnum
WHERE a.ObjType = 10 AND d.CardCode = '{customer_cid}' AND b.ObjType = 4 AND a.ValidFor = 'Y'
	AND (a.ValidForm <= GETDATE() OR a.ValidForm IS NULL) AND (a.ValidTo+1 >= GETDATE() OR a.ValidTo IS NULL)
	AND e.Currency IS NOT NULL

UNION

SELECT '{customer_cid}' AS customers_cid, c.ItemCode AS products_model, b.Discount AS rabatt,
	(
		SELECT CASE
			WHEN (ISNULL(IsGrossPrc, 'N')  = 'Y')
				THEN ISNULL(e.Price,0) * (100-ISNULL(b.Discount,0)) / 100 / ((100.0  + (SELECT ISNULL(Rate,0) FROM OVTG WHERE Code = c.VatGourpSa)) / 100)
			ELSE
				ISNULL(e.Price,0) * (100-ISNULL(b.Discount,0)) / 100
		END
	)
	AS products_price,		
	(
		SELECT CASE
			WHEN (ISNULL(IsGrossPrc, 'N') = 'Y')
				THEN ISNULL(e.Price,0) / ((100.0  + (SELECT ISNULL(Rate,0) FROM OVTG WHERE Code = c.VatGourpSa)) / 100)
			ELSE
				ISNULL(e.Price,0)
		END
	)
	AS products_original_price,
			
	'1' AS amount
FROM OCRD AS d
LEFT JOIN OEDG AS a ON d.GroupCode = a.ObjCode
LEFT JOIN EDG1 AS b ON a.AbsEntry = b.AbsEntry
LEFT JOIN OITM AS c ON b.ObjKey = CAST(c.ItmsGrpCod AS nvarchar)
LEFT JOIN ITM1 AS e ON c.ItemCode = e.ItemCode AND d.ListNum = e.PriceList
LEFT JOIN OPLN AS f ON d.ListNum = f.Listnum
WHERE a.ObjType = 10 AND d.CardCode = '{customer_cid}' AND b.ObjType = 52 AND a.ValidFor = 'Y'
	AND (a.ValidForm <= GETDATE() OR a.ValidForm IS NULL) AND (a.ValidTo+1 >= GETDATE() OR a.ValidTo IS NULL)
	AND e.Currency IS NOT NULL
	AND NOT EXISTS (SELECT 1 FROM EDG1 WHERE ObjType = 4 AND ObjKey = c.ItemCode AND AbsEntry = a.AbsEntry)

Mit folgenden SQL Befehlen werden die kundenspezifischen Einzelpreise aus SAP ermittelt. Lassen Sie diese von Ihrem SAP Betreuer prüfen.

Beachten Sie bitte, das die Datensatzmenge extrem groß werden kann, wenn man die Kunden mit den Artikeln multipliziert. Dadurch kann ein Abgleich viele Stunden benötigen. Auch muss das Hosting des Shops entsprechende Lasten abfangen können.

Besonderheiten

Artikelnummer Beschränkungen bei Shopware 5

Shopware schränkt die Artikelnummern ein, welche verwendet werden können. Die Artikelnummer muss aus mindestens einer 4-stelligen Mischung aus Buchstaben und Zahlen angelegt werden, darf im System nur einmal verwendet werden und muss immer mit einem Buchstaben beginnen!

Erlaubt sind:

  • Die alphanumerischen Zeichen: 0-9 A-Z

  • folgende Sonderzeichen: . – _

Zeichensatz der sync4 Datenbank

Entsprechende einschränken sind zu beachten.

Zusätzliche Anpassungen

Etwaig benötigte Anpassungen für sync4 und der Warenwirtschaft sind kostenpflichtige Dienstleistungen und können in einem späteren Angebot definiert werden.

Die Erweiterung kundenspezifische Einzelpreise ist ein kostenpflichtiges Modul für sync4. Für die Verwendung von kundenspezifischen Einzelpreisen wird ein Plugin im Shopware Shop benötigt. Shopware 5: Shopware 6: Die Reihenfolge ist definiert anhand der aufgelisteten SQL Befehle.

Abweichende Sonderzeichen können nicht gespeichert werden, in diesem Fall wird eine Warnung angezeigt. Weitere Informationen dazu gibt es auch in der Dokumentation von Shopware:

Latin1_general_CI_AS ()

http://s.sync4.de/profihost
https://www.sync4.de/voraussetzungen/
https://www.sync4.de/leitfaden/
https://store.shopware.com/swaguserpricef/kundenspezifische-preise.html
https://store.shopware.com/vio8752425629335/kundenspezifische-preise.html
https://docs.shopware.com/de/shopware-5-de/produkte-und-kategorien/produkte-anlegen#aufbau-der-artikelnummern-in-shopware
https://en.wikipedia.org/wiki/ISO/IEC_8859-1