HVS32 SAP RFC Interface (Polling): Unterschied zwischen den Versionen

Aus Wiki - Heidler Strichcode GmbH
Zur Navigation springen Zur Suche springen
Zeile 1: Zeile 1:
[[de:HVS32_SAP_RFC_Schnittstelle_(Automatik-Polling)]]
+
[[en:HVS32_SAP_RFC_Interface_(Polling)]]
  
= Voraussetzungen =
+
= requirements =
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
| DGS-Version || 3.6.0.550 oder höher
+
| DGS-Version || 3.6.0.550 or higher
 
|-
 
|-
 
| DGS-Plugins || HVS32Client, SAP RFC Server
 
| DGS-Plugins || HVS32Client, SAP RFC Server
Zeile 10: Zeile 10:
  
  
= Funktionsbeschreibung =
+
= Functional description =
Der DataGatewayServer (DGS) nutzt für die Kommunikation mit einem SAP System die SAP Bibliothek "JCo" und agiert beim Automatik Polling als JCo Server-Programm.<br>
+
The DataGatewayServer (DGS) uses the SAP library "JCo" for communication with an SAP system and acts as a JCo server program during automatic polling.<br>
  
Der DGS ist die zentrale Kommunikationseinheit, über die sämtliche Daten zwischen dem Versandsystem und dem SAP-System ausgetauscht werden. Er läuft in Form eines Dienstes auf einem Windows-Server.<br>
+
The DGS is the central communication unit through which all data is exchanged between the shipping system and the SAP system. It runs in the context of a service on a Windows server.<br>
  
Es können beliebige RFC Funktionen im DGS implementiert werden, welche von einem RFC-Client (SAP) aus aufgerufen werden. <br>
+
Any RFC functions can be implemented in the DGS, which are called from an RFC client (SAP). <br>
  
Je HVS32 Funktion muss ein separater RFC Baustein genutzt werden. Die Struktur des RFC-Bausteins (Felder, Tabellen, Strukturen) ohne Implementierung muss im SAP System auf einem Applikationsserver für den DGS verfügbar sein - da die Metadaten der RFC Bausteine bei Systemstart abgerufen werden. <br>
+
A separate RFC module must be used for each HVS32 function. The structure of the RFC module (fields, tables, structures) without implementation must be available in the SAP system on an application server for the DGS - since the metadata of the RFC modules are retrieved at system startup. <br>
  
Der DGS registriert sich selbst unter einer Programm-ID an einem SAP Gateway (nicht für ein spezifisches SAP-System) und wartet auf eingehende RFC-Aufrufe.<br>
+
The DGS registers itself under a program ID at a SAP gateway (not for a specific SAP system) and waits for incoming RFC calls.<br>.
  
Wenn ein RFC-Aufruf von einem beliebigen SAP-System an dieses SAP Gateway mit der Option "Verbindung mit einem bereits registrierten Programm" (mit der selben Programm-ID) übermittelt wird, findet die Verbindung mit dem DGS statt.<br>
+
If an RFC call is transmitted from any SAP system to this SAP Gateway with the option "Connection with an already registered program" (with the same program ID), the connection with the DGS takes place.<br>.
  
Nach dem Ausführen einer RFC-Funktion wartet der DGS auf weitere RFC-Aufrufe vom selben oder einem anderen SAP-System.<br>
+
After executing an RFC function, the DGS waits for further RFC calls from the same or another SAP system.<br>.
  
Im Falle einer unterbrochenen oder beendeten RFC-Verbindung registriert sich der DGS automatisch wieder am selben SAP Gateway unter der selben Programm-ID.
+
In the event of an interrupted or terminated RFC connection, the DGS automatically re-registers with the same SAP gateway under the same program ID.
  
 
<gallery>
 
<gallery>
RFCServerCentralSAPGateway.png|DGS SAP/RFC Server an zentralem SAP Gateway
+
RFCServerCentralSAPGateway.png|DGS SAP/RFC server at central SAP gateway.
 
