100% found this document useful (1 vote)
773 views24 pages

SAP PI - B2B ANSIX12 Inbound Scenario

This document describes an inbound EDI ANSIX12 scenario where an external partner sends an EDI 850 file to SAP PI. PI converts the file to an IDOC and sends it to ECC. PI also sends a 997 acknowledgment file back to the external partner. It provides steps to configure the scenario in SAP PI, including onboarding partners in TPM, creating interface control objects (ICOs) in ID, and configuring channels and modules. The key aspects are splitting incoming EDI files, converting to IDOC format, and returning acknowledgments to partners.

Uploaded by

santoshkumarkn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
773 views24 pages

SAP PI - B2B ANSIX12 Inbound Scenario

This document describes an inbound EDI ANSIX12 scenario where an external partner sends an EDI 850 file to SAP PI. PI converts the file to an IDOC and sends it to ECC. PI also sends a 997 acknowledgment file back to the external partner. It provides steps to configure the scenario in SAP PI, including onboarding partners in TPM, creating interface control objects (ICOs) in ID, and configuring channels and modules. The key aspects are splitting incoming EDI files, converting to IDOC format, and returning acknowledgments to partners.

Uploaded by

santoshkumarkn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 24

SAP PI- B2B ANSIX12 Inbound Scenario

9 Li kes 11,575 Vi ews 21 Comments

EDI ANSIX12 Inbound


This is an inbound scenario where data flow is as follows. Let’s take EDI 850(Orders) in our
example.

External Partner——–EDI 850 File—–(1)—->PI————-IDOC——–(2)——>ECC

External Partner<——–997 Ack——(3)——PI


External partner sends an EDI 850 file to PI. PI converts it in to an IDOC and sends it to ECC.
And also PI sends a 997 EDI file back to External partner as an acknowledgement.

There are several ANSIX12 EDI transactions like 810(Invoice), 850(Orders), 856(Shipment) etc.
But in our example we talk about 850(Orders).

Prerequisites
1. Firstly we need to on-board all partners involved, in to PI TPM. TPM stands for Trading
Partner Management which is a B2B central repository to maintain all partner
information.

2. We’ll on-board following 3 partners in to TPM.

a. Partner_A
b. Partner_B
c. Partner_C

3. Along with these 3 partners we on-board one more partner which acts as self-partner.

a. Partner_ECC

4. Before we on-board partners in TPM, we need to create corresponding parties in ID.

a. Party_A
b. Party_B
c. Party_C
d. Party_ECC

5. Above all, make sure B2B add on is installed in our PI landscape.

Things to do in TPM
Step 1: Create all parties in ID

In our example, we have 4 parties to create.

Step 2: Create all Partners in TPM

To create partners in TPM, we first login in to B2B integration cockpit using following URL.

http://PIHostName:port/b2bic

Postfix b2bic to PI url to login in to integration cockpit, which looks like following

Click on Trading Partner Management and add our partners there.


In Party Name select its corresponding party which we have already created in ID in step 1.

Now go to identities tab and give a unique partner ID and partner ID qualifier for the
partner and save it.

Here, we give partner ID in identifier text box and ID qualifier in agency code text box. In this
case partner ID is 000000000A and Qualifier is ZZ.

Now go to Messages tab, add message type ANSIX12 850 of version 4010 and save it.

Now go to EDI Acknowledgments tab, then go to ANSIX12 tab, mark 997 acknowledgment
as required and save it.
Similarly create partners for Partner_B, Partner_C and Partner_ECC as well.

Use partner IDs as 000000000B, 000000000C, 0000000ECC respectively. And use ZZ as


qualifier for all partners.

While creating Partner_ECC, select partner type as self.

Step 3: Create Agreements


Now we create partner agreements for all partners. Agreement is created between External-
partner and self-partner we created. In our example since we have 3 partners, we create 3
agreements.

a. A-ECC

b. B-ECC

c. C-ECC

To create an agreement for partner A, select it and go to Agreements tab and click on Create.

Similarly create agreements for Partner_B and Partner_C too.

Things to do in ID
In ID, we create 3 ICOs. Below is the reason why we do that.

To achieve our functionality, we have to do following 2 things.


1. Send EDI file from external partner to ECC
2. Send a 997 acknowledgment back to partner

