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

Custom Idoc-segments

Former Member
0 Likes
804

Hi,

I am working on inbound processing of idocs. The issue is to post production confirmations into SAP using idocs sent by the middleware. I have to create a custom idoc for this purpose. I know the steps for creating a custom idoc type and message type.

The problem is that the number of segments of each idoc sent by the middleware is not fixed. They wanted the idoc to be setup in such a way that each time they send an idoc they want segments repeated based on the entries in the flat file.

Please help me out.Thanks

Hi,

I am working on inbound processing of idocs. The issue is to post production confirmations into SAP using idocs sent by the middleware. I have to create a custom idoc for this purpose. I know the steps for creating a custom idoc type and message type.

The problem is that the number of segments of each idoc sent by the middleware is not fixed. They wanted the idoc to be setup in such a way that each time they send an idoc they want segments repeated based on the entries in the flat file.

Please help me out.Thanks

5 REPLIES 5
Read only

dani_mn
Active Contributor
0 Likes
761

HI,

You have to make a IDOC for each entry in FLAT file.

Its not possible to create a new segment for each record.

If the structure of the records is same in Flat file. then you need just one segment.

use the FM 'MASTER_IDOC_DISTRIBUTE' to create and send idoc's.

and in inbound processing you need a INBOUND PROCESSING CODE with which you can attach your function module for inbound processing.

Regards,

HRA

Read only

Former Member
0 Likes
761

the flat file looks like this

setno matl i/o

1 a i

1 b o

1 c o

2 e i

2 z o

3 f o

for the setno 1 only one idoc has to have 3 segments. for setno 2 it has to have 2 segments and so on.

So how do i do this

Read only

dani_mn
Active Contributor
0 Likes
761

HI,

For this i have a solution.

you can make two segments one is header and other is item.

in Header segment only setno field ocours. and in item segment all three fields will be there. like this.

HEADER INFORMATION:

1

ITEM INFORMATION:

1 a i

1 b o

i c o

Now you fill your each idoc for each setno. and distribute it. and in receving system you will got a IDOC for each SETNO. Then you can loop in header segment and find all its items from item segment.

Regards,

HRA

<b>Reward points if my post helps you.</b>

Read only

Former Member
0 Likes
761

You mean to say that the item segment should be an extension type ??

Thanks

pratyusha

Read only

Former Member
0 Likes
761

For the repeating segments set the maximum number in the attributes to 99999.