cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Issue - E1EDKA1-PARVW

0 Kudos

Hi,

I have a requirement that

when partner function ship to Party(WE) exists then all address information should be assigned to target structure.

Target structure is Fixed file Length.(FileContentConversion).

in target structure, for ship to party fields are

Last name, Firstname, Middlename,address,city,state,country,zipcode,phone

Char (20) , (10), (2), (25), etc.

In target structure, for example firstname is not present then target structure should populate last name in 1st 20 char, then 10 spaces, then middle name(2) etc.

but now if values are present then working fine, else positions are disturbing.

E1EDKA1-NAME1 = Tar.lastname

E1EDKA1-NAME2 = Tar.firstname

1. E1EDKA1-PARVW(context w.r.t. E1EDKA1) equals 'WE' using equalS then pass

E1EDKA1-NAME1(Lastname) to "If then withoutelse condition" and pass output to node function "remove contexts" then assign the output value to target field. Same for E1EDKA1-NAME2 works fine.

2. If E1EDKA1-PARVW equals to WE, but if E1EDKA1-NAME2 is not present, then

output shows as Lastname,middlename,city etc. column positions are moved to the left.

Please let me know how to fix this issue.

Accepted Solutions (0)

Answers (2)

Answers (2)

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

hi

you must assign spaces or any other character to guarantee that the target file´s structure is right.

to do this, validate if name2 exist. if not assign a contant value with spaces (MaxLenght of NAME2)

the same with all other fields.

Regards

Rodrigo Pertierra

Former Member
0 Kudos

Use Map with default function.

Regards

Ramg

0 Kudos

Yes, Partially I got it.

If Ship to partner function is present then if no value is present then working great with mapWithDefault function. Suppose if partner function WE-Ship to party itself is not present then also I want the spaces to be populated at the target structure.

Sorry, I did not mention my requirement clearly in first step.

Regards,

Krishna

Former Member
0 Kudos

Hi

I hope you will map your target root structure based on the existence of the Ship to party ?

R using create if function in your target?

Thing is to you need to get your target strucutute with the required fields and in FCC you might have mentioned the spcified lengths.

Correct me if im worng

Regards

Ramg

0 Kudos

Ram,

My requirement is

1. if Partner - Ship to Party(WE) exists then get all address information and if some of the field(s) are not present then populate spaces at target structure for the fields missing.

2. if Partner - Ship to Party(WE) record itself not EXISTS then also populated spaces for the address fields at the target structure in order not to disturb the other field column positions in that structure.

Now first party is achieved. But the second party is not working.

Regards,

Krishna

Former Member
0 Kudos

Hi

You are checking with Equals condtion if so the n u are passing the Name to target.

Try using equals and also Exists function.with OR condition

Regards

Ramg

0 Kudos

Ram,

equals function is boolean type and I cannot use it. I tried and I got error message. Can you explain little more detail to use equals and exists with or condition ?

I tried many ways with equals,exists and OR conditions and no luck.

regards,

Krishna

Former Member
0 Kudos

>> I tried many ways with equals,exists and OR conditions and no luck.

Try using equalS,Exists and OR condition. Use standard function under Text---> equalS not the Boolean Equals function.

Regards,

Abid

0 Kudos

Yes Abid,

What I did was

All fields are context w.r.t. segment E1EDKA1

1. E1EDKA1-PARVW equalS(text function)

constant = WE then output to

2. if

E1EDKA1-NAME1 -> mapWithDefault -> then (withoutelse Condition) and output to remove context function and then finally target element.

This entire process works fine if there is value or not as long as PARVW = WE exists. if for some reason, there is no partner function (WE), then not working properly.

My target file is Fixed length file.(the other fields are moved to left if name1 field does not exist).

With what logic I have to use exists and OR condition ?

Regards,

Krishna

Former Member
0 Kudos

Hi,

You need to use the If else function. If PARVW=WE exits then map what ever you are mapping right now else condition you need to populate the empty costant value. so that FCC will not override...

Regards,

Venu.

0 Kudos

Venu,

I used If else function with different scenarios i.e. w.r.t IDOC and E1EDKA1, both are not working properly.

Former Member
0 Kudos

hi,

based on your logic all E1EDKA1-NAM1 exits then your logic will work...

change as like below.

E1EDKA1-PARVW=WE Then (sing lf condition)

NAME1->EXITS Map Name1->removeContext map source to target else..map the constant(use the IF else)output of IFELSE pass to first IF conditiona as a Input.

Regards,

Venu.

0 Kudos

Venu,

I got it.

1. E1EDKA1-PARVW = WE then NAME3 -> mapWithDefault

2. output of if then function -> remove contexts ->exists -> if then else(constant) -> name

Thanks,

Regards,

Krishna