• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

riyaz.net

Tech Tips and Tutorials for SAP Professionals and Bloggers

  • Home
  • WordPress
  • Tips & Tricks
  • Internet
  • SAP
    • SAP PI
    • SAP ABAP
  • Personal Finance
  • Health & Fitness
  • Travel & Leisure
You are here: Home / SAP / SAP PI: ABAP Mapping Simplified

SAP PI: ABAP Mapping Simplified

May 26, 2010 by Riyaz

abap-mapping

Many PI consultants consider ABAP mapping to be very complex and hence avoid using it. However in reality it is pretty easy. With this easy to follow step-by-step guide, ABAP mapping will be a cakewalk. Java and XSLT mapping is already made simple for you earlier. Now lets master some ABAP stuff.

In SAP PI, ABAP Mapping is not enabled by default. We need carry out some configuration to register the ABAP Mapping in the Exchange Profile. The step by step procedure of doing this is explained in this article: How to register ABAP Mapping in Exchange Profile. Make sure this is done before you proceed any further.

Writing Your First ABAP Mapping Class

Logon to your the ABAP stack on your SAP PI system and create a new ABAP objects class using ABAP Workbench (transaction SE80).

abap mapping class

This class must implement interface IF_MAPPING of package SAI_MAPPING.

IF_MAPPING

The EXECUTE method of this class will serve as the ABAP Mapping program for our interface. The parameters SOURCE, PARAM, TRACE, DYNAMIC_CONFIGURATION, RESULT and exception CX_MAPPING_FAULT are available for use within the method.

IF_MAPPING-EXECUTE

IF_MAPPING-EXECUTE

All you need to do now is to write your transformation logic in ABAP within the EXECUTE method and use the class as mapping program in your Interface Mapping object.

Implementing ABAP mapping in SAP PI

Once your ABAP Class is ready and activated, define a new interface mapping. Specify source and target message interfaces and click on Read Interfaces option. Under the Mapping Program section, select the Type as Abap-class (if this mapping type is not visible, you need to register the ABAP mapping type in Exchange profile). Under the name field, type the name of the ABAP class that we created previously.

abap-mapping-in-interface-mapping

Save and activate the changes. Carry out rest of the configuration as usual and test your interface.

In the next article, I will provide an actual code walkthrough using a simple ABAP Mapping example.

Filed Under: SAP Tagged With: SAP ABAP, SAP PI

About Riyaz

Riyaz Sayyad is the founder of Riz Labs. Learn more about him here.

Primary Sidebar

Popular Guides

  • Dropbox Tutorial
  • CDN Setup Guide
  • Blog Design Tips
  • Optimize RSS Feed
  • Create Twitter App
  • Short URLs
  • Password Protect Folders
  • Time Management
  • ALE IDocs Tutorial
  • SAP PI Starter Kit
  • SAP PI Tips
  • Ergonomics

Popular Topics

  • Home
  • WordPress
  • Tips & Tricks
  • Internet
  • SAP
    • SAP PI
    • SAP ABAP
  • Personal Finance
  • Health & Fitness
  • Travel & Leisure

About Riyaz

riyaz.net is a popular technology site with how-to guides, tips and tutorials on personal technology, blogging, social media, web apps, personal finance and SAP.

riyaz.net was launched way back in 2005 by web designer, blogger and SAP Consultant Riyaz Sayyad from Pune, India. Over the years the site has grown into a full featured online community with thousands of visitors daily from around the world. Read more.

Copyright © 2025 ยท riyaz.net