Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Difference between with table name with * and without *

Former Member
0 Likes
1,271

Hi..

I had seen some of the standard abap that the table name had *, like *ekpo. What is the meaning? What is the difference between with * and without * ?

Thanks and Regards,

Rishika

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,237

hi,

It just creates a work area with same structure.

No other difference as such.

reward if useful

preet

10 REPLIES 10
Read only

Former Member
0 Likes
1,237

Hi rishika,

' * ' is a wildcard character which is frequently used in sap to search for abap objects,

Example,

In se11(database table) if you type *ekpo,it will give you all the tables that ends with 'EKPO' like EKPO,ZEKPO,TXW_S_EKPO,etc depending upon the tables which exists in your database.

Hope this clarifies your doubt.

Best of luck,

Bhumika

Read only

Former Member
0 Likes
1,237

Nothing spl, it is just to declare a workarea.

Read only

0 Likes
1,237

Hi Subramanian,

Can you please give us some more knowledge on this..

Regards,

Sai

Read only

Former Member
0 Likes
1,237

Hi Rishika,

As far as my knowledge is concerned you cannot create a table with *. It says Table Name contains alpha numeric character. *ekpo displays all the tables that have ekpo string in them.

Regards,

Sai

Read only

Former Member
0 Likes
1,237

Hi rishika,

It just lets you use the table a second time. For example:

select single * from ekpo where ebeln = '12345' and ebelp = '1'.

select single * from *ekpo where ebeln = '67890' and ebelp = '1'.

You now have two separate records, one in ekpo and one in *ekpo.

Another way to do this is to simply use the 'into' argument in the 'select' statement to read the second ekpo record into some other field. The '*' format can be confusing, I think it may be left over from earlier releases, like 2.2.

Read only

Former Member
0 Likes
1,237

it will act like a work area.

no difference between them

Read only

Former Member
0 Likes
1,237

Hi Rishika.

I would like to suggest,

It does not really make a difference as it creates a work area with same structure.

I would like to suggest you a reference, it is quite the same as your case,

[SDN - Reference for Passing asterick with table name in program|;

Hope that's usefull.

Good Luck & Regards.

Harsh Dave

Read only

Former Member
0 Likes
1,237

Hi,

please check this:

TABLES:
  sflight, *sflight.                   "workarea's
DATA:
  t_sflight TYPE TABLE OF sflight.

PARAMETERS:
  p_carr TYPE sflight-carrid.

SELECT *
  FROM sflight
  INTO TABLE t_sflight
 WHERE carrid = p_carr.

LOOP AT t_sflight INTO *sflight.
  WRITE:/
    *sflight-carrid,
    *sflight-connid.
ENDLOOP.

*LOOP AT t_sflight INTO sflight.
*  WRITE:/
*    sflight-carrid,
*    *sflight-connid.
*ENDLOOP.

Here both the loop are same , with* means workarea.

Regards

Adil

Read only

Former Member
0 Likes
1,237

Hi rishika,

1. This is actually a facility provided in abap syntax.

2. It is usually checked while saving a record.

3. For eg.

If we have one variable

EKKO

and another *EKKO

(They both are same only, with same structure)

(but two different variables)

4. The functional meaning, for usage purpose,

of *EKKO is OLDEKKO.

5. While saving the transaction,

the data is saved only if there is any change

in the values.



IF EKKO <> *EKKO.
*--- SAVE
ELSE.
MESSAGE 'NO DATA CHANGED'
ENDIF.

6. We can aswell use any other variale

eg. oldekko

oekko

myekko

etc,

7. But for business meaning,

R/3 has the facility for *

*----


1. we can use almost everywhere.

2. just copy paste



report abc.

*--------------------------
TABLES : T001.
TABLES : *T001.

DATA : ITAB LIKE EKKO.
DATA : *ITAB LIKE EKKO.

DATA : NUM TYPE I.
DATA : *NUM TYPE I.


regards,

amit m.

Read only

Former Member
0 Likes
1,238

hi,

It just creates a work area with same structure.

No other difference as such.

reward if useful

preet