Application Development 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: 

What does an asterisk (*) before a field mean?

Former Member
0 Kudos

Hi all,

I encountered this line of code:

IF variable NE *variable.

...

...

ENDIF.

This is the first time I encountered a variable with an asterisk (*) before it.. What does it mean? Thanks!

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Its just a normal declaration. Some people use this format.

Thanks & Regards,

Navneeth K.

8 REPLIES 8

Former Member
0 Kudos

hi,

with an asterisk (*) before a variable means it is ot displaying the total thing and the space has to be increased in the screen to display the particular variable

Former Member
0 Kudos

Hi,

Its just a normal declaration. Some people use this format.

Thanks & Regards,

Navneeth K.

0 Kudos

For example, if i have to compare 2 work areas of vbak, i will declare one as wa_vbak and other as *wa_vbaak.

Putting (*), is just one of the type of declaring variables convention.

0 Kudos

Okay so far everyone just said that it is just another way to declare a variable... But I think what I need to know is when to use it in terms of coding standards..

For example, I need two variables, why should I use var1 and *var1 instead of just var1 and var2.

Thanks!

Edited by: Ricardo R. Caliolio, Jr. on Oct 23, 2008 2:59 PM

Edited by: Ricardo R. Caliolio, Jr. on Oct 23, 2008 3:00 PM

0 Kudos

Hi Ricardo,

You can find such declaration in mostly SAP Module Pool Programs.

The purpose:

Lets say in MM02

In the screen, you have input box like MARA-MEINS, MARA-MTART etc.

When the screen is loaded, data is selected to MARA and the same data is copied to *MARA.

When user changes anything in Screen , fileds of MARA are changed, but *MARA still has the old data.

When SAVE button is clicked, its checked whether MARA <> *MARA, if yes, data is saved.

TABLES: MARA, *MARA

*MARA is used, as we cannot have two similar tables with same name, hence this is the SAP way of coding.

Edited by: Swastik Bharati on Oct 23, 2008 9:34 AM

>

> Hi Ricardo,

>

> You can find such declaration in mostly SAP Module Pool Programs.

>

> The purpose:

>

> Lets say in MM02

> In the screen, you have input box like MARA-MEINS, MARA-MTART etc.

>

> When the screen is loaded, data is selected to MARA and the same data is copied to *MARA.

>

> When user changes anything in Screen , fileds of MARA are changed, but *MARA still has the old data.

>

> When SAVE button is clicked, its checked whether MARA <> *MARA, if yes, data is saved.

>

> TABLES: MARA, *MARA

>

> *MARA is used, as we cannot have two similar tables with same name, hence this is the SAP way of coding.

>

> Edited by: Swastik Bharati on Oct 23, 2008 9:34 AM

Thanks a lot!

Former Member
0 Kudos

Hello,

ON *-INPUT

- The ABAP/4 module is called if the user has entered the u201C*u201D in the first character of the field, and the field has the attribute *-entry in the screen Painter.You can use this option in Exceptionla cases where you want to check only fields with certain Kinds of Input.

Former Member
0 Kudos

Hi,

It is just another work area, usually used to have two work areas for the same database table.

Such as

tables: vbak, *vbak.

You can select into and refer to entries from either vbak or *vbak.

Darren