cancel
Showing results for 
Search instead for 
Did you mean: 

Conditionally suppress tags in PI

Former Member
0 Kudos

Hi Experts,

We are using service interface which sends PO from SRM to PI. We need to suppress few tags conditionally based on vendor of the PO which is in incoming pay load header. Can you please let me know how to achieve this?

Thanks very much!

Latha Koppara

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member184789
Active Contributor
0 Kudos

hi,

for suppressing tags, you could either use a createIf functionality or if you have a UDF, there you can have result.addSuppress() if a condition is not met.

Muniyappan
Active Contributor
0 Kudos

Hi,

you could check below link also. check the section "The node function createIf"

http://scn.sap.com/people/stefan.grube/blog/2006/01/09/the-use-of-suppress-in-the-xi-30-graphical-ma...

if you are new to this whole concept you can learn about mapping using below link.

http://wiki.sdn.sap.com/wiki/display/XI/PI+7.0+and+7.1+Mapping+-+Blogs,+Articles,+Wiki,+Code+Samples...

Regards,

Muniyappan.

baskar_gopalakrishnan2
Active Contributor
0 Kudos

This is very much possible in simple graphical mapping. Check the condition using constant and equals function (for example) and if the condition matches use createif to create target tags otherwise no.

you might want to see this good link and example 5

http://scn.sap.com/people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-part-ii

ambrish_mishra
Active Contributor
0 Kudos

Hi Latha,

Where do you want to suppress the tags. In SRM or PI ? Since SRM interfaces often use standard proxy interface API (PurchaseOrderRequest_Out) to send PO to PI, not sure if you can govern this by configuration in SRM.

If you are doing graphical mapping to map source and target message in PI, very much possible. please provide details and I can help further.

Ambrish

Former Member
0 Kudos

Ambrish,

Thanks very much for the response. Seems like I am talking to the right person.

I need to achieve it in PI mapping. Vendor is in header of payload and I need to suppress item description tag at item level only for few vendors.

Also we use HTTP adapter to send to multiple vendors, based on payload vendor number I need to send to different Http destinations, can you please let me know how I can achieve that?

Appreciate your help!

Latha

ambrish_mishra
Active Contributor
0 Kudos

Hi Latha,

You can store the vendor numbers for which you want to suppress the description in Value mapping or Fix value table like below:

Source/target agency names to be given as per project naming convention.

sample values V1 and V2

VendorNumber(source schema)     Suppress (target schema)

V1                                                true

V2                                                true

.........

Value mapping provides you flexibility to add/remove vendor numbers without changing the mapping.

Pass the vendor number to the value mapping or Fix value table. I have used Fixed-Value table for example.

this way your Description tag will be suppressed when Vendor V1 and V2 are passed from source.

If the description is mandatory, simply pass constant null instead of creatif.

For multiple receivers, you can do conditional receiver determination on vendor number in ID. Have multiple receivers and use Xpath and give vendor value to choose a receiver.

Simple example for conditional receiver determination is below:

http://wiki.sdn.sap.com/wiki/display/XI/Xpath+Condition+in+Receiver+Determination

Hope it answers your question.

Ambrish

Former Member
0 Kudos

Thanks very much for the detailed reply Ambrish.

I have tried like you suggested and have attached the screen shot. However it still created the tag. Can you please point me in right direction?

Appreciate your help!

ambrish_mishra
Active Contributor
0 Kudos

Hi Latha,

I am sure it will work.please attach your screenshot again. I can't find it.

Ambrish