idoc_to_file_beginner_guide_2009061511245120405

16
8/8/2019 IDOC_to_File_Beginner_Guide_2009061511245120405 http://slidepdf.com/reader/full/idoctofilebeginnerguide2009061511245120405 1/16 IDOC to FILE - Beginner’s Guide SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com  © 2007 SAP AG IDOC to File – Beginner’s Guide Applies to: SAP Exchange Infrastructure (PI) Summary SENDING A CUSTOM IDOC DEVELOPED IN SENDER R/3 SYSTEM TO RECEIVER SYSTEM VIA INTEGRATION SERVER. Author(s) : Mandeep Virk Company : ArchitectSAP Solutions Created on: 24 December 2007 Author Bio Hi I am Mandeep Singh Virk working with ArchitectSAP Solutions as a Process Integration Consultant. Hi Folks, Although IDOC to File is a common yet pivotal scenario. It is very challenging to trigger an IDOC to integration server , rest part is up to integration server. So here we are mainly concerned on the part from R/3 to integration server. We will create a custom IDOC and trigger it to receiver system via integration server. So Here we go..

Upload: vpithani

Post on 10-Apr-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: IDOC_to_File_Beginner_Guide_2009061511245120405

8/8/2019 IDOC_to_File_Beginner_Guide_2009061511245120405

http://slidepdf.com/reader/full/idoctofilebeginnerguide2009061511245120405 1/16

IDOC to FILE - Beginner’s Guide 

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

  © 2007 SAP AG

IDOC to File – Beginner’s Guide

Applies to:

SAP Exchange Infrastructure (PI)

Summary

SENDING A CUSTOM IDOC DEVELOPED IN SENDER R/3 SYSTEM TO RECEIVER SYSTEMVIA INTEGRATION SERVER.

Author(s): Mandeep Virk

Company: ArchitectSAP Solutions

Created on: 24 December 2007

Author Bio

Hi I am Mandeep Singh Virk working with ArchitectSAP Solutions as a ProcessIntegration Consultant.

Hi Folks,

Although IDOC to File is a common yet pivotal scenario. It is very challenging to trigger an IDOC tointegration server , rest part is up to integration server. So here we are mainly concerned on thepart from R/3 to integration server. We will create a custom IDOC and trigger it to receiver systemvia integration server.

So Here we go..

Page 2: IDOC_to_File_Beginner_Guide_2009061511245120405

8/8/2019 IDOC_to_File_Beginner_Guide_2009061511245120405

http://slidepdf.com/reader/full/idoctofilebeginnerguide2009061511245120405 2/16

IDOC to File – Beginner’s Guide 

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

  © 2007 SAP AG

Table of Contents

Applies to: .......................................................................................................................1 Summary.........................................................................................................................1 Author Bio .......................................................................................................................1 STEPS TO DEVELOP CUSTOM IDOC IN R/3 SYSTEM ................................................3 STEPS TO ESTABLISH CONNECTION BETWEEN R/3 SYSTEM AND XI SERVER.....5 TESTING ......................................................................................................................11 MONITORING...............................................................................................................13 XI OBJECTS DEFINITION............................................................................................14 Integration Repository: Design ......................................................................................14 Integration Directory: Configuration ...............................................................................15 RESULT........................................................................................................................16 

Page 3: IDOC_to_File_Beginner_Guide_2009061511245120405

8/8/2019 IDOC_to_File_Beginner_Guide_2009061511245120405

http://slidepdf.com/reader/full/idoctofilebeginnerguide2009061511245120405 3/16

IDOC to File – Beginner’s Guide 

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

  © 2007 SAP AG

STEPS TO DEVELOP CUSTOM IDOC IN R/3 SYSTEM 

Go to TC: WE31 

• To Create IDOC Structure: Segments

• Enter the name of your segment type and click on Create button. Enter short text and Save

it. Now go back. Go to Edit menu option Set Release.

Fig No. 1

Go to TC: WE30 

• To Create IDOC Type: Basic.

• Enter the Object Name, Select Basic Type and click Create icon

Fig No. 2

• Select the IDOC Name and click Create icon. The system prompt us to enter the segmentType and its attributes. Choose the appropriate values and press enter.

• Save it and go back

• Go to Edit Set Release

Page 4: IDOC_to_File_Beginner_Guide_2009061511245120405

8/8/2019 IDOC_to_File_Beginner_Guide_2009061511245120405

http://slidepdf.com/reader/full/idoctofilebeginnerguide2009061511245120405 4/16

IDOC to File – Beginner’s Guide 

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

  © 2007 SAP AG

Fig No. 3

Go to TC: WE81 

• To Create Message Type

• Change the details from Display mode to Change mode.

• System will give the message “Caution: The Table is cross-client “. Press Enter.

• Click New Entries to create new Message Type

• Fill Details. Save it and Go Back

