cancel
Showing results for 
Search instead for 
Did you mean: 

non-XML payload in graphical mapping

Former Member
0 Kudos

Experts,

I have a scenario where I need to trigger a graphical map which eventually populates an IDoc (custom) structure but the Idoc is not being populated with any of the source field.

My source data is a flat file.

1. I dont want the src file content to be transformed to XML.

2. But need to trigger the map (graphical map) to populate the constant values in IDoc.

However, even with a src message type with a single String type element (no sub-element), the mapping is failing giving XML parsing error.

Question is:

1. If it is possible to call a Graphical map without the XML conversion of the source? if yes.. how?

2. Otherwise can I use Java / ABAP mapping? because since the input parameter for IF_MAPPING~EXECUTE - source is XSTRING type. So can I pass a flat file instead?

- Shibaji

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

The graphical mapping requires an XML document as source and target. A flat file will not be processed.

Java Mapping and ABAP Mapping work on the binary representation of the mapping. So you can pass a flat file as source. XML libraries in Java and ABAP support you in creating the XML target from flat source file.

Former Member
0 Kudos

Stefan,

Thanks for reply.

As the IF_MAPPINGEXECUTE passes the SOURCE parameter as XSTRING, it can pass the binary representation of the flat file in the mapping. Where I am bit confused is if IE checks for the XML validation of the source payload before calling the IF_MAPPINGEXECUTE method.

If IE does not check the source for XML validation before calling the IF_MAPPING~EXECUTE method, I can by-pass the XML validation.

Could you please confirm at what point IE does the XML validation (before or after or within MAPPING routine call)?

- Shibaji

stefan_grube
Active Contributor
0 Kudos

XML validation works on the source. So you cannot use XML validation in your scenario.

Stefan

Former Member
0 Kudos

I have done it..

Answers (2)

Answers (2)

Former Member
0 Kudos

HI Shibaji

1. I dont want the src file content to be transformed to XML.

2. But need to trigger the map (graphical map) to populate the constant values in IDoc.

XI expects some XML if it is empty also it will work but you need to send dummy XML for triggering the mapping. You can pass just a blank field as source to trigger this.

. If it is possible to call a Graphical map without the XML conversion of the source? if yes.. how?

IE expects XML to process so you need to send some data to execute mapping. I don't think you can avoid XML conversion.

Otherwise can I use Java / ABAP mapping? because since the input parameter for IF_MAPPING~EXECUTE - source is XSTRING type. So can I pass a flat file instead?

Java or ABAP mapping also require some source and target to be formed and when you can meet the requirement for triggering the mapping from Graphical. It will complicate using Java/ABAP mapping

I think if you have a source dummy message with single field with 0..1 occurrence then it should trigger your mapping without any error

Thanks

Gaurav

VijayKonam
Active Contributor
0 Kudos

Though you do not want the source not to be parsed as XML, XI IE expects an XML. So, wither you have to use file content conversion to change your single line text file in to xml or use simple a dummy xml file which has a root node atleast. For that root node, define datatype,message type. Your mapping will execute..!!

VJ