Supported by
Supported by Inetum

Transport a local table with its maintenance screens

images/thumbnail.jpg - Thumbnail

Some time ago you created a table and its maintenance screens as local objects.

When, later, you regret it and decide to transport the table, how will you be able to also transport the maintenance screens?

Transporting the maintenance screens function group together with the table is not enough.

Test a sequence of function modules in SE37

images/thumbnail.jpg - Thumbnail

I was sure I had already posted about this before but I can’t find it so here it goes (again?).

Some function modules save global data which must then be used by another function module belonging to the same function group. So, if you need to test them, they must run in sequence inside the same transaction.

Everybody knows you can use SE37 to test a function module. What few people know is that you can also use SE37 to test a sequence of function modules inside the same transaction. Those who don’t know this end up creating a small program to call those functions in sequence and that’s also ok. But here’s how you can avoid that.

Test function module with data loaded from a file

images/thumbnail.jpg - Thumbnail

Transaction SE37 lets you test function modules. Sometimes these function modules use tables. And sometimes you need to load these tables with a lot of data records. But the only way to do it is manually. Or maybe not…

Here’s a trick to do it using a file.

Have extra control over your selection screen

images/thumbnail.jpg - Thumbnail

The PARAMETERS and SELECT-OPTIONS already have some configuration options. But sometimes you need more control, more customising. Interestingly, although it’s not simple nor obvious, it can be done through a standard function module.

Debug on a user without debug permissions

images/thumbnail.jpg - Thumbnail

In a well protected system, normal users don’t have debug permissions. Very often, this makes it harder for ABAP programmers to help solve the users' problems, not being able to debug directly in their session.

But there is a legit, albeit obscure, work-around for this problem.

Edit standard programs without a key

images/thumbnail.jpg - Thumbnail

Here we are again facing a dilemma: hide something because it is dangerous and someone can do bad things using this information or teach it because it would be condescending to presume the readers are not responsible enough to know it. Dictatorships usually go for the first: burning books, censorship, etc. Abapinho like to believe that its readers are responsible people and deserve the right to know.

Thus, here it is. No, it’s not a user manual on how to enrich uranium nor a formula for homemade nitroglycerin. But it’s something similar: a trick that allows you to change standard objects without the need for a key.

Edit transport requests even if they don't let you

images/thumbnail.jpg - Thumbnail

As we all know, system adminstrators are very bad, cold blooded and cruel people. To prove it you just need to read the Bastard Operator from Hell.

We, ABAP programmers, are hopeless victims in the hands of these evil creatures.

But not always do we have to be smashed under their hairy fingers.

Show values in SE16N without conversion exit

images/thumbnail.jpg - Thumbnail

By default SE16N always shows the values in the external format, applying the conversion exit to all of them. Until recently, I used to go the ancient SE17 whenever I needed to see them in their internal format. But Rui Nunes told me how to do it in SE16N.

Serialization - Clone Dolly in ABAP

images/thumbnail.jpg - Thumbnail

This article was written by José Vília:

The Dolly sheep was alive in ABAP and I didn’t know about it.

Having created a class instance, I’d like to share it with another totally independent program to use it as if the instance had been created there.

It’s an ABAP Dolly sheep factory we’re talking about here, people. Serialization in the ABAP world.

Abracadabra reveals secret parameter

images/thumbnail.jpg - Thumbnail

Here’s a not very orthodox wat to deal with a report’s selection screen. Sometimes you may need to have a special parameter which you prefer to hide from normal users but still need access to. Example: a flag to activate a debug/trace mode. I’ll show you how you can do this by just typing the magic word, ABRACADABRA. It goes like this: DATA: unhide_parameters TYPE flag. PARAMETERS: p_debug AS CHECKBOX. AT SELECTION-SCREEN.

ALV Grid built in error protocol

images/thumbnail.jpg - Thumbnail

We’re all lazy. It’s just human. Programmers are human. We’re often lazy when it comes to the way we program something. And usually being lazy when making a program will result in someone else having more work when maintaining it.

Let he who is free of laziness throw the first rock.

I won’t!

PlantUML - Finally UML became simple to use

images/thumbnail.jpg - Thumbnail

Foreword

When I say that I like to use UML class diagrams to document my code, people think I’m crazy.

Introduction

The UML has gained a bad reputation because people think that, first you make the classes diagram in UML and only then write the program. But that was in 1996, when you the good practices said the first thing to do was the whole technical spec, even if no one really did it.

Nowadays, fortunately, we are no longer ashamed to say that the very act of programming is already in itself a way of drawing.

Classe para garantir segurança em programação dinâmica

images/thumbnail.jpg - Thumbnail

I recently found a program which was generating an SQL statement by concatenating several variables with fixed SQL parts. But, either by not paying attention or simple ignorance, the person who did it, thought it would make sense to associate a text-symbol to each of these variables with. Something like this:

SALV consistency report

images/thumbnail.jpg - Thumbnail

Sometimes a SALV has inconsistencies which can go unnoticed. For example, if its structure has an amount field which doesn’t have an associated currency field:

Go into a transaction skipping its selection screen

images/thumbnail.jpg - Thumbnail

Once again SAPGui surprises me with yet another obscure shortcut I didn’t know about. Let’s use the customer display transaction XD03 as an example: Go into the transaction’s selection screen with /NXD03 Fill in the customer number an press ENTER to display its details Do whatever it is you want to do there and get out of it Suddenly… you remember that you needed to do something else there