So, technically it looks like 2 ICO’s are enough here. But as a part of first step (where we send
EDI file from partner to ECC), we don’t send it directly to ECC. But we split this in to 2 flows.
First flow is from external partner to EDISeparator channel. And second flow is from
EDISeparator channel to ECC. The reason why we do this is, we need EDISeparator channel to
split incoming EDI message in to multiple EDI messages if contains multiple transactions in it.
And also EDISeparator channel is needed to send a 997 acknowledgment back to partner.

Hence we need to create following 3 ICOs in ID.

ICO 1

External Partner——EDI 850 File——>PI———- EDI 850 File ———


>EDISeparator
ICO 2

EDISeparator——EDI 850 XML File——–>PI———- IDOC XML ———>ECC


ICO 3

EDISeparator——EDI 997 File——–>PI———- EDI 997 File——->External


Partner

I have created 2 Business components, one for external partner and other for EDISeparator.
Besides, I have one more business system for ECC.

1. BC_ExtPartner
2. BC_Split_conv
3. BS_ECC

Note: For simplicity, I have used a file channel to pick EDI messages instead of using AS2.
Creating ICO 1

In ICO 1, sender component would be external partner component and receiver component
would be EDISeparator component.

While creating this ICO, give some dummy name for Interface and Namespace. This interface
and namespace need not be present in Integration Repository.

Give sender channel as NFS/FTP file channel (for simplicity, I have used file sender channel
instead of AS2 sender channel). We will place our EDI files in this path.

In file sender channel modules tab, give following module sequence.


TPMContentAccessModule is required to dynamically fetch partner information from TPM
based on sender partner ID, qual and receiver partner ID, Qual combination when ICO gets a
new EDI file.

EDISearchParametersModule adds few EDI search parameters like correlation ID which will
be helpful while monitoring EDI messages.

In Receiver tab, give business component we created for EDISeparator as receiver


communication component. In this case, it is BC_Split_conv.

In Receiver Interfaces tab, give some dummy names for Name and Namespace. They need
not be present in Integration Repository.

In outbound Processing tab, give EDISeparator receiver channel which receives incoming EDI
file.
In EDISeparator receiver channel, check Read from Dynamic Headers check box. This ensures
TPM configuration we did will be given priority to configuration we do in this channel. For
example if we say Ack is not required in communication channel and Ack is required in TPM
configuration, TPM configuration will be given priority and Ack will be sent.

Now, EDISeparator receiver channel does two things.

1. If incoming EDI message has multiple messages in it, EDISeparator receiver adapter
will split that EDI message in to multiple individual EDI messages. If it contains only
single EDI message, it will just send out single EDI file as it is.
2. If the partner is configured as acknowledgment required in TPM, EDISeparator
adapter will create another EDI message with 997 transaction as an
acknowledgment.

Creating ICO 2
Now, we create ICO 2 to receive splitted EDI messages which is explained in point 1.

So, sender component would be EDISeparator business component and receiver component
would be ECC.

In this ICO, give some dummy Interface and Namespace name. They need not be in
Integration Repository.

In EDISeparator sender channel do following configuration. Since this ICO should pick up
splitted EDI 850 messages, we configure channel as following so that this channel will pick up
only EDI 850 splitted messages and ignore the rest.
Incoming message is in raw EDI format. First we have to convert this EDI file in to XML file.
Hence we use a predefined SAP module to do that.

Go to Modules tab and configure following module sequence.

TPMContentAccessModule and EDISearchParametersModule are


optional. X12ConvertedModule is required to convert ANSIX12 EDI file to XML file.
tpm.enable parameter ensures to use TPM configuration while conversion.

Now go to Receivers tab and give receiver as ECC.


Now go to Receiver Interfaces tab and give message mapping which we have created to
convert EDI XML to IDOC XML.

I have already created a mapping which converts EDI XML to IDOC XML in Integration
repository. I am not covering that in this document. There is an SAP provided mapping for EDI
850. You can refer that to create your own mapping or just use that same mapping in this ICO.

Now, go to outbound processing tab and give IDOC receiver channel.

Creating ICO 3

Now, we need to create ICO 3 to receive splitted 997 EDI message and send it as an
acknowledgment back to partner.
Here since no message mapping is involved, we just route the EDI file to partner and no XML
conversion is required.

Give some dummy name to Interface and Namespace. They need not be there in Integration
Repository.

