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

What does this ABAP code do?

andrew_jacobs2
Participant
0 Likes
746

Hi,

I came across this ABAP code and I'd like to know what the asterisk (*) before the variable names does.

*mkpf = mkpf.

*mseg-lgort = mseg-lgort.

*ladr = ladr.

save_mkpf = *mkpf-usnam.

save_mblnr = *mkpf-mblnr.

save_budat = *mkpf-budat.

save_cpudt = *mkpf-cpudt.

save_ematn = *mseg-ematn.

save_lgort = *mseg-lgort.

save_ladr = *ladr.

*t001w = t001w.

save_werks = *t001w-werks.

save_name1 = *t001w-name1.

*ekko = ekko.

*am07m = am07m.

save_lifnr = *ekko-lifnr.

save_ebeln = *ekko-ebeln.

save_ekgrp = *ekko-ekgrp.

save_linam = *am07m-name1.

save_lina2 = *am07m-name2.

*t024 = t024.

save_eknam = *t024-eknam.

save_ektel = *t024-ektel.

*mkpf-usnam = old_mkpf.

*mkpf-mblnr = old_mblnr.

*mkpf-cpudt = old_cpudt.

*mkpf-budat = old_budat.

*mseg-ematn = old_ematn.

*mseg-lgort = old_lgort.

*ladr = old_ladr.

*t001w-werks = old_werks.

*t001w-name1 = old_name1.

*t024-eknam = old_eknam.

*t024-ektel = old_ektel.

*ekko-lifnr = old_lifnr.

*ekko-ebeln = old_ebeln.

*ekko-ekgrp = old_ekgrp.

*am07m-name1 = old_linam.

*am07m-name2 = old_lina2.

Thx.

Andy

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
695

It is a temporary buffering variable.

Regards,

ravi

3 REPLIES 3
Read only

Former Member
0 Likes
696

It is a temporary buffering variable.

Regards,

ravi

Read only

Former Member
0 Likes
695

Hi,

It is nothing but the Work Area. Check the below sample code.

report abcd.

tables: *vbak, vbak.

select single * from vbak into *vbak where vbeln <> space.

write *vbak-vbeln.

Regards,

Satya

Read only

matt
Active Contributor
0 Likes
695

The asterisk doesn't "do" anything. In older abap, it was used like:

TABLES: mara, *mara.

You then had two independent work areas with the structure of mara.