Showing posts with label MAPPING. Show all posts
Showing posts with label MAPPING. Show all posts

Saturday, April 11, 2020

Using RemoveContext


The source structure is a FLAT structure and we want to map it to an Array as in Target.







                                                      AMOR FATI - LOVE OF FATE

Monday, October 14, 2019

BAPI

WHAT IS A BAPI & BAPI WRAPPER ?


BAPI is a function module which is remotely enabled & does not raise any exceptions.
It is defined as business API’s for SAP objects. They play an important role in the technical integration & in the exchange of business data between SAP components & between SAP & non SAP components.

A BAPI wrapper is a Remote enabled Function Module in a backend system, that has a specific signature, so that it can be used in a mobile scenario.
Typically, it calls a BAPI in the backend system, so it 'wraps' a BAPI, hence the name.
As long as a Remote enabled FM follows the standard signature of a BAPI wrapper, it can be called a BAPI wrapper even if it doesnt actually call one.
Conceptually, a BAPI wrapper has the role of a private method of a business object (SyncBO) and resides in a backend system.

Let's say you want to mobilize a Sales Order scenario. You will need a set of BAPI wrappers (GETLIST, GETDETAIL etc) for distributing Sales Orders.
Now, if there already BAPIs in your backend that do this work, then all you need to do is write RFC FMs, which call the BAPIs on the backend instead of getting data directly from tables. If you don't have already BAPIs for a Sales Order, you can still make BAPI wrappers (since a BAPI wrapper is simply an RFC enabled FM), without using any BAPIs, but which get their data directly from the corresponding Sales Order table(s).
Then you can go ahead and use these BAPI wrappers.

The main thing is this:
1. To make a BAPI wrapper, you need to make a RFC FM with a particular signature. That FM can then be called a BAPI wrapper.
2. It does not matter how a BAPI wrapper does its work internally, as long as it's signature follows the standard. i.e. It may or may not call a BAPI.

Summarizing this can say that you create a function module (RFC or not) in which you call the BAPI you are trying to 'wrap'. This is oftenly done because (for example) the interface of a BAPI (import / export / tables) is quite 'large'. 
To avoid this, one creates a wrapper in which a lot of coding is already done before the BAPI is called. So when calling the wrapper, the calling program has (a lot) less to do before it can use the BAPI.

Tcode BAPI - will give you a list of BAPIs

Some comooly used BAPIs -

PO Creation : BAPI_PO_CREATE

Sales order Creation : BAPI_SALESORDER_CREATEFROMDAT2
sales order change : BAPI_SALESORDER_CHANGE
Delivery : BAPI_OUTB_DELIVERY_CONFIRM_DEC



AMOR FATI - LOVE OF FATE







Sunday, October 13, 2019

BPM Introduction

Business Process Management deals with cross component BPM. This includes SAP workflow in SAP backend and processing of message on Integration Server.

Cross Component Business Process Management provides SAP NetWeaver Process Integration with functions for stateful message processing, that is, the status of an integration process is persisted on the Integration Server. 

This means that an integration process can, for example, wait infinitely until further messages are received or until a particular deadline is reached. 

Moreover, it is possible to process messages further within an integration process.

There are lot of other scenarios when we need to use BPM. i.e. Splitting of messages, Merging of messages, Multicast a message to various systems, Send an Alert, Make the asynchronous call into the synchronous,etc.

SAP PI BPM is used for cross-system integration and managing a higher level business process between disparate systems. 

A typical scenario is a Sales Order acceptance process where several systems would need to be consulted before accepting the order such as a inventory check, global ATP check etc.

We use SOAP adapter to connect to BPM.

The Service Interface pattern is always STATELESS XI 3.0 COMPATIBLE

 Steps in the Integration Process Modeling:-

 Messaging Relevant Steps-
  • Receive Step
  • Send Step
  • Transformation Step (Mapping)
  • Receiver Determination

 Control Steps-
  • Block
  • Container Operation
  • Control Step
  • Fork
  • Switch
  • While Loop
  • Wait
  • User Decision



AMOR FATI - LOVE OF FATE

PROXIES


We can integrate SAP System with PI with 3 different adapters -


  1. IDOC
  2. RFC
  3. PROXY

Proxy communication always by passes the Adapter Engine and will directly interact with the application system and Integration engine. So it will give us better performance.

Proxies communicate with the XI server by means of native SOAP calls over HTTP.

Easy to handle messages with ABAP programming.

Proxy is good for large volumes of data. we can catch and persist the errors ( both system
application fault ) which was generated by Proxy setting.


2 types of proxies available -

Java Proxies: - 

Java proxies are used when JAVA applications needs to send or receive messages with
other applications. JAVA proxies are generated from the WSDL description  of the interface 
in the Integration Repository, and the result is a .jar file containing generated java classes
corresponding to the integration objects. 

ABAP Proxies: - 

ABAP proxies are used when ABAP applications needs to send or receive messages. ABAP
proxies are generated on the Application server with transaction SPROXY, based on the
WSDL representation of the message interface.


There are 2 types of ABAP Proxies - 

1. Client proxy / outbound proxy

2. Server proxy / inbound proxy




Client Proxy 





Server Proxy






Steps required for developing ABAP Proxies in dual stack :

1. Create a source data type and a target data type.
2. Create Message types for the source and target data types.
3. Create Message Interfaces includes Inbound Message interface and Outbound
    Message interface.
4. Create message mapping between the source and target message types.
5. Create Interface mapping.
6. Create ABAP proxies using the transaction SPROXY in the application system.


Creating ABAP Proxies in Application system 

Go to SPROXY transaction in R/3 system.

Here we can see all the Integration Repository objects. Select the outbound interface for
which we want to create the proxy. Right click on the interface and select create option.









Steps required for developing ABAP Proxies in single stack :

1. Create a source data type and a target data type.
2. Create Message types for the source and target data types.
3. Create Message Interfaces includes Inbound Message interface and Outbound
    Message interface.
4. Create message mapping between the source and target message types.
5. Create Interface mapping.
6. Create ABAP proxies using the transaction SPROXY in the application system.

Creating ABAP Proxies in Application system: 

Go to SPROXY transaction in R/3 system.

Here we can see all the Integration Repository objects. Select the outbound interface for
which we want to create the proxy. Right click on the interface and select create option.


Objects that need to be developed in ID :

Create sender and receiver communication component
Create sender and receiver communication channels
Create Integrated Configuration.

In sender communication channel we should select Adapter type is SOAP Adapter

Transport Protocol : HTTP
Message Protocol  : XI3.0








AMOR FATI - LOVE OF FATE