Adding values to a standard domain
If you think it’s impossible to add values to a standard SAP domain without requesting an activation key, you’re wrong.
If you think it’s impossible to add values to a standard SAP domain without requesting an activation key, you’re wrong.
Exception classes let you state multiple texts describing the different possible errors that they can represent.
However, there exists an option to associate it with a message class (SE91). This allows texts to be defined as classic SE91 messages instead of being defined directly in the exception class. And it has advantages.
Select a word in the ABAP editor and choose CTRL-C. Then select another word and choose CTRL-C again. Then another word and so on. You have copied words several times to the clipboard. Experience and common sense tells us that if you choose CTRL-V you can only paste the last word you copied to the clipboard. But that is not quite right. You may not be aware of it, but the ABAP editor has a good memory.
The SCMP transaction compares the content of a table across two systems. It is very useful, especially for parameterization tables. It is very easy to use. It allows for the pre-selection of the registers and fields to compare. It also allows you to only display the differences, which is convenient for tables with lots of data. I don’t think any more explaining is required. Ite et videte. This tip recently appeared in the ex SAPtricks blog and I think it is so useful that I have reposted it here, in case you haven’t already seen it.
Although I have been using ABAP since 1998, I learn new features or options every week, and sometimes even new commands. It’s hard to believe. Today, I’ll share a little SQL option that I recently discovered. SELECT * FROM T001 INTO TABLE T_T001 ORDER BY PRIMARY KEY. I have known SELECT, FROM, INTO, TABLE and even ORDER BY for a long time. I just didn’t know of PRIMARY KEY. It orders the internal table by its key.
Cartoons always look good in a report. In a SAPGui that is boredom in blue, the more colours and cartoons there are the better it is. Luís Rocha showed me a very convenient function to fill up a report with icons.
When you create a return parameter in a method of a class that is a TABLE TYPE based on a type declared in the class proper, an error sometimes pops up that says:
“Type of RETURNING parameters must be fully specified.”
Most functionals, and even the hardcore functionals, knows that in order to start debugging an ABAP program, we use the /H command. But few programmers, even the hardcode programmers, will know the purpose of the /HS command.
Today’s hint is not a hint - it’s an advice.
After creating a table, you create its maintenance views. The maintenance views dwell within a group of functions. This group of functions is requested from you at the time of their creation. Since, after all, that’s no more than a set of generated code, and most of it is, nonetheless, standard includes. Loads.
I give you the problem: there are those who create their own Z functions and put them in groups of functions with maintenance views. It’s true. Some do this.
In the ‘bad old days’ when the ABAP was even more old-fashioned than today, variable statements were all made through LIKE and were referenced to table fields:
DATA: V_KUNNR LIKE KNA1-KUNNR.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.
You want to call an RFC function in another system but, because you’re not a carrion eater, you only want to do it if it’s alive. Hence, you need a way of checking whether that particular destination RFC system is alive. How do you do that? Charles Santana does it like this: DATE: rfcdest TYPE rfcdest, ping_status TYPE /sdf/e2e_traffic_light_numeric. CALL FUNCTION '/SDF/RFC_CHECK' EXPORTING iv_destination = rfcdest iv_ping = 'X' * iv_logon = 'X' * iv_latency = 'X' IMPORTING ev_ping_status = ping_status.
You call a function. Imagine it doesn’t answer. It may be that it’s staying silent. Or it’s shy. Or dumb. Or, of all the misfortunes, it doesn’t exist.
To make sure and put your mind to rest you then do: