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: 

TYPING : CLEAR or REFRESH needed ?

Former Member
0 Kudos

Hi,

When you define data with a LIKE you must initiate them first (CLEAR, REFRESH) before using. Is this also the case when you're using TYPING for your DATA declarations ?

Thanks in advance,

Rob Makelaar

2 REPLIES 2

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

There is nothing forcing you to initialize any memory area within an application before using it, wheter it is a variable, or internal table. Also, you would use CLEAR or REFRESH at anytime in your program where you want to clear out the contents of the varible, whether it is defined using LIKE or TYPE, doesn't matter.

Regards,

Rich Heilman

Former Member
0 Kudos

It doesn't matter if you are using LIKE or TYPE. However, it is best practice to use CLEAR and REFRESH wherever necessary for e.g.:

Internal table with header line:

clear itab.

read table itab with key...

data: itab type mara occurs 0 with header line.

refresh itab.

select statement...

Thanks,

SKJ