cancel
Showing results for 
Search instead for 
Did you mean: 

Message mapping Query

Former Member
0 Kudos

Hi,

I have (xml)file to idoc scenario where the xml xsd has following structure.Its is PO posting

batch

header

item

now in batch i have a feild total po which i need to validate with the total number of po in the file and if the two are not matching then i need to send a error xml file back to same ftp server (insted of sending it to R3 for idoc posting), so my receiver will change based on this check.

Can anyone let me know how to do this.

Accepted Solutions (0)

Answers (1)

Answers (1)

Shabarish_Nair
Active Contributor
0 Kudos

use the logic as is here - http://wiki.sdn.sap.com/wiki/display/XI/CountofRecords-%27Countontheeasiestway+through%27

then you can set a flag in your message and based on it do appropriate recv. determination

Former Member
0 Kudos

Hi Vijay,

How do i do reciever determination based on flag?

Shabarish_Nair
Active Contributor
0 Kudos

utilize xpath

/people/shabarish.vijayakumar/blog/2005/08/03/xpath-to-show-the-path-multiple-receivers

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

Former Member
0 Kudos

Hey thanks for reply but how do i do it without BPM?

Former Member
0 Kudos

Hi,

U can achive this without BPM also.

u will have 2 receivers in Receiver Determination.

2 interface Determinations(2 operation mappings also.)

But... the fault XML u want to send and also the IDOC message types will have occurences 0..1 in operation mapping

and message mapping.

So based on ur condition (Checking the count..) if count is correct only u map with the IDOC.... and the error xml is not mapped...

If the mismatch then the other way..

This will work.. if still nt clarified.. do post

Babu

Former Member
0 Kudos

Hi,

How you have used xpath for target message type, i guess only for source message type the xpath works

Former Member
0 Kudos

Yes ,

Certainly , You can do this without BPM.

There may be few other ways also , i am explaining you one out of them .

Message Mapping . Create three message Mapping .

i. ) File sender to IDOC Receiver

ii.) file sender to file receiver (with error information).

iii.)file sender to receivers ( Message type :Receivers namespace : http://sap.com/xi/XI/System) : This one will be used to choose receiver dynamicaly.

at target Message type :Receivers the element Service Populate with the value of buisness system based on your condition.

like in your case : IDoc receiver Buisness system if counts matches, else File Receiver buisness system if count doesnt matches.

Operation Mapping . Create three Operation Mapping .

i. ) File sender OUTB to IDOC Receiver INB

ii.) file sender OUTB to file receiver (with error information) INB.

iii.)file sender OUTB to ReceiverDetermination INB

( target service interface :ReceiverDetermination namespace : http://sap.com/xi/XI/System) : This one will be used to choose receiver dynamicaly.

Rest is same in ESR Side.

Now let us come to Key points in ID.

1. Receiver Determination.

It would be extended : Here choose third Type Operation mapping : iii.)file sender OUTB to ReceiverDetermination INB

this will deside, Receiver Dynamically.

2. Interface Determination.

now for each buisness system , create interface determination and choose appropriate operation mapping.

Rest steps would be same ....

Do ask if found any problem .

Regards

Dragon