on 08-09-2020 5:53 PM
Hi Experts,
I have requirement where I am calling two different systems fetching the data.
Flow -
Response XML from Step-1
<EmployeeTime>
<EmployeeTime>
<ABC>xyz</ABC>
<userId>100050</userId>
<ABC1>xyz1</ABC1>
</EmployeeTime>
<EmployeeTime>
<ABC>xyz</ABC>
<userId>100060</userId>
<ABC1>xyz1</ABC1>
</EmployeeTime>
<EmployeeTime>
<ABC>xyz</ABC>
<userId>100070</userId>
<ABC1>xyz1</ABC1>
</EmployeeTime>
</EmployeeTime>
Response XML from Step-2
<n0:ZHTR_LEAVE_SAL_ADVANCEResponse xmlns:n0="urn:sap-com:document:sap:rfc:functions" xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<E_LEAVEDATA>
<item>
<PERNR>100050</PERNR>
<AMOUNT>0.0</AMOUNT>
<DAYS/>
<DATE>0000-00-00</DATE>
</item>
<item>
<PERNR>100060</PERNR>
<AMOUNT>0.0</AMOUNT>
<DAYS/>
<DATE>0000-00-00</DATE>
</item>
<item>
<PERNR>100070</PERNR>
<AMOUNT>0.0</AMOUNT>
<DAYS/>
<DATE>0000-00-00</DATE>
</item>
</E_LEAVEDATA>
</n0:ZHTR_LEAVE_SAL_ADVANCEResponse>
I am using gather to combine these two message, however, I am not getting the desired results.
My requirement is to get the output as
<EmployeeTime>
<EmployeeTime>
<ABC>xyz</ABC>
<userId>
<PERNR>100050</PERNR>
<AMOUNT>0.0</AMOUNT>
<DAYS/>
<DATE>2020-02-29</DATE>
</userId>
<ABC1>xyz1</ABC1>
</EmployeeTime>
<EmployeeTime>
<ABC>xyz</ABC>
<userId>
<PERNR>100060</PERNR>
<AMOUNT>0.0</AMOUNT>
<DAYS/>
<DATE>2020-02-29</DATE>
</userId>
<ABC1>xyz1</ABC1>
</EmployeeTime>
<EmployeeTime>
<ABC>xyz</ABC>
<userId>
<PERNR>100070</PERNR>
<AMOUNT>0.0</AMOUNT>
<DAYS/>
<DATE>2020-02-29</DATE>
</userId>
<ABC1>xyz1</ABC1>
</EmployeeTime>
</EmployeeTime>
can anyone please guide how to put the condition in gather to achieve this.
Regards,
Akash
Akash,
how did you solved this issue? Please share. Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi akashenoc,
It's not clear why can't you use Enricher.
Enrich doesn't require same XML's. Till the time you have a valid XML you could use Enricher.
thanks and regards,
Praveen T
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Akash,
"The Gather step merges messages from different routes (into a single message) with the option to define certain strategies how to combine the initial messages. The Join step is used in combination with the Gather step. It brings together the messages from different routes, but it does not affect the content of the messages"
But your requirement is not merging, your requirement is to enrich based on UserID. Hence as per my understanding Enricher should be used.
For more details please refer below link:
Hope this helps !
thanks and regards,
Praveen T
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi akashenoc,
You wont be able to get the desired result in one step. you could use Enricher step to achieve this.
Please find below the link with more details.
Post that you might need an xslt or message-mapping or groovy script to get the resultant structure.
Hope this helps !
Thanks and regards,
Praveen T
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.