Wednesday, 28 December 2016

Sorting with any/multiple fields in table maintenance

Below are the steps to be followed if you want to provide sorting in the table maintenance generator.

  • Please go through the below blog to add a new custom button in TMG screen
  • Then create one custom FM with following logic that will popup the dialog box for the user to select the columns of table control in SM30.
  • This FM should have view name of type DD02L–TABNAME as importing parameter and exporting parameter of type ABAP_SORTORDER_TAB  that contains the field names to be sorted.

Tuesday, 27 December 2016

How to extend an ABAP Managed Database Procedures using AMDP BADI’s

With ABAP 7.4 SP08, the modification-free enhancement of AMDPs is now possible using so-called AMDP BAdIs. The AMDP BAdIs transmit the effect of the switches from the Switch Framework to the implementation of database procedures in the current database. It allows the definition of a clear contract between extension provider and extension consumer (aka implementer) through a dedicated interface. AMDP BAdIs are created in Enhancement Spots in the transaction SE20 and are later called within an AMDP implementation similarly to other AMDPs.

Monday, 26 December 2016

Remote Code Analysis in ATC – Technical Setup step by step

Technical Requirements

To use Remote Code Analysis in ABAP Test Cockpit (ATC) you need to install and configure one ATC central check system SAP_BASIS = 7.51. The systems, which you want to check in your landscape, must be on SAP_BASIS 7.00, 7.01, 7.02, 7.31, 740 or 7.50 releases.

The RFC destinations for all checked systems must be provided in the ATC central check system and RFC-stubs must be implemented in all checked systems (SAP Notes 2270689 and 2190065).You would also need authorizations for administrative and quality assurance activities. See Authorizations for the ABAP Test Cockpit.

Saturday, 24 December 2016

About “classic” and Standard ABAP-Debugger (“Display List”-Option)

For a few years, I have been using the “new” ABAP-Debugger, and I’m quite happy with it (learning something new every other time, e.g. cool features for exploring memory usage or down- and uploading data (but only up to 500000 Lines) from/into internal tables).

Only recently I was missing a feature I knew I had used in the past: “Display List”.

About “classic” and Standard ABAP-Debugger (“Display List”-Option)

Friday, 23 December 2016

Sorting Columns Dynamically in a Table Control

This is about dynamically sorting the contents of a column in a table maintenance generator and in turn within a table control.

1 : Consider a table ZTESTL with columns for Material , Language & Material Description.

Sorting Columns Dynamically in a Table Control

Thursday, 22 December 2016

Say Goodbye to Polling: Real-time events in ABAP with ABAP Channels

What is real-time in ABAP and why ABAP Channels?

The new technologies like Cloud, Mobility, and In-Memory open new opportunities and lead the industries to the real-time business. Become real-time business means react immediately to the market changes, provide higher responsiveness, accelerate business processes, adjust responses in real-time based on changed business conditions, deliver fast and personalized service for customers, or exploit new business chances not possible before.

Thursday, 15 December 2016

Step-by-Step procedure for creation, execution and storing of ABAP Managed Database Procedures in HANA

ABAP Managed Database Procedure

Database Procedures are stored and executed in the Database. We can create and execute database procedures in HANA database through ABAP using AMDP Class and AMDP Method called ABAP Managed Database Procedures. SQL SCRIPT is the language for creating stored procedures in HANA. Main benefit of using SQL Script is to allow the execution of complex calculations inside HANA database. The language is varies from one database system to another.The ABAP Managed Database procedures should be created using ABAP Development Tools (Eclipse or HANA Studio).

Tuesday, 13 December 2016

Remote Code Analysis in ATC – One central check system for multiple systems on various releases

ATC Introduction

For those of you, who are using Code Inspector (SCI) and are not familiar with ABAP Test Cockpit (ATC) yet, it is SAP’s central quality assurance infrastructure for static functional, performance and security code checks, which bundles together the well-known and widely used quality tools like syntax check, SLIN, ABAP Unit, security checks and is extensible for your custom checks. ATC reuses Code Inspector checks and significantly improves the code quality by offering the uniform quality criteria for the whole development landscape and establishing new quality assurance processes (quality gates, exemptions, mass regression tests) to minimize errors in productive systems. Beyond this ATC is the toolset of choice to achieve the smooth migration of ABAP code to SAP HANA and SAP S/4HANA by means of special SAP HANA and SAP S/4HANA checks.

Monday, 12 December 2016

Layer-Aware Debugging in NW 7.0 EHP2

Software Layer-Aware Debugging (SLAD) in NetWeaver 7.0 EHP2

The Problem…

Have you ever had this problem?  You need to analyze a bug, or you want to find out how an application works. And you don’t know where exactly to set a breakpoint. So you start the ABAP Debugger and start stepping through the code.

Friday, 9 December 2016

ABAP TDD in NetWeaver 7.0 EHP2

I showed what the Test-Driven Development cycle might look like in the ABAP Workbench (SE80) in NetWeaver Release 7.01. Unfortunately, the TDD experience in that Release was marred by a hurdle right at the start of the process of implementing an ABAP class. That hurdle has been removed, and there are three other important improvements to ABAP Unit.

With NetWeaver 7.0 EHP2 (Release 7.02), the process has become a little bit more graceful. This weblog reviews what ABAP TDD looks like in practice in Release 7.02.  (Look for even more improvements in support for ABAP TDD in the Customer Engagement: Evaluation of the Pilot Version of ABAP in Eclipse.)

Thursday, 8 December 2016

Customer Engagement: Evaluation of the Pilot Version of ABAP in Eclipse

Why ABAP in Eclipse?

The idea of offering an ABAP development environment in Eclipse may surprise some experienced ABAP developers, since the classical ABAP Workbench since years has proved itself as an integrated, comprehensive business development environment with a rich toolset for development, testing, troubleshooting and support running on a powerful server with a sophisticated, robust life cycle management. On the other hand Eclipse has established itself in the world as a state-of-the-art open development platform with the powerful UI capabilities, which are second to none and nowadays many developers are fascinated by its usability, productivity and flexibility.

Wednesday, 7 December 2016

ABAP Debugger Scripting: Advanced

It’s easy to write your own ABAP Debugger Scripts in NetWeaver 7.0 EHP2, either for ad hoc use directly in the debugger or for re-use by you or your colleagues.  An ABAP Debugger Script is an ABAP Objects program that runs under the control of the debugger.  The script automates your activities in the debugger by calling the services offered by the ABAP Debugger. In this weblog, we show you how to write a script, whereby the most important topic is how to use the Script Wizard to call the services of the ABAP Debugger from a debugger script.  We also demonstrate some sample scripts for tracing, creating individualized breakpoints, and extracting data for display from complex data objects.

Tuesday, 6 December 2016

ABAP Debugger Scripting: Basics

Now that NetWeaver 7.0 EHP2 is available as a Mini-Basis System, we can tell you about some of its new features.

One of the coolest of these new features for problem analysis is ABAP scripting in the New ABAP Debugger. In this weblog, we explain what this feature is for, what the script workplace looks like, and how to run a couple of first scripts to whet your appetite.  You’ll see how to do a complete trace of executed statements from the script overview, and how to see where particular statements occur in your (executed) code.

Monday, 5 December 2016

Unit testing mockup loader for ABAP

The tool is created to simplify data preparation/loading for SAP ABAP unit tests. In one of our projects we had to prepare much tables data for unit tests. For example, a set of content from BKPF, BSEG, BSET tables (FI document). The output to be validated is also often a table or a complex structure.

Data loader

Hard-coding all of that data was not an option – too much to code, difficult to maintain and terrible code readability. So we decided to write a tool which would get the data from TAB delimited .txt files, which, in turn, would be prepared in Excel in a convenient way. Certain objectives were set:

Friday, 2 December 2016

ABAP on HANA – Steps to call a CDS view from another CDS View

Core Data Services (CDS) :


CDS is an infrastructure layer for defining semantically rich data models, which are represented as CDS views.

A CDS view is used to define the structure of an SQL view and represents a projection onto one or several ABAP Dictionary tables or ABAP Dictionary views.

This blog shows how to call a CDS view from another CDS view.

Thursday, 1 December 2016

ABAP on HANA – Step by step procedure to create a CDS view using input parameters to display multiple records.

This blog shows how to display multiple records by using input PARAMETERS keyword, As there is no provision to use ABAP keyword SELECT-OPTIONS which display multiple records in CDS View.

1. Go to Dictionary => ABAP DDL Sources => New Data Definition


ABAP on HANA – Step by step procedure to create a CDS view using input parameters to display multiple records.

Wednesday, 30 November 2016

MVC (model view controller) framework for ABAP part 2

Reports with class

In MVC (model view controller) framework for ABAP part 1 you can find the “starter kit” for a framework you can use to create applications that are using dynpros and CFW controls that the framework is able to control. In this second part I will introduce only one further class that can be used for report programming. In my daily work, I am using this report very frequently as a template for new ones.

