10-21-2008 11:19 AM
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!
10-21-2008 11:21 AM
Hi,
Its just a normal declaration. Some people use this format.
Thanks & Regards,
Navneeth K.
10-21-2008 11:21 AM
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
10-21-2008 11:21 AM
Hi,
Its just a normal declaration. Some people use this format.
Thanks & Regards,
Navneeth K.
10-21-2008 11:22 AM
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.
10-23-2008 7:59 AM
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
10-23-2008 8:33 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
01-08-2009 7: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!
10-21-2008 11:21 AM
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.
10-21-2008 11:22 AM
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