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: 

Hi All ! need help in idoc !

Former Member
0 Kudos
122

Can a idoc be posted succes fully with out writting the inbound code....

What i mean is can we get the gree signal in the we02....only by writting the outbound and ale configuaration (Dist model) ?

3 REPLIES 3

Former Member
0 Kudos
94

hi,

if at all you want to post IDOCs sucessfully to receiver system, it is mandatory that you have to do all the necessary ALE config releated to your specific Message type and IDOC type....

make use of WEDI, SALE transactions for ALE initial config...

Once these settings are done you can see green light in WE02

rewards if useful............................

0 Kudos
94

Do we need to write the inbound function module or not !

Former Member
0 Kudos
94

HI,

We should write the function module than only we can the data.

Example function module .

Inbound IDoc Posting Function Module

In the receiving system, create a function module Z_IDOC_INPUT_ZRZSO_MT using SE37. Below, I have described the logic for the same.

Add Include MBDCONWF. This include contains predefined ALE constants.

Loop at EDIDC table

Check if the message type is ZRZORDER. Otherwise raise WRONG_FUNCTION_CALLED exception

Loop at EDIDD table

Append data from the segments to appropriate internal tables

For example: append data from ZRZSEG1 segment to the internal table of type ZCUSTOMERS

Update the DDic tables from internal tables

Depending on the result of the update, fill the IDoc status record (type BDIDOCSTAT) and append it to the corresponding table.

Status 53 => Success

Status 51 => Error

You can [3] download the sample ABAP code for the above function module here.

Inbound Settings

Define Logical Systems – Transaction SALE (Please refer to Outbound Settings discussed in [4] previous part)

Assign Client to Logical System – Transaction SALE (Please refer to Outbound Settings discussed in [5] previous part)

Maintain RFC Destinations – Transaction SM59 (Please refer to Outbound Settings discussed in [6] previous part)

Define Ports – Transaction WE21 (Please refer to Outbound Settings discussed in [7] previous part)

Generate/Create Partner Profile – Transactions BD82/WE20 (Please refer to Outbound Settings discussed in [8] previous part)

Assign Function Module to Logical message – Transaction WE57

Create a new entry

Specify name of the Function Module as Z_IDOC_INPUT_ZRZSO_MT

Also, specify Type as F, Basic IDoc type as ZRZORDER, Message type as ZRZSO_MT and Direction as 2 (Inbound)

Save the entry

Define Input method for Inbound Function Module – Transaction BD51

Create a new entry

Provide Function Module name as Z_IDOC_INPUT_ZRZSO_MT

Specify the Input method as 2

Save the entry

Create a Process Code – Transaction WE42

Create a new Process Code ZPCRZ

Select Processing with ALE Service

Choose Processing type as Processing by function module

Save the entry

On the next screen, select your function module from the list

Save the changes

Now you will be taken to the next screen

Double-click on Logical message

In the Assignment to logical message, specify the message type ZRZSO_MT

Save the changes

Send and receive data

On the sender system, execute the IDoc Generation Program. Check the status of IDoc using transaction WE02.

Check the status of the IDoc in the receiver system using transaction WE02. You can also check the contents of DDic tables to make sure that the records have been created in the receiver system.

Regards,

S.Nehru.