Applies to scenario:
Need to manipulate file name at target for Pass-through (no mapping) interface. Pass-through payload can be
- PDF, excel, word, zip, flat file, image – message structures cannot be defined.
- XML – for which no transformation is required.
Need to manipulate file name at target for Pass-through (no mapping) interface. Variable substitution (for Dynamic File Name), cannot be used as Input payload is not / cannot be read, as it is pass-through interface. Reader must know to perform File to File scenario and to implement Java Mapping.
Company: Infosys Limited.
Created on: 07/06/2011
I am SAP Certified Development Associate - Process Integration with SAP Netweaver (PI 7.1). I have about 5 year experience of SAP XI/PI implementation and support. I am also, Sun Certified Programmer for the Java Platform, Standard Edition 6. I have good understanding of XML, XSLT, SOAP, WSDL, ABAP. I am an active member in SAP SND.
Using Java Mapping
a. output file name will be manipulated using DynamicConfiguration.
b. input payload will be copied to output payload, as it is.
Steps in ESR
- Create a Data Type (some dummy structure). E.g.,
- Create a Message Type, MT_Structure and refer DT_Structure.
- Create an Outbound Service Interface, SI_Structure_Out and refer MT_Structure.
- Create an Inbound Service Interface, SI_Structure_In and refer MT_Structure.
- Create an Operational Mapping, OM_Structure. Refer SI_Structure_Out and SI_Structure_In.
- Create a zip or jar file of below Java Mapping ‘DynamicFileName_JavaMapping’ (compiled). Import it into ESR as imported archive. Refer this Java Mapping in OM_Structure.
Steps in Integration Directory
- Create a File Sender channel. In ‘Advance’ tab, select ‘Use Adapter-Specific Message Attributes’ and ‘File Name’.
- Create a File Receiver channel. In ‘Advance’ tab, select ‘Use Adapter-Specific Message Attributes’ and ‘File Name’.
- Create Sender and Receiver Communication Components. Create ‘Integrated Configuration’ Object to run scenario in Advance Adapter Engine OR Create Sender Agreement, Receiver Determination, Interface Determination (should refer OM_Structure), and Receiver Agreement to run in Integration Engine.
This is an example of a Java Mapping Code sample:
For above code
Input File Name: xi_input_DynamicFileName.pdf
Output File Name: NewDynamicName_201107.pdf