Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Message Mapping / Missing attribute.

I would appreciate any input on a mapping scenario I am having difficulty with.

I have a "Node" which is 0..Unbounded. This node has two attributes which are optional:

Node

@type

@status

My scenario requires that I map differrent instances of this node based on one or the other attribute i.e.

if Node@type = "Actual" -> Map Node Value to Target A

if Node@status = "Complete" -> Map Node Value to Target B.

I am using the ifWithoutElse function to try to achieve my goal.

Problem is, via an example:

If I have three Nodes.

1. Node (Value)

@type = "Actual"

@status = "ADDA"

2. Node(Value)

@type = "Actual"

3. Node(Value)

@status = "Completel"

.

The mapping to Target A in the first two cases is fine, however mapping to Target B based on the Node with @status="Complete" does not fare so well. What is happenning here is the value in Node 2 gets mapped. It provides the value from the first node it reaches that does not have a @status attribute.

The result of the ifWithoutElse looks like the following:

stringEquals:in0___________stringEquals:in1_________stringEquals:out

SUPPRESS_____________SUPPRESS____________ SUPPRESS

false___________________ XXXX___________________SUPPRESS (Node without attribute)

true____________________BBBB__________________ BBBB

true___________________AAAA__________________ AAAA

_______________________ AAAA__________________AAAA

The value I want in in the final line but this seems to get confused and as a result of the item without the attribute I am searching upon the column, stringEquals:in0 seems to get moved up one place. I would ideally with it to look like the following:

stringEquals:in0___________stringEquals:in1_________stringEquals:out

SUPPRESS_____________SUPPRESS____________ SUPPRESS

_______________________ XXXX___________________SUPPRESS (Node without attribute)

false___________________BBBB__________________ BBBB

true___________________AAAA__________________ AAAA

true__________________ AAAA__________________AAAA

I would appreciate any input you may have. IF this can be achieved without the use of UDF then all the better as I am not very competent in UDF functionality.

Cheers.

Mick.

Former Member
Not what you were looking for? View more on this topic or Ask a question