cancel
Showing results for 
Search instead for 
Did you mean: 

how to break the file and send it to 2 different formats??

Former Member
0 Kudos

Hi PI Experts,

My scenario is i have a file with multiple records on the sender side and i have 1 receiver business system and have to receive the data in 2 formats, one is in JDBC and other in xml format. my condition is if field is equal to 'ECC' then the data should be send to JDBC and if element is not equal to 'ECC' then data should be send to xml format.

for example, if a file has 2 records('ECC & ECC1) then 'ECC' record has to be stored in JDBC and 'ECC1' record should be send to xml format.

tell me what to do in the mapping side. hope u guys understood my problem.

if possible send me screenshots of the mapping.

Accepted Solutions (0)

Answers (3)

Answers (3)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

You can try enhanced Interface determination. You create two message structure, one for jdbc and other one for xml on the receiver side. Based on the value that come from the source field element do mapping logic to choose the appropriate receiver structure. This is possible to do.

refer this [link|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/90dcc6f4-0829-2d10-b0b2-c892473f1571?QuickLink=index&overridelayout=true]

Former Member
0 Kudos

HI Srini,

Just use two different message types in ur mapping!!!

Write the condition if (A = ECC ){Map to Structure A}

else if (A = ECC1){Map to Structure B}

Once you are generating all the required ECCs in Message Type A and then All ECC1s in Message Type B,

It is just configuration stuff where you will have common sender Agreement, receiver determination and also interface determination but the only thing that will separate these two is your receiver agreement.

You have to use two service interfaces for this, one for Structure A and another for Structure B.

I have done similar stuff 2 yrs back!!!

Please let me know if you require anything on this.

Thanks & Regards,

VK

former_member184681
Active Contributor
0 Kudos

Hi,

You will have to divide the logic to several PI objects. First, create an extended Receiver Determination (if JDBC and XML are separate receiver systems) or extended Interface Determination (if this is the same system, but different formats). Here, extended means that you enter two receiver systems/interfaces and put a condition like IF field = ECC then receiver1.

The second step is to create separate mappings for each receiver interface. In the mapping, you have to additionally put some conditions if you want each system only to receive some part of the message. There is no option to split the message into parts on the Receiver/Interface Determination level. Although the message can be split (or rather: duplicated) there, each receiver gets the whole message.

Hope you'll find this useful,

Greg