"
Etiqueta > ui
Supported by

DDIC structure key

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.

Ler o resto do artigo! »

Automatic keyboard

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.

Ler o resto do artigo! »

QUICKINFO: tip on how to give tips.

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. But you don’t have room on the screen to give that information. SAP thought of this:


WRITE: sy-datum QUICKINFO 'Today’s date'.

When you run the program it doesn’t seem to make any difference, but when you stop the mouse on the value a small square appears with the additional text. Very much like tooltips in HTML:

quickinfo

You can also use it to leave secret messages for users. Or to do treasure hunts.

It would have been good to know this in those days when it could have been useful.

Thanks to See-ming Lee for the photo.

Greetings from Abapinho.

Colour hallucination

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.

Ler o resto do artigo! »

No one cares for LISTBOX

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:

Ler o resto do artigo! »

Hey dad, look…no hands

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?

Ler o resto do artigo! »

Menu search

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.

Client or Customer?

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?

Do this: go to the transaction CMOD menu: “Go to>Global Enhancements>Keywords>Change”. You then enter the data element whose description you intend to modify. You will get a dialogue box in which you can redefine all the descriptions for this data element. Next you save it and it’s done. From now on, wherever this data element is used, your new description will appear. Powerful!

Oh, and on the menu option right next to it (the one that says “show”) you can view the list of all the data elements that have already been modified on that system.

Simple? But do take it easy and don’t start calling MATNR “thingy” and UNAME “mate” and so on. SAP is serious business.

Thank you to Miguel Freitas for the tip.

(And thank you to David Rodrigues for the foto).

Greetings from Abapinho.

Adding buttons to the selection screen

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.

Ler o resto do artigo! »

Fill up the selection screen with cartoons

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.

Ler o resto do artigo! »

If a stranger offers you values, this is Input

Interrogação

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?

Ler o resto do artigo! »

Selection screen with tabs

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.
Ler o resto do artigo! »

Multiple choice ALV in a modal dialogue box

Do you know how to present an ALV with a list of records in a dialogue box allowing multiple choice? I didn’t. But I do now. Let me explain how.
Ler o resto do artigo! »

Progress indicator

You know those progress bars that show how long it will take for a process to end? The ones that sometimes go back to the beginning when they reach the end and leave you frustrated and confused and wondering what use they are anyway? Here’s how you can use them in an ABAP program.


DATA: lv_texto TYPE char40,
      lv_valor type i.

DO 10 TIMES.

  WAIT UP TO 1 SECONDS.

  CLEAR lv_texto.
  lv_valor = sy-index * 10.
  lv_texto(3) = lv_valor.
  CONCATENATE lv_texto '%!' INTO lv_texto.
  CONCATENATE 'Time remaining' lv_texto INTO lv_texto SEPARATED BY space.

  CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
    EXPORTING
      percentage = lv_valor
      text       = lv_texto.

ENDDO.

You see that the timer bar is filling up. Unfortunately the WAIT UP TO N SECONDS command is limited to whole numbers, so I don’t know how you can do a faster count. But it’s better than nothing.

And watch out for the WAIT command, because it does a COMMIT to the database.

Greetings from Abapinho.

(Português) Como encavalitar tabelas

Sorry, this entry is only available in European Portuguese. For the sake of viewer convenience, the content is shown below in the alternative language. You may click the link to switch the active language.

Às vezes temos de criar uma tabela Z. Às vezes temos até de criar várias tabelas Z. Às vezes estas tabelas estão relacionadas de alguma forma. Como quando uma contém dados de cabeçalho e a outra dados de item, por exemplo. Ora se estão relacionadas pode dar jeito que sejam editadas em conjunto. É para isso que servem os Clusters de Visão (view cluster).

Ler o resto do artigo! »


About Abapinho
Abapinho runs on WordPress
Articles (RSS) e Comments (RSS).