Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

IDOC Port defnition ***Urgent***

Former Member
0 Kudos

Hello Gurus,

Could u plzz provide me instructions on how to define a port and partner profile for IDOCs..

Rgds,

Pavan P.

6 REPLIES 6

Former Member
0 Kudos

hi

<b>Port</b>

Go to we21 . Then choose Transactional R and press f7.. Then give any name and provide RFC destination ( First create RFC destination in sm59 )

<b>Partner profile:</b>

Go to we20 and define 2 partner with in " Partner Type in LS Logical System "

then save it

Reward points

Former Member
0 Kudos

Hi Pavan,

After you create the necessary workflow configuration, you can carry out the steps for process

configuration.

1. Create a new message type.

2. Link the message type to the IDoc type.

3. Allocate the function module to the logical message type.

4. Define the attributes for the inbound function module.

5. Create a new process code.

6. Assign input methods

7. Create (or change) a partner profile.

<b>The Port Definition

Transaction: WE21</b>

Path: From the ALE customizing in IMG, choose Sending and Receiving Systems,

Systems in Network, Asynchronous Processing, Assigning Ports, DefinePort.

A port defines the medium in which data is exchanged between the two systems. In the ALE

process, IDocs are transferred via memory. As of release 4.6, six port types are available.

--Transactional RFC (tRFC) :ports used for ALE communication

-- File ports :used by EDI

-- CPI-Cports :used to communicate with R/2 systems

-- Internet ports :used to connect with Internet applications

-- ABAP-PI :ports used to process data via the ABAP programming interface

-- XML ports : used to process files in XML format

NOTE: For port definitions to be generated automatically, the RFC destination

name must be the same as the logical system name.

Port definitions are client-independent objects. The tRFC port used in the ALE process can be

generated automatically when you generate partner profiles, or it can be maintained manually.

<b>Create or Change the Partner Profile

Transaction: WE20</b>

Menu Path: From the Area menu of EDI, choose IDoc, Partner Profile.

A partner profile is created for every partner system with which you exchange IDocs.

In the partner profile, a record is created for every incoming message.

Create a partner profile if it does not exist. Add a record for your incoming message.

Reward with points if helpful.

Regards,

Vijay

Former Member
0 Kudos

Hi Pavan,

Do these settings in your sending system.

Goto Transaction WE21 to define a port. You can choose the radio button Generate Own Port Name.Select the RFC Destination [ Your Receiving system] if your receiving system is not listed then you need to create a RFC destination through Transaction SM59. Now create a port in a similar way in your receiving system where your RFC destination will be of sending system.

Now, for creating a partner profile go to Transaction WE20. select Partner Type LS. Now you need to enter the name of the Logical System of your receiving system[ You can get the name through Transaction SALE under the node define Logical Systems] as the Partner No. Now for the field 'TY' enter US and for "AGENT" enter a user-id with sufficient authorizations. You then define the message types as outbound parameters wherein you will specify the port no. created in the receiving system. Similarly create a partner profile in your receiving system wehere the message types will be defined in inbound parameters with the port no of the sending system.

Hope this is helpful.

Regards,

Vipul Musale

Former Member
0 Kudos

Hi Pavan,

Go through this hope u can,

ALE/IDOC

IDOC Programming

There are two processes in IDOC processing one is INBOUND PROCESS( IDOC coming to the system and its handling at various stages) and the other is OUTBOUND PROCESS( IDOC is send to other system . Separate ABAP programs are written for these 2 processes and different configuration settings are required for each one .Depending upon the trigeering mechanism different programming approaches are used.OUTBOUND PROGRAMS handle the IDOC creation and INBOUND PROGRAMS handle the inbound IDOC and the data trasfer from the IDOC to the database tables.

NEED FOR ABAP PROGRAMMING arises if

1)New IDOC was created

Depending upon the triggering mechanism i.e change pointer,message control

etc the programming technique changes and the type of process.

2)Existing IDOC was extended

User Exits are used to populate data in new segments added and to read them

back.

3)To enhance an exsiting process.

User Exits are used .

Basic structure of an OUTBOUND PROGRAM

The basic structure of all outbound programs is same. The CONTROL

