on 06-18-2010 4:31 PM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use Map with default function.
Regards
Ramg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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
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
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.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.