Questions tagged [abap]

ABAP is the programming language of SAP softwares R/3, S/4HANA, CRM and many others.

ABAP is a SAP proprietary language that is used to write both the fundamental SAP R/3 system itself and the standardized business applications that run on top of this system and more recent systems like CRM and S/4HANA. It can be used for customer extensions of the system or entirely new software applications as well. The online language reference is available at no cost from the SAP Help Portal. Another great community - almost as rewarding as StackOverflow - is the SAP Community Network.

ABAP programs can be developed in ABAP Development Tools (ADT), a set of plugins for Eclipse, or using the tools in the ABAP Workbench on SAP GUI. ABAP programs use Open SQL statements to query the underlying Database Management System (DBMS). ABAP can be used to write executable programs, such as reports, and non-executable programs, such as function modules and classes. The ABAP Objects feature allows for object oriented programming in ABAP.

Useful links


Related tags

3276 questions
5
votes
5 answers

How to make ABAP code work in any ABAP-based system

I often share ABAP code via forums, github and so on, which is often intended to work on any ABAP-based system. Unfortunately, it often happens that some of the objects I use (database tables, types and so on) only exist in the solution I am working…
Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
5
votes
5 answers

Standard deep nested data type?

I took the nice example clientPrintDescription.py and create a HTML form from the description which matches the input data types for the particular RFC function. In SAP data types can contain data types which can contain data types, and I want to…
guettli
  • 25,042
  • 81
  • 346
  • 663
5
votes
1 answer

Several aRFC with WAIT, how to synchronize access to variable in callback?

I am using asynchronous RFC calls for doing some parallel work in SAP. Here you can see my pseudo code. * class variable data: gv_counter type i . .... method start_tasks . do 10 times . call function 'my_remote_function' …
Michael Meyer
  • 2,179
  • 3
  • 24
  • 33
5
votes
1 answer

Syntax error while VALUE constructing table line from literal

Here is one for you. How come that this one does not compile REPORT ZZY. TYPES: my_int TYPE x LENGTH 4, my_int_table TYPE STANDARD TABLE OF my_int WITH EMPTY KEY. DATA(g_tab_my_int) = VALUE my_int_table( ( 2 ) ). and this one does? REPORT…
Jagger
  • 10,350
  • 9
  • 51
  • 93
5
votes
2 answers

How to find ForeignKey in SAP Dictionary tables?

Table AUFK has a column called ADRNRA. The values in column ADRNRA have matching rows in table ADRC. In this case I found ADRC because someone told me the solution. Maybe I am blind, but it looks like AUFK-ADRNRA is no explicit foreign key. Is there…
guettli
  • 25,042
  • 81
  • 346
  • 663
5
votes
2 answers

Get stacktrace of errors from PyRFC call?

Up to now I get only an error message if something inside my SAP RFC function is wrong pyrfc._exception.ABAPRuntimeError: RFC_ABAP_MESSAGE (rc=4): key=No authorization, message=No authorization [MSG: class=00, type=E, number=001, v1-4:=No…
guettli
  • 25,042
  • 81
  • 346
  • 663
5
votes
1 answer

Can't unescape escaped string with ABAP

I want to escape this string in SAPUI5 like this. var escapedLongText = escape(unescapedLongText); String (UTF-8 quote, space, Unicode quote) " “ Escaped string %22%20%u201C I want to unescape it with this method, but it returns empty. Any…
Matthijs Mennens
  • 1,125
  • 9
  • 33
5
votes
1 answer

Is there an efficient way to avoid instantiating a class with syntax errors?

As you may know, it is pretty easy to have active code of a class containing syntax errors (someone activated the code ignoring syntax warnings or someone changed the signature of a method the class calls, for instance). This means that also dynamic…
ACuriousMind
  • 233
  • 2
  • 14
5
votes
3 answers

What is the shortest notation for updating a column in an internal table?

I have an ABAP internal table. Structured, with several columns (e.g. 25). Names and types are irrelevant. The table can get pretty large (e.g. 5,000 records). | A | B | ... | | --- | --- | --- | | 7 | X | ... | | 2 | CCC | ... | | 42 |…
Florian
  • 4,821
  • 2
  • 19
  • 44
5
votes
3 answers

Converting string into xstring without using function module

I want to convert a string into a xstring. I know that there is a function module named "SCMS_STRING_TO_XSTRING" But since it is not a good habit to use function modules anymore, a class based solution would be my prefered way to go. I know that…
Felix
  • 78
  • 4
  • 15
5
votes
2 answers

Trigger/Handle events between programs in different ABAP sessions

I have two programs running in separated sessions. I want to send a event from program A and catch this event in program B. How can I do that ?
rayashi
  • 1,721
  • 3
  • 20
  • 28
5
votes
1 answer

SAP Stringbuilder for ABAP?

I'm looking for a faster way to add to an existing string in ABAP. ABAP version NW 7.x Currently the string concatenation takes a very long time, especially once the string gets large. We need to build strings that are > 10 mb. The string is…
phil soady
  • 11,043
  • 5
  • 50
  • 95
5
votes
1 answer

How do I access BOR macros from a class?

If you're used to accessing BOR objects via the macros in include , you may attempt to do this within the ABAP OO context as well. Due to the strong typing restrictions of ABAP OO this is not possible. What is the alternative?
Esti
  • 3,677
  • 8
  • 35
  • 57
5
votes
2 answers

Using an include with constants in ABAP OO

I have an ABAP include containing only constants. (Not my code) I want to use these constants in an ABAP OO method. (My code) How can I use these constants in an object oriented ABAP environment without copying them? The idea is to define these…
Gerd Castan
  • 6,275
  • 3
  • 44
  • 89
5
votes
1 answer

IN operator in check statement

In SQ02 transaction, I want to use the check command. Can I replace the OR operator with another operator, which shorts the command? Is there an operator like IN, which exists in SQL? The check command is something like: CHECK SKB1-BUKRS EQ '1000'…
hag
  • 53
  • 1
  • 5