Tuesday, 29 November 2016

MVC (model view controller) framework for ABAP part 1

What program type?

This is a question I have often reflected on. When I create an OO based dialogue application, what kind of program should I use? Since the program has to manage at least one dynpro, we could choose between three types of program for our application:
  • A module pool
  • A function group
  • A report

Monday, 28 November 2016

ABAP Runtime Analysis (SE30) – How to analyze ABAP program flow

The ABAP Runtime Analysis (transaction SE30) is the best starting point if you want to execute performance or flow analysis of your ABAP program. Unfortunately many people use ABAP Runtime Analysis only to look for performance bottlenecks and don’t know that ABAP Trace is the only tool with which you can trace the execution flow of an ABAP program at the statement level. This blog will show you how to use ABAP Trace of ABAP Runtime Analysis (SE30) to follow the flow logic of your ABAP program.

Saturday, 26 November 2016

Hierarchies in CDS views

Why do we need Hierarchies?

The main purpose of a hierarchy in analytics is to aggregate facts and provide a high-level overview with the option to drill into the lower hierarchy branches and nodes. Facts are represented as CDS analytical views, which are identified by the analytical data category CUBE provided as CDS view annotation.

A hierarchy is usually not defined on the facts themselves but on some master data column that categorizes the facts. This master data entity, or any business entity that should be arranged in a hierarchy, is given by a CDS view of analytical data category DIMENSION.

Friday, 25 November 2016

Implement and consume your first ABAP Managed Database Procedure on HANA

Prerequisites

  • SAP NetWeaver AS ABAP 7.4 Support Package 5 (or higher) running on SAP HANA
  • SAP HANA Appliance Software SPS 05 (or higher)
  • SAP HANA DB SQLScript V2.0 (or higher)
  • ABAP Development Tools for SAP NetWeaver

Thursday, 24 November 2016

News in ABAP Debugger Breakpoints and Watchpoints ,Statement Debugging

SAP NetWeaver 7.0 EHP2 brings an expanded set of breakpoint and watchpoint capabilities as well as a new higher-resolution statement debugging capability (of course in the New ABAP Debugger!).

This blog shows how to use these new features:
  • The new types of breakpoint (on ABAP command, on Web Dynpro entities, on method of a class, on Simple Transformations…)
  • The new types of watchpoints (on internal table, on ABAP objects and object attributes…)
  • The new conditional breakpoints and watchpoints

Wednesday, 23 November 2016

Displaying Internal Tables in the Debugger in NetWeaver 7.0 EHP2

The New ABAP Debugger, introduced with NetWeaver 2004s, came with a Table tool for displaying the contents of internal tables.

With NetWeaver 7.0 EHP2 and with Netweaver 7.30, the Table tool has been re-worked and expanded to make it easier to use and more flexible – a truly comfortable tool for examining internal tables, no matter how large or complex they might be.

Monday, 21 November 2016

Create Fiori app using CDS with BOPF- For beginners Part 2

This blog is on continuation to  Part 1.

In this part we shall create the BOPF action and display the sale order scenario in the Fiori App using Smart Template.

For the BOPF action, go to BOPF Business Object ZDEMO_I_SALESORDER  from Tcode BOBX. Click on change mode. Under the Node Elements, traverse to node ZDEMO_I_SALESORDER and select Action element. Right Click on Action and Click “Create”.

Monday, 14 November 2016

Create Fiori app using CDS with BOPF- For beginners Part 1

Prerequisite:

1) Concepts of Core Data Services(CDS)
2) Basic Understanding of OData service
3) Concepts of BOPF
4) Conceptual knowledge of Fiori(Smart Template)

The Fiori/Ui5 is for the UI part, the CDS is for the data retrieval(code push down) while the BOPF is for handling DB activities.

Saturday, 12 November 2016

BW transformation debugging a start routine

It’s about debugging in SAP BW Transformation and increasing personal productivity while finding issues in ABAP expert, start or end routines. The following helps me to save a few minutes each day while developing or solving issues. It might help avoiding complains from your system monitoring team that the system log is running full because of entries like these in SM21. Do you sometimes forget to remove break-points before transporting something to production?

Friday, 11 November 2016

A second way to get the new ABAP editor in LSMW

In my previous blog ‘How to get the new ABAP editor in LSMW’ I described how a single enhancement enables the new ABAP editor in SAP’s LSMW. While that solution only takes one implicit enhancement spot, it has a few (minor) limitations. In this next blog I will describe another approach to enabling the new ABAP editor in LSMW. This new solution is slightly more invasive, but gives us much more flexibility.

Thursday, 10 November 2016

Linux for Newbies: Installing ABAP AS on Oracle VirtualBox

Preparation

1. Download the latest released version of Oracle VirtualBox from https://www.virtualbox.org/wiki/Downloads for your Operating system.
2. Download openSUSE Leap 42.1 in your local machine (64 bit, released version) from https://software.opensuse.org/421/en
3. Make sure the relevant ABAP download files (“abap.rar”) are on your local hard drive.

Wednesday, 9 November 2016

How to get the new ABAP editor in LSMW

SAP LSM Workbench (LSMW) has for years been a much used tool for data migration into SAP. It is both loved and hated  While LSMW has had its last update in 2004 it remains a much used tool in this age of more modern toolsets such as SLT,  SAP DS and the like.

For many frequent and hard core users of LSMW a big nuisance is the old style ABAP editor. This old editor takes up alot of development time, especially in those ABAP-rich LSMW projects.

One night, bored and out of beer, I managed to develop a relatively simple enhancement that enables the new ABAP editor for LSMW.

Tuesday, 8 November 2016

The Joy Of Coding – Class and Sequence Diagrams

I assert the developer’s mood affects the code quality. I discuss a process where tools to display the topology and the coupling of ABAP programs bring back the joy of coding.
Joy of Coding

I like the verb comprehend, as it is etymologically be linked to incorporate. For me it conveys the feeling of being the owner of something after I grasp it for the first time.

As developer exploring a problem space while trying to implement a feature, they are times where our confidence improves, we know we are on the right path, we comprehend the system feedback, we feel the joy of coding.

Monday, 7 November 2016

CL_OBJECT_COLLECTION, iterator and Polymorphism

Suppose I have a requirement to calculate the total area of a series of shape, for example circle and rectangle.

So I have two classes, circle and rectangle, both have a method get_area to return their area:

class ZCL_CIRCLE definition
  public
  final
  create public.

Saturday, 5 November 2016

CDS ALV report with selection criteria

SAP classes CL_SALV_IDA_* and SAP programs SALV_IDA_* as of 7.5 SP03. With all this functionality provided by SAP, HANA / CDS is powerful development tool saving time and making possible the code pushdown to HANA database.

Create CDS view from ADT using folder Core Data Services, right-click to create New -> DDL Source

CDS ALV report with selection criteria

Friday, 4 November 2016

SAP AS ABAP – Authentication using X.509 Client Certificates

This document shows how to configure SAP AS ABAP for authentication with x.509 client certificates. It shows the procedure used to create a simple Certification Authority (CA) using OpenSSL and how to generate client certificates from this CA.

Enabling SSL

Install the SAP Cryptographic Library. The following are minimal parameters to enable SSL
  • ssl\ssl_lib = S:\usr\sap\K20\SYS\exe\run\sapcrypto.dll
  • sec\libsapsecu = S:\usr\sap\K20\SYS\exe\run\sapcrypto.dll
  • sec\ssfapi_lib = S:\usr\sap\K20\SYS\exe\run\sapcrypto.dll
  • ssf\name = SAPSECULIB
  • icm\server_port_1 = PROT=HTTPS, PROT=1443, TIMEOUT=900
  • icm/HTTPS/verify_client = 1

Thursday, 27 October 2016

ABAP CDS in SAP BW

Introduction

ABAP Core Data Services (CDS) Views were introduced with SAP ABAP 7.40 SP05. CDS allows the creation of rather complex views that by far exceed the capabilities of database views created in SE11. Besides their role in the ABAP Programming Language, CDS Views are the technology behind the virtual data model on top of the SAP S/4HANA application tables which, e.g. is used in SAP S/4HANA Analytics.

This aspect – the role of CDS in SAP S/4HANA Analytics – frequently brings up the question whether or how CDS might be used in the context of SAP BW powered by SAP HANA or SAP BW/4HANA.

Wednesday, 26 October 2016

SAP Screen Personas for Web Dynpro ABAP – Cross Session Scripting

Introduction

With SAP Screen Personas there is now the option to add client-side scripting to existing Webdynpro for ABAP applications.

With scripting it’s now possible to automate re-occurring or complex tasks. However there is a technical restriction: The script is always tied to the (technical) application. There is no possibility to define a script, which runs across different applications or even different browser windows. This heavily limits the applicability of scripting for automation.

Tuesday, 25 October 2016

Creating a Class Handler for SICF Service (with code example)

This is both a tutorial for creating a SICF service with source code and also the documentation for zMIMESync service class. Check the open source project if you are a BSP developer.
Easy BSP JavaScript development with zMIMESync (Open Source)
My colleagues leverage new front-end technologies like JS frameworks. However each time they edit a JavaScript file they have to open the MIME file, edit it and close it to see the change in the … Continue reading
Go to transaction se24 or go to your development package to create class.
se24:

Monday, 24 October 2016

Easy BSP JavaScript development with zMIMESync (Open Source)

Easy BSP JavaScript development with zMIMESync (Open Source)

My colleagues leverage new front-end technologies like JS frameworks. However each time they edit a JavaScript file they have to open the MIME file, edit it and close it to see the change in the web page. This workflow makes me cringe and I feel sorry for my fellow developers. I developed a solution for them and decided to share it with you.

Friday, 21 October 2016

Introduction to CDS Test Double Framework – How to write unit tests for ABAP CDS Entities?

Motivation


By now we have all come to recognize the advantages of unit testing our code and have accepted it as a non-negotiable part of the development process. But with the paradigm shift to push our code to the database, we have been unceremoniously blasted back to the dark ages of software testing. We are now faced with the problem of how to test our code pushdown logic implemented in ABAP CDS entities.

CDS Test Double Framework enables developers to test the logic expressed in their CDS entities in an automated way using the well-known ABAP Unit Test Framework.

Thursday, 20 October 2016

How to use C code via FBSL inside ABAP

The actual release candidate of Freestyle BASIC Script Language (FBSL) integrates a dynamic C JIT compiler, so is it possible to use ANSI C code inside FBSL. And with FBSLX, a COM library, you can use FBSL inside ABAP.

Here an example how to use ANSI C inside ABAP.

"-Begin-----------------------------------------------------------------
  Program zCMandelbrot.

Wednesday, 19 October 2016

MD5 calculation via ABAP and JavaScript

  1. Calculate MD5 for string “Jerry” via ABAP
  2. Calculate via JavaScript
1. Calculate MD5 for string “Jerry” via ABAP

Source code:

DATA: md5_160 TYPE hash160.
CALL FUNCTION 'CALCULATE_HASH_FOR_CHAR'
  EXPORTING

Tuesday, 18 October 2016

How To Use VBA Recorded Code in ABAP

With a tiny trick is it easy possible to use recoreded Microsoft Office VBA (Visual Basic for Applications) code in ABAP.

To do that I use only the Microsoft Script Control, with a little preparation for Excel. Then I read the content from an include, which contains the recorded VBA code. I concatenate the VBScript and VBA code and then I execute it – that’s all.

The only thing which is in addition to doing, is to set a point in front of each line of the VBA code. This is necessary because I use oExcel object in VBScript code.

Monday, 17 October 2016

Smartforms OOPS (object oriented)

I have not had that much opportunity to work with SmartForms till very recently. I had already switched to Eclipse & ADT as my primary programming tool and thought I could get away this, not having to go back to SAPGui based development – and then I encounter SmartForms! I can’t even use normal day-to-day ABAP Editor tools, can’t use normal breakpoints, can’t do a where-used, several drill-throughs don’t work – what did I just get myself into!

After the first one that I volunteered making changes to, we realized I had to do one from scratch. Here is an opportunity – I moved all the code out to a class and called the class from within the SmartForm. This way I have all the tools that SAP & ABAP provide to work with code, I can use the ADT environment, test the data output independent of the SmartForm, use editor-based breakpoints, etc, etc…

Saturday, 8 October 2016

Image in Mail body in ABAP

Objective


The requirement was to send the Birthday Mails to Employee along with image in mail body. Generally, the images are send as attachment in mail but to send the image in the mail body different approach is to be used.The main objective of this document is to send the image in email body. I searched on portals and google to resolve it but couldn't find proper solution , so decided to post the document on finding solution.

Friday, 7 October 2016

Purchasing Document Approval Process with Manual Approver Selection Development

Business Overview

Our PSU Client one of the largest supplier to the Indians Rail Network, one major challenge was they have very complex authorization based on the Category’s annual limits  given to the approves.

Business Requirement
  1. A typical case will have a PR, PO and Contract with Original Value In System which will have a release code of the Approving Authorities of the Company. Now, Client requirement was to have below facility’s in Approval flow

Thursday, 6 October 2016

