SAP Adapter

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

You use the webMethods SAP Adapter to communicate with SAP

systems. The steps for establishing this communication are:

 Create an RFC Connection to SAP


 Create an SAP adapter service
 Run the adapter service
 You will configure a synchronous RFC connection with your SAP
system.
 1. Open a web browser and navigate to the Integration Server
administrator page located at <webMethods Integration Server
(localhost)>:5555.
 Expand the Adapters menu header on the left menu bar and click
the SAP Adapter… link.
 In the SAP Adapter Administration page click the Configure New
Connection link to create a new SAP Adapter Connection to your
SAP System. This starts a wizard that walks the user through
creating a new connection.
 4. Click the RFC connection link.
 The SAP adapter connection configuration page is now displayed.
This page has many fields that support many SAP deployment
architectures including clustered and SAP security. In this case, we
will configure a simple SAP RFC connection to one server
 Click the Save Connection link at the bottom of the page. This
saves the connection information and creates an SAP adapter
connection object that is viewable from the Software AG Designer.
 7. Enable the connection by clicking the No link under
the Enabled column. Click the OK button to confirm you want to
enable the connectio
 The SAP adapter connection should now be enabled.
 To see how the adapter connection is displayed in the IDE, go to
Software AG Designer. Right click the demoSAP package and
select Refresh. The package contents and structure should appear
as shown.
 Right click on the sap folder of your tutorial package as shown and
select New -> Adapter Service.
 The adapter service wizard will prompt you for a name for the new
service. We will be executing an SAP Remote Function Call (RFC)
to get a listing of companies that are in the SAP system. In
the Element name field, enter sapCompanyList and click Next >.
 In the Select Adapter Type dialog, select SAP Adapter and click
the Next > button.
 In the Select an Adapter Connection Alias dialog, you will see
two connections displayed. The emptyConnection is used for
advanced purposes. In our case, select
the demosap.sap:connNode_connSAP connection which we
created and enabled and click the Next > button.
As we have pre-defined Services in our Company like handle exception it will store the error
in Database in XML format. If getlast error throws exception then handle exception will store
into Database.

after getlasterror service we have to put handle error service

How to handle exceptions in webMethods?


Answer#1
To handle exceptions in webMethods, we use three sequence
Step as below -
First sequence (exit on success)
- Second sequence (exit on failure)
- Third sequence (exit on done)
Second and third sequences are child steps of first one.
All the business login will come inside second sequence and What we have to do when
exception is there, this logic will Come in third sequence.

Answer#2

Experience:

As we have pre-defined Services in our Company like handle exception it will store the error
in Database in XML format. If getlast error throws exception then handle exception will store
into Database.

after getlasterror service we have to put handle error service

How do I throw an exception when using a try-catch block?


Set a flag in your catch block or leave a variable holding the error message in the pipeline.
Outside the catch block put a branch on that variable or flag and if it is non-null then exit
with failure or call the service that generates the exception.

IDOC is a container that can be used to exchange data between any two processes.

Each IDOC is assigned a unique number for tracking and future reference.

IDOC consists of several segments, and segments contain several fields.

IDOC contains the following three types of records...


1. One Control Record.
2. One or many Data Record
3. One or many Status record.

In IDOCs the following terms are to be known.


PORT:
Port is used in the outbound process to determine the name of the EDI subsystem program,
the directory path where the IDOC file will be created at the operating system level, the
IDOC file names and the RFC destinations.
RFC Destination:
Used to define the characteristics of communication links to a remote system on which a
functions needs to be executed.

Partner Profile:
Partner profile specified the various components used in an outbound process (Partner
number, IDOC type, message type, Port, Process code), the mode in which it communicates
with the subsystem (batch or immediate) and the person to be notified in case of errors.

Message Control
Used in pricing, account determination, material determination, and output determination.
The message control component enables you to encapsulate business rules with out having
to write ABAP programs.

TO Process IDOCS the following TCODES will be used.

IDoc, short for Intermediate Document, is a SAP document format for business transaction
data transfers. Non SAP-systems can use IDocs as the standard interface (computing) for
data transfer. IDoc is similar to XML in purpose, but differs in syntax.

IDOC are used for asynchronous transactions. Each IDOC generated exist as a self contained
text file that can then be transmitted to the requesting workstation without connecting to
the central database.

The purpose of an IDoc is to transfer data or information from SAP to other systems and vice
versa. The transfer from SAP to non-SAP system is done via EDI (Electronic Data
Interchange) subsystems whereas for transfer between two SAP systems, ALE is used.

IDoc can be triggered in SAP system or in EDI subsystem. This depends on the direction in
which IDoc is sent and is called as Inbound IDoc and Outbound IDoc accordingly. In case of
outbound flow, IDoc is triggered in SAP through document message control which is then
sent to EDI subsystem. EDI converts the data from IDoc into XML or equivalent format and
then sends the data to partner system through Internet.

For inbound flow, EDI converts partner data and IDoc is created in SAP. After successful
processing of this IDoc, Application Document is posted in SAP.

Types of IDOC:
Material master: MATMAS
Vendor master: CREMAS
Customer master: DEBMAS
Bill of material: BOMMAT
EDI, stands for Electronic Data Interchange, is the electronic exchange of structured business
data between different applications. ... The IDoc interface consists of IDoc types and
function modules that form the interface to the application.

The purpose of an IDoc is to transfer data or information from SAP to other systems and vice
versa. ... EDI converts the data from IDoc into XML or equivalent format and then sends the
data to partner system through Internet. For inbound flow, EDI converts partner data
and IDoc is created in SAP.

How to check failed IDOCs via TCODE WE02/WE05. Transaction WE02 is used to check all of
the IDOCs in the system over a given time period. There are both Inbound and
Outbound IDOCs. We are looking for IDOCs that did not process properly and these usually
have a status of 51.

You might also like