Skip to Content
avatar image
Former Member

Mapping change


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?


Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    Dec 06, 2011 at 08:49 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 06, 2011 at 09:10 PM


    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.



    Add comment
    10|10000 characters needed characters exceeded

    • 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.



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

  • avatar image
    Former Member
    Dec 08, 2011 at 06:17 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded