2006 Aug 10 5:02 AM
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
2006 Aug 10 5:17 AM
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
2006 Aug 10 5:29 AM
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
2006 Aug 10 5:39 AM
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>
2006 Aug 10 2:40 PM
You mean to say that the item segment should be an extension type ??
Thanks
pratyusha
2006 Aug 10 2:54 PM
For the repeating segments set the maximum number in the attributes to 99999.