cancel
Showing results for 
Search instead for 
Did you mean: 

receiver dtermination condition ...????

Former Member
0 Kudos

Hi..friends...

its IDoc - to -file..

based on the idoc ,one of the segments filed value...i need to plave the file on related FTP server..

earlier i discussed in thread...

in the receiver determination..in condition ..

i given like this ...

HRMD_A05/IDOC/E1PLOGI/E1PITYP/E1P0002/NAMZU = 1 then Bs_ftp1

HRMD_A05/IDOC/E1PLOGI/E1PITYP/E1P0002/NAMZU = 2 then BS_ftp2

..

the segment E1P0002 occurance.. 999999

in one Idoc, segment E1P0002 conatins similar values like NAMZU=1 the the file is placing on Bs_ftp1

in one IDoc,if segment E1P0002 conatins for NAMZU=1 and another E1P0002 conatins NAMZU=2 then the file is placing on both Bs_Ftp1 and Bs_Ftp2 ..its not checking the condition in the condition editor....

please help me..

regards

ram

Accepted Solutions (0)

Answers (11)

Answers (11)

Former Member
0 Kudos

Hi freinds..

could you please guide me..

regards

ram

Former Member
0 Kudos

Hi friends...

now its going to respected BS_ftps

in my idoc i given three times of E1P0002

first E1P0002 segment for NAMZU=1

second E1P0002 segment for NAMZU =2

third E1P0002 segment for NAMZU =1

so my output xml should be on BS_ftp1 (if NAMZU =1 ) like this

( i given 2 two segments for NAMZU =1 ..here id is incremental value how many times the NAMZU =1 repeating)

<Assignment Operator id =1 >

< userid =.................................>

</Assignment Operator>

</Assignment Operator id= 2>

<userid=....................................>

</Assignment Operator>

for Bs_ftp2 the xml file should be..

<Assignment Operator id =1 >

< userid =.................................>

</Assignment Operator>

i created some UDF like this....

Udf no input parameters and of type value..

public String countId(Container container)

{

int counter = 0;

counter++;

return(""+counter);

}

and i assign this UDF to assignment Operator.

and i am getting

1 for id..

each and every time i am getting 1 only..

i created another UDF like this..

public void countingId(String[] sNamzu,ResultList result,Container container){

int counter =1;

for (int i=0;i<sNamzu.length;i++)

{

if(sNamzu<i>.equals("1"))

result.addValue(counter+"");

counter=counter+1;

}

}

NAMZU>remove context>countingId>SplitByvalue(Each vlue)>id

if i do like this ..display queue..is working fine..

but in runtime...its

i am getting o/p file this

<assignment operator id =2>( i given 2 values for NAMZU =1)

<user id=....................>

</assignment operator>

<assignment operator >( id is missing )

<user id=...............>

</assignment operator>

please guide me..how to write UDF to get required output..

regards

Ram

Former Member
0 Kudos

Hi

i used like..

NAMZU--


equalS(text)---ifwithoutelse

Constant(1)----


then E1P0002 ( default parent context ..i didnt changed) then AssignmentOperator

i did the same another mapping also..

but both records appearing in both the Busyness systems..

please help me..cant i do without BPM...

regards

Ram

Former Member
0 Kudos

Ram,

Can you send a screen shot of the mapping to my id. May be that could help nailing out the error. You can find my mail id in my business card.

Change the context of NAMZU to E1PITYP from the default E1P0002

Regards,

Jai Shankar

Former Member
0 Kudos

Hi jai..

my legacy message is like this

Assignments 1..1 (root)

--AssignmentOperator 1..unbounded

....id

-


Operator 1..unbounded

......workshop

......enddate

......position

......userid

......username

......startdate

regards

ram

Former Member
0 Kudos

Use a ifWithoutElse.

The codition part : NAMZU.. equals(text function) Constant(1)

then - E1P0002

target - AssignmentOperator or Opertaor1 depending on your requirement.

Remember to change the context of NAMZU node to parent level.(E1PITYP)

For the second mapping use the same logic expect constant will have value 2 here.

Regards,

JaiShankar

Former Member
0 Kudos

Hi jai..

thank you very much for your quick responses..

please clearly explain me ..how to use the functions in message mapping..how to put condition in message mapping..

and (HRMD_A05/IDOC/E1PLOGI/E1PITYP/E1P0002/NAMZU = 1) the field NAMZU is not mapped to any target field.

regards

ram

Former Member
0 Kudos

Ram,

Can you give me you target structure? So that we can help you better. Also do let us know if you are using File Content Conversion at the target side.

Regards,

Jai Shankar

Former Member
0 Kudos

Hi Sravya..

thanks for your response..

i created two message mappings and two interface mappings..and also in ID interface determination i created two..

regards

ram

Former Member
0 Kudos

If you have only 2 receivers, then Sravya's idea is the better approach since you need no BPM in the design.

As pointed by Sravya, for this approach you need 2 maapings. One mapping will collect all the records that goes to the Bs_ftp1 receiver(you will need some node functions and context handling to achieve this). The other mapping collects all the records that goes to Bs_ftp2 receiver.

Regards,

Jai Shankar

STALANKI
Active Contributor
0 Kudos

You cannot check that out in the condition editor directly if it is multiple occurences.Create two mappings to generate the same and depending on the reciver give the appropraite interface mapping.

Former Member
0 Kudos

Hi Swetha..

i given individual conditions...

HRMD_A05/IDOC/E1PLOGI/E1PITYP/E1P0002/NAMZU = 1 then Bs_ftp1

HRMD_A05/IDOC/E1PLOGI/E1PITYP/E1P0002/NAMZU = 2 then Bs_ftp2

like that..

thanks and regards

ram

Former Member
0 Kudos

Hi jai..

thanks for your quick responses..

and please tell me how the integration process for BPM

regards

ram

Former Member
0 Kudos

Steps in the BPM

1. Receive(asynh) - Receive the IDOC

2. Transformation - 1:N mapping (create as many msgs as your EP1.. node)

3. Block Mode-For each

With in the block a send(asynch) step. The block will have a multi line container and the send step will have the source msg a single line container for the same target msg.

Regards,

Jai Shankar

Former Member
0 Kudos

Hi,

check ur condition in receiver determination,check whether u have given it in AND or OR.

It should be neither in AND or OR.

Thanks.

Former Member
0 Kudos

Hi Ram,

If the E1P0002 is going to occur multiple times, how do you want to route the target msg? Is it some thing like this? You create a single msg with as many records as E1P0002?

If so, then the condition will not be tested and you will not get the expected results. You need to go for a BPM with multi mapping. ie generate as many msgs(not records with in a msg) as the number of E1P0002 and send it to file with a block step.

Regards,

Jai Shankar