cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping issue

Former Member
0 Kudos

Hi frnds,

File to idoc

Source:

Header (0 to 1 occ)

Detail(0 to n)

Trailor(0to 1)

Target :IDOC

here i am repeating A3 segments based on some condition with detail record...this fine

under this A3 segments there is a field MWSKZ

I am sending tax code (I0 or I2) based on some condition.that is working fine.

the problem is if A3 segment repeats more than once.in 1 st A3 segment i need to populate I0 or I2.

from second Segment onwards i sud not create any value for MWSKZ

But it is creating value in every segment level.

please advice....

Regards,

Suri

Accepted Solutions (0)

Answers (3)

Answers (3)

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

the problem is if A3 segment repeats more than once.in 1 st A3 segment i need to populate I0 or I2.

from second Segment onwards i sud not create any value for MWSKZ

It is assumed that the MWSKZ is 0..1, then what you can do is not to use any context change after creating the detail record e.g


your logic for MWSKZ -> removeContext -> MWSKZ

This way, only the first value of MWSKZ is created (top value) and the others will not appear.

Hope this helps,

Mark

Former Member
0 Kudos

Hi All,

Thanks for reply

@Mark:if i am mapping with one to one as u said .then urlogic will work out.

Here i am sending tax code based on some condition with other field HKONT.if that condition satisfies then only need to pass I2 or else I0.

and i tried with split by value (each value also).but still value is repeating in second A3 segment.donno what i sgng wrong.

Regards,

Suri

Former Member
0 Kudos

Hi Martin,

Can you tell me how to use context split.

Regards,

Suri

Former Member
0 Kudos

Martin,

Understood what u said..but i tried that way it didn't work.

Former Member
0 Kudos

Hi frnds,

File to idoc

Source:

Header (0 to 1 occ)

Detail(0 to n)

Trailor(0to 1)

Target :IDOC

here i am repeating A3 segments based on some condition with detail record...this fine

under this A3 segments there is a field MWSKZ

I am sending tax code (I0 or I2) based on some condition.that is working fine.

I2 --> GL 441200001 and Tax Line item is there

I0 --> GL 441200001 but tax line item is not there

if other than GL 441200001 we sud not create any tax code.

Tax line item is T3 segment at idoc side

Please advice

Regards,

Suri

Edited by: suri svn on Feb 2, 2012 10:12 AM

Former Member
0 Kudos

Suri,

how about this:


For the parent Node
[GL Field]-------------------\
[Constant: 441200001]--------[equalsS]--------[ createIF ]--> A3

For MWSKZ
[GL Field]-------------------\
[Constant: 441200001]--------[equalsS]-------------------------------------[ ifWithoutElse ] -----[collapseContext]----->[SplitByValue: eachValue]-> MWSKZ
[taxLineItem]---->[exists]---->[FixValues: true-> I2; false -> I0 ]  ------/

Could you give a short data example what you get in?

Regards,

Konrad

Former Member
0 Kudos

Hi, you may need to add a context split after each tax code. Try add a SplitByValue(each value) function before creating the tax code field.

Former Member
0 Kudos

Dear Suri

You are creating A3 segment based on certain conditions, Create a UDF to count the number of times segment A that should be created.

Write another UDF where you run a loop for number of times A is supposed to be repeated.

Now you can control/suppress the MWSKZ node