Wednesday, October 26, 2016

SAP Idoc Integration with SAP BODS

IDocs: Intermediate Doc

Whe u send data from NON sap source to SAP system,sap will accept only IDoc

if you want to send out data from sap system to non sap sources,sap will send idocs to the destination and it will convert into their respective fpormat


Inbound Idoc:accept data from non sap sources

Outbound IDoc :send out data from SAP to non SAP system

1.Introduction:  

Imagine you want to build a Reporting Solution, not a Data Warehouse in pure terms. So somebody opens the balance sheet report and does not like the way it looks. So a booking in SAP is created to correct it and then....he has to wait the entire night until the Data Warehouse gets refreshed. Another option would be to configure SAP so it sends all changes to the reporting database immediately. And that is what IDOCs are for.
On the downside though, to configure SAP to actually send changes is quite a challenge. If an IDOC is provided by SAP already it is not that bad, but if you want to distribute changes for data SAP never thought about, you have to write your IDOC from scratch and hook it into every single application dealing with that data.
The basic problem is the IDOC design. It is not like a database triggers that is independent from all the applications and fires no matter who and how a change happened. It is happening on application level, so there is a common ABAP call that has to be done at every single application.
Inside SAP, a couple of settings have to be made, this configuration is mandatory for both sending and receiving IDOCs. The following configurations steps are involved to send IDOCs from BODS to SAP ECC.
1.     Define Logical Systems
2.     Define RFC Destination
3.     Defining RFC Port(Transactional RFC)
4.     Define Partner Profile
Let us see in brief how to configure the above steps:

2.SAP Configuration settings:

2.1        Define Logical Systems:
Defining Logical systems is done in SAP ECC with the transaction ‘SALE’.
Note: This entire documentation refers to SAP IDES system refer the below screen shot for detail.
Enter the Transaction ‘SALE’ to define logical system and its assignment. As this confirmation doesn’t have authorization we will request basis to create it. Hence we used the following logical system as shown below.
Click on the above shown to define the logical system. The below popup come just continue
The Logical system created by basis is ‘ID3CLNT801’ as shown below.
  
  2.2  Define RFC Destination:
Enter the transaction ‘SM59’ to configure the RFC destination in SAP ECC as shown below.
Click on TCP/IP connections as shown above and the create it.
Once the RFC created with Registered Server Program (Program ID) as ‘DI_RFC’ as shown here. With the defined program ID, configure this from BODS side from management console as shown below. Logon on to Management console and click administrator.
RFC server configuration is done as shown below.
The configured served need to be started the interface as shown below.

Now check the connection from SAP side as shown below. Click on the connection test as shown.
If the connection is fine then the following screen will appear.
 2.1  Defining RFC Port (Transactional RFC):
Enter the transaction ‘WE21’ to create the Port as shown. The RFC destination will be defined here.
2.2  Define Partner Profile
And finally, we can configure SAP to route all IDOCs of a given type to DI by running the transaction "WE20". You click on "New", type in the Partner Number created in "/nsale" (we called it ID3CLNT801) and its type is "LS"....Logical System. Then you click on save.
Configure the Inbound parameters as SAP need to receive the IDOCS.
Note: From SAP if we need to send the IDOCS to BODS then configure outbound parameters, vice versa to receive the IDOCS (Inbound).
In this case it is considered to create the customer which comes from BODS; hence the configuration should be Inbound. It is shown below. Click on Add
Enter the message type “DEBMAS” and process code as ‘DEBM’, click on save.
Note: The following are the IDOC types, Message types on category wise.
General
Message types / IDoc types / BAPI
Vendor
Customer
Material master
MATMAS / MATMAS03
Accounting
Message types / IDoc types / BAPI
G/L account
Cost center
Cost element
Cost center group
Cost element group
Activity type
Activity group
Activity price
Profit center
Profit center group
Profit center account group
Logistics
Message types / IDoc types / BAPI
Article master
Additional
Product catalog
Product catalog item
Price list
Assortment
Service master
Characteristic
Class
Classification
Document
Purchasing info record
Conditions
Order book
Change master
Bill of material
Document BOM
Work breakdown structure
Human Resources
Message types / IDoc types / BAPI
PA object type person
PD object types
 
Sending an IDOC to SAP is an asynchronous task. One or many IDOCs are posted to SAP, just like inserting into a database table, and get stored in the SAP database. Later, SAP starts to process the IDOC and e.g. creates this new material record. Once the processing is done, no matter if successful or not, the status of this IDOC is updated in the SAP table EDIDC.
As a consequence, unlike with BAPIs, you get no return of the processing. Your only choice is to periodically query above status table and copy the status back into the senders table. If an immediate return code is required or the actual error message you have to use BAPIs. On the counter side, IDOCs are supposed to be faster while still running full data consistency tests.
Before sending the IDOCs we need to have SAP Data store to be created and then import the required IDOC. For our case to create the customer ‘DEBMAS06’
The data store created as referred here as ‘SAP_ECC’ shown above, then import the IDOC ‘DEBMAS06’ as shown below.
Click on import by name and give the IDOC name as shown below.
The following flat file information is required to create the customer through IDOCs. Row generator is required for input the configuration. 
Flat file information as shown below.

Configuration information as shown below.
Once the Job completed check the generated IDOC by using the transaction code ‘WE02’.
Status 53 shows IDOC successfully received to SAP from BODS.
Customer (310) got created successfully by checking the transaction ‘XD03’.

5 comments:

  1. Replies
    1. Looking for the best SAP BO Training in Bangalore, then don't delay join IntelliMindz SAP BO Training in Bangalore. Join our SAP BO training to get hands-on training and practice in SAP BO Software. Any Queries call @ 9655877677. IntelliMindz is the best IT Training Institute in Bangalore with placement, offering 200 and more software courses with 100% Placement Assistance.
      SAP BO Course in Bangalore
      SAP BO Course in Chennai
      SAP BO Online Course

      Delete
  2. This comment has been removed by the author.

    ReplyDelete
  3. informative blog..but none of the images are visible

    ReplyDelete