cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Problem

Former Member
0 Kudos

My senario is Idoc->Xi->File.

I am using Idoc orders05 where segment E1EDKA1 repeats 3 times or more than that for the qaulifier values (PARVW = AG, LF, WE). Since I have worte condition by using if else...

In IdocsegmentE1EDKA1

PARVW -


|

Constant(LF)-|Eq---If(true)thenPARTN-|Target field(min 1,max 1)

else--Blank--


|

Here in the aboue logic..if the condition is wrong it is giving me blank..but I need the value of PARTN if PARVW = 'LF'.

Here I have given context to the node E1EDKA1.

Accepted Solutions (0)

Answers (3)

Answers (3)

stefan_grube
Active Contributor
0 Kudos

This is a typical mapping problem.

Check this block:

/people/stefan.grube/blog/2006/01/09/the-use-of-suppress-in-the-xi-30-graphical-mapping-tool

Regards

Stefan

claus_wallacher
Active Participant
0 Kudos

Hi Gowri,

if I understand your problem correct, you cannot work with the if..then..else logic since you will always get an output back with the first occurrence of E1EDKA1 (either the correct one, if the first entry happens to be the one with PARVW=LF or one where you assign a blank value. Since your target field has the occurrence 1..1 the mapping will not consider the next occurrences of E1EDKA1.

You should replace your if function with the ifWithoutElse function instead. This only works if you know that there exists a E1EDKA1 segment with PARVW=LF. If you don't know that you need to work with a user defined function.

Regards,

Claus

S0003485845
Contributor
0 Kudos

Hi,

i don´t know if I understand the question correct, but if you wanna check all 3 KA1-Segments to get the values from the one with the Qualifier "LF", you need to make sure that you set the context a level higher than the E1EDKA1.

Otherwise it might only check the values until your first context change. So for both fileds PARTN and PARVW, just use a higher context and it should work.

If not, please specify your question a little more clear.

Greetings

Stefan

Former Member
0 Kudos

Hi,

Try this..

Use the Functions if then else...& equals in this case.

You would find If-then-else in Boolean Function,

Equals in Text Functions from DropDown box.

In the If..Then ...Else there are there points where you can use variabls...

First : parv EQUALS(function) ls(constant) IF

Second : partn THEN

Third : constant ELSE.

If that doesnt help lemme knw ur mail id....i wud mail you d screen shot.

Cheers,

Sumit

Former Member
0 Kudos

Seftan,

I have checked with higer node context..but I am getting the value as blank.

In the Idoc the segment E1EDKA1 repeats three times for the qualifiers as I mentioned(AG, LF, WE). I need to map the value comming for qualifer LF to the target field.

Since my target field is required field.For this i have used if then else boolen operator for checking this. if PARVW = 'LF' then PARTN else i have assigned blank.

As the idoc segment repeats for three times ..for the first time qualifier gets the value AG...so my condition fails. I am getting the value as Blank,but for the second time i am getting the correct value for the , bz my condition if PARVW = 'LF' is true.

I need a correct output for first time.

I guess u have understand...pls let me know still u need any clarification....

Regards

Gowri K

Former Member
0 Kudos

Hi,

What i understand is that the target field is mandatory. So you are getting a mapping error.

If so use the Node Function MapWithDefault.

I think that wud help you.

Sumit

Former Member
0 Kudos

Hi Gowri,

Can u try doing this.

IF PARTN Equals LF, THEN PARTN >RemoveContexts>SplitByValue-->targetfield

Here are using a "If without else".

Regards,

Vikram

Former Member
0 Kudos

Hi Gowri,

Can u try doing this. (There was a typo mistake in my earlier post)

IF PARVW Equals LF, THEN PARTN >RemoveContexts>SplitByValue-->targetfield

Here are using a "If without else".

Former Member
0 Kudos

Hi Gowri,

I came across exactly such a situation today and I solved the issue as follows:

E1EDKA1 exists and PARVW = LF > SORT>CheckValue-->If true then PARTN else Blank.

The SORT properties choose lexographical and Descending.

The CheckValue is an advanced UDF.

for(int i=0;i<a.length;i++) {

result.addValue(a<i>);

i=a.length;

}

Also you will have to put the PARVW at the higher context.

Regards,

Vikram