cancel
Showing results for 
Search instead for 
Did you mean: 

variable substituion works for seeburger xsd-schema ?

Former Member
0 Kudos


Hi Experts,

I know multimapping does not support Dynamic Configuration for multiple filenames

Scenario to Soap to EDI-using seeburger xsd

As per the blog I mapped the dynamic file name to ISA and not LIST and using the same ISA in variable substitution but no files are generated with dynamic file names

will variable substituion works for seeburger xsd-schema ?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Sruthi,

Were you able to resolve this issue ?

Thanks

Harish
Active Contributor
0 Kudos

Hi Sruthi,

AFAIK - you need the field in target which can contain the value and not the node. Can you try with any field which is not used in the target message? (you can use any text field which is not used).

regards,

Harish

Former Member
0 Kudos

Hi Harish,

Thanks for your reply.

I tried but getting error, I also tried reading a value without dynamic configuration, I mean by using regular variable substitution method get same error, trying to read an order number out of EDI XML output

Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: The Adapter Message Property 'FileName' was configured as mandatory element, but was not supplied in the XI Message header

Thank you.

former_member184720
Active Contributor
0 Kudos

When you use variable substitution don't select the check box for ASMA.

You are getting this error because you enabled the check box for filename under ASMA

Former Member
0 Kudos

I tried both, still getting below error.

Delivery of the message to the application using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: Caught SAXException while parsing XML payload: Content is not allowed in prolog.

can you  help mon this? what is the reason for this error.

former_member184720
Active Contributor
0 Kudos

What is your PI version? I remember couple of discussion where ppl had similar issue.

Can you try below approach?

Former Member
0 Kudos

PI version is : 7.3 dual stack.


Former Member
0 Kudos

Are you using BicMapper bean module in File channel to convert as EDI? if so then you need use differnt method to get the file name.

nabendu_sen
Active Contributor
0 Kudos

Hi Sruthi,

Variable Substitution does not work with Modules in Receiver which manipulates the XMLs.

Regards,

Nabendu.

engswee
Active Contributor
0 Kudos

Hi Sruthi

As mentioned by Nabendu, variable substitution will not work in your scenario. To be exact, the error "Content is not allowed in prolog" is due to the payload being parsed by the SAX Parser which is expecting XML payload. However, in your case, you would likely have a BIC module to convert the XML to EDI in your receiver channel. Therefore the payload at the point of execution of variable substitution is no longer an XML.

Refer also to a similar error in the following thread.

Re: XML to EDI conversion along with Filename Variable referencing field

Rgds

Eng Swee

Former Member
0 Kudos

Hi Eng,

Thank you.

So there should be some approch to meet the requirement right.

I am just thinking to use Runtime operation command after processing option in channel.

Any one have script for getting file name using one field in payload, lets say order number from payload should present in file name.

or do i need to use adapetr module for this? or BPM ? which one will be the best option since variable substitution and dynamic configuration are not possible.

Thank you.

Former Member
0 Kudos

you can follow the below steps to achieve this mapping and configuration.

1. Assign the filename using dynamic cinfiguration bean in mapping - Filename.

2. Include AF_Modules/DynamicConfigurationBean in the module configuraition

3. Write the file name to mesage.interface as below in the parameter section

1key.0write http://sap.com/xi/XI/System/File FileName
1value.0message.interface

4. enable variable substition

fNamemessage:interface_name

5. %fName% in File name scheme.

Former Member
0 Kudos

As I mentioned already, can not use dynamic configuration / variable substitution.

Former Member
0 Kudos

Hi Sruthi,

Instead of any existing field, just add a variable at target structure and map the file name to that. It might work.

engswee
Active Contributor
0 Kudos

Hi Sruthi

Your scenario seems to hit the different limitations in PI - (a) multimapping with dynamic config and (b) variable substitution with non XML content

One possible approach around this is to split the scenario into two steps.

Step 1

Sender -> PI -> File (multiple files still in XML format)

Perform multimapping and map the filename to a suitable target field. In the receiver channel, DO NOT have the BIC module to convert to EDI format. Include variable substitution based on the target field. These files should be placed in a temporary location.

Step 2

File sender -> PI -> Original target file

Pick up the files from the temporary location, set ASMA for Filename in the Sender channel. In mapping, perform 1-1 mapping for all fields, but remove the mapping for the field that was used to store the filename from above step. In receiver channel, set ASMA for filename and add BIC module to perform conversion from XML to EDI. The files will be placed in the final destination location and retain the same name.

Rgds

Eng Swee