cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Help

Former Member
0 Kudos

Hi,

I have a source Idoc and the target should be Idoc XML. I have mapping for this as we have to suppress a few segments based on certain condition.

Source structure is as below

Idoc

-->SegA1(1..1000)

----->SegB1(1..100)

--------->SegC1(0..100)

--------------->VKORG(0..1)

---------------->ZFLAG(0..1)

Target structure is also same.

Condition : If VKORG=3000 then check for ZFLAG, if ZFLAG exists then suppress the corresponding SegC1 in the Target.

I have tried with UDF's and graphical mapping.  It doesnt seems to be simple as it looks. Please help.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi All,

I have resolved this issue.

Note :

1. When VKORG equals 3000 then check if ZFLAG does not exists then I should create the target segment.

2. When VKORG not equals 3000 also, I shoudl create the target segment

Actual Hierarchy

ZE1WBB07

----->E1EBB01

----------->E1WBB03

------------------>VKORG

----------------->ZFLAG

Thanks for all your help!!

Regards,

Malini

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Try this out, it will work.

udo_martens
Active Contributor
0 Kudos

Hi,

use function CREATE IF.

Combine the conditions with AND.

/Udo

Former Member
0 Kudos

Yes, I have tried this. I'm facing issues with context. As ZFLAG is passed only when it has a value, the number of elements in VKORG and ZFLAG doesnt match. I'm setting VKORG and ZFLAG to the context of SegA1. If I set both to the context of SegC1, I may get a value in ZFLAG for every VKORG using mapwithDefault but this doesnt help as I would not be able to maintain the order.

udo_martens
Active Contributor
0 Kudos

Hi,

i see no reason that the order can influence the result. The context should be SegC1 (check with display queue).

You can try:

If VKORG = 3000 (should be false in case VKORG not exist)

If ZFLAG = X (should be false in case ZFLAG not exist)

combine with AND

Inverse with NOT

Use of create if and the combinded conditions above

/Udo

Former Member
0 Kudos

I have the both the queues as below

VKORG 

3000  

3010 

3000

----------

3000 

3010

3000

ZFLAG

T

----

T

The above are queues of VKORG and ZFLAG when displayed


udo_martens
Active Contributor
0 Kudos

Hi,

if VKORG = 3000 (should be false in case VKORG not exist)

If ZFLAG = T (should be false in case ZFLAG not exist)

combine with AND

-> true only if vkorg=3000 and flag=T

Inverse result with NOT

> false only if vkorg=3000 and flag=T

Use of create if and the combinded conditions above

You put the inverse to wrong place. And you changed the context of zflag and vkorg. And your target is not SegC1.

/Udo

abhradeepbasu
Participant
0 Kudos

Which version, you are working?