cancel
Showing results for 
Search instead for 
Did you mean: 

Idoc segment field value check

Former Member
0 Kudos

Hi,

I have IDOC to SOAP scenario.

In IDOC we have E1LFA1M segment that is repeating multiple time. I have to check Field KTOKK where Value is like CXS then it should send the data to target else it shold not send the data.

I have six segement where KTOKK value is CXS and five is with differnent values so it sould send only six segement data to target.

Please suggest me some mapping

Regards

Laxmi Bhushan

Accepted Solutions (1)

Accepted Solutions (1)

former_member333459
Participant
0 Kudos

Hi,

You can use if without else and the condition should be if 'KTOKK' equals 'CXS' then pass 'CXS' and change the properties of if without else as keeping suppress true.

This will work.

Thanks and Regards,

Neethu

Answers (2)

Answers (2)

Former Member
0 Kudos

HI,

you can use createIf node function for generating the target node only if source field satisfies the conditions....

above holds if you want to generate the target node based on your condition....

else use if with out else condition and pass the values to the target fields (need to handle the context changes..)

if not clear provide the source segment structure and target node structure..

HTH

Rajesh

Former Member
0 Kudos

use constant / KTOKK as input to with equals function compare it and output to ifthen else and map it to target.

make KTOKK context to root node.

chirag

Former Member
0 Kudos

Hi Chirag,

I am giving condition at receiver determination.

My condition is like this.

Receiver Determination --> Condition Editor

Operand --> XPATH --> IDOC node is KTOKK

Middle Operand --> = operator

Right Operand --> ZCSX ....it is constant.

But still it is sending all the data.

Regards

Former Member
0 Kudos

why r u giving condition at receiver determination - the condition shud be provided in mapping only...

condition on receiver determination determines which message goes to which receiver based on condition....

i understood it correctly - ur requirement is to pass only KTOKK node data based on conditon to target node and filter all other unsatisfied condition.....

if this is ur requirement then u ahve to do it in mapping using the logic...

chirag

Former Member
0 Kudos

ok chirag.

i removed condition in receiver determination,

I am trying mapping like this

IF KTOKK = Constant (ZCXS) then E1LFA1M else Constant (0)----


>targent Node

still sending all the data.

Regards

Edited by: laxmi bhushan on Mar 9, 2011 3:47 PM

Former Member
0 Kudos

u have to make the context of KTOKK to root node and then use equals function - pass the output of ifwithoutelse to target root node...

all logic will be at target root node...

check the same with display queue options

chirag

Former Member
0 Kudos

all logic will be at target root node...

What this means

regards

Former Member
0 Kudos

share ur target structure- is it like at target - root node and then the child data field???

chirag

Former Member
0 Kudos

Hi laxmi

Please use this UDF with context values

ur mapping will be like this

KTOKK field-removecontext -UDF-Target

UDF

int intLength = strKTOKK.length;

for(int i =0;i<intLength;i++)

if (("CXS").equals(strKTOKK<i>))

{

result.addValue(strKTOKK<i>)

}