Skip to Content
0
Dec 24, 2007 at 12:29 PM

** Is it possible to move back and generate the target node in Message Map

7 Views

Hi,

We are doing EDI to IDoc scenario. In our scenario the source XML comes like

XML Instance

-


G_SPOC (Node) 0..unbounded

.....

.....

D_670 (Field)

........

S_SDQ (Node)

D_67

D_380

D_67_2

D_380_2

........

G_SPOC

.....

.....

D_670

........

S_CTP

D_212

G_SPOC

.....

.....

D_670

........

S_SDQ

D_67

D_380

D_67_2

D_380_2

........

Target Strcutre

E1EDP01 0..unbounded

.........

...........

For this instance we have to create E1EDP01 node for how much times D_67,D_67_2..... will come.

By using 'CreateIf' function we check the existance of D_67,D_67_2 ... and create the target structure E1EDP01. This is working fine if S_SDQ node will come in source XML. Basically D_67,D_67_2 represents Store Nos and D_380,D_380_2 represents Qty.

In the customer given EDI file, Price change also comes for Line items. It may comes in the file middle also. When Price Change come, the node S_SDQ will not come in G_SPOC but where as S_CTP will come. This contains Price Change in the field D_212.

The indicator whether QD (Qty Discount), QI (Qty Increase), PC (Price change), AI (Additonal Increase) is stored in the fild D_670.

In our logic in mapping, we create E1EDP01 based on the existance of D_67,D_67_2... . But, for PC (Price Change) we created special node E1EDP01 at the end (after all D_67,D_67_2 ) by checking the condition whether D_670 = 'PC'. This is also working fine when 'PC' comes in last G_POC of source XML. But, when it will come in middle of G_SPOC, mapping is only executed for first 3 GPOC (for Example, QD,QI,PC) and it ignored the last one AI. (Because this is generated based on D_67 under S_SDQ again).

The problem is we think that the system does not go back and execute the mapping for AI based on D_67.

It executes mapping only in order.

So, How will we solve this problem, friends? The requirements is we have to do this thru Graphical Mapping only.

We tried sever possibilites, but not worked out.

Kindly help me friends to solve this issue.

Thanking you.

Kind Regards,

Jeg P