cancel
Showing results for 
Search instead for 
Did you mean: 

help on scenario design

former_member440449
Participant
0 Kudos

Hi all,

I need an scenario as this one: I will pick a file from an FTP server, and I have to map it to an IDOC.

There is one condition: if a value of the file is "A", then I have to map it to IDOC1. If a value of the file is "B", then I have to map it to IDOC2.

Is there any way to do this without BPM?

Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

former_member440449
Participant
0 Kudos

Thanks all for the reply.

Actually, I have expressed bad.

The condition is in one field of the file, and it is like this:

if fieldA > 0 and fieldB = 'A' then map to IDOC1

if fieldA < 0 and fieldB = 'A' then map to IDOC2

I could see that I can't use xpath condition for using < or >, just for = or !=.

Do you know if I can do it without BPM?

former_member181962
Active Contributor
0 Kudos

Hi,

It IS possible to check for greater than or lesser than.

You have to chose the expression operator.

(Chose 'EX' in the operator).

/people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination

Also you can check Stefan's reply in this thread:

Best Regards,

Ravi

Answers (6)

Answers (6)

rajasekhar_reddy14
Active Contributor
0 Kudos

here is the blog, apply this deisgn

/people/rajasekhar.reddy14/blog/2011/02/24/multi-mapping-without-bpm-for-idoc-scenarios-yes-it146s-possible

former_member472138
Active Contributor
0 Kudos

>>>>>>>>>> if a value of the file is "A",

Is it the value of file name or is the value of the field?

Regards

Pothana

Former Member
0 Kudos

Create 2 different mapping, one is for IDoc1 and another is for IDoc2, At parent root node maintain the condition if the field value is 'A' for IDoc1 and field value is 'B' fro Idoc2

While determining the Interface in ID, mention the condition using XPath in condition textbox for determining IDoc1 and IDoc2.

It is important to check the condition in both the places i.e. in ID and mapping

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

There is one condition: if a value of the file is "A", then I have to map it to IDOC1. If a value of the file is "B", then I have to map it to IDOC2.

If the value you meant is in the name of the file, instead of using xPath you can use the Context Object called FileName instead. If the value of the file is in the payload, use xPath as suggested by Simone and Baskar.

Hope this helps,

Mark

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>Is there any way to do this without BPM?

Yes you can achieve without BPM.

You can check during mapping and decides what is the target or you can choose xpath condition to decide the reciever as spontani described.

To decide receiver based on mapping follow the below link

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/90dcc6f4-0829-2d10-b0b2-c892473f1...

Former Member
0 Kudos