Idoc Document

of 62 /62
Idoc – Configuration Steps Applies to: This document applies to SAP version ECC 6.0. Summary This document explains about inbound and outbound Idoc configuration with simple steps. Author(s): Renuka Srinivasan Company: Applexus Technologies (P) Ltd Created on: 15 January 2011 Author Bio Renuka Srinivasan Is working as SAP Technology Consultant with Applexus Technologies (P) Ltd. Completed Bachelor of Engineering in Sri Shakthi Institute of Engineering and Technology. SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 1

Embed Size (px)

description

Idoc Document,Steps and T code.

Transcript of Idoc Document

Idoc Configuration Steps

Applies to:This document applies to SAP version ECC 6.0.

SummaryThis document explains about inbound and outbound Idoc configuration with simple steps. Author(s): Renuka Srinivasan Company: Applexus Technologies (P) Ltd Created on: 15 January 2011

Author BioRenuka Srinivasan Is working as SAP Technology Consultant with Applexus Technologies (P) Ltd. Completed Bachelor of Engineering in Sri Shakthi Institute of Engineering and Technology.

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 1

Enter Title Here: Do not exceed space provided - Title automatically appears in page header

Table of ContentsApplies to:......................................................................................................................................................... 1 Summary........................................................................................................................................................... 1 Author Bio......................................................................................................................................................... 1 Table of Contents.............................................................................................................................................. 2 1. What is Idoc?................................................................................................................................................ 2 2. Why Idoc Configuration?............................................................................................................................... 3 3. Steps in Idoc Configuration........................................................................................................................... 3 4. Steps to be done in Source client ................................................................................................................ 8 5. Steps to be done in Destination client ........................................................................................................ 10

1. What is Idoc?IDocs are structured ASCII files (or a virtual equivalent). They are the file format used by SAP R/3 to exchange data with foreign systems.

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 2

Enter Title Here: Do not exceed space provided - Title automatically appears in page header

IDocs is the acronym for Interchange Document. This indicates a set of (electronic) information which builds a logical entity. An IDoc is e.g. all the data of a single customer in your customer master data file, or the IDoc is all the data of a single invoice. The information which is exchanged by IDocs is called a message and the IDoc is the physical representation of such a message. The name messages for the information sent via IDocs is used in the same ways as other EDI standards.

2. Why Idoc Configuration?To exchange IDoc data between systems and partners that are completely independent or between same systems we need to configure.

3. Steps in Idoc ConfigurationConsider we have to exchange data between two different clients. Following are the configuration steps common for Interchange Documents in both the clients. 3.1. Create segment a. Go to transaction WE31 -> Give your segment name -> Press Create.

b. Type your field name and data element and press save then segment definition will be created automatically.

3.2 Create Idoc Type Go to Transaction WE30 a. For new IDOC type select the radio button Basic type and press Create button.

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 3

Enter Title Here: Do not exceed space provided - Title automatically appears in page header

b. Then select the IDOC option to create and press Enter. Give segment name, minimum and maximum number for and save it. Check if this is mandatory segment.

c.

If you want Header and Item create the segment tree according to that, you can view as follows then press Save.

d. Then go back and set release the IDOC type for using it further. Idoc type will be created successfully once we release that status. We have to release the segments (in WE31) and IDOC type as well.

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 4

Enter Title Here: Do not exceed space provided - Title automatically appears in page header

3.3 Create Message Type Go to transaction WE81 for new message type. Go to change mode and click New Entries for creating our own message type.

3.4 Associate Message Type with Basic Idoc Type Go to transaction WE82 for associating the message type with basic IDOC type.

3.5 Create Logical System Go to transaction SPRO and press SAP Reference IMG for creating the logical system for source and

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 5

Enter Title Here: Do not exceed space provided - Title automatically appears in page header

destination. Click the node define logical system from SPRO -> SAP Reference IMG -> SAP customizing Implementation Guide -> SAP xApp Resource and Portfolio Management (SAP xRPM) -> Base system Interfaces -> SAP Human Capital Management Integration -> Common system configuration and SAP HCM ALE setup -> Application link enabling (ALE) -> Basic Settings -> Logical Systems -> Define Logical System

Else go to transaction SALE then go to Basic settings-> logical system then Define logical system. We can create the same.

3.6 Create Logical Connection a. Go to transaction SM59 for creating Logical Destination. SM59 -> logical connections -> Create

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 6