record which is of TYPE EDIDC has to be filled. It contains important fields like

IDOCTP IDOC type

MESTYP Message Type

RCVPRN Recieving Partner (Destination)

RCVPRT Partner Type (it is LS i.e Logical System)

The DATA RECORD internal table which is of TYPE EDIDD has to be filled

in the same order as there are segments in the IDOC definition.

It has 2 important fields which are to be filled ,these are

SEGNAM Name of the segment

SEGDATA Data in the segment and can be upto 1000 bytes.This field

is corresponds to each data segment in the IDOC.

e.g.

DATA INT_EDIDD LIKE EDIDD OCCURS 0 WITH HEADER LINE.

DATA W_SEGDATA LIKE zsegment "custom segment zsegment

INT_EDIDD-SEGNAM = 'ZSEGMENT'

W_SEGDATA-field1 = value "taken from some table

W_SEGDATA-field2 = value "taken from some table

INT_EDIDD-SEGDATA = W_SEGDATA

APPEND INT_EDIDD

This will fill the data record corresponding to the segment ZSEGMENT . For all

segments the sam steps will be repeated until all the data corresponding to all the

segments in the idoc is filled in the internal table of type EDIDD.

There is only one control record and can be multile data records in the idoc

structure.

Which data is to be extracted from the tables to be filled in EDIDD type internal table is determined in standalone programs from the objects which are specified in the selection screen and from the object key passed to the function module in case of message control and is taken from BDCP table in case of change pointers using function modules "CHANGE_POINTERS_READ"

In case of stand alone programs and function modules based on change pointers method the function module "MASTER_IDOC_DISTRIBUTE" is used to send the IDOC to ALE layer for distribution ,in case of message control it is handled automatically by the RSNASTED program invoked by the message control.

OUTBOUND PROCESS AND OUTBOUND PROGRAM.

Outbound programs are used in outbound process to genearte IDOCs . There

purpose is to extract the data from the tables and to fill the IDOC data records

and the control record in the IDOC and pass ito the ALE layer for distribution to the recieving system .

Depending upon the triggering mechanism (how and when the outbound program will be started different techniques and interface is used for outbound program.

1)Message control

Application like PO(purchase order) creation use this technique , where the output type is linked to the application(Message control is a configurable cross application component which can be set in IMG .Such programs are created in the form of function modules and linked to the output type which is linked to the apllication.These have predefined interfaces.

In outbound programs(function module) that use message control the key of the

application document is passed to the function module whcig will read the data from the table depending upon the key passed(NAST structure) and fill the IDOC segemnts with the application data.The control record is also passed to the function module but is not fully filled, the rmaining fields are filled and the control is passed back to the calling program which is RSNASTED and is invoked by the

message control to process ALE and EDI output types and this program on recieving the IDOC data will create the physical IDOC in the system.

The parameteers passed to the function module are

IMPORTING PARAMETERS

OBJECT LIKE NAST

It contains documents key.

CONTROL_RECORD_IN LIKE EDIDC

It contains the partailly filled control record

EXPORETING PARAMETER

OBJECT_TYPE

CONTROL_RECORD_OUT LIKE EDIDC

TABLES

INT_EDID LIKE EDIDD

The internal table used to fill the data records in the same order as they exists in the IDOC.

The important parameters that should be filled in the custom function module are

CONTROL_RECORD_OUT and INT_EDIDD .The OBJK field of the structue NAST contains the key of the apllication document.

2)Stand alone programs

Generally used for Master Data transfer and as such depending upon the requirement can have different interfaces.The programs have a selection screen which has select options to select the objects, and parameters for specifying the recipient Logical System and the Message Type.

Data is selected based on the specified objects from the tables . and control record of type EDIDC is created and filled with important values like DIRECTION ,IDOCTP,RCVPRT,RCVPRN and MESTYP .

Data is filled in an internal table of TYPE EDIDD according to segment definitions

and in same order and the function module MASTER_IDOC_DISTRIBUTE is called passing the control record and the internal table containg IDOC data and importing an internal table consisting of control records for each communication IDOCS created.

3)Change pointer

Change Pointer table is read and checked if changes were made to important fields , if so the outbound program will be triggered automatically , these have predefined interfaces

