Tuesday 29 August 2017

A compare tool: Download and analyze the runtime performance result from SAT

I once participated one project which needs to do bench-marking about how much performance gain we can benefit after we move the whole CRM system on top of HANA.

we plan to do it via steps below:

1. Run one test report via SAT on both HANA based and non-HANA based system

2. export trace result( xml format ) of HANA system locally, and import it into non-HANA system, and do comparison in SAT.

Saturday 26 August 2017

SAP JCo Server Example

Introduction


When writing my first JCo server for I found it very cumbersome to find guiding code snippets and as well as a self-contains, fully working example. Thus I would like to put such an example here.

Friday 25 August 2017

Some small ABAP tools I write to improve daily work efficiency or just for fun

I write some small ABAP tools for my daily work. Some of them might not be so useful at first glance – I just write them for fun. Some of them could be used to improve work efficiency.

1. Tcode Usage Statistics Tool


This 56 lines of report can print the tcode usage for a given user per month.
REPORT ZTCODE.

Wednesday 23 August 2017

Realizing automotive EDI processes with VDA, EDIFACT, ANSI, ODETTE, and IDocs

Introduction


The supply chains of automotive companies are usually fully automated. Instead of using paper-based processes, OEMs (original equipment manufacturers) and their suppliers communicate using electronic data interchange (EDI). Thereby, messages are sent from one IT system to another IT system without any human intervention.

ABAP syntax check in Notepad++

Introduction


Notepad++ is a free text editor with a lot of good functions to work on ABAP source code files. Several developers have shown how to improve your work with this editor. That’s great to read and write ABAP source code without using transaction SE80 or Eclipse – have a try, it’s interesting to write source code without system assistance.

Tuesday 22 August 2017

Step by step to use jChartFX in BSP application

In my blog CRM One Order statistic tool I develop a small tool to print out the statistics of number of assigned line item for all business documents in the system.

The tool has the following three sections of output in SAPGUI.
This section means there are 1 order which has 5000 line items, 1 order has 2000 items, 1 order has 1998 items …

Sunday 20 August 2017

ABAP to get SAP BW Direct & Event scheduled process chains list

Proposal:


Sometimes we may be struggling to find out all the list of Direct & Event scheduled process chains. Also as part of SAP BW Support activity, during GMW (Global Maintenance Window) we are carrying few activities manually which needs to be done before the start date of GMW. Analyzing and de-scheduling the process chains (PC) depends upon the down-time duration of the GMW falls under this activity. It takes long time for identifying the process chains which are Direct or Start using Meta chain/API. So here I have developed a ABAP code to get the list.

Saturday 19 August 2017

Delivery and Shipment handling units

Business Requirement :


1.Creation of Delivery Handling unit for over packing and master cartons even if over packing is not required.
2 Creation of Shipment Handling Unit for boxes packed in Deliveries to allow receipt by HU# in the receiving plants.

Friday 18 August 2017

ABAP custom code adaptation for SAP HANA – The efficient way

Introduction


Currently many SAP customers plan and evaluate the migration from their classic ERP system running on any DB to Business Suite on SAP HANA or S/4HANA. For both scenarios custom ABAP code needs to be adapted for SAP HANA. This paper shares best practices in order to minimize the adaptation effort. The recommended procedure has already been applied successfully in many different SAP Hana migration projects.

Wednesday 16 August 2017

Enumerations in ABAP

To represent a fixed value set in ABAP you can use several different technologies. The newest one is enumerations which are provided at language level and can be used as of AS ABAP 7.51. With this blog post I want to show which possibilities there are for ABAP developers to define enumerations and use them in signature elements in the safest way possible.

Saturday 12 August 2017

Call HANA Orion API from ABAP

The SAP HANA Repository is a key feature of the HANA native development environment.  It is the design time archive for all development objects from database tables all the way up through user interface artifacts. However up until now we’ve not had a supported API which would allow application developers or 3rd party tools developers to access the Repository.  With the advent of the Web-based development tooling, SAP needed to create a REST-based service interface for these development tools.  These two requirements come together in SPS 09 in the form of the newly released SAP HANA REST API.

Basics of Web Dynpro ABAP

Basics


Web Dynpro applications  can be created and edited in the web dynpro explorer in the ABAP development environment

It has been fully integrated into the ABAP Workbench so there is no separate transaction code. we use the object list selection to display  or create Web Dynpro component.

Thursday 10 August 2017

An ABAP tool to get ABAP source codes line number

You can use this tool ( an ABAP report ) to get the line number of your ABAP source code.

How to use this tool


Just specify the criteria based on which the source code will be scanned and line number will be calculated.

CDS view source code count tool Part-12

The Continues Blog, For development complexity and draft effort estimation I need a tool to calculate the total line number of the CDS views belonging to a given package.

ABAP Development, SAP ABAP Tutorials and Materials, SAP ABAP Certifications

Wednesday 9 August 2017

ABAP Nested Loop Performance Test

During an ABAP performance discussion, we decided to run tests to decide on the best method for nested loops. The example was to have an outer loop of BKPF and an inner loop of BSEG.

Nesting two raw loops gives the worst performance in all cases; therefore I have left it out.

In our initial test using the source code shared below; here are the methods ordered by better performance:

Sunday 6 August 2017

How to create ABAP CDS View with enabling derivation of the value for parameters

There have been dozens of blogs online for walking through developers on how to create ABAP CDS view with parameters in ABAP for HANA, however, one major issue still exists is that although input parameters can restrict or filter the data from CDS views, the limitation of the value input for a parameter to filter out more specific data range is significant.

Here the author presents you a way to enable derivation of the value for parameters to tackle similar problems in your future development using the example shown below.

Friday 4 August 2017

Regarding cookie manipulation in CL_HTTP_CLIENT to avoid CSRF token validation failure issue

Recently I meet with this cookie issue so I document it as a blog in case any other guys might meet with the same problem.

I am trying to create some Opportunity transaction data by consuming OData service via CL_HTTP_CLIENT. Since this is a update operation which needs to be finished by HTTP POST, so a CSRF token is needed in this HTTP post. Let’s first have a look what is a typical scenario running in Chrome extension postman:

Thursday 3 August 2017

Old New ABAP Editor

Introduction


If you develop now UI for SAP, you use Web IDE. If you are doing backend and ABAP, you use ABAP in Eclipse. But sometimes you still need to come back to SAP GUI and ABAP Workbench and use the “New” ABAP Editor.

Wednesday 2 August 2017

ABAP Group Operations in Internal Tables

Today, we will be inspecting some cool grouping techniques introduced in ABAP 7.40.

First, let’s get familiar with our context. We will read the table T001K, where BWKEY (valuation area) is the table key, but BUKRS (company code) is repeated multiple times in various lines. Let’s start off by reading this table.

Converting Function Module Exceptions to Exception Classes

Although function modules belong to the era of procedural programming, we all need to use them from time to time. While most BAPI’s usually return error messages in a clean internal table format, many other function modules return classical exceptions.

If you are calling a function within a class method, you might have a hard time converting those classical exceptions to class based exceptions – meaning exception classes.