Enter Title Here: Do not exceed space provided - Title automatically appears in page header

b. Then Click Connection test icon after marking the current user checkbox in logon and security tab.

c. Then Destination client will automatically open

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 7

Enter Title Here: Do not exceed space provided - Title automatically appears in page header

3.7 Create Ports Go to transaction WE21 for creating ports. WE21 -> Transactional IR -> Create

4. Steps to be done in Source client1.Go to transaction SE11 -> create a table with entries. 2.Go to transaction WE31 -> create segments as shown before. Here you have to mention all the fields mentioned in the database table. 3.Go to transaction WE30 -> create basic IDOC type and release the segments and basic type. 4.Go to transaction WE81 -> create message type. 5.Go to transaction WE82 -> assign message type to basic Idoc type. 6.Go to transaction BD64 -> Click on Display/change button

7. Click on Edit menu -> model view -> create

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 8

Enter Title Here: Do not exceed space provided - Title automatically appears in page header

8.Specify description and technical name and press continue.

9.Select your model view -> click edit -> Add message type

10. In dialog box specify sender, receiver, and message type and continue. Now the model view lo oks Like

11. Click on environment menu -> generate partner profile

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 9

Enter Title Here: Do not exceed space provided - Title automatically appears in page header

12. It will show the following screen. Select your model view and click on execute.

13. It will show the partner profile log in next screen. 14. Click on back button 2 times it will take to distribution model screen. 15. Click on Edit -> Model view -> Distribute 16. In displayed dialog box select the partner system and continue. 17. Then it will show the log of model view distribution. 18. To check partner profile go to transaction WE20. 19. Then write the report program in SE38 to create IDOC control records and transfer it to destination partner system. 20. Go to Transaction WE02 to check the generated IDOC control records.

5. Steps to be done in Destination client1. Go to transaction SE37 to create the function module for updating the table from IDOC segments. 2. Specify import, export and table parameters. 3. Go to transaction WE57 for assigning the FM to logical system. Click on Display/ change button.

4. Specify FM name, function type, basic type(IDOC ), message type and direction then save it. 5. Go to transaction BD51 to define input method for inbound function module and click on Display change button

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 10

Enter Title Here: Do not exceed space provided - Title automatically appears in page header

6. Specify your function module and input type by clicking the new entries. 7. Go to transaction WE42 and create process code. 8. Go to transaction BD64 and generate the partner profile again. 9. Got o transaction SE 38 and execute the transaction in source system (client100). 10. Check in destination system (client 800). Go to Transaction WE02 and check your table in SE11. (You can get the transferred entries in that table).

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 11

Enter Title Here: Do not exceed space provided - Title automatically appears in page header

Related Content You must include at least 3 references to SDN documents or web pages. http://forums.sdn.sap.com/thread.jspa?messageID=10041344#10041344 http://forums.sdn.sap.com/thread.jspa?messageID=9949613#9949613 http://forums.sdn.sap.com/thread.jspa?messageID=9932294#9932294

1. What is Idoc?IDocs are structured ASCII files (or a virtual equivalent). They are the file format used by SAP R/3 to exchange data with foreign systems. IDocs is the acronym for Interchange Document. This indicates a set of (electronic) information which builds a logical entity. An Idoc is e.g. all the data of a single customer in your customer master data file, or the Idoc is all the data of a single invoice. The information which is exchanged by IDocs is called a message and the Idoc is the physical representation of such a message. The name messages for the information sent via IDocs is used in the same ways as other EDI standards.

2. Why Idoc Configuration?To exchange Idoc data between systems and partners that are completely independent or between same systems we need to configure.

3. Steps in Idoc ConfigurationConsider we have to exchange data between two different clients. Following are the configuration steps common for Interchange Documents in both the clients.

3.1. Create segment1. Go to transaction WE31 -> Give your segment name -> Press Create. 2. Type your field name and data element and press save then segment definition will be created automatically.

3.2 Create Idoc TypeGo to Transaction WE301. For new IDOC type select the radio button Basic type and press Create button. 2. Then select the IDOC option to create and press Enter. Give segment name, minimum and maximum number for and save it. Check if this is mandatory segment.

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 12

Enter Title Here: Do not exceed space provided - Title automatically appears in page header

3. If you want Header and Item create the segment tree according to that, you can view as follows then press Save. 4. Then go back and set release the IDOC type for using it further. Idoc type will be created successfully once we release that status. We have to release the segments (in WE31) and IDOC type as well.

