Skip to Content

Hello Guys,

In this I  am Explaining how we can extract data from SAP ECC and how we can load data to SAP ECC.I hope you find this useful for you.

Connection Set Up:


  • The SAP ECC allows only Application level communication to SAP BODS. SAP BODS cannot communicate with SAP ECC at DATA BASE level.
  • To connect with SAP ECC from SAP BODS we have to create SAP ECC data store in DATA SERVICES Repository.

An SAP application data store includes the following information

  • Connection information including the application server name, the language used by the SAP client application, the client and system numbers etc. You supply these values based on our installation of the SAP application.
  • Security information, specifically the SAP security profile to be used by all connections initiated from this data store between Data Services and the SAP application. we supply a security profile based on our installation of the SAP application.

If we create a sap application type data store in BODS, we can import following objects from data store.

  • Table/ view     
  • Hierarchies     
  • ODP               
  • BAPI (Functions)
  • IDOCS

SAP Objects behavior in SAP BODS

  • Table/ view – source (only read data)
  • Hierarchies–                source (only read data)
  • ODP-                          source (only read data)
  • BAPI (Functions) —    source and target (read and write)
  • IDOCS–                    source and target (read and write)

Apart from these objects we can also extract Flat files in sap application server.


INTERFACES:


RFC (SAP-SAP (SAP’S Application Programming Interface)): SAPI is the sap’s native interface for communication between 2 sap systems. Loads data to SAP applications and allows direct access to application tables outside of the data flows through RFC function calls.

ABAP (SAP-Non SAP): Reads data from SAP applications using ABAP data flows and supports tables, hierarchies, ODP sources, and functions with scalar arguments.

            SAP BODS sends an ABAP Code to SAP Application Server, and then SAP Application server executes that program get the data from ABAP  data dictionary and the results are communicated back to SAP BODS.

IDoc interface:  Reads from and loads data to SAP applications. Data Services can send, receive, and create SAP IDocs including extended and custom IDocs and supports reduced input sets, parallel processing, real-time, and batch processing.

SAP system should be configured to send and receive IDocs from Data Services. IDoc message sources (SAP outbound IDocs) must be configured in the Data Services Designer and in the RFC client branch of the Data Services Administrator. However, we do not need to configure RFC clients for IDoc. Message targets (SAP inbound IDocs). The partner number, partner type, message type, and IDoc type settings you save in the Designer’s IDoc target editors are the ones needed to send messages to SAP application via transactional remote function calls (tRFCs).

We can access Hierarchies and flat file only in ABAP interface, table (both RFC and ABAP)

RFC/BAPI Functions.

We can use SAP remote function calls (RFCs) in queries created in Data Services data flows. In addition, Data Services provides the SAP application BAPI interface to support the use of remote function calls designed for business transactions (BAPIs).we use the SAP application data store to import BAPI function metadata. SAP functions that are not RFC-enabled can be used in ABAP data flows.

BAPI functions: A real-time job can apply data to SAP applications using a real-time job remote function call (RFC). The RFCs that are included in SAP application releases, called Business Application Programming Interface (BAPI) function calls (such as BAPI_SALESORDER_CREATEFROMDAT1) can be particularly useful

RFC functions: A real-time job can use RFC-enabled functions to retrieve information from and apply information to SAP applications. With nested tables, we can include tables as input or output parameters to the function

The Transport Format:

The Transport Format is a Data Services predefined file format object for reading flat files from SAP applications. It is automatically used to define data transport objects added to SAP application data flows. When we execute the job that contains That contains Transport Format file then DS calls the file upload program on sap application server, the flat file upload program will be executed in the application server then it  uploads the data.

EXTRACTING DATA FROM SAP ERP


We can extract data from SAP ECC by using both Real time and Batch jobs. We can extract sap tables directly.

REAL-TIME JOB:

Data Services supports real-time data transformation including receiving messages from ERP systems (such as SAP ERP) or XML-based, analytic applications. “Real-time” means that Data Services reacts to messages as they are sent, performing predefined operations and responding appropriately .Extract data from the body of the message received and from any secondary sources used in the job. There is at least one real time message should be there in the real time jobs.

Data Flows in real-time jobs:

Can contain SAP tables (as sources), IDocs as sources and targets, and RFC-enabled functions

BATCH JOB:

