Understanding B2B Scenario 
B2B communication involves data exchange between two organizations or partners, which use different communication technologies in their landscapes. The interaction between the two heterogeneous companies is possible only when a middleware like SAP Process Integration mediates between the two companies and enables secured exchange of business data.
The Party identifies a company that is taking part in a B2B scenario. The business components that are made available for B2B communication are grouped under this party. The name given to the party identifies the company in the Integration Directory. But, to identify the company during any external communication, the company uses a globally unique ID along with the associated Agency and Scheme. During external communication, the name of the communication party that is known internally, gets mapped to the unique ID. Note: You can choose any of the default Agency, such as DBC (Duns & Bradstreet Corporation), NMFTA (National Motor Freight Traffic Association),EAN (International Article Numbering Association) or enter a different agency, for example, ITU (International Telecommunication Union) with its scheme as X.400
The header mapping hides the technical system name within your landscape with another system name that you want to expose to the external business partners. For example, if the sender in your landscape is a business system called XI005 that contains CRM application, using header mapping you mask the internal system with a business component called CRM_CompanyA. So, your partner can see the message from CRM_CompanyA
The virtual receiver hides the technical system name within your landscape while replying to a message in a B2B communication. For example, when the external partner sends you the details of a product, the business system BS005 in your landscape replies with an acknowledgement and the virtual receiver details hides the internal name with a business component called CRM_CompanyA.
Security is an important feature in a B2B communication as data exchange takes place beyond the firewall of the companies. SAP Process Integration provides security at the following levels:
Adapter-specific
Non-repudiation of data and authentication of messages
Username and password for client authentication
Agreement
Encryption/Decryption
Sign/ Validate
Allow only authorized users at both the business partners to access PI configurations
B2B Adapters are developed specific to business scenarios whereas technical adapters are developed specific to protocols. Few examples of B2B adapters supported by SAP NetWeaver PI are given below:
RNIF 1.1 and 2.0 Adapters- For process integration in high tech industries
CIDX Adapters- For collaborative commerce on the internet in the chemical industry
Partner developed adapters like EDI to ensure connectivity with systems based on UN/EDIFACT standard.
Define a party that represents your company.
More information: Defining Party
Define the communication components under the party.
More information: Importing a Business System, Defining a Business Component
Create an integration flow.
More information:Creating an Integration Flow
Assign the sender and receiver communication components and their interfaces
More information: Assigning Systems and Interfaces
Configure the adapters for sender and receiver channels.
More information: Defining Channels
Define the header mapping at the receiver.
More information: Defining Header Mapping
Activate and deploy the integration flow.
More information: Deploying Integration Flows
Monitor the channels and message processing.
More information: Monitoring Runtime Objects
Repeat steps 1 to 5 in the task above.
Define virtual receiver at the sender.
More information: Defining Virtual Receiver
Repeat steps 8 and 9 in the task above.