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

Internal table


i want to use an internal for USR02.

In type definition, i wrote :

types: begin of s_usr02,

bname type usr02-bname,

end of s_usr02.

In OnInitialisation, i wrote :

data : tb_usr02 type table of s_usr02.

All is ok but in the layout, i cannot access it. It says :

"tb_usr02 is neither specified under tables nor defined as an internal table"

What can i do ?


Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jun 16, 2004 at 03:43 PM

    Hi Cédric,

    The answer is in the question. :-o

    You declared tb_usr02 under OnInitialization, so You declared tb_usr02 locally for OnInitialization event



    If you want to see your internal table from each event (and you don't want to create a structure and a table type under DDIC), you need to declare a table type under types:

        type standard table of s_usr02
        with default key

    and declare tb_usr02 under page attributes:

    tb_usr02 type ty_t_usr02

    Enjoy yourself.

    Dany 😊

    Add a comment
    10|10000 characters needed characters exceeded

    • hallo Cédric,

      First when you write "data:" you are declaring local variables in on method. Each onX event is one method in generated class. At the end of that method local data (which was on the stack) is gone! This is way you table did not work.

      The advice you received before should have been enough for you to crack this problem. I would seriously recommend reading a good ABAP book.

      On the


      tab, do the following:
      types: t_bname type standard table of usr02-bname.

      On the


      tab, do:

      bnames TYPE T_BNAME


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.