Saturday, 14 February 2026

ABAP - Programming Language & Development Environment

 ABAP - Programming Language & Development Environment

(Advanced Business Application Programming)

 

ü  Fourth-generation language (4GL) developed by SAP in which SAP R/3 applications are written.

ü  Used to create the thousand of tiny embedded programs called transactions that make up an application.

ü  Application specific language with built-in knowledge of an application domain

ü  Interpretive language - translates and executes source statements one line at a time.

ü  Event-driven, top-down, well structured and powerful

 History & Features

Originated in 1980s

All SAP R/3 applications are developed in ABAP

Began as a report generation programming language

Evolved into a full-fledged development environment

Highly similar to COBOL in reporting respect

Very different from typical 3GL in other ways

Sometimes referred to as "German COBOL"

Moved beyond 4GL with introduction of ABAP Objects

4GL language based on structured programming methodologies

Also known as ABAP/4 to designate 4GL

Event driven dialog programming is central to the system

Interpretive language

Open and portable because of interfaces provided by SAP

Modular because of reusable subroutines and functions from a centrally managed library

Extensive data manipulation - dates, strings, floating-point numbers, etc

Standard SQL statements for accessing underlying database

 

Object Orientation Evolution

Algorithmic view - performance in 1960s

Procedural view - subroutines and procedures from outside the program

Structural view - manner in which subroutines and procedures performed

Object Oriented view - couples this trend not only to operations but also to data

 

Principal Blocks of OO Compared to 3GL

Object - record

Class - record type

Message - procedure

Method - call

SAP BAPI - a set of methods called an interface

Inheritance and encapsulation

Advantage is reusable software components - rapid implementation

SAP R/3 is NOT an OO environment per se

Highly influenced by OO

 ABAP/4 Development Workbench

SAP's integrated graphical programming environment offers all the necessary tools for creating and maintaining business applications in the R/3 System. The ABAP Workbench supports the development and modification of R/3 client/server applications written in ABAP. You can use the tools of the ABAP Workbench to write ABAP code, design screens, and create user interfaces. Furthermore, you can debug and test applications for efficiency using predefined functions, as well as access development objects and database information.

 Repository Information System (RIS)

ABAP/4 dictionary

Domain

Data elements

Table and structure

Views or composite objects

Data browser

Object browser

Program editor

Screen painter

Menu painter

Area painter

Function library

Debugger

Computer-Aided Test Tool (CATT)

Runtime analysis

SQL tracer

Workbench organizer

Transport system

 Programming

2 types - dialog (dynamic) and list (report)

Perhaps similar to online versus batch in IDMS

Traditional Features

Data definition statements - DATA, TYPES and TABLES

Data query statements - SELECT

Data manipulation statements - ADD, SUBTRACT, MOVE and COMPUTE

Data control statements - DO, WHILE, IF, CASE and PERFORM

Data types and operations

Data table processing

Internal tables

SAP transactions

Report transactions

Dialog transactions

Subroutines

Functions

Reporting

Screen or hardcopy

Logical databases are combined (joins)

Selection screens

Interactive reporting

Dialog Programming

Dynamic Programming (dynpro)

Combination of input screens and corresponding processing code

Dialog program is called a module pool - a collection of processing modules

Flow Logic

PROCESS BEFORE OUTPUT (PBO)

PROCESS AFTER INPUT (PAI)

PROCESS ON VALUE-REQUEST (POV)

PROCESS ON HELP-REQUEST (POH)

Corresponds to premaps, response processes; edit tables and screen help in IDMS

ABAP/4 Query

User-friendly interface for end-users

Output can be routed to file storage, Excel and other file types

SAPScript

A word processing program

Adds fonts and size variations to print Legacy Migration

Legacy System Migration Workbench (LSM Workbench)

Batch interface

Utility maps legacy source to data structures in R/3


Logging on to the R/3 System

 Logging on to the R/3 System

From the Windows Start menu choose SAP Front-end, and finally SAP logon-Pad. The SAPgui Logon screen appears. Enter the logging information in the fields in that screen and press Enter:

 

1.   Client number:           

2.   User name:                 

3.   Password:                   

 

If your username/password is valid for the client number that you have supplied the R/3 system displays a dialog box with system welcome message. (Note that if this is the first time you log on to the system, you will be asked to change your initial password). Click on the green check mark or press the Enter key to proceed. If your username/password is invalid the system will present an error message and ask you to re-enter the data.

 

The next screen is the Start screen from which you can access to all the R/3 functions permitted on your account. Your permitted functions have been organized into the following main folders: Overview, Development, Test, and Utilities.

 

Logging off from the R/3 System

There are three ways to log off from the R/3 system.

1.     Choose the menu path: System, then Logoff, from the main menu bar on the top of any R/3 screen; or

2.     Click on the Close icon on the frame of your R/3 window; or

3.     Enter /nend in the command field of the standard toolbar (on the top right hand corner of the screen).

 

In each case the system will display a dialog box warning you that ‘Unsaved data will be lost. Do you really want to log off?’ Choose the ‘Yes’ pushbutton to continue the log off process. Choose the Cancel pushbutton to return to your session.

Friday, 13 February 2026

Difference between Drilldown report and Interactive report

1.What is the difference between Drilldown reprt and Interactive report?

2. Is there any similarity between Classical report and Drill down Report?

There is no difference between drill down and interactive report, they are the same.

With drilldown reporting, SAP provides you with an interactive information system to let you evaluate the data collected in your application. This information system is capable of analyzing all the data according to any of the characteristics that describe the data. You can also use any key figures you wish to categorize your data. You can display a number of objects for a given key figure, or a number of key figures for a given object. In addition, the system lets you carry out any number of variance analyses (such as plan/actual comparisons, fiscal year comparisons, comparisons of different objects, and so on).

You can produce both simple, data-directed lists (basic reports) and complex, formatted lists in drilldown reporting (form reports).

Drilldown report provides you with comfortable functions for navigating through your data. For example, you can jump to the next level of detail or the next report object on the same level, hide individual levels and switch between the detail and drilldown lists. It also provides a number of additional functions which let you process lists interactively (sorting, conditions, ranking lists, and so on). SAP Graphics, SAPmail and the Excel List Viewer are also integrated into drilldown reporting.

The drilldown functions are divided into three groups which differ in the number of functions available. That way each user can choose the functional level most suited for his requirements.

In addition to the online functions for displaying reports, drilldown reporting also provides functions which let you print reports. A number of formatting functions are available to let you determine the look of your printed reports (page breaks, headers and footers, underscores, and so on).

The menus and the functions available directly on the drilldown report make it easy to use the information system.

What is an Interactive Report?

An interactive report generally works in the following fashion:

1. Basic list is displayed.
2. User double clicks on any valid line
    or
    User selects a line and presses as button on the tool bar.
3. The corresponding event is triggered
4. Then in the code, the line on which action was done, is read.
5. Depending on the values in that selected line, a secondary list is displayed.
6. Steps from 2-5 are repeated till the end.

From the above explanation, I believe, its clear that, the 20th list, will essentially depend on the "selected line" of 19th list. According to your question, you want to move to 20th list directly, without "a prior list". May I know the exact requirement so that, an appropriate solution can be suggested? 

Again, your question was, how to move to 20th list directly on pressing of execute button. Its not possible to move to 20th list. You must cross over a basic list, before you can go to a different list level, using the code given by Pavan. 

What are Drilldown reports?

The lines of basic list of a drilldown report when clicked, will take the user to the corresponding (standard) object's display.
 
For eg: Suppose your report's primary component is purchase requisition, (assume you are printing PR details), and the basic list displays details of many PRs.
 
Eg: when clicked on a particular line of the PR basic list, it takes you to std t-code me53 (display of purchase requisition). This is the 'Drill-down' functionality.
 
For this, in the at-line selection of your program, as per the above ex: you'll set the parameter ID of PR number BAN (that you can get from Data element) in memory (using set parameter id) and then calling the corresponding transaction (usually skipping initial screen of the std t-code).   
 
Likewise, if it's Material Number (Matnr), you'll be displaying MM03 transaction w.r.t. the line's matnr.

 

Sunday, 1 February 2026

What is SAP R/3? and What Makes SAP R/3 different?

 What is SAP R/3?

SAP is the leading Enterprise Information and Management Package worldwide. Use of this package makes it possible to track and manage, in real-time, sales, production, finance accounting and human resources in an enterprise.

What Makes SAP R/3 different?

Traditional computer information systems used by many businesses today have been developed to accomplish some specific tasks and provide reports and analysis of events that have already taken place. Examples are accounting general ledger systems. Occasionally, some systems operate in a "real-time" mode that is, have up to date information in them and can be used to actually control events. A typical company has many separate systems to manage different processes like production, sales and accounting. Each of these systems has its own databases and seldom passes information to other systems in a timely manner.

