home / infca / mb / SAP (navigation links) Ella amó esa noche como si fuera mortal
y él fue inmortal mientras duró esa noche

Lee Hollingdale | ODA RFC trace | Links | End

Parlant amb el SAP des MB


What is it ?

SAP is the largest Enterprise Resource Planning (ERP) solution provider. SAP is actually the name of the company, officially SAP AG, based on the phrase Systeme, Anwendungen und Produkte in der Datenverarbeitung.

Systems Applications Products in Data Processing (SAP) is a client/server application that helps you manage your business processes in sales, materials management, and distribution. SAP has mainframe and UNIX solutions to support an interface for an EDI subsystem.

The R/3 product is their client-server solution for Enterprise Resource Planning. mySAP.com is the current offering. It is an evolution of R/3 bundled with a number of additional components, as CRM, Business Warehouse plus SAP's middleware platform, SAP NetWeaver.


Products

El XI es la eina de integració de moduls SAP, així com la única via de comunicació amb l'exterior.
Parla MQ i JMS amb el "Adapter for (SAP) XI" que porta el MB.

    .--------.           .--------.
    |        |           |        |
    |  SAP   |           |  SAP   |
    |        |           |        |
    .--------.           .--------.
        |                |        |
        |                |   XI   |
        |                |        |
        |                .--------.
        |                    |
        |                    |
  .-----------.        .-----------.
  |           |        |           |
  | Adapter   |        | Adapter   |
  | for mySAP |        | for XI    |
  |           |        |           |
  .-----------.        .-----------.

Detalls XI :

SAP Exchange Infrastructure (SAP XI) enables you to implement cross-system processes. It enables you to connect systems from different vendors (non-SAP and SAP) in different versions and implemented in different programming languages (Java, ABAP, and so on) to each other.


Detalls IDOC

url

SAP generates application data in the SAP Intermediate Document (IDOC) layout.

url

The connected systems transfer or receive IDocs through their IDoc RFC interface.

iDoc adapter

iDoc sample and links

SAP designed IDocs ("Intermediate Documents") for exactly this purpose -- for encapsulating, moving around, and processing just the sections of data needed for specific purposes.

url

An IDOC structure contains 1 DC segment and more DD segments. Length of DC is 524 bytes and all DDs are 1063 bytes (version 4 iDoc). The length of your message structure (referenced by DD.segnam) must be 1000 bytes. You have to fill up the DD header. This is very important because DD segnam describes which model the MRM uses. OK, but why 1695 bytes? When you get a simple IDOC from SAP it is 1695 bytes long because: MQSAPH - 108 DC - 524 DD - 1063
Tamaño IDOC

Un mensaje IDoc ALE típico que se ha enviado desde SAP al enlace WebSphere MQ para R3 consta de una cabecera MQMD, una cabecera MQSAPH y el propio IDoc ALE. El IDoc consta de estructuras de tamaño fijas:

url

MQSAPH fields - 12 parser's ! WS MB Information Center [*****] See Pager sample {com.ibm.etools.mft.samples.pager.res} & See Soccer Results sample ! {com.ibm.etools.mft.samples.soccer.res} [ VMware MB - c:\PF\ibm\ws\evtoolkit\eclipse\plugins\com ... ]

See Manipulating messages in the IDoc domain - url from SAP IDOC to XML and viceversa - url

Your best bet to answer this question before someone else does is to use AMQSBCG to dump a message produced by SAP.

IDOC Control type
10 10 TABNAM Name_of_table_structure 3 MANDT Client 16 DOCNUM IDoc_number 4 DOCREL SAP_Release_for_IDoc 2 STATUS Status_of_IDoc 1 DIRECT Direction_for_IDoc_transmission 1 OUTMOD Output_mode 1 EXPRSS Overriding_in_inbound_processing 1 TEST Test_flag 30 IDOCTYP Name_of_basic_type 30 CIMTYP Extension 30 MESTYP Logical_message_type 3 MESCOD Logical_message_code 3 MESFCT Logical_message_function 1 STD EDI_standard 6 STDVRS Version_of_EDI_standard 6 STDMES EDI_message_type 10 SNDPOR Sender_port 2 SNDPRT Partner_type_of_sender 2 SNDPFC Partner_function_of_sender 10 SNDPRN Partner_number_of_sender 21 SNDSAD IDoc_SADR_fields_in_total_Sender 70 SNDLAD Logical_address_of_sender 10 RCVPOR Receiver_port 2 RCVPRT Partner_type_of_recipient 2 RCVPFC Partner_function_of_recipient 10 RCVPRN Partner_number_of_recipient 21 RCVSAD IDoc_SADR_fields_in_total 70 RCVLAD Logical_address_of_recipient 8 CREDAT IDoc_creation_date 6 CRETIM IDoc_creation_time 14 REFINT Reference_to_interchange_file 14 REFGRP Reference_to_message_group 14 REFMES Reference_to_message 70 ARCKEY EDI_archive_key 20 524 x'20C SERIAL EDI_ALE_Serialization_field 8 532 x'214 DOCTYP IDoc_type
Campos de Estructura de control (DC)