Fig No. 4

Go to TC: WE82 

• To Assign Message Type to IDOC Type

Fig No. 5

Page 5: IDOC_to_File_Beginner_Guide_2009061511245120405

8/8/2019 IDOC_to_File_Beginner_Guide_2009061511245120405

http://slidepdf.com/reader/full/idoctofilebeginnerguide2009061511245120405 5/16

IDOC to File – Beginner’s Guide 

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

  © 2007 SAP AG

Go to TC: WE60 

• To See IDOC Documentation. Here you can see Structure of your Basic Type IDOC in textformat.

Fig No. 6

STEPS TO ESTABLISH CONNECTION BETWEEN R/3 SYSTEM AND XI SERVER  

Go to TC: SM59 

• To Configure RFC Connection for Receiver System

Fig No. 7

Page 6: IDOC_to_File_Beginner_Guide_2009061511245120405

8/8/2019 IDOC_to_File_Beginner_Guide_2009061511245120405

http://slidepdf.com/reader/full/idoctofilebeginnerguide2009061511245120405 6/16

IDOC to File – Beginner’s Guide 

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

  © 2007 SAP AG

• Define RFC Destination for Receiver system i.e. XI Server

Fig No. 8

• Provide all Technical settings for your Receiver System. System Name for your XI Serveras Target Host and its System No .

• Move to Logon & Security Tab to provide Logon Details like Language, Client, User,Password.

Go to TC: WE21 

• To Configure Port in IDOC Processing for Receiver System .

• Choose tRFC as a Port for IDOC Processing and Choose Create New.

Fig No. 9

Page 7: IDOC_to_File_Beginner_Guide_2009061511245120405

8/8/2019 IDOC_to_File_Beginner_Guide_2009061511245120405

http://slidepdf.com/reader/full/idoctofilebeginnerguide2009061511245120405 7/16

IDOC to File – Beginner’s Guide 

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

  © 2007 SAP AG

• In a Pop up system will prompt you to choose options from Generate port name or Defineyour own port name. You can define port name of your choice.

Fig No. 10

• Give a short description to your port and assign RFC Destination to this port which youhave created in previous steps.

Fig No. 11

Go to TC: BD54 

• To Configure a Logical System as Receiver System .

• Change the details from Display mode to Change mode.

• System will give the message “Caution: The Table is cross-client “. Press Enter.

• Create New Entries. Give name to your Logical System and Description for the same.

Page 8: IDOC_to_File_Beginner_Guide_2009061511245120405

8/8/2019 IDOC_to_File_Beginner_Guide_2009061511245120405

http://slidepdf.com/reader/full/idoctofilebeginnerguide2009061511245120405 8/16

IDOC to File – Beginner’s Guide 

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

  © 2007 SAP AG

Fig No. 12

Go to TC: WE20 

• To Configure a Partner Profile for your Receiver System .

• Select Partner Type LS (Logical System). Choose Create New.

• Enter Logical System Name as Partner No. which you have created in previous step i.e.BD54. Partner Type should be LS.

• Fill all mandatory fields as per your system specifications. You can Choose F4 help.

Add a new row in Outbound Parameters and select Message Type which you have createdin custom IDOC as shown in fig 13.

Fig No. 13

Page 9: IDOC_to_File_Beginner_Guide_2009061511245120405

8/8/2019 IDOC_to_File_Beginner_Guide_2009061511245120405

http://slidepdf.com/reader/full/idoctofilebeginnerguide2009061511245120405 9/16

IDOC to File – Beginner’s Guide 

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

  © 2007 SAP AG

• Message Type that you have defined in WE81 

Fig No. 14

• Assign Message Type and Basic Type to Outbound Parameters of Partner Profile.

• Specify Receiver Port which we had defined earlier.

• Make sure that Output mode should be Transfer IDOC immediately instead of CollectIDOC.

Fig No. 15

Page 10: IDOC_to_File_Beginner_Guide_2009061511245120405

8/8/2019 IDOC_to_File_Beginner_Guide_2009061511245120405

http://slidepdf.com/reader/full/idoctofilebeginnerguide2009061511245120405 10/16

IDOC to File – Beginner’s Guide 

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

  © 2007 SAP AG

• As this was the last step of our configuration part for RECEIVER SYSTEM on SenderSystem Side. We Developed a custom IDOC and Configured settings for the outboundprocessing through all these steps. Now what we have to do is to Test the outbound IDOCprocessing for the same.

• But before moving further with this step we have to do technical settings for SENDERSYSTEM that should be on XI Server .Now Logon to XI Server in your Landscape.

Go to SM59.

• To Define RFC Destination for Sender System

• Maintain Technical Settings and Logon & Security Settings as per your systemspecifications.

Fig No. 16

Go to TC: IDX1.

• To maintain Port and Logical System for Sender System in IDOC Adapter

