cancel
Showing results for 
Search instead for 
Did you mean: 

variable substitution can not parse the message xml: Content is not allowed in prolog.

Former Member
0 Kudos

Hi Experts,

Can anyone please respond to the below query ASAP.

My requirement is PI will get the main payload and attachment data from SAP ECC through Proxy.

From mainpayload I will get one field "FileName" , the same name I should use as the attachment name before sending to target with PGP encryption.

Here are the steps I have followed.

Please Help me how to resolve this issue. I read several Blogs on this but none of them worked.

It would be very great if you provide the solution soon..

Thanks,

Gayathri.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi All,

Thanks for the solutions which you provided.

By using UDF I have completed my development without any error.

Now I got another Requirement for sending mail to Bank(third party Receiver).

Once the file leaves from PI I should send an acknowledgement to Bank. Please help me with the steps.

Thanks,

Gayathri.

former_member186851
Active Contributor
0 Kudos

Gayathri,

Please close this thread and post a new thread for the same.

Answers (2)

Answers (2)

former_member186851
Active Contributor
0 Kudos

Gayathri,

Try defining the parameter value like below


payload:MT_MERCER_BOA,1,Recordset,1,FileName,1

and also I guess you cant use PGP with Variable substiton,since PGP encrypts the payload.

Try using Dyanmic UDF instead.

Former Member
0 Kudos

Hi Raghu,

Are you sure that Variable substitution  and PGP Encryption will not work together.

payload:MT_MERCER_BOA,1,Recordset,1,FileName,1:


Do you want me to use Targetmessage Type , how it will work?

Thanks,

Gayathri.

former_member186851
Active Contributor
0 Kudos

Hello Gayathri,

Yes,I guess it wont work together.

Why dont you use dyanmic config as Alberto suggested.

Former Member
0 Kudos

If I follow Alberto  steps what should I give in "Filename"  in File parameter.

Former Member
0 Kudos

Just give * if you are going to have Dynamic UDF...

Former Member
0 Kudos

Also for variable substitution  try remove the SWC from sender agreement...

http://scn.sap.com/community/pi-and-soa-middleware/blog/2012/08/16/the-mystery-of-content-is-not-all...

Former Member
0 Kudos

Yes, you have to use UDF in Mapping to set dynamic configuration, for example:

DynamicConfiguration conf1 = (DynamicConfiguration) container      .getTransformationParameters()      .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);  DynamicConfigurationKey key1 = DynamicConfigurationKey.create( "http:/"+"/sap.com/xi/XI/System/File","FileName");  String NFname= Var1+".csv"; 
former_member186851
Active Contributor
Former Member
0 Kudos

I have already tested without SWCV still I got the same error.

Former Member
0 Kudos

Why donyou use in Advanced option: "Use Adapter specific Message Attributes" and mark File Name option:

Check Image as an example:

Former Member
0 Kudos

Hi Alberto,

Will it work without Variable substitution?

If I follow your steps what should I give in "Filename"  in File parameter.

Please suggest me.

Thanks,

Gayathri.