Todos los campos se deben especificar y establecer. La sintaxis es:

<nombreraiz>.<NombreAnalizador>.<nombrecarpeta>.<nombrecampo>=

Por ejemplo:
SET "OutputRoot"."IDOC"."DC"."docnum" = '0000000000000001' ; /* 03 */ SET "OutputRoot"."IDOC"."DC"."idoctyp" = 'MATMAS01' ; /* 10 */

Los nombres de campo, que se deben especificar en orden, son:

1) tabnam 2) mandt 3) docnum 4) docrel 5) status 6) direct 7) outmod 8) exprss 9) test 10) idoctyp 11) cimtyp 12) mestyp 13) mescod 14) mesfct 15) std 16) stdvrs 17) stdmes 18) sndpor 19) sndprt 20) sndpfc 21) sndprn 22) sndsad 23) sndlad 24) rcvpor 25) rcvprt 26) rcvpfc 27) rcvprn 28) rcvsad 29) rcvlad 30) credat 31) cretim 32) refint 33) refgrp 34) refmes 35) arckey 36) serial

url

XMP to IDOC
SET OutputRoot.Properties.MessageDomain = 'MRM'; SET OutputRoot.Properties.MessageSet = 'PMFK4RK002001'; SET OutputRoot.Properties.MessageType = 'z2ddrrt000'; SET OutputRoot.Properties.MessageFormat='CWF'; SET OutputRoot.MQMD.Format = 'MQSTR'; SET OutputRoot.IDOC.DD[1].sdatatag.MRM.fn_code = InputBody.EAI_HEADER.CODE; SET OutputRoot.IDOC.DD[1].sdatatag.MRM.order_nmbr = InputBody.CREATE.ORDER_NMBR; SET OutputRoot.IDOC.DD[1].sdatatag.MRM.d_num = InputBody.CREATE.D_NMBR; SET OutputRoot.IDOC.DD[1].sdatatag.MRM.ad_nmbr = ' '; SET OutputRoot.IDOC.DD[1].sdatatag.MRM.ad_flag = InputBody.CREATE.FLAG; SET OutputRoot.IDOC.DD[1].sdatatag.MRM.email = InputBody.CREATE.EMAIL; SET OutputRoot.IDOC.DD[1].sdatatag.MRM.error_code = InputBody.EAI_HEADER.RESULT_CODE; SET OutputRoot.IDOC.DD[1].sdatatag.MRM.pad906 = ' ';

url

Obtencion del IDoc

url


SAP APIs

url


SAP and BI
.--------.-------. .------.---------. .-----------------------------------. | | | | | | | | | | | | | | | MQ | XI | | | Domino | Agent | <-----> | MB | Adapter | <-----> | Link | eXchange | SAP | | | | | | | | for R/3 | Infrastructure | | | | | | | | | | .--------.-------. .------.---------. .-----------------------------------.

The R3/Link product consists of an inbound server, reading IDOCs from an input queue and passing them into SAP, and an outbound server, reading IDOCs from SAP and writing them to an output queue. Both these apps run on the MQ machine, and make a TCP connection to the SAP system using SAP RFC calls.

MQ Series link for R/3 User Guide

MQ Series link for R/3 User Guide (on-line)

MQ Series Link for R/3 v 1.2 CSD03

Preguntes
SAP Adapter ubication
.------.---------. .--------. | | | | | | | SAP | (1) | | | MB | Adapter | <----------> | SAP | (1) XML sobre HTTP usando JCO RFC [1] | | | | | | | | | | .------.---------. .--------. .------. .---------.--------. | | | | | | | (2) | SAP | | | MB | <----------> | Adapter | SAP | (2) BAPI XML sobre MQ, o iDoc sobre MQ. JMS | | | | | | | | | | .------. .---------.--------.

What is RFC ? Remote Function Call
ICS had a "RFC trace" - does MB have anything similar ?

David : the adapter uses JCO to access LIBRFC32.DLL, the RFC API.

Yo prefiero el JCA adapter que viene con Broker 6.1 [emir]

Toolkit [6.1] + "SAP" ; [int]

SAP nodes licences

You get everything in the standard version and you are allowed to use them in "unit test" but to use them for real you have to pay an additional license fee for the sap nodes (they have a pid I believe). Their sales person should be able to work out a price. From the technical side nothing else has to be installed. In fact there is no direct checking or enforcement on our part in the code.
Regards, John.
John Reeve, WebSphere Message Broker Developer

