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

Regarding *CLEAR keyword*

Former Member
0 Likes
1,361

Hi experts,

While going thru a print program I came accross a statement

Clear : vbup,

vbrk,

adrc,......

As far as I know clear is used for internal tables , but here it is used on database tables. So can we use clear on database tables also ? If so what will that clear statement do ?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,334

Hi Kusuma,

As you know , we can declare work area using TABLES keword.

TABLES: vbup.

To clear such work area, we write

CLEAR vbup.

Hi experts,

While going thru a print program I came accross a statement

Clear : vbup,

vbrk,

adrc,......

As far as I know clear is used for internal tables , but here it is used on database tables. So can we use clear on database tables also ? If so what will that clear statement do ?

10 REPLIES 10
Read only

Former Member
0 Likes
1,334

I dont think u can clear db tables like that

regards

vivek

Read only

Former Member
0 Likes
1,334

Hi Kusuma,

clear vbak.

this statement clears the contents of vbak work area.

tables: vbak.

select single *

from vbak

into vbak

where vbeln = '121'.

for this statement vbak acts as work area and clear vbak means it will clear the work area.

kiran

Read only

Former Member
0 Likes
1,334

Hi,

clear statement clears only the work area.

it does not clear the body of the table/internal table.

Thanks & Regards'

sudheer

Read only

Former Member
0 Likes
1,335

Hi Kusuma,

As you know , we can declare work area using TABLES keword.

TABLES: vbup.

To clear such work area, we write

CLEAR vbup.

Read only

Former Member
0 Likes
1,334

Hello KIran,

So u mean clear here is used on database tables directly ?

Read only

0 Likes
1,334

no

it will clear work area only

Read only

0 Likes
1,334

Hi Kusuma,

Whenever you declare using statement Tables : vbap,vbak. A workarea gets created during the load of the program.You can use this as the workarea in your program.

Thanks,

Ahsan

Read only

0 Likes
1,334

Hi,

When you declare something like this:


Tables: vbap.

An internal table 'Vbap' is created with a header line.

If you use...

clear: vbap.

The header line of the internal table is cleared.

Regards.

Read only

Former Member
0 Likes
1,334

ok got it ... thanq for ur replies.

Read only

Former Member
0 Likes
1,334

Hi,

With the clear statement u can clear the work area of the internal table.

clear VBAK.

this statement will clear the header of the table VBAK. so that u can use the header in this case u need not to define an interrnal table of type VBAK.

Thanks & Regards

Ashu Singh