cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass the mail body to RFC structure

monikandan_p
Active Participant
0 Kudos

Dear Experts,

      I have completed the development Mail->PI-->RFC,I can able to process the From,To,Subject - to RFC structure perfectly using standard mail sender xsd by external definition.

But issue with body of the mail.

Mapping structure:

Mail sender:

Receiver RFC in SXMB_MONI:

How to take the body of the mail separately and pass it to RFC without improper content.

Is there any proper structure or module config to handle this issue.

Best Regards,

Monikandan.

Accepted Solutions (1)

Accepted Solutions (1)

RaghuVamseedhar
Active Contributor
0 Kudos

Monikandhan,

If Content field get similar kind of prefix and postfix, all the time. Write below UDF.


return inputContent.substring(inputContent.indexOf("Content-Transfer-Encoding:7bit")+30, inputContent.indexOf("sig----"));

monikandan_p
Active Participant
0 Kudos

Hi Raghu,

Can you pls explain clearly with the udf where we need to apply the above return code in the udf.

Best Regards,

Monikandan.

RaghuVamseedhar
Active Contributor
0 Kudos

Monikandan,

From your screenshot.

Content = "................Content-Transfer-Encoding:7bit Hi Team, Can you reset the password. sig---- ......"

Expected BODY to RFC = Hi Team, Can you reset the password.


If Content field get similar kind of prefix and post-fix, all the time. Write above UDF which return sub-string of input.

If prefix and post-fix are variable but follow a pattern, I can guide you with regular expression to match the pattern.

monikandan_p
Active Participant
0 Kudos

Dear Raghu,

          Thanks for your reply.

  I can able to process the body of the mail successfully to RFC structure,Now i am facing issue to process the CC of the mail to RFC and i am following standard mail structure there is no field structure for CC.

Also i tried using below variable header method,but i cant able to map and bring in to RFC structure,Kindly guide how to map it to RFC.

Scenario: Mail->PI->RFC

Kindly go through the below sender mail structure and guide how to process the CC.

Best Regards,

Monikandan.

RaghuVamseedhar
Active Contributor
0 Kudos

Monikandan,

Please write a UDF to get header details and write it to target XML.


DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/Mail","SHeaderCC");

String cc = conf.get(key);

return  cc;

Please post the XML which is coming into SAP PI i.e. XML before mapping. Please post Dynamic Header part of SOAP message before mapping.

monikandan_p
Active Participant
0 Kudos

Thanks Raghu its working fine.

Best Regards,

Monikandan.

Answers (0)