Create an EDISeparator sender channel to pick up EDI 997 messages and use it here.
Receiver will be External partner here.

Give some dummy names for Interface and Namespace.

In outbound processing, configure one NFS file receiver channel to place 997 EDI files. (In real
time, we use AS2 adapter and route the 997 files to partner).
That’s it! We are done with configuring. Below picture gives an overall view on how EDI
inbound interface works. In real-time we use AS2 adapter to connect to external partner
instead of file channel in our example.

To test the interface end to end, take a sample EDI ANSIX12 850 file and change sender ID,
Qualifier and receiver ID, Qualifier so that they will match with our partner configuration.

For example, if we are testing with Partner A, following should be configured.

Sender Partner ID: 000000000A

Sender Partner ID Qualifier: ZZ

Receiver Partner ID: 0000000ECC

Receiver Partner ID Qualifier: ZZ


While testing you will be able to see in message log that sender and receiver partner
information is fetched dynamically using TPMContentAccessModule based on partner ID and
qualifier combination in incoming EDI file.



 Alert Moderator

Assigned tags

 SAP Process Integration

Related Blog Posts

 The new B2B Add-On for SAP NetWeaver Process Integration


By Katrin Ahsen, Feb 03, 2012
 Functional Acknowledgement (Inbound and Outbound FA 997)- for Beginners
By Former Member, Mar 02, 2014
 B2B – Control Key scenario association – Sender Channel Error
By Nishant Chavan, Mar 12, 2014

Related Questions

 How to handle Seeburger custom mapping in B2B addon


By Karthiga Karunakaran, Jul 10, 2018
 File to Proxy in PI 7.5 single stack
By gurudatta d, Apr 24, 2017
 IDOC number not visible in B2B monitoring
By Former Member, Mar 09, 2017
21 Comments
You must be Logged on to comment or reply to a post.

Former Member

May 29, 2016 at 6:03 pm

Hi Avinash,

I appreciate your wonderful document,actually I am searching for complete B2B step-by-sptep blog at
last I found it.Good work Keep it up!

Thank you!

Bhoopal

o Like(1)

Roberto Cantero

June 1, 2016 at 4:09 pm

Hello,

Check that link:

https://scn.sap.com/docs/DOC-71653

Step by step here

regards,

Roberto.

 Like(0)

Former Member

January 4, 2017 at 3:59 am

Looking for EDI outbound scenario

 Like(0)

Mohammed Younus

August 9, 2016 at 7:51 am

Hi Avinash,

Good work in explaining the inbound B2B scenario in details.

Keep it up. Continue blogging.

regards,

Younus

o Like(1)

ambuj mishra

August 9, 2016 at 8:37 am

Well explained and covers lot of areas about B2B ANSI integration. Thanks for sharing Avinash.

o Like(1)

Dibyajit Das

August 9, 2016 at 9:17 am

Thanks Avinash for sharing the blog.

o Like(1)

sivakrishna sathu

October 28, 2016 at 9:25 am

Very useful blog Avinash, keep going.

o Like(2)


janardhan reddy

November 4, 2016 at 12:06 pm

Very useful information.. Thanks…

o Like(0)

Former Member

November 14, 2016 at 8:35 am

Hi Avinash,

I was trying to replicate the above scenario. All configuration works fine, apart from “Read from Dynamic
Headers” in the EDISeperator Receiver channel. As soon as I enable this check I start getting below error.

“Transmitting the message to endpoint <local> using connection File_http://sap.com/xi/XI/System failed, due to:
com.sap.engine.interfaces.messaging.api.exception.MessagingException: javax.resource.ResourceException:
com.sap.aii.adapter.ediseparator.ra.property.handler.PropertyHandlerException: Unable to get property:
ControlKey from CPA cacheControlKey”

Do you have any pointers to fix this issue ?


We are on SP04 latest patch for B2B addon.

Regards
Vishal J

o Like(0)

Avinash Bandela Post author

November 23, 2016 at 7:16 am

Hi Vishal,

When you check the checkbox “Read from Dynamic Headers”, settings are dynamically read from
TPM instead of channel.

Usually we get this kind of exception if modules are wrongly configured in the channels. Please check
your module sequence used. Kindly refer module configuration in channel screenshots I showed above.

Thanks,
Avinash B

 Like(0)

Bhalchandra Wadekar
December 12, 2016 at 4:36 pm

Hi Vishal,