</gallery>
 
</gallery>
  
= Notwendige SAP-Komponenten/-Parameter =
+
= Required SAP components/parameters =
* neueste Version 3 der SAP Bibliothek Java Connector "JCo" in 64Bit
+
* latest version 3 of SAP library Java Connector "JCo" in 64Bit.
* SAP GUI Installation auf dem Server, auf welchem der DataGatewayServer installiert ist - alternativ eine manuelle Anpassung der %SystemRoot%\system32\drivers\etc\services und %SystemRoot%\system32\drivers\etc\hosts
+
* SAP GUI installation on the server where the DataGatewayServer is installed - alternatively a manual adjustment of %SystemRoot%\system32\drivers\etc\services and %SystemRoot%\system32\drivers\etc\hosts.
* eine definierte Destination mit Verbindungstyp T (TCP/IP-Verbindung) im SAP-System über die Transaktion SM59 ([[#Destination_.C3.BCber_SM59_definieren|siehe Destination über SM59 definieren]])
+
* a defined destination with connection type T (TCP/IP connection) in the SAP system via transaction SM59  
 +
([[#Destination_.C3.BCber_SM59_definieren|siehe Destination über SM59 definieren]])
 
<br>
 
<br>
folgende Parameter werden vom DGS benötigt, um sich mit einer Programm-ID an einem SAP Gateway zu registrieren:
+
the following parameters are required by the DGS to register with a program ID at a SAP gateway:
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! Parameter !! Beschreibung
+
! Parameter !! Description
 
|-
 
|-
| jco.server.gwhost || SAP-Gateway an welchem die Funktionsbausteine registriert werden
+
| jco.server.gwhost || SAP gateway at which the function modules are registered
 
|-
 
|-
| jco.server.gwserv || SAP-Gateway-Service (Port) der genutzt wird (z.B. sapgw00)
+
| jco.server.gwserv || SAP gateway service (port) which is used (e.g. sapgw00)
 
|-
 
|-
| jco.server.progid || Programm-ID aus der SM59 unter welcher die Registrierung stattfindet
+
| jco.server.progid || program ID from SM59 under which the registration takes place
 
|-
 
|-
| jco.server.connection_count || Anzahl gleichzeitiger Verbindungen, die später von SAP zum Aufruf genutzt werden können
+
| jco.server.connection_count || Number of simultaneous connections that can be used later by SAP to call the program
 
|-
 
|-
| jco.client.ashost || SAP-Applikation-Server auf welchem sich die Struktur des RFC Bausteins befindet
+
| jco.client.ashost || SAP application server on which the structure of the RFC block is located
 
|-
 
|-
| jco.client.sysnr || SAP System Nr
+
| jco.client.sysnr || SAP system no.
 
|-
 
|-
| jco.client.client || Mandanten ID (SAP)
+
| jco.client.client || Client ID (SAP)
 
|-
 
|-
| jco.client.user || SAP-Benutzer mit Rechten zum Ausführen von RFC
+
| jco.client.user || SAP user with rights to execute RFC
 
|-
 
|-
| jco.client.passwd || Passwort
+
| jco.client.passwd || Password
 
|-
 
|-
| rfcfunctions || Liste von Funktionsbausteinen, die vom DataGatewayServer dem SAP bereitgestellt werden
+
| rfcfunctions || List of function modules provided by the DataGatewayServer to SAP
 
|}
 
|}
Falls für clientseitige RFC-Aufrufe eine Lastverteilung (SAP Message Server) auf Seiten von SAP genutzt wird, muss anstelle der Parameter ashost und sysnr folgendes konfiguriert werden:
+
If load balancing (SAP Message Server) is used on the SAP side for client-side RFC calls, the following must be configured instead of the ashost and sysnr parameters:
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! Parameter !! Beschreibung
+
! Parameter !! Description
 
|-
 
|-
| jco.client.mshost || IP oder Name des SAP Message Server
+
| jco.client.mshost || IP or name of the SAP Message Server
 
|-
 
|-
| jco.client.r3name || System ID des SAP-Systems
+
| jco.client.r3name || System ID of the SAP system
 
|-
 
|-
| jco.client.group || Name der SAP-Servergruppe
+
| jco.client.group || Name of the SAP server group
 
|}
 
|}
  
= Verfügbare HVS32 Funktionen =
+
= Available HVS32 functions =
Artikel-Daten und Gefahrgut-Informationen müssen im RFC Baustein als Table oder Struct definiert werden, da diese in einer 1:n Beziehung zu den Packstückdaten stehen.<br>
+
Item data and dangerous goods information must be defined as Table or Struct in the RFC module, as they have a 1:n relationship to the package data.<br>
Alle Parameter, welche an das HVS32 gesendet werden sollen, müssen in die Import-Parameter geschrieben werden. Die Rückmeldung aus dem HVS32 erfolgt in den Export-Parametern. Die Kommunikation ist bidirektional, d.h. die Rückmeldung erfolgt synchron in der gleichen Transaktion wie die Anfrage.<br>
+
All parameters which are to be sent to the HVS32 must be written into the import parameters. The feedback from the HVS32 is done in the export parameters. The communication is bidirectional, i.e. the feedback is done synchronously in the same transaction as the request.<br>
  
Bitte beachten Sie, dass die Feld-Beschreibungen sich nur auf einen Standard beziehen, welcher als Vorschlag für die Schnittstelle dienen soll. Funktionsnamen, Feldnamen /-längen /-formate können prinzipiell abweichen, müssen in diesem Fall jedoch individuell betrachtet/analysiert werden.<br>
+
Please note that the field descriptions refer only to a standard, which should serve as a suggestion for the interface. Function names, field names /-lengths /-formats may differ in principle, but in this case must be considered/analyzed individually.<br>
 
<br>
 
<br>
'''[[HVS32_Automatik-Polling_Funktionen|Verfügbare HVS32 Funktionen]]'''
+
'''[[HVS32_Automatic_Polling_Functions|Available HVS32 functions]]'''
  
= Beispiele =
+
= Examples =
 
<div class="toccolours mw-collapsible mw-collapsed" style="width:60%; overflow:auto;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="width:60%; overflow:auto;">
<div style="font-weight:bold;line-height:1.6;">Beispiel für eine RFC Baustein Struktur für die VersandDatenAnfrage</div>
+
<div style="font-weight:bold;line-height:1.6;">Example of RFC module structure for shippingDataRequest</div>
 
<div class="mw-collapsible-content">
 
<div class="mw-collapsible-content">
 
<source>
 
<source>
Zeile 230: Zeile 231:
  
 
= FAQ / Troubleshooting =
 
= FAQ / Troubleshooting =
=== Destination über SM59 definieren ===
+
=== Define destination via SM59 ===
Zur Einrichtung einer RFC-Verbindung im SAP, welche für die Anbindung des HVS32 Versandsystems gedacht ist, gehen Sie bitte wie folgt vor:
+
To set up an RFC connection in SAP, which is intended for the connection of the HVS32 shipping system, please proceed as follows:
# Wechseln Sie zur Transaktion sm59
+
# Go to transaction sm59
# Wählen Sie den Typ T (TCP/IP connections) '''[Abb.1]'''
+
# Select the type T (TCP/IP connections) '''[Abb.1]'''
# Erstellen Sie mit dem Button "create" eine neue Verbindung
+
# Create a new connection with the "create" button
# Geben Sie eine RFC Destination an (z.B. "RFC_HVS32")
+
# Specify an RFC destination (e.g. "RFC_HVS32")
# Stellen Sie den Aktivierungstyp auf "Registriertes Serverprogramm"
+
# Set the activation type to "Registered server program
# Legen Sie eine Programm ID fest (z.B. "HVS32") '''[Abb.2]'''
+
# Set a program ID (e.g. "HVS32") '''[Abb.2]'''
# Öffnen Sie den Reiter "MDMP & Unicode"
+
# Open the "MDMP & Unicode" tab
# Stellen Sie dort die Art der Kommunikation auf "Unicode" '''[Abb.3]'''
+
# Set the communication type to "Unicode" '''[Abb.3]''''
# Speichern Sie die Einstellungen
+
# Save the settings
# Sie können die Verbindung über "Connection Test" prüfen, sobald auf dem Zielsystem der DataGatewayServer installiert und als Dienst gestartet ist '''[Abb.4]'''
+
# You can test the connection via "Connection Test" once the DataGatewayServer is installed on the target system and started as a service '''[Abb.4]'''
  
 
<gallery>
 
<gallery>

Version vom 6. August 2021, 11:40 Uhr


requirements

DGS-Version 3.6.0.550 or higher
DGS-Plugins HVS32Client, SAP RFC Server


Functional description

The DataGatewayServer (DGS) uses the SAP library "JCo" for communication with an SAP system and acts as a JCo server program during automatic polling.

The DGS is the central communication unit through which all data is exchanged between the shipping system and the SAP system. It runs in the context of a service on a Windows server.

Any RFC functions can be implemented in the DGS, which are called from an RFC client (SAP).

A separate RFC module must be used for each HVS32 function. The structure of the RFC module (fields, tables, structures) without implementation must be available in the SAP system on an application server for the DGS - since the metadata of the RFC modules are retrieved at system startup.

The DGS registers itself under a program ID at a SAP gateway (not for a specific SAP system) and waits for incoming RFC calls.
.

If an RFC call is transmitted from any SAP system to this SAP Gateway with the option "Connection with an already registered program" (with the same program ID), the connection with the DGS takes place.
.

After executing an RFC function, the DGS waits for further RFC calls from the same or another SAP system.
.

In the event of an interrupted or terminated RFC connection, the DGS automatically re-registers with the same SAP gateway under the same program ID.

Required SAP components/parameters

  • latest version 3 of SAP library Java Connector "JCo" in 64Bit.
  • SAP GUI installation on the server where the DataGatewayServer is installed - alternatively a manual adjustment of %SystemRoot%\system32\drivers\etc\services and %SystemRoot%\system32\drivers\etc\hosts.
  • a defined destination with connection type T (TCP/IP connection) in the SAP system via transaction SM59

(siehe Destination über SM59 definieren)
the following parameters are required by the DGS to register with a program ID at a SAP gateway:

Parameter Description
jco.server.gwhost SAP gateway at which the function modules are registered
jco.server.gwserv SAP gateway service (port) which is used (e.g. sapgw00)
jco.server.progid program ID from SM59 under which the registration takes place
jco.server.connection_count Number of simultaneous connections that can be used later by SAP to call the program
jco.client.ashost SAP application server on which the structure of the RFC block is located
jco.client.sysnr SAP system no.
jco.client.client Client ID (SAP)
jco.client.user SAP user with rights to execute RFC
jco.client.passwd Password
rfcfunctions List of function modules provided by the DataGatewayServer to SAP

If load balancing (SAP Message Server) is used on the SAP side for client-side RFC calls, the following must be configured instead of the ashost and sysnr parameters:

Parameter Description
jco.client.mshost IP or name of the SAP Message Server
jco.client.r3name System ID of the SAP system
jco.client.group Name of the SAP server group

Available HVS32 functions

Item data and dangerous goods information must be defined as Table or Struct in the RFC module, as they have a 1:n relationship to the package data.
All parameters which are to be sent to the HVS32 must be written into the import parameters. The feedback from the HVS32 is done in the export parameters. The communication is bidirectional, i.e. the feedback is done synchronously in the same transaction as the request.

Please note that the field descriptions refer only to a standard, which should serve as a suggestion for the interface. Function names, field names /-lengths /-formats may differ in principle, but in this case must be considered/analyzed individually.

Available HVS32 functions

Examples

Example of RFC module structure for shippingDataRequest
'Z_HVS_VERSANDDATENANFRAGE'

IMPORTING
  PACKSTUECK STRUCTURE
    KUNDEN_NR CHAR(20)
    ZIEL_ADR_NAME1 CHAR(50)
    ZIEL_ADR_NAME2 CHAR(50)
    ZIEL_ADR_NAME3 CHAR(50)
    ZIEL_ADR_STRASSE CHAR(50)
    ZIEL_ADR_LKZ CHAR(5)
    ZIEL_ADR_PLZ CHAR(10)
    ZIEL_ADR_ORT CHAR(50)
    ZIEL_ADR_REGION CHAR(20)
    ZIEL_ADR_BAHNHOF CHAR(30)
    ANSPRECHPARTNER CHAR(20)
    TELEFON_NR CHAR(20)
    FAX_NR CHAR(20)
    UST_ID_NR CHAR(20)
    ILN_NR CHAR(20)
    AUFTRAGGEBER_ID CHAR(10)
    VERSANDART_ID CHAR(10)
    AVIS_HINWEIS1 CHAR(30)
    AVIS_HINWEIS2 CHAR(30)
    AVIS_ZUSATZ1 CHAR(20)
    AVIS_ZUSATZ2 CHAR(20)
    LIEFERSCHEIN_NR CHAR(40)
    AUFTRAG_NR CHAR(20)
    BESTELL_NR CHAR(20)
    WARENWERT CHAR(19)
    WW_WAEHRUNG CHAR(3)
    NACHNAHME CHAR(19)
    NN_WAEHRUNG CHAR(3)
    NN_VERMERK CHAR(1)
    NN_VERWENDUNG CHAR(30)
    VERSICHERUNGSWERT CHAR(19)
    VW_WAEHRUNG CHAR(3)
    FRANKATUR_KENNUNG CHAR(10)
    ZAHLUNGSBEDIGNUNG CHAR(10)
    ZB_ZOLL CHAR(1)
    FRACHTFUEHRER_KD_NR CHAR(10)
    SONDERDIENSTE CHAR(30)
    SENDUNGS_INHALT CHAR(30)
    TERMIN_ART CHAR(1)
    TERMIN_DATUM CHAR(10)
    TERMIN_ZEIT CHAR(5)
    NEUTABSENDER_NAME1 CHAR(30)
    NEUTABSENDER_NAME2 CHAR(30)
    NEUTABSENDER_NAME3 CHAR(30)
    NEUTABSENDER_STRASSE CHAR(30)
    NEUTABSENDER_LKZ CHAR(3)
    NEUTABSENDER_PLZ CHAR(10)
    NEUTABSENDER_ORT CHAR(30)
    RECHNUNGS_EMPF_NAME1 CHAR(50)
    RECHNUNGS_EMPF_NAME2 CHAR(50)
    RECHNUNGS_EMPF_NAME3 CHAR(50)
    RECHNUNGS_EMPF_STRASSE CHAR(50)
    RECHNUNGS_EMPF_LKZ CHAR(5)
    RECHNUNGS_EMPF_PLZ CHAR(10)
    RECHNUNGS_EMPF_ORT CHAR(50)
    POST_LEITCODE CHAR(15)
    POST_ZIEL_FRACHTZENT CHAR(5)
    FRACHT_BRIEF CHAR(20)
    GEWICHT CHAR(9)
    NETTO_GEWICHT CHAR(9)
    PACK_STK_GES CHAR(10)
    PACK_STK_NR CHAR(10)
    VERPACKUNGSART CHAR(6)
    PACKSTUECK_LAENGE CHAR(10)
    PACKSTUECK_BREITE CHAR(10)
    PACKSTUECK_HOEHE CHAR(10)
    PACKPLATZ CHAR(10)
    PACKSTUECK_ID CHAR(15)
    ANZAHL_ARTIKEL CHAR(10)
    ZUSATZ_ZEILE1 CHAR(150)
    ZUSATZ_ZEILE2 CHAR(150)
    FREI_AVIS1 CHAR(62)
    FREI_AVIS2 CHAR(62)
    HV_ELEKTRONIK_ARTIKEL CHAR(1)
    EMPF_EMAILADRESSE CHAR(100)
    KOSTENSTELLE CHAR(30)
    DRUCKERNAME CHAR(30)
  DGPOSITIONS STRUCTURE
    UNNR CHAR(4)
    KLASSE CHAR(6)
    VPG CHAR(5)
    K_CODE CHAR(5)
    BEZEICHNUNG CHAR(110)
    MENGE CHAR(9)
    BEGRENZTE_MENGE CHAR(1)
    VERP_ANZAHL CHAR(10)
    VERPACKUNGSART CHAR(8)
    NEBEN_GEFAHR CHAR(20)
    BUCHST640 CHAR(1)
    MENGEN_EINHEIT CHAR(2)
    BEFOERD_KAT CHAR(10)
    FAKTOR CHAR(10)
    NETTO_EXPL_MASSE CHAR(9)
    TUNNEL_B_CODE CHAR(10)
    FREIGEST_MENGE CHAR(1)
    FF_CODE CHAR(20)
  DELIVERYPOSITIONS STRUCTURE
    ANZAHLPOSETIKETTEN CHAR()
    ARTIKELBTNNR CHAR(25)
    ARTIKELEAN CHAR(20)
    ARTIKELEINHEIT CHAR(10)
    ARTIKELGEWICHT CHAR(9)
    ARTIKELMENGE CHAR(9)
    ARTIKELSOLLMENGE CHAR(9)
    ARTIKELTEXT1 CHAR(100)
    ARTIKELTEXT2 CHAR(100)
    ARTIKELTEXT3 CHAR(100)
    ARTIKELTEXT4 CHAR(100)
    ARTIKELWAEHRUNG CHAR(3)
    ARTIKELWERT CHAR(9)
    CHARGEFLAG CHAR(1)
    KUNDENARTIKELNR CHAR(50)
    KUNDENBESTELLNR CHAR(50)
    POSAUFTRAGNR CHAR(50)
    POSITIONNR CHAR(40)
    POSLIEFERNR CHAR(40)
    SERIENNR CHAR(30)
    URSPRUNGLAND CHAR(2)
    ARTIKELGRUPPE CHAR(50)
    ARTIKELSERVICES CHAR(100)
    ARTIKELVOLUMEN CHAR(9)


EXPORTING
  PACKSTUECKRUECK STRUCTURE
    TRACKING_NR CHAR(35)
    VERSAND_SENDUNGS_NR CHAR(20)
    DRUCK_DATE_TIME CHAR(10)
    AUSGANG_DATE_TIME CHAR(10)
    GEBUEHR CHAR(19)
    GEBUEHR_WAEHRUNG CHAR(3)
    FEHLERTEXT1 CHAR(200)
    FEHLERTEXT2 CHAR(200)


}

FAQ / Troubleshooting

Define destination via SM59

To set up an RFC connection in SAP, which is intended for the connection of the HVS32 shipping system, please proceed as follows:

  1. Go to transaction sm59
  2. Select the type T (TCP/IP connections) [Abb.1]
  3. Create a new connection with the "create" button
  4. Specify an RFC destination (e.g. "RFC_HVS32")
  5. Set the activation type to "Registered server program
  6. Set a program ID (e.g. "HVS32") [Abb.2]
  7. Open the "MDMP & Unicode" tab
  8. Set the communication type to "Unicode" [Abb.3]'
  9. Save the settings
  10. You can test the connection via "Connection Test" once the DataGatewayServer is installed on the target system and started as a service [Abb.4]