Billboard spots rival cars, makes targeted pitch
TAKE NOTE (Insights into SAP solutions and Emerging Technology)
UNDER DEVELOPMENT(Information for ABAP Developers)
Introduction to ABAP 7.4
As time has gone by, more and more commands and constructs have been added to the ABAP language. While nothing has been taken away, this is to ensure backward compatibility, the rate of change seems to
be accelerating. While many changes came as a result of the introduction of SAP NetWeaver 7.02, that is nothing compared to the deluge of change that came with version 7.4.
This blog series will focus on the changes that came with version 7.4 by breaking the blog up into sections a developer would normally be interested in, like string processing, or conditional logic…etc. Since you and I are developers, we tend to spend a good bit of time accessing the database when developing ABAP programs, so let’s begin this series here….
New Commands in OpenSQL for ABAP 7.4
CASE Statements In OPEN SQL Queries in ABAP 7.4
One of the new features of ABAP 7.4 is the ability to insert CASE statements into SQL queries. The code below shows an example of this. In this example, there is a field in a local structure named ERNAM, and it should be filled with the literals “NAME1″, “NAME2″, or “NAME3″ respectively, depending on the contents of the database field AUART (DocType).
You will notice that you have to put an @ symbol in front of your ABAP variables (or constants) when using the fancy new features, such as CASE, in order to let the compiler know that you are not talking about a field in the database. (This is called “Escaping” the Host Variable). You also have to put commas between the fields you are bringing back from the database and put the INTO statement at the end. This is a result of a new “strict” syntax check that comes into force when the compiler notices you are using one of the new features. In other words, if you try and use a new feature like a CASE statement in an SQL query but do not put an @ symbol beside the variable name, then you will get a hard error. In this way, SAP can still being backward compatible.
Q&A (Post your questions to Facebook or Twitter and get the answers you need)
Q. I am trying to find a BAdi to help me with my current requirment. I have tried the SCN and downloaded a program tahts supposed to find exits and BAdi’s but it doesn’t seem to work. Do you know of any way to find BAdi’s in a transaction?
A. I think I can help… BAdIs are called in ABAP programs in two ways depending on the type of the BAdI. We’ll discuss how to find each type of BAdI in the following sections.
Enter the statement “GET_BADI” on the popup. Now, execute the debugger by pressing to see if there are any BAdI calls in the transaction. The screen shot below shows the ABAP Debugger screen when the execution reaches the GET BADI statement. This time the BAdI type can be seen on the declaration statement of the l_badi variable, which is again BADI_SD_SALES.