cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping change

Former Member
0 Kudos

hi,

i have below requirement change; can somebody give me inputs.

This interface is

SAP -->PI --> BS1 / BS2 / BS3 that is

IDOC -->PI --> FILEs

only the business system BS3 needs two additional fields; as of now there is only one mapping for all 3 BS. the file is generated based on the IDOC field RCVRN, which tells which BS.

so how can I add two additional fields in mapping only for BS3?

Thanks,.

Accepted Solutions (1)

Accepted Solutions (1)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Use Enhanced interface determination. You create two different target structures in the target interface and based on the source data do mapping and choose right target interface. Very simple.

see this link

refer the section Mulitple operations in the same inbound interface.

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/90dcc6f4-0829-2d10-b0b2-c892473f1...

Answers (2)

Answers (2)

Former Member
0 Kudos

thanks all for your answers:

used the same mapping and the last 2 fields would be blank for the other 2 systems. passing the value to the required system.

Former Member
0 Kudos

HI,

If you want to use single mapping, then add two fields to the existing mapping and place a condition in the mapping, like if RCVR=BS3 then logic....

or else, you can create different mapping and use it in the Interface determination based on the BS.

thanks...

Karna....

Former Member
0 Kudos

thanks baskar n karna,

I have already this interface running in prod; i dont want to disturb the flow;

condition is used in recvr determination to redirect the files; now i need to add two filelds for BS3.

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

I have already this interface running in prod; i dont want to disturb the flow;

Since there are two fields added for BS3, best practice dictates that you need to create another version of your current SCV to satisfy the requirements. This approach would need you to:

1. Create another SCV

2. Copy the existing mappings from there

3. Make the changes

4. In ID call the operation mapping in version 2 for business system 3 under interface determination

Otherwise, you can also follow what was suggested by the two posters above.

Hope this helps,

Mark

anupam_ghosh2
Active Contributor
0 Kudos

Hi,

Following information becomes essential to suggest alternative solution

1. What was the source XML structure (sample)?

2.What was the target XML structure (sample) in past ?

3. What will be the new target XML for BS3?

4. From which field of source XML the target XML is being populated?

5. What is the version of PI you are working?

First you add two extra field (say X and Y) as per your requirement, with min occurence as zero,at the end of current target XML for all receiver BS1 / BS2 / BS3. This X and Y will be populated with correct values for BS3 but for BS1 and BS2 fill up this field with some special values say text "INVALID".

Now just add a small java mapping or XSLT mapping code after the existing message mapping, within the same Interface mapping. This java/XSLT code will first check from the source Payload the values of field X and Y. If fields X and Y contains value "INVALID" then the mapping will simply remove fields X and Y from target payload, else the mapping will only copy the source to target XML without any change.

Thus with only change in mapping you can add two extra fields to target system.

In case you need help with code (preferably java since I am not so good in XSLT) then would request you to answer the questions , I posted above.

Hope this solves your problem.

Regards

Anupam

Edited by: anupamsap on Dec 7, 2011 6:17 AM