Adding external software dependencies for SAP

SAP delivered files:

Download these files for your operating system from the SAP Service Marketplace, and save them to a directory, such as C:\SAP_LIB.

Set the location of the SAP prerequisite files using the following command:

mqsichangeproperties WBRK61_DEFAULT_BROKER -c EISProviders -o SAP -n jarsURL -v C:\SAP_LIB mqsichangeproperties WBRK61_DEFAULT_BROKER -c EISProviders -o SAP -n nativeLibs -v C:\SAP_LIB

To check that the values have been set correctly, run the following command:

mqsireportproperties WBRK61_DEFAULT_BROKER -c EISProviders -o SAP -r

MB v 6.1 "Message Flows", page 236 [244/1580]


Instalar el conector JCA (WMB 6.1) de SAP plataforma AIX

Pend8888

SAP_Input
SAP input node

The SAPInput node allows you to interact with SAP applications. For example, the SAPInput node monitors an SAP system for any new purchase orders. When a new purchase order occurs, the SAPInput node generates a message tree that represents the business object with the new purchase order details. The message tree is propagated to the Out terminal so that the rest of the message flow can use the data to update other systems, or to audit the changes.

MB v 6.1 "Message Flows", page 996 [1004/1580]

When you get a message, try it this way

  1. copy the Properties folder
  2. create the MQMD and then set any properties you might need in the MQMD
  3. copy the Data

Have you looked at the data coming into the flow with a trace node ? This will help you name the folders correctly ( get a trace of the root )

SAP_Request
SAP request node

The SAPRequest node allows you to interact with SAP applications. For example, the SAPRequest node requests information from a SAP Enterprise Information System (EIS). A customer business object is sent to SAP, causing SAP to retrieve information about a customer, such as an address and account details. The response information that is retrieved by the SAPRequest node can then be used by the rest of the message flow. The SAPRequest node can send and receive business data.

MB v 6.1 "Message Flows", page 1000 [1008/1580]

Dades que ens calen

Els samples diuen de fer servir :

SAP Inbound Adapter Configuration

Inbound adapters allow data to be passed from the EIS system to the MB.

Inbound parms
SAP Outbound Adapter Configuration

Outbound adapters allow data to be passed from the MB to the EIS system.

Outbound parms
SAP RFC trace settings
RFC trace parms
Toolkit samples

Open

  1. Help
  2. Samples gallery
  3. Technology samples
  4. Message Broker
  5. Transports and connectivity
  6. SAP connectivity
  7. 2 samples : Input & Request.

Lee Hollingdale

The Object Discovery Agent (ODA) and Bussiness Object Designer (BOD) are two design-time tools that can be used to extract metadata from the target system - in this case, SAP.

The ODA is the connector-specific component that connects to the targer system and then waits for requests to obtain metadata. The BOD connects to the ODA and requests metedata from it. The BOD displays the data returned, allowing the user to edit it if they wish, and then saves this metadata as XML schemas (.xsd files).

The ODA acts as an intermediary between BOD and SAP, and is used to extract IDoc metadata from the target SAP system.

ALE & iDoc

RFC & BAPI

SAP and WBI MB Integration for Dummies v0.pdf (?)
SAP and WebSphere Message Broker Integration for Beginners v1.2.pdf (?)


Amunt! Top Amunt!
MQ SAP link

The IBM MQSeries Link for SAP R/3 allows us to both put and get data into and out of SAP R/3 from and to other data sources and legacy applications. It consists of three parts:

The MQSeries SAP Link uses ALE to load SAP IDoc metadata into the MQSeries Integrator Formatter. This means that it can handle bidirectional IDoc formats.
A library of IDocs is provided and additional or customized IDocs can be loaded dynamically into the Formatter via the IDoc loader.

Using the MQSeries Integrator Version 1.0 , SG24-5386-00


SAP data required by ODA
MB v 6.1 & SAP
Wizard

Generates :

High-level steps :

Adapter Connection Wizard can be invoked from :

WMB61_Beta_Adapters.ppt


SAP ODA

miniSAP

Lola:\h:\SAP_SAG - Win & Linux

Transaccions (?) SAP

ST11 = see RFC trace


Links
RedBooks
Migrating the MQSeries Link for R3 to the MB Adapter Nodes for SAP
Una forma sencilla de aprender y practicar ABAP es instalar MiniSAP. MiniSAP es un release 4.6D de SAP totalmente funcional durante 1 mes (ampliable 90 días más) con el que practicar la creación de Reports, ALVs, módulos de función, Module Pool, etc.

Install How-To

Description, download & License Key

Requires : "SDN User id" & "Hardware key (HWID)"

ABAP
.
.

Ep ! Valid HTML 4.01!   Valid CSS! Escriu-me !
Updated : 12/01/2009.  
Uf !