SAPscript forms breakdown tool

Overview


"SAPscript forms breakdown helper" is a free tool for analysing forms. It has different features to help you understanding the structure of a form and the used SAPscript commands. Therefore you are quickly ready to decide what has to be changed to fulfill your requirements. Please note that you cannot make changes to a form with this tool. That's the task of transaction SE71.

Tuesday, 4 October 2016

Custom function module to get the dates of last Friday/any day of given number of months and date

Purpose:

Purpose of this document is to develop a custom function module to get the dates of last Friday/any day of given number of months and date.

FM code:

Please maintain mentioned input parameters to the custom FM.

Custom function module to get the dates of last Friday/any day of given number of months and date

Monday, 3 October 2016

How to create a custom TAB for MIGO Item Details

I have implemented a custom tab in MIGO, you can follow the steps.

My requirement was to add a new tab named “Warranty” in MIGO.

Step1 : Create a custom table to store the data of  “Warranty”  tab

How to create a custom TAB for MIGO Item Details

Saturday, 1 October 2016

Converting Excel file data with multiple sheets to an internal table

PREREQUISITES

It is expected that the readers have the basic knowledge of Function modules and considerable experience in ABAP workbench.
Also Check that EXCEL is registered in R/3 via transaction SOLE.

INTRODUCTION

Reading data from files is a very common requirement in project implementations. Excel spread sheets are simpler and better readable to text files. The standard ABAP function module ALSM_EXCEL_TO_INTERNAL_TABLE reads data from Excel file into internal table of type ALSMEX_TABLINE.

Friday, 30 September 2016

The hassle with function module calls - part 2

In the last blog post I wrote about my approach to standard function module wrappers. See The hassle with function module calls

Thanks to your participation, there was a lot of very helpful input about this matter from the community. This lead me to a better understanding of exception classes and I now set up a handy mechanism to transform the function module exceptions into appropriate class-based exceptions. Hoping the fruitful discussion is going on, I'd like to share it!

With or without message?


Most function modules pass system messages when raising classical exception. For example, look at function SX_INTERNET_ADDRESS_TO_NORMAL, that can validate mail addresses:

Thursday, 29 September 2016

Simple event handling in ABAP OOPS

Introduction:


This document is to show how to make a simple interactive report in OOPS by using event 'HOTSPOT_CLICK' present in standard sap class 'CL_GUI_ALV_GRID'.

I have taken a scenario of displaying the PO (Header and Item) data for a vendor by creating event driven interactive report. The program is created in ALV+OOPS. The interaction will be done on vendor number and PO document number.

The flow will be: - Vendor Details -> PO (Header) -> PO (Item)

Wednesday, 28 September 2016

Three different ways to serialize and deserialize complex ABAP data

If you've ever written an RFC-enabled function that transfers a structure, then you've probably seen a code inspector error like this:

Three different ways to serialize and deserialize complex ABAP data

"The type "BKPF" or the type of one of its subcomponents can be enhanced. An enhancement can cause offset shifts when the RFC parameters are transferred."

Monday, 26 September 2016

The hassle with function module calls