Unlike real time job, batch job cannot extract or load the data in real time fashion.

Data Flows in batch jobs:

Can contain ABAP data flows (as sources), tables, hierarchies, and ODP objects (as sources), or IDocs (as sources or targets), and SAP RFC-enabled functions.

ABAP DATA FLOWS (bulk or large data (i.e. more than 10000 rows) :

Move table and hierarchy data between SAP applications and Data Services using ABAP.

An ABAP data flow extracts and transforms data from SAP application tables, files, and hierarchies. The ABAP data flow produces a data set that you can use as input to other transforms, save to a file that resides on an SAP application server, or save to an SAP table. When Data Services executes ABAP data flows, it translates the extraction requirements into ABAP programs and passes them to SAP to execute.

Data transfer methods

ABAP data flows in Data Services allow you to automatically create ABAP programs. After an ABAP program runs, it creates a flat file (transport file) on the SAP application host. This file is later transferred from the SAP application host to a directory local to the job server executing the Data Services job. To use a data transfer method for this outbound SAP file, select an option when configuring a data store for your SAP application host. Data transfer options specified in an SAP Applications data store editor determines the method by which the results (from batch jobs that contain ABAP data flows) are returned to Data Services.

RFC Use to stream data from the source SAP system directly to the Data Services data flow process using RFC.

Direct download SAP application server transfers the data directly to the Client Download directory.

Shared directory SAP application server loads the Working Directory on SAP server with the transport file. The file is read using the Data Services Path to the shared directory.

FTP SAP application server loads the Working Directory on SAP server with the transport file. The file is read using the FTP relative path to the SAP working directory and written to the Client download directory.

Custom Transfer SAP application server loads the Working Directory on SAP server with the transport file. The file is read by a third-party file transfer program and loaded to the Local directory.

LOADING DATA TO SAP ECC


We can’t load the data directly to the SAP ECC tables, we have to use

  1. 1.      IDOC
  2. 2.      BAPI
  3. 3.      LSMW

IDOC is the preferred method to load data to SAP ECC as per SAP Best practices.

IDOC:

            An SAP IDoc is an intermediate document that can be used to send and receive business documents between SAP application servers and other servers. SAP applications offer numerous IDocs that describe different business documents. The data in an IDoc supports a particular transaction. An IDoc can contain data from multiple tables and can contain hierarchical data. Data Services processes outbound and inbound IDocs from and to the SAP application server. SAP outbound IDocs are called IDoc sources in Data Services. SAP inbound IDocs are called IDoc targets. The method of processing IDocs depends on the type of job in which you define the IDoc and whether the IDoc is handled as a message or a file. In Data Services, an IDoc can be used as a source or target object in a batch or real-time job. An Idoc can be processed as a message or as a file; however the only limitation is that batch jobs cannot process IDoc messages as sources.

The following configurations steps are involved to send IDOCs from BODS to SAP ECC.

  • Define Logical Systems                                   
  • Define RFC Destination
  • Defining RFC Port (Transactional RFC)         
  • Define Partner Profile

BAPI:

BAPI technology (Business Application Programming Interface) is the main API technology available to customers to read and update data that may be called from within SAP or externally using RFC protocol and ALE/IDoc technology.

These are like functions you can call this by giving some input and get the output.

LSMW:

            The Legacy System Migration Workbench (LSMW) is a tool to transfer data from legacy systems into an R/3 System. LSMW supports a step-by-step procedure; if one step is executed and saved then next step automatically follows. It is a frame work to load data to sap and read data from sap in flat file format. We use this when we have small amount of data. LSMW uses Recording, BAPI and IDOCS to upload and download data from sap application server.

When we want load data to SAP ECC from Non SAP Source, we have to write the data to flat file and then by using LSMW we can upload it to SAP Application server.

  • Non SAP Source—-Flat File—SAP Application Server

The same is also for sap sources

  • SAP Application Server—-Flat File—Non SAP Source

Integration of SAP ECC with SAP BODS:

  • From SAP ECC 6.0 onwards no need for integration, it is already integrated with BODS.
  • We have to integrate previous versions of SAP ECC with SAP BODS.

References:

Supplement for SAP: http://help.sap.com/businessobject/product_guides/boexir4/en/sbo401_ds_sap_en.pdf

To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

Leave a Reply