Test driven development in ABAP – Unit test classes

Test Driven Development using ABAP UnitThis article provides info about creation an ABAP unit test class that might significantly reduce the future maintenance cost at the testing level. The flow is simple – you design your functional tests in advance and then you create your code. You can run the test class repeatedly to tell you which tests still didn’t pass. Continue reading

SAPScript Export & Import

SAPDue to fact that SAPScripts do NOT offer the version management functionality it’s good idea to store each final (production) version of your SAPScript as a file exported to your PC or to some version management system (i.e. Subversion). Continue reading

ABAP OO – Access class attributes dynamically

SAPThe piece of code presented in this article is just a short demonstration of how you can access class attributes dynamically – when the attribute name is stored in a variable which value is determined during run time. Continue reading

ABAP – Class based exceptions

SAPThere are several ways how to handle errors or warnings in ABAP and in this article I’ll try to present exceptions. Specifically – global class based exceptions in ABAP Continue reading

How to revert SAP Released transport task to Unreleased status

If you released a task of a transport by mistake and you want to re-open it back you can achieve this if you follow steps described in this short article Continue reading

ABAP – Change Documents example with Z-table

SAPIn this example I’ll follow on the theory of Change Documents presented in previous article (ABAP – Change Documents (theory)) and I’ll show how to create(or update an existing) Z-table where each modification will be logged into CDHRD and CDPOS tables Continue reading

ABAP – Change Documents (theory)

Data manipulation in SAP is done using standard documents such as Sales Orders, Purchase Orders, Vendor Invoices etc. Sometimes it’s necessary to make a change a document after it has been saved and created for the first time. From security point of view it is required/imperative that all such changes must be recorded by the system. For this purpose there is a standard functionality implemented in SAP system called “Change Documents” Continue reading

Create new batch characteristics with values checked and suggested by a function module

SAPIn this example I’ll try to show you how to create new characteristics for a material batch. This will include the following steps:

  1. Creation of a function module to check characteristics value (optional)
  2. Creation of a function module to suggest characteristics value – search help (optional)
  3. Creation of new characteristics (CT04)
  4. Creation/modification of a class (CL02)
  5. Object/Class assignment to a class (CL24N or CL20N and OMS2 if necessary)
  6. Batch modification with our new characteristics (MCS2N)

Continue reading

How to maintain text IDs in SAP

SAPIf you want to create new text ID that will be available in SO10 transaction, then follow these easy steps below. Continue reading