Tuesday 30 May 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 …

Friday 26 May 2017

Replicate ABAP database table definition to PostgreSQL

Recently I am doing self-study on PostgreSQL which is a very popular object-relational and open source database.After I have played around with it a while I have great interest to replicate some of my CRM table to PostgreSQL and manipulate the table there for practice purpose.

The table in PostgreSQL could be created via command line or SQL script, the latter works almost exactly the same as what we do in HANA studio, which means a developer who has HANA studio development experience can pick up PostgreSQL very quickly.
Suppose I have to create a new table in PostgreSQL which has exactly the same fields as the table COMM_PRODUCT in CRM:

Export ABAP transparent table content to PostgreSQL table

Now ABAP table COMM_PRODUCT is successfully replicated to PostgreSQL:

SAP ABAP PostgreSQL, SAP ABAP Guide, SAP ABAB Tutorials and Materials

Wednesday 24 May 2017

ABAP ICF handler and Java Servlet

This blog will not introduce how an ICF handler class in ABAP or a Servlet in Java are developed, but focus the way those instances of handler class or Servlet are spawned by Web Server.
Let’s first study the Servlet spawn behavior in Java.

Servlet in Java


According to Servlet specification, http request against a given url will be served by the same single instance of servlet.

For example, I have developed a simple Servlet which just returns “Hello world” as response. I map it with url starting with “/Hello”.

Tuesday 23 May 2017

PO Service line item quantity exceed validation against PR quantity…

Scenario


Service PO creation / change scenario – Service Quantity increasing more than requested in PR.

If we are creating PO with respective to RFQ, we can increase the any service line item quantity whatever we wanted. There is no proper SAP validation exist in PO for the POs which are created with reference to RFQ. This scenario is related to only service POs.

Friday 19 May 2017

Thursday 18 May 2017

Interface In between SAP and MULESOFT

  • Introduction

This Document gives an in-detail approach to create an interface in between SAP and COUPA, with help of MULESOFT middleware application. It has step by step activites to be done in both SAP and MULESOFT applications. Technically Mulesoft integration is very stress-free comparatively with other middleware applications to interact with could base applications.

Use ABAP Channels to build a trace tool used in my daily work

In that blog some demo examples are explained. After going through those impressive tutorials and demos, have you ever thought about building some useful stuff for your daily work by leverage this powerful feature in ABAP?

As ABAPers we use various trace / monitor tools in our daily work, such as SAT and ST05. And in CRM, all business transactions are managed by so called One Order framework. This framework uses function module CRM_ORDER_MAINTAIN to create, update and delete the document.
Just look at this long list of importing parameters

Wednesday 17 May 2017

Functional Programming – Try Reduce in JavaScript and in ABAP

In that blog I use the curry idea in the example below:

SAP ABAP Tutorials and Materials, SAP ABAP Certifications

output:

jerry-java

In this blog, as blog title, I will show another approach by leveraging built-in function reduce in JavaScript Array and Reduce keyword in ABAP to fulfill the same requirement.

Tuesday 16 May 2017

A real case to use REDUCE to finish a task in daily work

Have you ever used REDUCE keyword to resolve a real task in your daily work? For me not till today.

There is a table CRM_JSTO which stores the object guid together with the status object name it uses.

SAP ABAP Tutorials, SAP ABAP Guide, SAP ABAP Syllabus

Friday 12 May 2017

Locators in ABAP Open SQL

Recently I learned a new approach to access database table content without having to transport the column data into ABAP program using locator.

I make modifications on this sample. The modified one:

REPORT demo_db_locator.

DATA: otr_text_locator TYPE REF TO cl_abap_db_c_locator,
      length           TYPE i.

DATA: pattern  TYPE string VALUE 'ABAP',
      lv_index TYPE int4 VALUE 1.

Thursday 11 May 2017

Merge table cells vertically in adobe table

One of the common requirements for complex table design in adobe forms.

Step 1: Create table.

SAP ABAP Tutorials and Materials, SAP ABAP Adoble

Simple Remote Query

Introduction


I thought that this way to handle data type could be also useful for reading specific database records defined on backend system database. Remote database records can be read by means of META_READ_TABLE and RFC_READ_TABLE standard function modules;  these modules are useful and powerful but for sure they are not developer-friendly because of its table parameters: options, fields and data. In details:

Tuesday 9 May 2017

Cross domain request in ABAP and Java with two workaround

Cross Domain Request in ABAP


Create a new ICF node in tcode SICF, implement the following source code in its handler class.

SAP ABAP Guide, SAP ABAP Tutorials, SAP ABAP Certifications

Saturday 6 May 2017

Virtual Fields in CRM Reporting Framework

Use Case


In one of our applications, we have a search over the 1Order documents.

It uses the tables:
  • CRMD_SRV_SUBJECT (Service Subject) and
  • CRMD_SRV_OSSET (Service Subject Reference Object).
However, we need to pass the following “Reasons” as search criteria.

Thursday 4 May 2017

NoITAB – A Stack

Internal Tables


ABAP’s internal tables are dynamic data objects that allow to process large quantities of data with the same structure, thereby taking care of dynamic memory management. So they are good at storing database table data and this makes them ubiquitous.

There seems to be no alternative. Complex data structure are usually mapped to internal table to avoid additional effort to implement a special data structure that will probably have poor performance anyway.

Wednesday 3 May 2017

Change log for Z-Table Maintenance (via SCDO)

Generally we don’t need table logging for custom table maintenance (SM30), but it is important and needed for some cases. All customizing tables are automatically recorded by default but if you use regular Application tables (master and transaction data), you’re about to get your hands dirty .)

SAP ABAP Tutorial, SAP ABAP Materials, ABAP Guide, ABAP Certifications
Sample Z-Table

Tuesday 2 May 2017

Add documentation in Custom Program (.docs)

Introduction:


I am going to show, how we can add documentation in Custom program.

I have searched in SCN network too many times, to achieve this functionality but not get any clue, so i have decided once i will achieve this functionality in my program. I will write regarding this functionality, I know this is very small thing however i have spoiled one day for this.

Eight different sort algorithms implemented in ABAP

Some application developers think that it is enough to know SORT keyword and how to use sorted table in ABAP for their daily work without knowing how SORT is done internally. For me I can not say this assumption is wrong. I personal preference is to know something more thoroughly. We have learned various sort algorithms in the university, here I just list my implementation on some of them using ABAP for my personal study purpose.

For each sort algorithm I will create a static public class with a sort method which accepts an internal table with unsorted Integer and an output table which are sorted. For simplification reason the element in the internal table only consists of unsigned integers ( >= 0 )

Monday 1 May 2017

Bitwise operation ( OR, AND, XOR ) on ABAP Integer

For training purpose I need to explain to my ABAP team colleagues about how bitwise operation on Integer in Java like below is done.

SAP ABAP Tutorials and Materials, SAP ABAP Certifications, SAP ABAP Guide