Skip to Content

Interesting itab(*) syntax in a custom program

Hi fellow ABAP developers!


I have just spotted a bit of ABAP in a bespoke report program that has me flumoxed.


This is it (with some anonymization);

*----------------------------------------------------------------------------------------------------

TYPES: tt_chg_ptrs_in TYPE STANDARD TABLE OF bdcp,

tt_ztable TYPE SORTED TABLE OF ztable WITH UNIQUE KEY matnr.

DATA: l_it_chg_ptrs_in TYPE tt_chg_ptrs_in,

l_it_ztable TYPE tt_ztable.

IF l_it_chg_ptrs_in(*) IS NOT INITIAL

OR l_it_ztable[] IS NOT INITIAL.

.

.

ENDIF.

*----------------------------------------------------------------------------------------------------

The (*) appendage appears to behave in the same way as the [] variant when refering to the complete set of itab entries. I checked this out in debug just to be certain that the l_it_chg_ptrs_in(*) reference returned the same data as l_it_chg_ptrs_in[].

Is this a new (or old) lanuage element?


Who can shed some light on this for me?


Cheers all,

Mike

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Mar 13, 2014 at 03:18 PM

    Maybe @Horst Keller would know, let's see if he can be paged...


    Thomas

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 13, 2014 at 02:56 PM

    Weird,

    I just checked what this syntax does in de debugger, but it seems to be exactly the same as without (*)

    I'm guessing this is used in other programming languages and the abap compiler just doesn't mind.

    Kind regards, Rob Dielemans

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 13, 2014 at 10:51 AM

    Welcome to 7.40, this syntax is explained in table_exp - Table Expressions. (can be found from changes in Release 7.40 in ABAP - Release-Specific Changes.)


    Regards,

    Raymond

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.