on 12-03-2007 12:58 PM
Hi All,
Need your help...
Source is IDOC(Orders.Orders05) and target is File...
<b>Source</b>
E1EDKA1 PARVW = "AG" IHREZ = ""
E1EDKA1
PARVW = "WE"
IHREZ = ""
E1EDKA1
<b>PARVW = "LF"</b>
IHREZ = ""
E1EDKA1
PARVW = "ZI"
IHREZ = ""
<b> Target</b>
ZBGM (1..1)
CODE (0..1)
(Note ZBGM segment occ is 1..1)
The condition is
If E1EDKA1-->PARVW = "LF" and
E1EDKA1-->IHREZ = ""
then CODE = "9"
Else
CODE = "42" .
I had written an UDF
for the above condition for source PARVW field and target CODE field....
for(int i=0;i<4;i++)
{
if((PARVW<i>.equals("LF")) && IHREZ<i>.equals(""))
{
result.addValue("9");
return ;
}
else
{
result.addValue("42");
} }
If i test by field level by clicking Display QUeue i am getting the as per my requirement <b>value as 9</b> for the third segmet value...(output i am getting 42 42 9)
But when i test by going to TEST tab the target CODE field value is 42 ... Mean it is testing once only and reading first segment value i.e for the first occurence PARVW = AG ....
How to get the required value for my actual req... ...
Please suggest....
Thanks and Regards,
Sridhar Reddy
Message was edited by:
sridhar reddy kondam
Hi The Problem is solved,
I had just used <b>Sort</b> Function and now its working...
Thanks and Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
seems to be cardinality issue of the elements. E1EDKA1 is 0..unb but code is 0..1
recheck its occurence and test
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prabhu,
I need only one value either 9 or 42 based on the condition...
So if PARVW = LF and IHREZ = "" then the field CODE should be populated with 9...
And i think some where i am missing something... may be the cardinality ... is it?
And i had mapped PARVW to CODE field and a constant to BGM segment..
THanks and Regards,
sridhar reddy
Message was edited by:
sridhar reddy kondam
sridar
the issue is with cardinality. The source node has occured 3 as per ur post and its last value is 42. so the parsing is done thrice as E1EDKA1 is mapped to CODE. in this case the last value is populated to code as per ur condition. change the cardinality of CODE to 0..unb and test the mapping. it shud work
since code occurence is 0..1 u will have only once result populated when testing the message mapping.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
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.