cancel
Showing results for 
Search instead for 
Did you mean: 

Collect IDocs to Single Request message without BPM

Former Member
0 Kudos

Hi Experts,

My scenario is IDoc to SOAP.

PI receives multiple IDoc with same message type. ECC pushed bundled IDOcs to PI via HTTP port.

Ex: <CLFMAS>

<IDOC1>

<IDOC2>

<IDOC3>

The receiver is SOAP channel.

I would like to achieve mentioned output structure without BPM.

Input Structure:
------------------
<CLFMAS>1..1
     <IDOC1> 1..999999
        <Employee>1..1
               <EmpID1>1..1
                <Location>0..999
                    <JAPAN>0..1
                <Location>
                    <FRANCE>
                <Location>
                    <BRAZIL>
     </IDOC1>
      <IDOC2>
        <Employee>
               <EmpID2>
                <Location>
                    <BRAZIL>
                <Location>
                    <JAPAN>
                <Location>
                    <USA>
        </IDOC2>
</CLFMAS>

Output structure:
----------------------
<RequestMessage>1..1
     <GroupListType>1..1
             <GroupList>0..Unbounded
                  <JAPAN>1..1
                   <EmpID1>0..Unbounded
                   <EmpID2>    
              <GroupList>
                  <BRAZIL>
                   <EmpID1>
                   <EmpID2>    
     </GroupListType>
</RequestMessage>

Pointers will be very helpful.

Thanks

Ray..

Edited by: RayPIUS on Oct 16, 2011 6:21 AM

Accepted Solutions (0)

Answers (2)

Answers (2)

PriyankaAnagani
Active Contributor
0 Kudos

Hi,

Use IDOC packaging concept and specify the packet size as 2 or 3 based on how many idocs you want to collect for creating a single target message. And try with the below mapping logic.

location>removecontext>sort>splitbyValuehange>collapseContext-->TargetGroupList

formatByExample-->TargetEmpId

formatByExample:

input1:resultofSortByKey

input2:location>removecontext>sort-->splitByvaluchange

SortBykey:

input1:location-->removecontext

input2:EmpId>UDF>removecontext-->

UDF:

execution type allvalues of context

pass location(var1) and empId as inputs to UDF

for(int i=0;i<var1.length;i++){

result.addValue(empId[0]);

}

Regards,

Priyanka

Former Member
0 Kudos

HI,

-> you go with IDOC packaging concept. we have three approaches collecting idocs,

1. by using tRFC port

we need create rfc destination(SM59) and port of tRFC(WE21) and ccreate partner profile(WE20), in partner profile we have to specify the packet size.

then coming to PI in ID we need to create sender communication channel for IDOC there we have to provide packet size.

2.by using XMLFILE PORT

Please refer this blog it will help you

3.by using XML HTTP PORT

please go through this blog i hope this will help you

-> IN PI we have message packaging concept.

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/10b54994-f569-2a10-ad8f-cf5c68a94...

regards,

ganesh.