• Give RFC Destination as Defined in previous step.

NOTE: Make sure that Port for sender system is of the format SAP<SID>. Where SID is yourthree digit System ID.

Page 11: IDOC_to_File_Beginner_Guide_2009061511245120405

8/8/2019 IDOC_to_File_Beginner_Guide_2009061511245120405

http://slidepdf.com/reader/full/idoctofilebeginnerguide2009061511245120405 11/16

IDOC to File – Beginner’s Guide 

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

  © 2007 SAP AG

Fig No. 17

• Now that is all from the configuration side of Ports and Logical Systems for both Senderand Receiver Systems

TESTING 

• To Test IDOCs outbound processing

Go to TC: WE19 

• To Test the IDOC processing

• Select Basic Type button and search for your developed Custom IDOC with F4 help.

Fig No. 18

• Enter Data Records in segment type of your IDOC that you wish to send to other system.

• Here we are using some test data to test the processing for the same.

Page 12: IDOC_to_File_Beginner_Guide_2009061511245120405

8/8/2019 IDOC_to_File_Beginner_Guide_2009061511245120405

http://slidepdf.com/reader/full/idoctofilebeginnerguide2009061511245120405 12/16

IDOC to File – Beginner’s Guide 

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

  © 2007 SAP AG

Fig No. 19

• Now we will specify Technical settings in the header of IDOC i.e. in EDIDC field.

Click on EDIDC and specify the technical details for both sender and receiver. Click Enter.

Fig No. 20

• Select Standard Outbound Processing to trigger the IDOC for outbound Processing.

• You will get prompt as shown in case of successful triggering of IDOC else in case of failuresystem will display message “ IDOC <Idoc No.>was saved but cannot or should not besent”.

Page 13: IDOC_to_File_Beginner_Guide_2009061511245120405

8/8/2019 IDOC_to_File_Beginner_Guide_2009061511245120405

http://slidepdf.com/reader/full/idoctofilebeginnerguide2009061511245120405 13/16

IDOC to File – Beginner’s Guide 

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

  © 2007 SAP AG

Fig No. 21

Go to TC: WE02 / WE05.

• To check the status of triggered IDOC

• You can see your IDOC under the node of Outbound IDOCs

Fig No. 22

MONITORING 

Go to TC: SXMB_MONI

• To monitor IDOC received by integration server

Fig No. 23

NOTE: Here you can see the message flag along with red icon displaying status“Acknowledgement not possible”. This is another most challenging area to deal with and fix theproblem. I will try to explain/troubleshoot this part in next article.

Page 14: IDOC_to_File_Beginner_Guide_2009061511245120405

8/8/2019 IDOC_to_File_Beginner_Guide_2009061511245120405

http://slidepdf.com/reader/full/idoctofilebeginnerguide2009061511245120405 14/16

IDOC to File – Beginner’s Guide 

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

  © 2007 SAP AG

XI OBJECTS DEFINITION

Integration Repository: Design

• Define Data Type, Message Type and Interface Type Objects with a new messagestructure to handle incoming IDOC.

Eg. MT_Materials and Message Interface as Inbound Asynchronous.

Fig No. 24

• Import custom IDOC from SAP objects under Imported objects in a specific SWCV.

Eg. ZMATERIAL_MESSAGE.ZMATERIAL

Fig No. 24

• Define message mapping with custom idoc as sender interface and user defined messagestructure as receiver interface as shown :

Page 15: IDOC_to_File_Beginner_Guide_2009061511245120405

8/8/2019 IDOC_to_File_Beginner_Guide_2009061511245120405

http://slidepdf.com/reader/full/idoctofilebeginnerguide2009061511245120405 15/16

IDOC to File – Beginner’s Guide 

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

  © 2007 SAP AG

Fig No. 25

Integration Directory: Configuration

• Before moving with this step assign a Business System to existing/new Technical System.

• Now Import Business System assigned to Technical System from SLD to your integrationbuilder.

• Go to Integration Directory Objects Tab Service Without Party Business System

• Right Click Assign Business SystemSelect newly built BS and proceed further.

Fig No. 26

Page 16: IDOC_to_File_Beginner_Guide_2009061511245120405

8/8/2019 IDOC_to_File_Beginner_Guide_2009061511245120405

http://slidepdf.com/reader/full/idoctofilebeginnerguide2009061511245120405 16/16

IDOC to File – Beginner’s Guide 

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

• Define a Receiver Communication Channel as FILE Adapter and assign it to ReceiveService.

• Also Define all the configuration objects either manually or through wizard.

• Remember in this case sender should be Business System and there is no need definecommunication channel for the same. Use IDOC Adapter as sender adapter.

• Now you can test the idoc by triggering it from R/3 system form WE19.

RESULT

Received XML payload on receiver service

Fig No. 27