Do you know this? You use a function module from SAP (let's say, the very useful START_TIME_DETERMINE), and you use it often. But every time you insert it, half a page of coding is generated, the parameters do not get syntax checked and inline data declarations are not supported.

It would be much more convenient having the same functionality in a method, wouldn't it?

So I create a wrapper method. But where to put it? After a year, I want to find it easily, and I want my colleagues to be able to find it either. Here's my approach:

Saturday, 24 September 2016

Language Translation Tool for SAP Technical Objects

Purpose:


The tool developed increases the efficiency of language translation objects as it helps in avoiding human errors. This tool also does the translation for Reports, Function groups, Includes in seconds. This tool not only saves time for translation but also helps in reviewing the translation done with an additional Excel tool.


Traditional method of LT


In most of the cases the Language translation for various Custom Texts is made available in Excel worksheet.
Below is sample screen shot of the same.

Friday, 23 September 2016

How to compare the contents of transport Request?

Overview:

I got this requirement in my project to compare the contents of each transport.
Luckily this 2 programs came in handy for me. Hope so too for the peeps who'll have the same requirement.

Below are the sample transports to be compared (DIFFERENCE) PART1/2

Thursday, 22 September 2016

Selection Screen Variants - Part III

My Previous Blogs in the series:

1. Selection Screen Variants - Part I
2. Selection Screen Variants - Part II

Dynamic Variants: The values in such variants are dynamic and can vary over time.

How to use table TVARVC for dynamic variants?: The table TVARVC can be used for creating variants where input data needs to be changed frequently.

We have to first maintain high and low values for a field in the table TVARVC .Transaction STVARVC can be used to maintain  these values in client 000. In other clients the table can be directly maintained in SM30.

Wednesday, 21 September 2016

Selection Screen Variants - Part II

In my previous blog Selection Screen Variants - Part I


Variant Attributes:


Once we enter values on the screen and click on save there are various attributes that we can select. Here we will look into the details with the help of an example.

We have a selection screen with three fields namely: Material (Parameter) , Date and Plant ( Select Options).

Monday, 19 September 2016

Selection Screen Variants - Part I

What are variants?


In SAP ABAP reports have a mechanism for entering values for database selection or for performing different calculations through SELECTION SCREENS.

Selection screen provides a user an option to execute the reports or transactions as per his requirements and thus provide a range of values as an input.

Whenever there is a requirement to execute a report with the same set of input values again and again, for large selection screens entering the same values can be a tiresome and boring task. Thus SAP has provided a functionality to save these values in a set called as VARIANTS.

Friday, 16 September 2016

Creation of Selection Screen Variant in Module Pool Programming

Introduction


Selection screen variants can be stored only in Reports. This document explains on how to create Selection screen variant in a module program.

Preview of Output


Creation of Selection Screen Variant in Module Pool Programming

Thursday, 15 September 2016

A simple tool to display product hierarchy in an ALV tree

Recently I start to study SD and I found the product hierarchy in transaction code V/76 could not be viewed in tree style and it is not so convenient to check:

A simple tool to display product hierarchy in an ALV tree

Tuesday, 13 September 2016

General properties of ABAP Classes / Interfaces

Every day you create or change ABAP class in class builder. When you activate your change, have you noticed a series of objects with several "=" in the middle part of each?

General properties of ABAP Classes / Interfaces

Monday, 12 September 2016

ABAP News for Release 7.50 - ABAP Channels Reloaded

ABAP Channels (ABAP Messaging Channels AMC and ABAP Push Channels APC) were introduced with ABAP 7.40, SP02, SP05. They enable an event based bidirectional communication between ABAP application servers and with the internet. For that, a dedicated Push Channel Protocol (PCP) can be used since 7.40, SP08. Before ABAP 7.50, the communication between ABAP servers and the internet was restricted to the Web Socket Protocol (WS) and the AS ABAP acting as a stateless APC server. The following features are new with ABAP 7.50:

Saturday, 10 September 2016

A tale of two SAP incidents

Summer is a strange time for SAP teams: lots of people go on holiday, projects are left to tick over, burning issues are put on hold. A time for those who remain to take it easy a while, take a look at those really intractable problems or catch up on technical innovations and pet projects with no-one to bother you. This is all fine in theory except that the business doesn't rest and production incidents still occur. This is the story of two such incidents and how SAP support helped us.

The first occurred right at the start of August, when nearly all my development team had already left: the SWN_SELSEN production job had started to abend. I groaned inwardly when I heard the news. Nothing could be more simple on the face of it than SWN_SELSEN: it simply selects workflow notifications and sends them out. There is no variant but the customising is fearsomely complicated and you needed to be a deeply experienced workflow guru (something I am not) to understand the code and the exits. This was a high-profile problem too - though the business impact was small, the program was sending PO approval notifications to all the top guys in the company, so when these stopped, important people noticed.

Thursday, 8 September 2016

A kill to an ABAP CDS View?

In the first blog of this series we considered that CDS views are not just for the super cool HANA types, but can also be used to escape when marooned on planets with nothing but a lowly Oracle DB. Many of SAP's customers I suspect have only just begun to dip their toes into these scary HANA waters, and so its important to understand what of this new technology we can learn and use today (whilst still on the traditional non-HANA DB); and what must wait for a possible future HANA implementation.

In today's blog we will consider the performance of the ABAP CDS view with an Oracle DB, if we are without the HANA DB in the back end; all from the perspective of a certain double-o secret agent. In Teched I posed the question to an SAP expert, (Who shall remain nameless, less Spectre (of course we all know that SAP==Spectre ABAP Programmers) learn of his details and track him down), here I was lead to believe that even on Oracle the use of the ABAP CDS views would give major performance benefits over the equivalent SQL statement. I have to say I had my suspicions that this may have been a double agent trying to lure me, and so without further ado on returning from TECHED set out to test the ABAP CDS view tech with the help of my very own 00-agent and the necessary 00 CDS-View.

Wednesday, 7 September 2016

Setting Code Inspector Custom Variant as Default Code Inspector variant

In our projects we generally create a custom variant for the code inspectors, which take cares of our project related Naming convention and coding standard.
If you are new in creating Code inspector variant you can refer below link.

http://sapabapcentral.blogspot.com/2015/09/creating-code-inspector-check-variant.html

In general whenever we develop any object or make any changes in any object, we go to Transaction SCII and run the code inspector for Z created Variant instead of directly checking it from Object menu Class/Program/Function module etc. ->Check -> code inspector.

Saturday, 3 September 2016

Output Catcher for ABAP

Output Catch is a small SAP server application to catch text on the presentation server from ABAP on the application server. You can send text direct to the editor of output catch, to a specific log file on the client, to a Windows debugger or to the Windows event protocol of the client.

It is very easy to use Output Catch:
  1. Register the Destination OUTPUTCATCH with the TAC SM59.
  2. Start the program OutptCatch.exe.
  3. Fill the connection parameters.

Friday, 2 September 2016

Creating Custom Fields in ME31K , ME32K , ME33K

As we know the enhancement to the screen is not impossible but it is not supported because we need some S_DEVELOP authorisation and modify some of the Standard table with z fields .That why please consider this document only if water is above your head and is a critical requirement of client
1) Create a Project using CMOD Tcode.
2) Give the enhancement name MM06E005.
3) Go to component Tab.