ALE/IDOC Transaction

SALE Area Menu for ALE configurations.It includes transactions for

Logical System definition and linking it to a client, Transactions for

RFC Destination and Port Definition Etc.

SM59 RFC Destination

Here we specify the login settings for the destination including

the I.P address or Application Server name and the User name and

password.The information entered here is used to run Remote Function

Calls(RFC ) on the destination server .We can create number of types

of RFC Destinations but 3 types are important .

R/3 (R/3 to R/3), LS(logical system) and TCP/IP.

The name of the RFC destination should be same as that of Logical

System as it helps in creation of automatic partner profiles.

WE21 Port Definition.

There are 6 types of ports but only 2 types File and Transactional RFC

types of ports are important.

We have to specify the RFC Destination before a port can be created.

WE57 This is used to assign the Inbound function module to the Message Type

and to the IDOC Type.

WE42 This is used to define the process Code for Inbound Processing.

BD95 Define Filter object type .We can specify the field and the table it belongs

to as a filter object .

BD59 Assignment of Filter object type to the Message Type .Here we create the

link between Filter object and the segment and the message type and the

segment Field.

BD50 Set message Type to reducible.

BD65 Define Mandatory Fields.

BD64 Distribution Model . Also known as Customer Distribution Model Used to

define all the messages that will be exchanged between remote systems

and the name of thes logical systems. Any filters can also be specified.

The model once created has to be distributed on every system which will

be communicating ,It can be maintained on only One system.

BD21 Creating IDOcs from change pointers.

This can be used to create IDOCs from change pointers for a particular

message LIKE MATMAS.

BD22 This can be used to delete change pointers.

BD87 Status Monitor. Idocs can be selected base on number of criteria and there

processing status can be seen in detail.

BD10 Material Master Data Distribution .

Based on Message MATMAS.

BD12 Customer Master Data Distribution .

Based on Message CREMAS.

BD14 Vendor Master Data Distribution

Based on Message DEBMAS .

BDFG Generate ALE Interface for BAPI.

Here we specify the Business Object and the BAPI Function module for

which the interface has to be created.

WE31 Segment Editor.

This is used to create segments. We create the segment type and

segment definition is automatically created by editor e.g. Z1DUMMY is

segment type and Z2DUMMY is the segment definition .We specify the

fields and the data elements these cp\orresponds to create segments.

WE30 IDOC Editor

It is used to create a new IDOC Type or IDOC Extension .We specify the

segments that will be addd to the IDOC type.

WE02/05 IDOC List.

Various selct options and parameters are provided to select IDOCs

depending on the date, direction , mesage type etc.

WE20 Partner Profile

Here we create partner profile for each and every partner from / to which

the messages will be exchanged.There are 6 types of PF generally only

profiles of type LS(Logical System) ,KU(Customer) ,LI(Vendor) is used.

We specify the partner number and partner type and the agent and

the agent type responsible for handling of errors .

For every message send to the partner we have a outbound record and for

evry message coming from the partner we have the inbound record .

We specify the message in the otbound/inbound records ,double

clicking will take us to the detailed screen where the IDOC Type ,Port

and whether the IDCO will be immediatelt processed or collected are

mentioned.

Reward points if helpful.

Thanks

Naveen khan

Former Member
0 Kudos

Hi Pavan,

For creating the port,port is a channel through which IDOC travels, we have to go to Tcode <b>we21</b> and there select transactional RFC( for ALE).If u are working on EDI then select file instead of TRFC............ click on create icon........then u will be asked to enter the port and the description.After entering the port name then give the RFC destination which u have created in the previous step in the TCODE SM59.........save it.With this the port will be created......

Coming to partner profile creation............... actually partner profile will identifies which type of data that partner will receive.we can create the partner profile in the TCODE we20........enter partner no n partner type( as LS).If we are creating this in outbound server then click on outbound parameter............. enter the message type,port and IDOC type..........save it.If we are creating in the inbound server then click on inbound parameter...........enter message type,port and process code(which is a pointer to the function module which collects the inbound IDOC)......With this partner profile will be generated.................

Reward points if it helps u................

Regards,

Sree.