on 05-11-2009 8:26 AM
I have a flat file to flat file scenario. Based on the input file content, I want to route data to the receiver.
My source flat file contains several IDOC details. Assume two fields FIELD1 and FIELD2 in different segments of the IDOC. My requirement is if FIELD1 of an IDOC = "US" and FIELD2 of the same IDOC = "CA", then that IDOC's details needs to be passed to the receiver.
I have implemented the above condition at interface determination.
But the problem is:
Assume there are 3 idocs in the input file.
FIELD1 of IDOC[1] = 'US' and FIELD2 of IDOC[1] = 'GL'
FIELD1 of IDOC[2] = 'UK' and FIELD2 of IDOC[2] = 'EN'
FIELD1 of IDOC[3] = 'BR' and FIELD2 of IDOC[3] = 'CA' .
Now none of the IDOCs in the input satisfy my requirement and hence the message mapping should not be called at all. But in my case its failing because FIELD1 of IDOC[1] and FIELD2 of IDOC[3] together are satisfying the condition and hence the message mapping is called.
But I need to check this condition IDOCwise. Both the conditions to be satisfies in the same IDOC.
I am thinking that contexts are not being taken care.. It just see the whole file together and not IDOCwise.
Can someone help me on the same. Please let me know if more information is required.
Thanks,
Shobha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Create seperate receiver flat files for each input IDOC details using 1:N mapping and then you can easily route the files in receiver determination using payload content.
Thanks,
Subhajit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If u have flat file to flat file scenario then u must be using FCC...plz check if it is creating proper xml with proper context...then it might work.
once proper xml file is created then if condition is satified then only create node at target side.
and in receiver determination u can specify the condition to route data to receiver.
Regards,
Manisha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shobha,
In your case you should go for enhanced receiver determination.
For more details check the below blog..
[https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/3343] [original link is broken] [original link is broken] [original link is broken];
Other wise try like below,
[FIELD1 of IDOC[1] = 'US'] and [FIELD2 of IDOC[1] = 'GL'] EX. or
[FIELD1 of IDOC[1] = 'UK'] and [FIELD2 of IDOC[1] = 'EN'] EX.
Check the blog for detail..
[https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/3774] [original link is broken] [original link is broken] [original link is broken];
Regards,
Prakasu.M
Edited by: prakasu on May 11, 2009 7:07 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>
> I have a flat file to flat file scenario. Based on the input file content, I want to route data to the receiver.
>
> My source flat file contains several IDOC details. Assume two fields FIELD1 and FIELD2 in different segments of the IDOC. My requirement is if FIELD1 of an IDOC = "US" and FIELD2 of the same IDOC = "CA", then that IDOC's details needs to be passed to the receiver.
>
> I have implemented the above condition at interface determination.
>
> But the problem is:
> Assume there are 3 idocs in the input file.
> FIELD1 of IDOC[1] = 'US' and FIELD2 of IDOC[1] = 'GL'
> FIELD1 of IDOC[2] = 'UK' and FIELD2 of IDOC[2] = 'EN'
> FIELD1 of IDOC[3] = 'BR' and FIELD2 of IDOC[3] = 'CA' .
>
> Now none of the IDOCs in the input satisfy my requirement and hence the message mapping should not be called at all. But in my case its failing because FIELD1 of IDOC[1] and FIELD2 of IDOC[3] together are satisfying the condition and hence the message mapping is called.
>
> But I need to check this condition IDOCwise. Both the conditions to be satisfies in the same IDOC.
>
> I am thinking that contexts are not being taken care.. It just see the whole file together and not IDOCwise.
>
> Can someone help me on the same. Please let me know if more information is required.
>
> Thanks,
> Shobha
The ideal solution to your scenario is to redesign the interface as below;
1. Receive the file.
2. Do a 1: N mapping (this should split your message into multiple Messages)
3. On this message you can do the required check. Now only the required field for the particular IDoc will be part of the check and it will not mix with other Idocs.
Will this do? Else please provide more details
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.