Posts

Showing posts with the label ABAP custom tools

File data conversion made easy using ABAP custom utility class zcl_filedata_convert

In the last post, I talked about how to read XLSX files into an internal table and  convert internal to XLSX files . In this post, I wanted to share a custom utility class that can make tasks of data conversion as simple as a method call. The class is ZCL_FILEDATA_CONVERT. Below are a few of the code snippets showing its capabilities. Let's start with XLSX to the internal table. It automatically handles date and time fields for you. Internal table to XLSX similarly converting data from and to CSV or TSV or special separated file, It handles it all. Here is a link to source : ZCL_FILE_DATA_CONVERT Use it as it is or modify it to suit your needs. As always, hope you like the post and use its information in your day to day work.

SAP application component browser custom tool, Check application component hierarchy of any object

Image
As part of the  custom tools  series, today's post is about a tool that is helpful to both functional and technical counterparts. Have you ever wondered, which table or t-code belonged to which application component in SAP? Recently, I did and thought maybe others want to see that as well. But first, What is an application component? An application component is defined as a modular, deployable, and replaceable part of a software system that encapsulates its behaviour, data and exposes these through a set of interfaces.  In other words, In SAP, all sales and development related functions would be part of the SD application component, similar to other functions such as MM or LO (logistics). Now, coming back to the tool. Here is what the input looks like: You can input the application component name or an object name.  The other input defines what type of objects you want to browse or fetch. Example: I want to know where th...

Easily send emails from ABAP using Custom utility class ZCL_SEND_MAIL

in the previous post,s I shared how to use CL_BCS class to send emails . and I also shared how to use cl_bcs_message class to send email in user-exit and BADI . The standard libraries even though useful, are cumbersome to use so I have created a utility that combines the power of both CL_BCS and CL_BCS_MESSAGE to let you send an email with ease from anywhere in the system. Below are examples and source links to the utility class ZCL_SEND_MAIL A simple example: Sending email from user exit/Badi Link to Source:  ZCL_SEND_MAIL As usual, Hope you like the post and use the information in your day to day work.

ABAP Custom code generator dynamic pattern: ZCODEGEN

Image
 In My last post about  ABAP editor custom dynamic patterns . I talked about how to create new custom patterns to help you speed up various aspects of your day to day development. Today I wanted to share with you a Custom dynamic pattern Utility that I built. Here is what it looks like: Starting the pattern: The UI: Features: You can declare:   Types - With auto data declarations(Global/Local)    Data     Selection Screen - with Validation   Basic SQL queries  Setup Config to change prefixes of generated code. Here is an example of generating a simple report to fetch data based on MATNR from MARA . Declare Types: Press the get fields button: Select field and copy: Set data declaration checkboxes Move on to the selection screen tab. Get fields to choose from as a selection screen. Select field and copy and set obligatory and check table. Move to the SQL tab. Select fields for queries either directly or from local declared types, some for wh...

ABAP logging made easy using simple logger utility class ZCL_LOGGER

In the last post,  Application logging in ABAP . I talked about application logging. It's an excellent utility but it's cumbersome from a developer's point of you. Especially if you work or have worked with languages like JavaScript where logging is as easy as Console.log("your text"). to add the same level of ease, I created a utility class that makes logging easy. Starting a log is as easy as instantiating the object. Below is the example : Adding messages to the log becomes a single line code: Here is the snippet to save the log. Notice how you don't have to worry about saving the log messages.. because the class saves your messages the moment you add them, so you don't have to worry about collecting your logs and making sure the save happens in all scenarios. Now I will take the same code snippet that I shared in the last post and rewrite it using the logger class to show how convenient it is to use the...