Skip to Content

ABAP Language News for Release 7.40, SP08

Release 7.40, SP08 of Application ABAP in SAP Netweaver is another bundled release that comes with a new kernel. While 7.40, SP02 was delivered with kernel release 740 and  7.40, SP05 with kernel release 741, 7.40, SP08 is based on kernel 742. When upgrading your 740 application server to 7.40, SP08 you have to use kernel 742 and by this you will get the following enhancements of the ABAP language in a fully downward compatible way.


  • Predicative method call IF meth( ) and a new boolean function xsdbool for logical expressions
  • Iterative expressions FOR … UNTIL|WHILE in constructor expressions, new constructor expression REDUCE especially for FOR
  • Addition BASE for start values of constructor expressions

Internal Tables

Database Access

  • Inline declarations, enhanced SQL expressions and new position of INTO clause in Open SQL
  • Parameter views, new built-in functions and view extensions in  ABAP CDS
  • Tabular changing parameters, class based exceptions and specialized BAdIs in AMDP

Furthermore, you can make interface methods optional now. As always, you find all ABAP News in the ABAP Keyword Documentation, that was updated in the SAP Help Portal. The updated version contains a new reference documentation for the ABAP Dictionary. The next bundled release with new ABAP features (I know some niceties already)  will be 7.40, SP12 presumably.

