Hello,
U can achieve ur req. using standard functions only
1) Duplicate Item node using duplicate subtree option
2) Follow below mapping for the first Item node i.e. for A
3) Follow below mapping for the second item node i.e. for D
Note - change the context of Order_Type field and set it to MT level
4) Result
Thanks
Amit Srivastava