cancel
Showing results for 
Search instead for 
Did you mean: 

Payload as a single Field

ABHISHEK_MISHRA
Explorer
0 Kudos

how we can treat full file (Full payload ) as in single field.

While file picking from sender end and keep the full content as a payload in single field at source side?

Accepted Solutions (0)

Answers (4)

Answers (4)

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

Since your structure is dynamic do not use fcc, use java mapping to parse the payload and to map the response. Be careful in working with character sets when using java mapping.

Hope this helps,

Mark

Former Member
0 Kudos

Hi,

A bit confused with your question, but here are the two things which might help

1) sending whole source payload into single field in target structure, you can do this by mapping the headersegment to the target field and select RETURN AS XML on right click. there is one blog on this with screen shots if you want to take a look.

2) Taking whole payload from a single source field, You can do this by writing an UDF to extract the XML payload file and placing it before the MM in OP.

Thanks...

Karna....

PriyankaAnagani
Active Contributor
0 Kudos

Hi,

Create only one xml element in your source structure and read the entire data in the file into that field in case of sender. In case of receiver use return as xml option and put the entire payload in single field. Please refer the below link.

Regards,

Priyanka

ABHISHEK_MISHRA
Explorer
0 Kudos

Create only one xml element in your source structure and read the entire data in the file into that field in case of sender....?? How?

I am very well aware about the return as xml option, but my issue is how to read file where structure is not same at souce end it may be xml or .txt file...the whole structure need to post in single file..by FCC or any other way..

anupam_ghosh2
Active Contributor
0 Kudos

Hi,

you need java mapping to convert the file contents into a single field within target XML.

In case you need help in coding. Please furnish the following information

1. PI version you are working in.

2. Sample txt or xml file you are going to receive

3. Target XML required.

Regards

Anupam

Former Member
0 Kudos

Hi.

You can create a Java Mapping.

Regards.

ABHISHEK_MISHRA
Explorer
0 Kudos

1. PI version you are working in.-----PI 7.1

2. Sample txt or xml file you are going to receive....Structure is not constant, any structure (Even dummy ) that source file i need to treat as Payload to single source field.

3. Target XML required. target side here I need to send as a attachment which I know how to send.

Thanks,

Abhishek

ABHISHEK_MISHRA
Explorer
0 Kudos

My structure is not constant..Its dynamic structure..

PriyankaAnagani
Active Contributor
0 Kudos

Hi,

>>>>2. Sample txt or xml file you are going to receive....Structure is not constant, any structure (Even dummy ) that source file i need to treat as Payload to single source field.

>>>3. Target XML required. target side here I need to send as a attachment which I know how to send.

Then you won't require any ESR part...you can directly pick the file and attact it.....is there any specific reason for doing mapping in this scenario....

Regards,

Priyanka

ABHISHEK_MISHRA
Explorer
0 Kudos

Need the Payload for sending to Receiver as a mail attachment.

anupam_ghosh2
Active Contributor
0 Kudos

Hi,

you wanna put the entire file content into one field of an XML. I guess this will act as payload.

Could you please kindly post the XML structure where you wish to divert the file contents to.

Regards

Anupam

baskar_gopalakrishnan2
Active Contributor
0 Kudos

You might need to configure mail receiver adapter to send mail as an attachment. Refer this link

http://www.riyaz.net/sap/xipi-sending-emails-using-xi-mail-adapter/83/

Former Member
0 Kudos

Anupam,

Can you please help me out with this - http://scn.sap.com/thread/3555787

Thanks

Former Member
0 Kudos

hi,

[Blog 19719 - Convert the Input xml to String in PI 7.1 using Standard Graphical Mapping|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/19719] [original link is broken] [original link is broken];

[Copy XML Subtree|https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/8649] [original link is broken] [original link is broken];: this blog illstrates how to copy an entire XML subtree from source to target.

Mickael