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 vbep-wmeng and *vbep-wmeng

Former Member
0 Likes
1,786

What is the basic differnce between vbep-wmeng and *vbep-wmeng which is generally found in standard programs.

Can anybody through some light on this.

Regards,

Dharani.

1 ACCEPTED SOLUTION
Read only

gopi_narendra
Active Contributor
0 Likes
1,570

Hi,

This statement declares an additional table work area *table_wa, whose data type, like that of normal TABLES statements of flat, structured data type table_wa, is copied from the ABAP Dictionary.

The additional table work area can be used like the normal table work area. This applies in particular to obsolete short forms of Open SQL statements.

The statement TABLES cannot be used in classes. For declaring as many work areas as you want, you can use the addition TYPE to use the data types in the ABAP Dictionary.

Example

Declaration of a normal and additional table work area and its use in <b>obsolete</b> short forms of the SELECT statement.

TABLES: scarr, *scarr.

SELECT SINGLE *

FROM scarr

WHERE carrid = 'LH'.

SELECT SINGLE *

FROM *scarr

WHERE carrid = 'UA'.

Please note that this type of declaration is <b>OBSOLETE</b>

Regards

- Gopi

What is the basic differnce between vbep-wmeng and *vbep-wmeng which is generally found in standard programs.

Can anybody through some light on this.

Regards,

Dharani.

3 REPLIES 3
Read only

uwe_schieferstein
Active Contributor
0 Likes
1,570

Hello Dharani

The following coding was copied from report SAPFV45E.

* Hauptposition

data: begin of hvbap.
        include structure vbapvb.
data: end of hvbap.
data: begin of *hvbap.
        include structure vbapvb.
data: end of *hvbap.

The <*structures> are identical to their corresponding <structures>. They are frequently used <b>to compare old data vs. new or changed data</b>.

For example, when the report was started hvbap and *hvbap were filled with the same data read from the DB table. Now when the user changes data in the dialog these changes are collected in hvbap. Finally, hvbap and *hvbap are compared to see if data were indeed changed and have to be updated in the DB table.

I think with respect to ABAP-OO we should not use this <*structure> variables anymore.

Regards

Uwe

Read only

Former Member
0 Likes
1,570

Hi Dharani,

When you need two distinct work areas of the same database table in your program, you can use two tables declarations like

Tables: mara, *mara.

Typical use is on a screen, that has a table control. Here same table fields may appear on the main screen as well as in the table control. You use normal work area ( mara) to refer to main screen fields and the other work area ( *mara) for table control fields.

Hope this will help.

Regards,

Ferry Lianto

Read only

gopi_narendra
Active Contributor
0 Likes
1,571

Hi,

This statement declares an additional table work area *table_wa, whose data type, like that of normal TABLES statements of flat, structured data type table_wa, is copied from the ABAP Dictionary.

The additional table work area can be used like the normal table work area. This applies in particular to obsolete short forms of Open SQL statements.

The statement TABLES cannot be used in classes. For declaring as many work areas as you want, you can use the addition TYPE to use the data types in the ABAP Dictionary.

Example

Declaration of a normal and additional table work area and its use in <b>obsolete</b> short forms of the SELECT statement.

TABLES: scarr, *scarr.

SELECT SINGLE *

FROM scarr

WHERE carrid = 'LH'.

SELECT SINGLE *

FROM *scarr

WHERE carrid = 'UA'.

Please note that this type of declaration is <b>OBSOLETE</b>

Regards

- Gopi