3.3 Create Message TypeGo to transaction WE81 for new message type. Go to change mode and click New Entries for creating our own message type.

3.4 Associate Message Type with Basic Idoc TypeGo to transaction WE82 for associating the message type with basic IDOC type.

3.5 Create Logical SystemGo to transaction SPRO and press SAP Reference IMG for creating the logical system for source and destination. Click the node define logical system from SPRO -> SAP Reference IMG -> SAP customizing Implementation Guide -> SAP xApp Resource and Portfolio Management (SAP xRPM) -> Base system Interfaces -> SAP Human Capital Management Integration -> Common system configuration and SAP HCM ALE setup -> Application link enabling (ALE) -> Basic Settings -> Logical Systems -> Define Logical System Else go to transaction SALE then go to Basic settings-> logical system then Define logical system. We can create the same.

3.6 Create Logical Connection1. Go to transaction SM59 for creating Logical Destination. a. SM59 -> logical connections -> Create B. Then Click Connection test icon after marking the current user checkbox in logon and security tab. c. Then Destination client will automatically open

3.7 Create PortsGo to transaction WE21 for creating ports. WE21 -> Transactional IR -> Create 4. Steps to be done in Source client 1. Go to transaction SE11 -> create a table with entries. 2. Go to transaction WE31 -> create segments as shown before. Here you have to mention all the fields mentioned in the database table. 3. Go to transaction WE30 -> create basic IDOC type and release the segments and basic type.

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 13

Enter Title Here: Do not exceed space provided - Title automatically appears in page header

4. Go to transaction WE81 -> create message type. 5. Go to transaction WE82 -> assign message type to basic Idoc type. 6. Go to transaction BD64 -> Click on Display/change button 7. Click on Edit menu -> model view -> create 8. Specify description and technical name and press continue. 9. Select your model view -> click edit -> Add message type 10. In dialog box specify sender, receiver, and message type and continue. 11. Click on environment menu -> generate partner profile 12. It will show the following screen. Select your model view and click on execute. 13. It will show the partner profile log in next screen. 14. Click on back button 2 times it will take to distribution model screen. 15. Click on Edit -> Model view -> Distribute 16. In displayed dialog box select the partner system and continue. 17. Then it will show the log of model view distribution. 18. To check partner profile go to transaction WE20. 19. Then write the report program in SE38 to create IDOC control records and transfer it to destination partner system. 20. Go to Transaction WE02 to check the generated IDOC control records. 5. Steps to be done in Destination client 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. Go to transaction SE37 to create the function module for updating the table from IDOC segments. Specify import, export and table parameters. Go to transaction WE57 for assigning the FM to logical system. Click on Display/ change button. Specify FM name, function type, basic type (IDOC), message type and direction then save it. Go to transaction BD51 to define input method for inbound function module and click on Display change button Specify your function module and input type by clicking the new entries. Go to transaction WE42 and create process code. Go to transaction BD64 and generate the partner profile again. Got o transaction SE 38 and execute the transaction in source system (client100). Check in destination system (client 800). Go to Transaction WE02 and check your table in SE11. (You can get the transferred entries in that table).

Labels parameters

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 14

Enter Title Here: Do not exceed space provided - Title automatically appears in page header

Step-by-step guide to ALE and IDOCs Introduction to EDI and ALE: EDI (Electronic Document interchange) - EDI is the electronic exchange of business documents between the computer systems of business partners, using a standard format over a communication network. EDI is also called paperless exchange. Advantages: Reduced Data entry errors Reduced processing time Availability of data in electronic form Reduced paperwork Reduced Cost Reduced inventories and better planning Standard means of communications Better business process EDI has two process 1. Outbound process 2. Inbound process Outbound Process: 1.Application document is created. 2. IDOC is generated 3.Idoc is transferred from SAP to Operating system layer 4.Idoc is converted into EDI standards 5.Edi document is transmitted to the business partner 6.The Edi Subsystem report status to SAP Inbound Process: 1.EDI transmission received 2.EDI document is converted into an IDOC 3.IDOC is transferred to the SAP layer 4.The application document is created 5.The application document can be viewed. IDOC: 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.

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 15

