|
[EDI-L Mailing List Archive Home]
[Message List]
[Reply To This Message]
RE: Re: <tech> X12 input indexing issue in Mercator

I'm thinking that you may need to convert the value of a field in the
AMTLoop that you want to increment, to an integer value. I'm wondering if
Mercator doesn't like the fact that you're taking the entire AMTloop and
trying to increment it. If it was an individual field that you wanted to
increment. it look s like "INDEX(AMT Loop:AMTTest) + 1" is trying to
increment the entire loop.
I don't have the specs for the 860 in front of me, but if it were say for
example the PO101 (Assigned ID),
I would use TEXTTONUMBER(AssignedID:PO1 Segment:PO1 Loop) + 1.
I'm not sure exactly what would be useful with an incremented line number,
but there maybe a particular field that you want to increment.
When I've done an 856 map, I create an input card referencing a numerical
field in the ASN map and use INDEX(HLLevel) + 1. But HLLevel is a single
field.
Hope that helps.
Bob
-----Original Message-----
From: jm_edi [mailto:
Sent: Tuesday, December 02, 2003 12:47 PM
To:
Subject: [EDI-L] Re: <tech> X12 input indexing issue in Mercator
Thanks Bob and Michael for the suggestions...
I'm doing a bit of what each of you suggests and the following is a
summary of the test map I'm using to finalize the map rule logic.
INPUT DATA - emulates X12 AMT loop
------------------------------------
AMT*KC*68775.58
AT*970X0X4930
REF*10*1
REF*AX*AA
AMT*ZR*34387.79
REF*AX*AA
TYPE TREE SUMMARY FOR MAP RULE
------------------------------------
1) AMTTest group consists of AMT Loop (1:s)
2) AMT Loop group consists of AMT Segment (1:1), AT Segment (0:1), and
REF Segment (s)
3) REF01 is AX in this example and REF02 is AA in this example for
both AMT Loop's
MAP LOGIC SUMMARY
------------------------------
1) Map logic should do its thing if two AMT Loop's that are next to
each other have REF02 the same value for both having REF01 = AX. In
this case, the input data should trigger the action
2) FM_CheckAMT is passed a single AMT Loop object and checks whether
if it has a REF01 = AX and if it does returns the REF02 value
3) Following logic is executed at a level that has visibility to all
the AMT Loop's in AMTTest.
The following logic is what I'm using to determine the above rule and
should mean "if any REF segment of current AMT Loop has REF01 = AX
call FM_CheckAMT on current AMT Loop and next AMT Loop and see if both
have equal REF02 values, and if equal call FM_CreateOutputRecords
to take desired action."
=IF(UPPERCASE(RefNumQualCD Element:REF Segment:AMT Loop:AMTTest) =
"AX", IF(FM_CheckAMT(AMT Loop:AMTTest) = FM_CheckAMT(CHOOSE(AMT
Loop:AMTTest, INDEX(AMT Loop:AMTTest) + 1)),
FM_CreateOutputRecords(AMT Loop:AMTTest)))
What's seems to be messing up is the 2nd IF function which causes the
map to output garbage. If I remove the 2nd IF or hard-code it to
evaluate to TRUE, things work as expected so I believe I don't have
the syntax right to pass "current data object" and "next data object"
to functional maps.
Ideas?
Yahoo! Groups Sponsor
To unsubscribe from this group, send an email to:
Please use the following Message Identifiers as your subject prefix:
<SALES>, <JOBS>, <LIST>, <TECH>, <MISC>, <EVENT>, <OFF-TOPIC>
Access the list online at: http://groups.yahoo.com/group/EDI-L
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]
|
 |
Subscribe in XML format
| RSS 2.0 |
|
| Atom 0.3 |
|
|