cancel
Showing results for 
Search instead for 
Did you mean: 

SAP PI Mapping Question

Ramesh
Explorer
0 Kudos

Hi,
Requirement: Need to map the below scenario
Source Target

HEADER_TEXT 1.unbounded (Array)

TEXT1 1.1 String ID 1.1 String
TEXT2 1.1 String TEXT 1.1 String

TEXT1 should map as 1st row in HEADER_TEXT ID is a constant of K01
TEXT2 should map as 2nd row in HEADER_TEXT ID is a constant of K02

How to map in PI ESB graphical tool in message mapping.

manoj_khavatkopp
Active Contributor
0 Kudos

Can you please provide sample input xml and expected output xml

Ramesh
Explorer
0 Kudos
Source
<?xml version="1.0" encoding="UTF-8"?>
<HEADER_SOURCE>
	<TEXT1>line A</TEXT1>
	<TEXTID1>k01</TEXTID1>
	<TEXT2>line B</TEXT2>
	<TEXTID1>k02</TEXTID1>
</HEADER_SOURCE>	

Target
<?xml version="1.0" encoding="UTF-8"?>
<HEADER_TARGET>
	<HEADER_TEXT>
		<TEXT>line A</TEXT>
		<TEXTID>k01</TEXTID>
	<HEADER_TEXT>
	<HEADER_TEXT>	
		<TEXT>line B</TEXT>
		<TEXTID>k02</TEXTID>
	<HEADER_TEXT>	
</HEADER_TARGET>

Source is flat structure fields wanted to map to an array as in target
Ramesh
Explorer
0 Kudos

Thanks for your response and valuable answers will try that out.

Accepted Solutions (0)

Answers (2)

Answers (2)

nidhi_srivastava22
Active Contributor
0 Kudos

Hi Ramesh,

You need to use remove context & split by value to implement this mapping.

Thanks,

Nidhi Srivastava

former_member207703
Active Participant
0 Kudos

Hi,

I dont think removeContext required.


Regards,

Anoop Rai

ravicarpenter
Active Participant
0 Kudos

Hi,

Use SplitByValue - Each value