Skip to Content
author's profile photo Former Member
Former Member

TYPING : CLEAR or REFRESH needed ?

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Sep 07, 2007 at 01:17 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 07, 2007 at 01:35 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.