SAP takes a different approach. There is only one information-system in an enterprise, SAP. All applications access common data. Real events in the business initiate transactions. Accounting is done automatically by events in sales and production. Sales can see when products can be delivered. Production schedules are driven by sales. The whole system is designed to be real-time and not historical.

SAP structure embodies what are considered the "best business practices". A company implementing SAP adapts it operations to it to achieve its efficiencies and power.

The process of adapting procedures to the SAP model involves "Business Process Re-engineering" which is a logical analysis of the events and relationships that exist in an enterprise's operations.

SAP Application Modules

SAP has several layers. The Basis System is the heart of the data operations and should be not evident to higher level or managerial users. Other customizing and implementation tools exist also. From a manager's viewpoint the heart of the system are the application modules. These modules may not all be implemented in a typical company but they are all related and are listed below:

  • FI Financial Accounting--designed for automated management and external reporting of general ledger, accounts receivable, accounts payable and other sub-ledger accounts with a user defined chart of accounts. As entries are made relating to sales production and payments journal entries are automatically posted. This connection means that the "books" are designed to reflect the real situation.
  • CO Controlling--represents the company's flow of cost and revenue. It is a management instrument for organizational decisions. It too is automatically updated as events occur.
  • AM Asset Management--designed to manage and supervise individual aspects of fixed assets including purchase and sale of assets, depreciation and investment management.
  • PS Project System--is designed to support the planning, control and monitoring of long-term, highly complex projects with defined goals.
  • WF Workflow--links the integrated SAP application modules with cross-application technologies, tools and services
  • IS Industry Solutions--combine the SAP application modules and additional industry-specific functionality. Special techniques have been developed for industries such as banking, oil and gas, pharmaceuticals, etc.
  • HR Human Resources--is a complete integrated system for supporting the planning and control of personnel activities.
  • PM Plant Maintenance--In a complex manufacturing process maintenance means more than sweeping the floors. Equipment must be services and rebuilt. These tasks affect the production plans.
  • MM Materials Management--supports the procurement and inventory functions occurring in day-to-day business operations such as purchasing, inventory management, reorder point processing, etc.
  • QM Quality Management--is a quality control and information system supporting quality planning, inspection, and control for manufacturing and procurement.
  • PP Production Planning--is used to plan and control the manufacturing activities of a company. This module includes; bills of material, routings, work centers, sales and operations planning, master production scheduling, material requirements planning, shop floor control, production orders, product costing, etc.
  • SD Sales and Distribution--helps to optimize all the tasks and activities carried out in sales, delivery and billing. Key elements are; pre-sales support, inquiry processing, quotation processing, sales order processing, delivery processing, billing and sales information system.

SAP R/3 Application Modules

Each of these Modules may have sub-modules designed for specific tasks as detailed below.

System-Wide Features

SAP uses certain system wide features that should be understood at the outset. These are used to logically, safely and flexibly organize the data in a business enterprise.

  • Customizing-- is the configuring of the system to represent your organization's legal structure, reporting requirements and business processes. Internal reporting is a managerial tool in the daily operations. External reporting is required by governmental units controlling the legal structure of the corporation.
  • Organizational Elements
    • Financial--
      • client is a legal and organizationally independent unit at the highest level in SAP
      • company is an independent legal entity within a client
      • business areas are used to produce profit and loss statements and balanced sheets across marketing lines
    • Materials Management
      • Purchasing units
      • Plants
    • Sales and Distribution
      • Sales Organization
      • Distribution channel
      • Division
  • Master Data is records that remain in the database over an extended period of time. Examples:
    • Customer Master
    • Vendor Master
    • Material master
    • Account Master

This structure eliminates redundant data and is shared by all SAP Modules. It is a critical aspect of the robustness of the system.

  • Employee Self Service--your employees have access to the own HR records over the Internet.
  • Classification is the assignment of objects to a class. Each class has standard characteristics.
  • Matchcodes are query tools used to find specific information using search methods.
  • Security is administered for objects, profiles and authorizations. Users are only authorized to see or change the parts of the system required by their job responsibilities.

Business Processes and SAP Functionality

In order to understand a system like SAP a thorough understanding of the events and relationships that take place in a business is required. It is not enough to just realize the Sales, Production, Finance and Accounting have jobs to do in a business. The exact details of each action, the timing of that action and its interrelationships with every other process must be understood. In many large operations there may be no person that has a complete grasp of the situation. Before an operation can be automated or computerized a thorough study of the business must be undertaken. This task is called Business Process Engineering.