Were you able to solve your error?

Please can you tell us how you rectified the error.

Thank you,
Bala

 Like(0)

Former Member

December 13, 2016 at 11:11 am

Yes Bala, I was missing the TPMContentAccessModule in the file sender communication
channel.
Once I added that, the issue was resolved.

Regards
vj

 Like(0)

Bhalchandra Wadekar

December 19, 2016 at 10:07 am

Thanks, Vishal.

Regards,
Bala

 Like(0)

kavi tha

January 5, 2017 at 11:16 am

Hi Avinash

i have some doubt regarding “Read from Dynamic Headers” actually how it will work.

based on your previous post as per my understanding is if we select “Read from Dynamic Headers” it will
generate 997 based on TPM configurations. am i correct??
once we configure the “Read from Dynamic Headers” option in general tab in Receiver Ediseparator side then no
need to config next tab”ANSIX12″ in receiver edi separator “997 ACK Required” option ??

Even if we select both options (“Read from Dynamic Headers” and ” 997 ack required “) what will be happen is it
work?? which case we have to use “Read from Dynamic Headers” option .

if we not configure TPM configuration then it will not work “Read from Dynamic Headers” option??

One more doubt is you configured three partys A,B,C in ID level but you didnt use while create in BUSINESS
COMPONENT LEVEL and Communication level .than what is the use for creating party in ID level. And how we
create link TPM config details in ID level .using this module been localjbs/TPMContentAccessModule it
will create link TPM to ID.

Thanks
Kavitha

o Like(0)

Manoj K

January 5, 2017 at 12:07 pm

Kavitha,

When you select both in channel and mention Dynamic , the high Priority is given to dynamic so it will
read configuration from TPM.

if we not configure TPM configuration then it will not work “Read from Dynamic Headers” option??
No you will get an error.

Using this module been localjbs/TPMContentAccessModule it will create link TPM to ID.
Yes you are correct.

The parties name created in TPM is just a name for a customer it need not be same which you use in ID
, what is more important is the Identifier you mention in the TPM under that party.
Br,
Manoj

 Like(2)

kavi tha

January 6, 2017 at 5:18 am

Hi Manoj ,

Thanks for your reply.

I have doubt regarding in party’s .

I saw Party’s in ID but he didn’t use any where in ID level i mean if we configure the party’s in ID we will use
business system/component and communication channel as well .But i didn’t see that configuration .

Thanks
Kavitha

o Like(0)

Former Member

January 9, 2017 at 9:41 pm

How can I change the GS07 – segment in 997 – for example if a customer is sending “T” in 850 – the 997 should
send “T” in GS07. But for us it sends “X” – by default to all customers in 997.
Need help…..

o Like(0)

Former Member

January 9, 2017 at 9:42 pm

We use SAP PO – B2B for EDI.

We have setup EDI separator channel to send 997 automatically as we receive any
inbound documents from any customers.
Question – if 850 document for example – received from customer has value in
GS07 – “T” – which is responsible agency code – in this case customer is sending
value – ‘T’

But in 997 we send document – has GS07 with value “X” – which seems to be
default in all 997 that we send to any customers.

We want to change this to be T or we want to make sure it reads from the


document and sends the value customer has sent… is this possible?

Thank you very in advance for your help.

o Like(0)

Avinash Bandela Post author

January 10, 2017 at 3:28 am

Hi Alpesh,

There’s one way of doing it. You might have created an ICO for sending 997 to customer. In that ICO’s
sender EDISeparator channel, use X12ConverterModule to convert it to XML. Then use an intermediate
mapping to change its value to ‘T’. In the receiver channel convert the mapping output XML to X12 file
again using X12ConverterModule.

Hope this answers your question.

Thanks,
Avinash B

 Like(0)

Nguyen Steven

September 27, 2017 at 8:05 am


Hi Avinash,

Great blog!

I would like to have small questions: I saw there are Parties created in ID but you did not define BC, CC, ICO,
etc. for each party. Instead, used BC, CC, ICO, etc has empty Party.

What is the role of Parties in ID? Did you only use them to fill in TPM?

Best Regards,

Steven Nguyen

o Like(0)

Peter Ellebye

October 30, 2018 at 3:40 pm

Hi.

The blog refers to the module X12ConvertedModule.


It’s a typo…

Use localejbs/X12ConverterModule

Best regards…
Peter

You might also like