Manually populate a LISTBOX
In 2012 I wondered why LISTBOX is so rarely used. I taught how to use it with standard data elements, which automatically populate it. Today I’ll teach you how you can populate it yourself.
In 2012 I wondered why LISTBOX is so rarely used. I taught how to use it with standard data elements, which automatically populate it. Today I’ll teach you how you can populate it yourself.
There’s so many things you can do on the selection screen. Here’s another one: five buttons in the toolbar.
Sometimes the simplest things take the longest time to do. For instance, we recently needed an ALV grid to automatically resize to fill the whole window. But how? But how? But how?
Today when I want to create a SALV I always create a DDIC structure with the data elements already set to show the texts I need. This avoids the need for code to manipulate the field catalog.
Every programmer knows about the intimate relationship between batch-inputs and paperweights, staplers and similar heavy objects. These precious little helpers can keep us from spending up to eight hours hitting the “ENTER” key with one finger.
Although these objects have a certain charm, the law of gravity - the same one that makes them useful - sometimes makes them fall over and stop pushing this key.
In my opinion, this tip has arrived a few years too late, as it is now rare to use the WRITE command to directly write things to the screen. Therefore, we can say it’s a retro tip. A vintage tip. But let’s assume we are still in the twentieth century grappling with ABAP’s most Baroque command, WRITE. Then, imagine yourself sitting in front of SAP, listening to Pearl Jam, wearing black headphones and writing WRITEs of a series of values on the screen, which you would like the user to have more information on.
This is not really an article. It’s hardly a tip. It’s closer to getting something off my chest in all the colours of the rainbow.
For some strange reason, LISTBOX is rarely used in report selection screens. Even though it’s widely used throughout the web. Who knows why.
Dear reader, I suggest you pay attention to its advantages:
In today’s article I will show you (and explain!) how you can make a selection screen refresh itself on a regular basis without user intervention.
Are you ready?
Did you know that is possible to search in SAP menus? Probably yes. Well, I didn’t. I’ve spent years looking through menu S000 searching for the most random stuff imaginable. I’m sure that if I had done menu search I would have found most of them in seconds. Sometimes you just don´t think of the obvious. Thank you Sérgio Fraga for the tip. Greetings from Abapinho.
Wherever you use the data element KUNNR, its descriptions is “Client”. And what if we wanted to change this field description from “Client” to “Customer”? “Customer" is so much nicer! Or let’s suppose that the company you work for is trafficking in drugs and tells you that they want “Dealer” rather than “Supplier” to appear in the LIFNR field. Obviously we can label it as we wish on screens and Z reports but what about standard transactions?
Normally, when buttons must be generated for users to click, Screen Painter is used to create a screen which is then invoked by the report using CALL SCREEN. But, unless the screen being designed is already quite complex it is pointless creating a screen which will have no further use. Screens have always annoyed me.
I will demonstrate an example of using buttons on a completely normal selection screen resorting to a button called PUSHBUTTON and a very clever trick called ONLI.
Was SAP born miserable or are SAP-users simply unable to cheer it up?
The truth is that SAP GUI is no rainbow and neither does looking at it bring happiness. Even so, it puts at our disposal a bunch of cartoons that we may use to make it just a little more uplifting.
And take a look at just how easy it is.
In a report, the values are normally requested from the user at the first selection screen before the program is run. But what if you want to interactively ask for more values in the middle of running the program?
The selection screens of ABAP programs have several features that, although complex and easy to use, are generally ignored. Here, I will show you how easy it is to create tabs to better organise the parameters of a program. This time though, and uncommonly, I’ll spare you the verbal onslaught. It’s a practical class.