Sequential Walk Through

  • Sales
    • Pre-sales activity--planning and availability support for the sales personnel
    • Sales Order--The actual entry of the sales order into the system done by the salesperson at the point of sales perhaps using a PC and Internet connections.
    • Determining where the most efficient source of the ordered product is in inventory and shipping it.
    • Delivery
    • Customer Billing
    • Customer Payment
  • Production
    • Sales and Operations Planning SOP where the sales forecasts are used in a production planning model to check feasibility.
    • Master Production Scheduling MPS--The actual plan for the whole production process
    • Material Requirements Planning MRP--Where the production plan is actually converted into raw materials input requirements.
    • Planned Order--When materials are available and capacity exists this plan is created and then converted into a
    • Production Order.
    • Shop Floor Control where the actual production takes place and is registered into the system as finished goods.
  • Purchasing
    • Requisition--Once the Production manager plans to manufacture something a requisition for the raw materials required but not on hand must be prepared.
    • Vendor Selection--made by the purchasing department
    • Purchase order sent
    • Goods receipt increasing inventory
    • Invoice verification as it is received from vendor
    • Payment to vendor.
  • Finance and Accounting
    • Sales events must be captured at the proper time into the ledger system
    • Inventory must be adjusted to match goods shipped
    • Inventory must be adjusted to match raw materials received
    • Inventory must be adjusted to move value from raw materials to work in process
    • Inventory must be adjusted to increase finished goods when they are produced
    • Accounts Payable must be set up for purchases
    • Accounts Receivable must reflect goods billed but not yet paid for

Business Process Engineering must not only identify all these steps but must also find the most efficient way to minimize redundant actions. For example, when sales are made, inventory and manufacturing plans should be automatically updated. When manufacturing plans are updated raw materials should be automatically ordered from vendors. When finished goods are shipped customers should be automatically billed at the same instant. Real situations are far more complex than the simple explanation above.

 

 

Monday, 5 January 2026

Tricks: Are you working in S/4HANA MDG and unable to change the Material Ledger moving price? Try this workaround.

 1. In SE37, open the function module SE16N_INTERFACE and update the moving price in table MBEW for the required material.


2. Copy the PostCstgNo. and save the record.


3. Using the SE16N_INTERFACE function module, delete records from the following tables where KALNR = PostCstgNo: CKMLPR, CKMLPP, CKMLCR, CKMLHD.


4. Set a breakpoint in the function module FCMLHELP_PASSCODE_CHECK.


5. Execute transaction code /NFCMLHELP.


6. Select HelpDesk for Master Data.


7. Choose FCMLHELP_MLMASTER_CREATE.


8. Enter the Material and Plant.


9. Select Process and the options EBEW, QBEW, OBEW, then execute.


10. When the breakpoint is triggered, pass the value X.

Tuesday, 11 November 2025

SAP CPI : Content Modifier – Message Header

Introduction

In this second part of the CPI Basics series, we will focus on one of the most used steps in an iFlow: the Content Modifier.

The Content Modifier allows us to enrich and control the message as it passes through CPI. In this document, we will specifically explore the Message Header function:

Message Header → used to pass dynamic values to external systems. For example, extracting a value from the incoming payload and using it in an OData query filter.

To make this exploration practical, we will implement a simple integration scenario:

The SOAP Sender Adapter will be used as the entry point of the message, simulating an external system sending a request to CPI.

The OData Request Reply Adapter will be used as the target system, where the message header will be applied in the query filter to fetch data.

By the end of this document, you will clearly see how a Message Header can influence the request and response payload in a real integration flow.


1. Create IFlow

Step 1: Create a New Integration Flow

Open your CPI tenant → Design → Create new iFlow.






Give IFlow name and description
 





Step 2: Add Sender (SOAP Adapter)

The SOAP adapter is used when the source system communicates using
the SOAP protocol. It is common in SAP environments and in integrations with legacy systems that expose SOAP-based web services.

Benefits:
Widely supported in SAP and non-SAP systems.
Well-suited for structured XML messages.
Supports secure communication (HTTPS, certificates, WS-Security).

Constraints:
Limited to SOAP/XML format (no native JSON).
Payloads can be verbose and less flexible compared to REST/OData.
Transformation may be required if the target system expects a different structure.

Configuration steps:
1. In your iFlow, drag the Sender element from the palette to the canvas.






Choose SOAP 1x



2. Configure the SOAP Adapter:
o Open tab Connection and set the endpoint name (e.g.,/ContentModifier).
o Message Exchange Pattern: Request-Reply mean a synchronous pattern where the sender sends a request and waits for the response before continuing.




