Application Development and Automation 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: 
Read only

idoc inbound processing

Former Member
0 Likes
1,170

Hello

I have a requirement to create a custom FM to update ztables using the data from idocs. Can anyone help me with a sample code for creating a Z_IDOC_INPUT_DELVRY FM.

I would also like to know what is the use of segment fields like E1EDL41-QUALF, E1EDL43-QUALI and if they need to be stored along with other data like delivery number,item number, etc.

Thanks,

A.P.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
982

hi

check below

There are basically two types of IDOCs.

Basic IDOCs

Extended IDOCs

Idoc Components

Basic Idoc

Basic IDOC type defines the structure and format of the business document that is to be exchanged between two systems.

Extension Idoc

Extending the functionality by adding more segments to existing Basic IDOCs.

Creation of IDoc

To Create Idoc we need to follow these steps:

Create Segment ( WE31)

Create Idoc Type ( WE30)

Create Message Type ( WE81)

Assign Idoc Type to Message Type ( WE82)

Creating a Segment

Go to transaction code WE31

Enter the name for your segment type and click on the Create icon

Type the short text

Enter the variable names and data elements

Save it and go back

Go to Edit -> Set Release

Follow steps to create more number of segments

Create IDOC Type

Go to transaction code WE30

Enter the Object Name, select Basic type and click Create icon

Select the create new option and enter a description for your basic IDOC type and press enter

Select the IDOC Name and click Create icon

The system prompts us to enter a segment type and its attributes

Choose the appropriate values and press Enter

The system transfers the name of the segment type to the IDOC editor.

Create IDOC Type

Follow these steps to add more number of segments to Parent or as Parent-child relation

Save it and go back

Go to Edit -> Set release

Create Message Type

Go to transaction code WE81

Change the details from Display mode to Change mode

After selection, the system will give this message “The table is cross-client (see Help for further info)”. Press Enter

Click New Entries to create new Message Type

Fill details

Save it and go back

Assign Message Type to IDoc Type

Go to transaction code WE82

Change the details from Display mode to Change mode

After selection, the system will give this message “The table is cross-client (see Help for further info)”. Press Enter.

Click New Entries to create new Message Type.

Fill details

Save it and go back

i think itwould be helpful for you

Regards,

Naveen

8 REPLIES 8
Read only

Former Member
0 Likes
983

hi

check below

There are basically two types of IDOCs.

Basic IDOCs

Extended IDOCs

Idoc Components

Basic Idoc

Basic IDOC type defines the structure and format of the business document that is to be exchanged between two systems.

Extension Idoc

Extending the functionality by adding more segments to existing Basic IDOCs.

Creation of IDoc

To Create Idoc we need to follow these steps:

Create Segment ( WE31)

Create Idoc Type ( WE30)

Create Message Type ( WE81)

Assign Idoc Type to Message Type ( WE82)

Creating a Segment

Go to transaction code WE31

Enter the name for your segment type and click on the Create icon

Type the short text

Enter the variable names and data elements

Save it and go back

Go to Edit -> Set Release

Follow steps to create more number of segments

Create IDOC Type

Go to transaction code WE30

Enter the Object Name, select Basic type and click Create icon

Select the create new option and enter a description for your basic IDOC type and press enter

Select the IDOC Name and click Create icon

The system prompts us to enter a segment type and its attributes

Choose the appropriate values and press Enter

The system transfers the name of the segment type to the IDOC editor.

Create IDOC Type

Follow these steps to add more number of segments to Parent or as Parent-child relation

Save it and go back

Go to Edit -> Set release

Create Message Type

Go to transaction code WE81

Change the details from Display mode to Change mode

After selection, the system will give this message “The table is cross-client (see Help for further info)”. Press Enter

Click New Entries to create new Message Type

Fill details

Save it and go back

Assign Message Type to IDoc Type

Go to transaction code WE82

Change the details from Display mode to Change mode

After selection, the system will give this message “The table is cross-client (see Help for further info)”. Press Enter.

Click New Entries to create new Message Type.

Fill details

Save it and go back

i think itwould be helpful for you

Regards,

Naveen

Read only

0 Likes
982

Thanks for the input Naveen!

A.P

Read only

0 Likes
982

In IDOC_INPUT_DELVRY, there is a call to user exit 003. In there, you have access to both the IDOC data(IDOC_DATA) as well as the delivery data(DELIF_T_VBPOK).

Loop at them and move the values that you need, to the Z table fields and update the tables.

Read only

0 Likes
982

Please give more information as to what segments and what fields have the values that you are interested in to fill the Z table entries. Typically, you can loop at the idoc data and have a case statement for segnam field. This field has the name of the segment that is currently read in the loop. You can then move the sdata value of the current record to a structure of type segnam. After that you can read the individual fields of that structure/segment.

Look at the code of 'delvry_idoc_parse' routine in there and you will understand. You can even do this user exit 001 which is called from within loop of this routine.

Read only

0 Likes
982

Hello Srini

You're awesome. You made it a lot clearer to me.

Thanks,

A.P.

Read only

0 Likes
982

Glad to be of help. Please let me know if you encounter any further hurdles.

Read only

Former Member
0 Likes
982

Is the custom IDoc feeding only Z tables or you want to fill some Z tables while creating a delivery using standard IDocs? If you are using standard IDoc, then why not use some user exits to update the z tables?

Double click on the quilifier fields and go all the way to the domain and look at the values and you will understand the reason for the qualifier.

On the delivery, let us say you want to have material number. Now the same material can have different identifications depending on whether the value represents customer material number, manufacturer's part number, etc. Similarly, you may be creating the delivery with reference to several other documents. Then you can have a reference document qualifier called sales order and the value will represent the sales order number for which the delivery is created. Similarly it can be a PO or some other reference document. In short, qualifiers qualify the value of any particular attribute of the IDoc object.

Read only

0 Likes
982

Hello Srinivas,

Thanks for the quick reply. The inbound idoc I'm using is basic type DELVRY01 and message type WHSORD. It will be used to update only ztables as it is used only for an internal purpose. So how do I find the correct user exit to write the code to update the ztables.

A.P.