Creating Custom Fields in ME31K , ME32K , ME33K

Thursday, 1 September 2016

Smartform Version Comparison

There has long been a requirement, where we need to compare 2 Smartform versions.
In SAP there is no feature for this, there are no past versions maintained and also certainly no remote comparison.

This makes comparison and version management of smartforms a tedious task.

I was faced with such a task too. There were multiple complex smartforms and due to multiple activities and phases of my project working simultaneously, it was very difficult to trace what went wrong and definitely made it a lot of effort to maintain and revert changes in case of any issues.

Thus began my journey down the lane on how to overcome this problem.

Wednesday, 31 August 2016

Releasing Internal Table Memory

It is a well known fact, that you release the memory occupied by an internal table using either CLEAR or FREE, where FREE releases also the initial memory area. You normally use CLEAR, if you want to reuse the table and you use FREE, if you  really want to get rid of it and don't want to refill it later on. Assigning an initial internal table to a filled internal table does also release the target table's memory in the same way as CLEAR does.

But last week a colleague pointed out to me that it is not such a well known fact that deleting lines of internal tables with DELETE normally does not release the memory occupied by the deleted lines. Instead, there seem to be people deleting lines of internal tables in order to release memory. Therefore as a rule:

Monday, 29 August 2016

Mocking DAOs with ABAP Test Double Framework

Introduction


The sample below is very basic and no real business logic is included because it focuses on the concepts. For the dependency injection of the daos I used an interface for two reasons. First when more complicated or variants of Daos are needed the interface provides more flexibilty and the ABAP test double framework currently only can mock interfaces.

If you have suggestions, hints or question feel free to comment this document as I am keen on improve my concept, since it will not be the last time I have to write a Dao.

Thursday, 14 July 2016

Dynamic FM call with extra parameter

Use Case 


Consider the scenario in your development, you are reusing a standard FM in your program which is having 2 mandatory import parameters . And you shipped the solution to the customer. Now same FM in the customer system is having one more additional mandatory importing parameter. Now when your program runs and that calls the FM the dump appears in customer system. How to resolve this issue. This can be done by calling the FM dynamically with extra parameter that is not in your system but it is there in customer system. The below post tries to show the same.

The  FM ‘FPM_DEMO_FLIGHT_GET_CARRIER’ having below details as one import and one export parameter.

Wednesday, 6 January 2016

A room with an ABAP CDS view

In Björn Goerke's keynote speech from Barcelona Teched 2015, you may recall that he had crash landed on Mars, and was attempting to escape mars with the help of all of the latest SAP tech available. One of the technologies that we took away from teched, and that Björn used in his keynote was that of the CDS view.

But what if Björn had crashed on Mars and was without a Hana DB? what if he hadn't upgraded yet to full blown Hana, but he wanted to prep for such a future eventuality. That is a similar situation to what I find myself in with my current employer. We have crashed landed too, but we are even further out than Mars... and we have no Hana DB, but can we prep in advance for HANA? perhaps by using CDS Views on our current Oracle DB.