Step 3: Add Content Modifier
The Content Modifier is used to set or change values in the message during processing. It provides three functions: Message Header, Message Properties, and Message Body. This time we will focus on Message Header.

Configuration steps:
1. In your iFlow, drag the Content Modifier step between the SOAP Sender and the
Request Reply.







2. Double-click the Content Modifier and configure:
Message Header
Add a new header, for example:
o Name: OrderNo
o Source Type: xpath (XPath is A query language to navigate XML documents).
o Source Value: //in (‘//’ known as relative path, meaning it will search for the element <in> anywhere in the XML, not from the root).
o Data Type: java.lang.String (The Java data type for text, used here to store the extracted value as a string)
So  in  this  Message  Header,  you’re  basically  telling  CPI: “Look into the incoming XML, find <in>, take its value as text, and store it in a header named OrderNo.”
This header will be passed to the OData adapter and used in the query filter.






Step 4: Add Receiver (OData Request Reply Adapter)
The OData Request Reply Adapter is used to connect CPI with an external system that exposes OData services. In this step, we will send a request with the header value (OrderNo) as a filter and get the response payload back.
Benefits:
Standard protocol widely used in SAP and non-SAP systems.
Supports querying, filtering, and CRUD operations.
Integrates easily with SAP systems like SuccessFactors, S/4HANA, or SAP Gateway.
Constraints:
Requires a valid OData service endpoint.
Query options must match the service metadata; otherwise, requests fail.
Limited for complex business logic (might require multiple calls).

Configuration steps:
1. In your iFlow, go to external call and drag a Request Reply step after the Content Modifier.





2. Drag a line from the Request Reply to a new Receiver.




3. Select OData Adapter for the Receiver connection, choose OData V2.


4. Configure the adapter:

-         Address: https://services.odata.org/V2/Northwind/Northwind.svc (Provide the OData service endpoint)





- Click tab Processing, and then click select button




- Click button Step 2


- Click search button at field Select Entity and chose Orders.


- Click Select All Fields



- Click Step 3




Click search help at field Filter By and choose OrderID



-         Choose Equal and Write ${header.OrderNo}

A screenshot of a computer  AI-generated content may be incorrect.


Click Finish button


- Save and deploy the iFlow





Step 5: Check Deployment Result

After deploying the iFlow, you need to make sure it runs without errors.
Steps:
1. Go to Monitor → Manage Integration Content in your CPI tenant.


2. Find your iFlow (e.g., Z_IF_CONTENT_MODIFIER).


3. Verify the status:
o Started → The iFlow is running successfully and ready to process messages.
o Failed/Stopped → Open the log to review error details (e.g., adapter configuration, authentication).
4. If the status is not Started, fix the error and redeploy.



2. Subscribe Process Integration Runtime
Before testing the iFlow, ensure that a Process Integration Runtime is available in your subaccount.
Steps:
1. Go to your SAP BTP Cockpit → Subaccount.
2. Navigate to Instances and Subscriptions.
3. Choose Process Integration Runtime and click Create button.



4. Choose integration-flow for field Plan



5. Input instance name (e.g., Z_LEARN_CPI) and click Create.


6. Confirm and wait until the instance is provisioned.


3. Create Service Key
To enable external tools to call your iFlow, create a Service Key for the Process Integration Runtime instance.
Steps:
1. In BTP Cockpit, go to your Subaccount → Instances and Subscriptions.
2. Select your Process Integration Runtime instance.

3. Go to the Service Keys tab and click Create button.



4. Give service key name (e.g., Z_CPI_ACCESS_KEY) and click Create button.


5. The system will generate a JSON object containing authentication details (Client ID, Client Secret, Token URL, etc.).



6. We will use clientid and clientsecret for authentication when testing the iFlow.




4. Test the iFlow via SOAP UI
Now that the iFlow is deployed and started, we can test it using SOAP UI.





Steps:
1. Download WSDL from the iFlow
o In CPI, go to Monitor → Manage Integration Content.


o Select your iFlow (Z_IF_CONTENT_MODIFIER) and Under Endpoints, click on the button download for WSDL without policies.




2. Import WSDL into SOAP UI
In SOAP UI, create a new SOAP Project.



Browse and select the WSDL file you just downloaded.



SOAP UI will generate the correct request structure for the iFlow.



3. Prepare the SOAP Request
In the generated request, add the <in> value (e.g., <in>10248</in>).


4. Add Authentication
Click Auth button


Under Authentication, choose Basic Authentication.




Enter clientid from service key for username and clientsecret for password.



See the response payload as the result


We also can check the message from Monitor Message Processing