cancel
Showing results for 
Search instead for 
Did you mean: 

Suppress a target IDOC segment based on a condition.

Former Member
0 Kudos

Hello:

I need to supress a segment in my target IDOC based on the value of a particular field in the source file.

As an example, the format of my input file is as follows:


Acc1 (1:1)
 Head   (1:1)
 Hfield1
  Hfield2
 Detail (1:unbounded)
  Dfield1
  <i>Dkeyfield</i>
  Dfield2

<b>Format of the Target IDOC:</b>

IDOC
  segment1
  segment2 (0:200000)
    <i>segment2a</i>  (0:999999)

I'm creating a segment2 for each Detail in my input file, but I need to supress <i>segment2a</i> if <i>Dkeyfield</i> is equal to a certain value. Is it possible to achieve this in my mapping?

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hello:

First of all I want to thank everyone for their replies! We were able to solve the problem in our mapping, a solution similar to what Kumar suggested.


<i>Dkeyfield</i>---------|
                  |--Equals--not---|if  |    
value   ----------|                |    |
                          Detail---|then|---segment2a

Changing the context of DKeyfield and Detail to Acc1.

Thanks again for the responses!

Regards,

Carlos

Former Member
0 Kudos

Hi PLease see if this is of some use:

Detail---> segment2

Dkeyfield -


|

-


| (equalsS function in Text estion)-- not(boolean not function)--|if-|

Constant(value)---|

-


|-segment2a

-


Dkeyfield----


|then-|

Regards,

KNS Kumar.

Former Member
0 Kudos

Hi,

I guess you can acheive this using Standard Node functions. Until now we didn't come across this kind of situation so didn't work around on this type of situation so couldn't help you exactly. You also can find more information on this node functions in help.sap.com. I hope this helps you.

Jagadish.

MichalKrawczyk
Active Contributor
0 Kudos

Hi Carlos,

>>>I'm creating a segment2 for each Detail in my input file, but I need to supress segment2a if Dkeyfield is equal to a certain value. Is it possible to achieve this in my mapping?

if I understand it clearly you can do it:

you have to control the segment2 creation

so if the segment2a (it's a filed right?) should not be created

then segment2 shouldn't also be created

you have to add your conditions to segment2

Regards,

michal

Regards,

michal