Enter Title Here: Do not exceed space provided - Title automatically appears in page header

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. On both sides: Logical System Names SALE Setup RFC destinations SM59 Port Destinations WE21 In Source system: Segment Creation WE31 Basic IDOC Type Creation WE30 Message Type Creation WE81 Assign Message Type To Basic IDOC Type WE82 Distribution Model BD64 Writing Report Program SE38 Partner Profile WE20 Message control NACE Check IDOCs WE02, WE05 In Destination System: Creating FM SE37 Assign FM to Logical Message WE57 Define I/P method for Inbound FM BD51 Create Process Code WE42 Generate Partner Profile BD64

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 16

Enter Title Here: Do not exceed space provided - Title automatically appears in page header

IDOC processing in the same instance of R/3 Clients For example two clients in the same R/3 instance. Client 900. Client 800. To transfer the data between two clients the table structures and their data types should be match. In this example, Client 900 is Source system, and Client 800 is destination system. In Client 900 I have created a customized table and inserted some records. In Client 800 I have created only table. Common Steps in Both Clients: Creating the Logical System Names and Assigning to Clients: Go to TCODE SALE. IMG path Idoc Interface / Application Link Enabling (ALE) -> Basic Settings -> Logical Systems -> Define Logical System

Click on Display / Change Button

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 17

Enter Title Here: Do not exceed space provided - Title automatically appears in page header

Click on New Entries

Specify the Logical System name and description. Note: Logical System Naming convention is CLNT

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 18

Enter Title Here: Do not exceed space provided - Title automatically appears in page header

Click on Save and Back buttons Now you will come back to the IMG path screen. Click on Assign Logical System to client.

Click on Display / Change Button

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 19

Enter Title Here: Do not exceed space provided - Title automatically appears in page header

Click on New Entries

Creating the RFC Connection Names: Go to TCODE SALE. Direct TCODE SM59 IMG Path IDoc Interface / Application Link Enabling (ALE) -> Communication -> Create RFC Connections

Click on Create button.

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 20

Enter Title Here: Do not exceed space provided - Title automatically appears in page header

Specify all the details in RFC connection screen

Click on Logon Security tab and specify the details.

Click on the Special options tab and specify the details which you want.

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 21

Enter Title Here: Do not exceed space provided - Title automatically appears in page header

Now click on Test Connection button

It show the connection log in next screen

Click on Back Click on Remote Logon Button

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 22

Enter Title Here: Do not exceed space provided - Title automatically appears in page header

Depends upon your settings the destination client will open. If you check the Current user option under Logon/ Security tab, then it will show the screen directly without asking the user name and password details.

Creating RFC ports: Go to TCODE WE21 Select the Transactional RFC in left side tree and click on Create button

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 23

Enter Title Here: Do not exceed space provided - Title automatically appears in page header

In dialog box you can select either Generate port name or own port name. If you select Generate Port name system will generate automatically. Here I selected Own port name. Click on continue.

Specify the description and RFC destination name.

Click on Save.

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 24

Enter Title Here: Do not exceed space provided - Title automatically appears in page header

Repeat the same above process in other client. By using opposite client instead of 900 specify 800. In Client 900 steps: Creating table structure: Go to TCODE SE11. Specify table name as ZSTUDENTS. In Delivery and Maintenance tab set attributes as Display Maintenance Allowed The table fields are.

Insert some records in table.

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 25

Enter Title Here: Do not exceed space provided - Title automatically appears in page header

Creating IDOC Segments: Go to TCODE WE31. Specify a name and Click on Create Button.

Here specify all the ZSTUDENTS table fields and their types as shown below.

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 26

Enter Title Here: Do not exceed space provided - Title automatically appears in page header

Click on SAVE button, then it will show dialog box with user name, press continue.

Specify your package name and click on save.

Specify your request and press Continue.

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 27

Enter Title Here: Do not exceed space provided - Title automatically appears in page header

Click on Back button, and then you will see the created segment.

Creating Basic IDOC Type: Go to TCODE WE30 Specify a name to your IDOC and click on create button.

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 28

Enter Title Here: Do not exceed space provided - Title automatically appears in page header

In next dialog box select create new option and specify the description of IDOC and click on continue.

Click on Create segment in the screen.

In dialog box specify the segment name which you created and check mandatory check box.

Click on SAVE and BACK button.

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 29

Enter Title Here: Do not exceed space provided - Title automatically appears in page header

Go to menu EDIT ->Click Set Release

In next dialog box, click on Yes.