You must be Logged on to comment or reply to a post.
  • Hi Horst.

    Thank you for this information. Do have an idea or a link where I can find further release informations regarding ABAP Object?

    Thanks in advance!


  • Hello! This is an information of a great value, thank you!

    I've got one question - why there isn't a real boolean type in ABAP? I mean the boolean type what behaves like one in Java or Javascript.

    For example, it would be nice to write like this:

    DATA lv_flag1 TYPE abap_bool VALUE abap_true.

    DATA(lv_flag2) = NOT lv_flag1.   "so lv_flag2 = abap_false

    or like this:

    WHILE lv_flag1.

    "do something...


      • Here's an alternative that is shorter but equally mind-bending: πŸ˜›

        DATA(lv_flag2) = xsdbool( lv_flag1 EQ abap_false ).

        In the absence of simpler syntax (that I know of, anyway), I think that it might be better to create a quick static class to hide the complexity:

        CLASS bool DEFINITION.

           PUBLIC SECTION.

             CLASS-METHODS: bool

               IMPORTING value       TYPE abap_bool

               RETURNING VALUE(bool) TYPE abap_bool.

             CLASS-METHODS: not

               IMPORTING value      TYPE abap_bool

               RETURNING VALUE(not) TYPE abap_bool.



           METHOD bool.

             bool = value.


           METHOD not.

             not = xsdbool( value eq abap_false ).



        Which allows you to do things like:

        DATA( something ) = abap_false.

        DATA( not_something) = bool=>not( something ).


        WHILE bool=>bool( something ).


        This isn't perfect either but hopefully it's easier to read and digest...

        •                             Glen Simpson wrote:

          Here's an alternative that is shorter but equally mind-bending: πŸ˜›

          DATA(lv_flag2) = xsdbool( lv_flag1 EQ abap_false ).

          I firstly wrote:

          DATA(lv_flag2) = boolc( lv_flag1 EQ abap_false ).

          But for some reason I thought it was not right. It must be Monday πŸ˜€

  • Hello Horst Keller,

    Do you know if there is any plans to enhance the support for Parameterized tests in ABAP Unit using test data containers (ETDC objects from transaction SECATT)?

    Currently this is done using an API to read the TDCs. It would be nice if it was integrated in a way that the test class would recognize the TDC and treat each variant as one test case somehow.

    Best Regards,


    • Hello Guilherme,

      as far as I can see there are no concrete plans to enhance the support for parameterized tests in ABAP Unit. So at present one needs to stick to techniques like you mentioned or shown in report RS_AU_SAMPLE_PARAMETERIZED_TST.

      Best Regards


      • Hello Klaus,

        Thanks for your answer. It is not one that makes me happy though πŸ™ .

        I think this would be a well appreciated feature for the Testing community.

        If one day you decide to include it, I would gladly participate as tester or evaluate early stage designs.

        Best Regards,


    • Hi,

      I've read the SAP Insider article regarding the NW 7.5 news,

      but I must say it felt more like what's new in NW 7.4 SP05 than what's new in NW 7.5 πŸ˜†

      • >but I must say it felt more like what's new in NW 7.4 SP05 than what's new in NW 7.5

        I also had the impression, that apart from the new features for CDS/AMDP there are not many things, which were not available in 7.4 via SPs.

        But it's not because there are no new developments, but simple the ABAP group is nice enough to downport them to 7.4 πŸ™‚

        • there are not many things, which were not available in 7.4 via SPs.

          I see more than you can see


          Wait, wait a little while ...


          • >I see more than you can see

            With such resolution I'm pretty sure ... or maybe something is wrong with my eyes πŸ˜€

            But it sounds promising.

            >Wait, wait a little while ...

            I'll do. But it's not so easy πŸ™‚

          • Hello,

            can you imagine to organize a Open SAP course about all this topics? Maybe together with some of your colleagues? e.g. Sascha Krüger?

            I would certainly be enrolled....

          • I can imagine an Open SAP course about all these topics, but not organized by me. B.t.w., there is a TechEd session about this and maybe those guys ...

  • Great thing.

    But I have a problem using the combination of CORRESPONDING and FILTER:

    I constucted this logic first:I filter data from one table in some 'temporary' table and append it to a 'total' table:

        DATA(lt_sm_temp) =  FILTER #( lt IN lt_filter_sm

                                         WHERE otype = otype ).

        lt_sm = CORRESPONDING #( BASE ( lt_sm ) lt_sm_temp ).

    This works fine!

    And then I put it all together, because that should be the way to go:

        lt_sm = CORRESPONDING #(

                   BASE ( lt_sm )

                   FILTER #( lt IN lt_filter_sm

                                WHERE otype = otype ) ).

    I can activate this, so the syntax is correct. But I get a shortdump executing it ...

    Am I doing anything wrong?



    • I think I remember that one, there was an SCN discussion about it and the bug was reported to development.

      I'd say it is corrected with a kernel patch meanwhile. In my 7.50 development system it runs OK while with an older 7.40 kernel it dumps.

  • Hi,

    for some time we are in 7.40 SP8 and notice something strange: we want to replace a character with a SPACE, but it seems the REPLACE doesn't do that correctly:

    DATA: lv_string(1024) TYPE c VALUE 'Dit is dus dat teken@en dat staat hier@ook'.

    REPLACE ALL OCCURRENCES OF '@' IN lv_string WITH '  ' " space

              REPLACEMENT COUNT  DATA(lv_cnt).

    I tried the same thing in our intake on 7.50 with the same result.

    We really have hundreds of shese statements, so it must have worked, I guess.

    Are we doing something wrong or has anything happened since the last upgrade?



    • Works as "designed" ( 😐 ) and as always before, doesn't it?

      Please see the good ol' Trailing Blanks in Character String Processing and then REPLACE:

      "in the case of new it is ignored. "

      And last but not least REPLACE pattern IN:


      To be replaced by character-like content that contains trailing blanks, new has to have the data type string.

      (OK, the English translation is a bit awkward here, but I guess you can read the German original too)

      • Actually, I've checked it right now in NW 7.02 and it seems to work just fine.



        To be replaced by character-like content that contains trailing blanks, new has to have the data type string.

        I must say I didn't understand why it means that the whole replace is being ignored.

        As far as I understand, it only means that trailing blanks are ignored.

        i.e. in this example,'@' should be replaced with none (actually it will be removed).

        • seems to work just fine

          Depends on what you expect.

          You expected the right thing. Trailing blanks are ignored, therefore @ is replaced with an empty string.

          Kris expected wrongly that the blank is preserved in a replacement with type c. Instead he has to use type string.

      • Oh ... then I wonder whether people know what they are doing when testing this.

        Do you see the difference with this? Here 'other' quotes ("`" the accent grave in french) are used, not the regular ones "'" and this seems to work.

          REPLACE ALL OCCURRENCES OF '@' IN lv_string WITH ` ` " space

                  REPLACEMENT COUNT  DATA(lv_cnt).

        Bizar, isn't it?

        Thanks for the reply.


        • Bizar, isn't it?

          No, not at all!

          There is a well documented difference between data type c and data type string.

          And we have two types of character literals: text field literals ('...') and text string literals (`...`).

          And a lot of hints about the trailing blank stuff, e.g. in the literal chapter:

          • Trailing blanks in text field literals use memory, but are generally ignored in operand positions, like for all data objects of the type c. In text string literals they are always relevant, as in all data objects of type string.

          I am really a little bit concerned  that this is not common knowledge (strings were introduced with release 4.6!).

  • Hi Horst!
    Are there any plans to create an analogue to the LINES OF internal_tableΒ for use in constructor expressions?

    For example, supposed I’m attempting to perform packet processing of a large internal table like this:

    DATA(idx_from) = 1.
    DATA(idx_to) = packet_size.
    WHILE idx_to LT lines_in_some_big_table.
        REFRESH lt_packet[].
        INSERT LINES OF lt_some_big_table FROM idx_from TO idx_to INTO lt_packet.
        "... Do some stuff using lt_packet.
        ADD packet_size TO: idx_to, idx_from.

    It’d be nice if I could do something like this:

    WHILE idx_to LT lines_in_some_big_table
        lt_packet =  LINES OF #( some_big_table 
    				FROM idx_from 
    				TO idx_to ).
       ".... Do some stuff
        ADD packet_size TO: idx_to, idx_from.

    One can easily see how this would compose very nicely to with anΒ iterative expressionΒ to provide a short and concise way to express something that is rather idiomatic to ABAP programming.