cancel
Showing results for 
Search instead for 
Did you mean: 

ifWithoutElse mapping problem.

Former Member
0 Kudos

Hi

I have

ORDERS02 IDOC has three sets of E1EDKA1. AG (SoldTo), LF (Vendor) and another for WE (ShipTo).

I am attempting to map this IDOC to xCBL3.0 ORDER's Buyer, Seller and ShipTo party.

<i>

All the CONTEXT are default at the ED1EDKA1 level.</i>

The mapping for <b>BuyerParty</b>

/Order/OrderHeader/OrderParty/<b>BuyerParty</b>/Party/PartyID/Identifier/Ident

<b><i>Displaying Queue on the Ident looks OK.</i></b>

PARVW        
              equalsS    
Constant [AG] /          ifWithoutElse  ==> Ident
                         /
                     LIFNR

The same type of mapping is done for <b>SellerParty</b>

/Order/OrderHeader/OrderParty/<b>SellerParty</b>/Party/PartyID/Identifier/Ident

<i><b>Displaying Queue on the Ident looks OK.</b></i> <b>But TEST Run points to failure here !!</b>

PARVW        
              equalsS    
Constant [LF] /          ifWithoutElse  ==> Ident
                         /
                     LIFNR

The same type of mapping is done for <b>ShipToParty</b>

/Order/OrderHeader/OrderParty/<b>ShipToParty</b>/Party/PartyID/Identifier/Ident

<b><i>Displaying Queue on the Ident returns no values here !</i></b>

PARVW        
              equalsS    
Constant [WE] /          ifWithoutElse  ==> Ident
                         /
                     LIFNR

I can see when looking at the Context Queue for SellerParty that it get the correct value but <b>I get this error

Cannot produce target element</b> /Order/OrderHeader/OrderParty/SellerParty/Party/PartyID/Identifier/Ident. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd

This means of course that no identifier was put into SellerParty's Ident. However the Context Queue is the Designer for SellerParty does shows a value so I'd expect a value in there - but when running a Test it fails with the error. And interesting the ShipToParty has no value in the Context Queue (I was expecting the error to be on that last one and not the middle one)

What am I doing wrong - can I achieve this just via supplied Graphical mapping. ?

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Peter,

<i>I can see when looking at the Context Queue for SellerParty that it get the correct value but I get this error

Cannot produce target element /Order/OrderHeader/OrderParty/SellerParty/Party/PartyID/Identifier/Ident. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd</i>

See this error is coming because either you are sending a node data to a substring function or some other function which requires operation on source data - but in testing you have provided that source data as blank because it was optional so if this is the case, just change your mapping, first check if the node value is equal to Constant [], if not equal then send the node to substring function......or....this error can come if the cardinality of source data type and the data you provided for testing are not equal means if a node is 1..1 and in source data you have provided 2 nodes of it in testing.......

Hope this helps you.

Thanks,

Rajeev Gupta

Former Member
0 Kudos

Hi peter,

did you take the <b>equals</b> form the <b>boolean</b> functions?

You have to take the <b>equals</b> form the <b>text</b> functions!

Regards Mario

Former Member
0 Kudos

Hi,

In general Parvw will contain multiple values.. and you have alrady changed the context to above parent node right. Now input , you will have multiple values , so that target should be hold multiple values.. to do tha the target node should be 0.. unbound ..and map to indent .. if not get try to map with Splitby value and map to indent..

because you would have to insert the context ...in the output values..to indent..

Regards

Chilla..

Former Member
0 Kudos

ORDERS02 IDOC has three sets of E1EDKA1 each with PARVW as AG (SoldTo), LF (Vendor) and another for WE (ShipTo) and will have either LIFNR or PARNR set.

The Target document has specifically three <b>differently</b> named sets of nodes. The IDOC's AG, LF and WE data goes to BuyerParty(1..1), SellerParty(1..1) and ShipToParty(0..1) respectively. (these are as per defined in the xCBL standards).

The IDOC used in testing has all 3 of the E1EDKA1 (AG,LF and WE) segments are filled with the data.

The mapping context for source field PARVW and LIFNR is E1EDKA1. But I have tried with other variations of context against those fields, and using splitbyvalue and removecontext is various permutations and it still does not work.

So I am wondering if anybody has ever mapped an IDOC to a xCBL (or similar) message using the standard provide graphical tools

Former Member
0 Kudos

Hi Peter,

I had a similar mapping with the same IDOC and segment in one of our interface but there are no issues at all. Plz try to change the context of PARVW to higher node and check.

regards

Former Member
0 Kudos

Hi Vijaya

I did try that before. If you have got it working can you share how you performed the mapping ? (are you able to explain the mapping like I have described via the simple diagrams in my first post ?).

thanks

Former Member
0 Kudos

HI,

Why dont you try to use JAVA Mapping. any way

Please see the below threads

/thread/69574 [original link is broken]

/community [original link is broken]://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/ed649890-0201-0010-85bf-c8d5b7448392

Regards

Chilla..

Former Member
0 Kudos

Hi Peter,

You might get this error when the parent of "ident" element is not mapped properly. Just check the mapping for the parent element of "ident".

Not only the immediate parent, but the occurence of that entire segment.

I think wat u have done for "ident" element is correct.

Regards,

P.Venkat

Former Member
0 Kudos

Hi Chilla >> I actually want to do this with the standard graphical provided tools - as an exercise. I could have done this via XSLT. But I want to know if such a simple thing is possible using the graphical tools. thanks

Former Member
0 Kudos

Hi Venvat

the problem is not with the parent element. Problem is with "ident". The mapping that I have done (and as I attempted to explain - quite difficult to explain just in notepad!) looks like it should work but the first target "ident" is OK and from the display contexts of the second target "ident" seems OK but it does not get populated when I test it. My mapping must be wrong but I do not have a solution as yet. And am wondering if anybody can share their solution to such a problem.

Former Member
0 Kudos

Hi,

This is possible with Graphical mapping,

In your case you are mapping to Indent ..

Pleas change the Parvw ,LIFNR contexts to its parent node..

Is Indent is under one node which is having multiple occurrences..?

--if yes then each of parvw value changes the right side corresponding set should be repeated.

-- OR

No values but you are sending multiple parvw values with multiple conditions checking and maping to target node One..Here what is the target node occurrence.. if it is multiple no problem.. else use splitbyvalue..

else only one occurr for taget node then better to write UDF which contains checking with multiple values for PARVW and LIFNR and sending the result to resultlist..else ResultList.SUPPRESS (if target node occurr is 0.1).

Can you please expalain in which of these your prob comes...else?

Regards

Chilla..

Former Member
0 Kudos

Hi Peter,

There is no change between ur mapping logic and mine including the node occurance etc.. the only difference is, u have used LIFNR where as i have used NAME1. The context of PARVW is set to higher node and the NAME1 is set to E1EDKA1.

regards

Former Member
0 Kudos

Hi all

I have solved the problem. There are 2 changes that I needed to make.

1) My mapping was almost correct - I have now inserted a <b>removeContexts</b> between ifwithoutelse and the target. (There was no need to mess around with changing contexts.)

2) The xCBL ShipToParty as per xCBL standard is optional (the Buyer and SellerParty are mandatory). Because it is optional, XI will ignore it even though the lower level elements are populated (a bug perhaps). I had to put in a dummy value into the ShipToParty element (/Order/OrderHeader/OrderParty/ShipToParty). Only then will XI produce a completed XML and with the lower level populations of SellerParty elements (/Order/OrderHeader/OrderParty/ShipToParty/Party/PartyID/Identifier/Ident).

Example mapping - this is applicable to the AG, LF and WE. Only the LF is shown here - but exactly same principle.

PARVW        
              equalsS    
Constant [LF] /          ifWithoutElse - removeContexts  ==> Ident
                         /
                     LIFNR

Former Member
0 Kudos

I think it must be a problem with the cardinality of Ident in each of the segments.

Please have a look at them again.

Regards

Priyanka

prabhu_s2
Active Contributor
0 Kudos

peter

probabaly the conditions are not satisfied and check the occurence of Ident field.....if it is >0 then u will get this error. u can change to 0..1 and see