Skip to Content
0
Former Member
Feb 02, 2010 at 07:51 AM

Receiver determintation using Abap Mapping

17 Views

Hi,

I configured a scenario in which I'm using extended receiver determination to determine the receiver of an incoming message. (The reason for this is that there is only one XI system and two ECC systems - DEV and QAS. By means of the setting in a customizing table it can be determined whether the message is sent to DEV or QAS. The message can't be sent to both systems because it is a synchronous interface). The receiver determination calls an Interface Mapping which has target interface Receiver Determination. I made an Abap Mapping program in which the customize table is read and the output message is formed as follows (according to the structure of the Receivers message):

lrf_output_document = lrf_ixml_factory->create_document( ).

lrf_receivers = lrf_output_document->create_simple_element( name = 'Receivers'

parent = lrf_output_document ).

lrf_receiver = lrf_output_document->create_simple_element( name = 'Receiver'

parent = lrf_receivers ).

lrf_element = lrf_output_document->create_simple_element( name = 'Party'

value = ' '

parent = lrf_receiver ).

lrf_element->set_attribute( name = 'agency'

value = ' ' ).

lrf_element->set_attribute( name = 'scheme'

value = ' ' ).

lrf_element = lrf_output_document->create_simple_element( name = 'Service'

value = 'DEV'

parent = lrf_receiver ).

To fill the RESULT field a stream factory is instantiated and a XSTRING is created. When I send a message to the system, the receiver determination dumps: Error when parsing receiver listLength of XML document 129 Error when parsing receiver listLength of XML Document 129 System expected the element 'Receivers'

Looks like the XSTRING has not got the right structure and can not be parsed into the Receivers message. However, when I create a CSTRING, the message looks OK. I also changed the encoding (Codepage 4103).

When I replace the Abap mapping with a message mapping, the receiver determination works OK. However, in that case it is not possible to read the customizing table. I really need the Abap mapping.

Has anyone ever filled the Receivers massage by means of Abap mapping. Any feedback will be appreciated!