Creating Message Type: Go to TCODE WE81. Click on Display / Change button.

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 30

Enter Title Here: Do not exceed space provided - Title automatically appears in page header

Click on New Entries button.

Specify a message type name and Description and click on SAVE button.

Assign Message Type to Basic IDOC Type:

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 31

Enter Title Here: Do not exceed space provided - Title automatically appears in page header

Go to TCODE WE82 Click on Display / Change Button

Click on New Entries, Specify the Message Type and Basic IDOC Type and Release version. Click on Save.

Click on Back. Note: Here the Release version you can find in this way

Creating Model View and Distributing and Generating Partner profile: Go to TCODE BD64 Click on Display/ Change button

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 32

Enter Title Here: Do not exceed space provided - Title automatically appears in page header

Click on Edit menu -> Model View -> Create

Specify description of model view and technical name in dialog box and press continue.

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 33

Enter Title Here: Do not exceed space provided - Title automatically appears in page header

Select your model view and click on Edit menu -> Add Message type

In dialog box specify the sender, receiver, message type and click on continue.

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 34

Enter Title Here: Do not exceed space provided - Title automatically appears in page header

Now your Model View looks like

Click on Environment Menu -> Generate Partner profile

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 35

Enter Title Here: Do not exceed space provided - Title automatically appears in page header

It will show the following screen, click on execute.

It will show the partner profile log in next screen.

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 36

Enter Title Here: Do not exceed space provided - Title automatically appears in page header

Click on Back button 2 times, it will take back to Distribution Model screen.

Click on Edit Menu -> Model View -> Distribute.

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 37

Enter Title Here: Do not exceed space provided - Title automatically appears in page header

In displayed dialog box select the partner system and click continue

Then it will show the Log of Model View Distribution.

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 38

Enter Title Here: Do not exceed space provided - Title automatically appears in page header

Click on Back button. To check partner profile Go to TCODE WE20 In displayed screen select the partner system in left side tree under Partner Type LS.

Write a Report Program in SE38 to create IDOC control records and transfer it to destination partner system. The following is the program to generate the IDOC control records and process it. *&---------------------------------------------------------------------* *& Report ZSHAN_IDOC_STUD *& *&---------------------------------------------------------------------* *& *& *&---------------------------------------------------------------------* REPORT ZSHAN_IDOC_STUD. TABLES: ZSTUDENTS. DATA : S_CTRL_REC LIKE EDIDC, "Idoc Control Record S_ZSHSTUSEG LIKE ZSHSTUSEG. "CUSTOMER Header Data DATA : T_ZSTUDENTS LIKE ZSTUDENTS OCCURS 0 WITH HEADER LINE. DATA : T_EDIDD LIKE EDIDD OCCURS 0 WITH HEADER LINE. "Data Records DATA : T_COMM_IDOC LIKE EDIDC OCCURS 0 WITH HEADER LINE. "Generated Communication IDOc CONSTANTS :C_ZSHSTUSEG LIKE EDIDD-SEGNAM VALUE 'ZSHSTUSEG'. CONSTANTS: C_IDOCTP LIKE EDIDC-IDOCTP VALUE 'ZSHSTUDIDOCS'.

SAP COMMUNITY NETWORK 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 39

Enter Title Here: Do not exceed space provided - Title automatically appears in page header

*** Selection Screen SELECT-OPTIONS : S_STUID FOR ZSTUDENTS-ZSTUID OBLIGATORY. PARAMETERS : C_MESTYP LIKE EDIDC-MESTYP DEFAULT 'ZSHSTUDMT', "Message Type C_RCVPRT LIKE EDIDC-RCVPRT DEFAULT 'LS', "Partner type of receiver C_LOGSYS LIKE EDIDC-RCVPRN DEFAULT 'IT3CLNT800', C_RCVPOR LIKE EDIDC-RCVPOR DEFAULT 'PORTSH800', C_SNDPRN LIKE EDIDC-SNDPRN DEFAULT 'IT3CLNT900', C_SNDPRT LIKE EDIDC-SNDPRT DEFAULT 'LS'. "Destination System ***START-OF-SELECTION START-OF-SELECTION. PERFORM GENERATE_DATA_RECORDS. PERFORM GENERATE_CONTROL_RECORD. PERFORM SEND_IDOC. *&---------------------------------------------------------------------* *& Form GENERATE_DATA_RECORDS *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * --> p1 text * p1 text *