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
8
votes
2 answers

Dictionaries in ABAP. How?

How to translate this snippet of executable pseudo code into ABAP? phone_numbers = { 'hans': '++498912345', 'peter': '++492169837', 'alice': '++6720915', } # access print (phone_numbers['hans']) #…
guettli
  • 25,042
  • 81
  • 346
  • 663
8
votes
1 answer

Most efficient itab filtering with ABAP 7.40+ syntax

With release 7.40 we have plenty of ways to filter internal table data. For example, one can use such ABAP constructs: FILTER operator DATA(lt_extract) = FILTER #( lt_bseg USING KEY matnr_bwtar WHERE matnr = CONV matnr( SPACE ) …
Suncatcher
  • 10,355
  • 10
  • 52
  • 90
8
votes
1 answer

Strange behaviour when modifying table row via reference

I want to write a method which exports a table of references. This is required because each line of it could have its own structure. So I'm declaring the type like this: ... TYPE STANDARD TABLE OF REF TO data. I thought it would be a neat idea if I…
user5653854
8
votes
2 answers

abap multiple method call

While debugging abap code I found an interessting code construct. method_name(: Parameter1 ), Parameter2 ). As far as I can tell this one calls the method twice. The first time with the first parameter and the second time with the…
8
votes
3 answers

Best practice for Table Expressions (NW 7.4)

An official SAP presentation discussing new ABAP programming features in NetWeaver 7.4 (CD261) makes a big deal about table expressions, replacing the old syntax to read from an internal table: READ TABLE lt_aufk INTO ls_aufk WITH KEY aedat =…
Lilienthal
  • 4,327
  • 13
  • 52
  • 88
8
votes
1 answer

ID transformation from ABAP variable to XML does nothing

I experience a confusing issue with built-in SAP transformation ID. I try to serialize ABAP structure, but result XML is always empty. Do you have any suggestions, what is wrong with my code? DATA lv_xml TYPE xstring. CALL TRANSFORMATION ID …
Nikolai Kim
  • 685
  • 8
  • 22
8
votes
2 answers

What is the difference between like and like line of in ABAP?

I have one doubt. May I know what the difference between LIKE and LIKE LINE OF in ABAP is? I have seen somewhere that while declaring the work area they are declaring. wa LIKE it_one wa LIKE LINE OF it_one
8
votes
1 answer

Assertions in ABAP

Over the years I've written code in a variety of languages and environments, but one constant seemed to be the consensus on the use of assertions. As I understand it, they are there for the development process when you want to identify "impossible"…
Lilienthal
  • 4,327
  • 13
  • 52
  • 88
8
votes
2 answers

User-specific ABAP breakpoint acts weird

Why the statement BREAK-POINT 'my username'. affects not only me but other users too? Am I insane? Maybe this is a problem of permissions or any other reason? Can anybody explain me? This statement is located in method body in class which…
Suncatcher
  • 10,355
  • 10
  • 52
  • 90
8
votes
5 answers

How to set dynamic key for READ TABLE?

I'm trying to work out a way to read an internal table that has to be created dynamically. I have created the following report that fills a dynamic internal table with data. On the last line, I'm trying to read it with a key (mandt for example), but…
B. Bowles
  • 764
  • 4
  • 9
  • 21
7
votes
1 answer

How to convert an UTC timestamp to system date and time in ABAP

does anyone of you have suggestions how to convert a given UTC timestamp into the date and time of the system time zone? Converting from an UTC timestamp to the users local time zone is easy, you could just do: CONVERT TIME STAMP lv_utc_timestamp…
seso
  • 171
  • 1
  • 2
  • 9
7
votes
4 answers

Update Statement in ABAP not working

I have an UPDATE statement in ABAP which looks like : UPDATE zicstt099 FROM TABLE lt_zicstt099 The Update is failing every time with sy-subrc eq 4. The database Table ZICSTT099 has three primary keys : WEB_USER_ID & EMAIL_ID along with MANDT…
Rohit Sinha
  • 71
  • 1
  • 1
  • 2
7
votes
4 answers

How to programmatically tell if system is R/3 or S/4

Is it possible to determine via code if the current system is R/3 or S/4? I need it because I have a method that returns the software component of Human Resources related data, but this component should be different to R/3 and S/4 systems. …
Pedro Accorsi
  • 765
  • 1
  • 8
  • 21
7
votes
1 answer

Why does nested LOOP AT SCREEN cause infinite loop/recursion?

Here is one for you. Although such a language construction does not make much sense I would like to know why the nested LOOP AT SCREEN cause infinite loop (recursion?). Let us take the following simple program. REPORT yyy. PARAMETERS: p_x1 TYPE…
Jagger
  • 10,350
  • 9
  • 51
  • 93
7
votes
1 answer

Why does `FOR ALL ENTRIES` lower performance of CDS view on DB6?

I'm reading data from a SAP Core Data Service (CDS view, SAP R/3, ABAP 7.50) using a WHERE clause on its primary (and only) key column. There is a massive performance decrease when using FOR ALL ENTRIES (about a factor 5): Reading data using a…
koks der drache
  • 1,398
  • 1
  • 16
  • 33