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

internal table

hi all

this is amit from gurgaon. i m a new enterant to this wide world of SAP field. i want to know abot internal table.

i expect awarm response from u expert guys.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jun 16, 2005 at 05:54 AM

    Hi Amit,

    Welcome to SAP and to SDN. Hope you find it irresistably interesting!!:-)

    Here's the link which tells you all you need to know about internal tables -

    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb35de358411d1829f0000e829fbfe/frameset.htm

    Regards,

    Anand Mandalika.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 16, 2005 at 05:54 AM
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 16, 2005 at 06:22 AM

    Dear

    Internal types are just like table which you see in Microsoft Word with heading for example

    Empno ename job salary deptno

    -


    -


    -


    -


    -


    1 SMITH MANAGER 2000 10

    2 WARD ANALYST 3000 20

    3 ALLEN CLERK 1500 10

    4 ZEESHAN PRESIDENT 5000 30

    you can get data from tables and put it in internal table for future use. at run time the data i fetch from database into internal tables.

    after that you get the data from internal table line by line and process it.

    There are three table kinds:

    - standard tables,

    - sorted tables

    - hashed tables

    most of the time standard tables are used.

    if you want to declare an internal table based on a database table the syntex would be like this

    DATA itab_scarr type standard table of scarr.

    here itab_scarr is an internal table and has the same columns which scarr table has.

    now i will give you an example of internal table

    DATA itab_scarr TYPE STANDARD TABLE OF scarr.

    DATA wa_scarr TYPE scarr.

    SELECT * FROM scarr

    INTO TABLE itab_scarr.

    LOOP AT itab_scarr INTO wa_scarr.

    WRITE: / wa_scarr.

    ENDLOOP.

    -


    second example

    you can also define an internal table on the base of you own type for example

    TYPES: BEGIN OF template,

    a TYPE c,

    b TYPE c,

    c1 TYPE c,

    END OF template.

    DATA itab_template TYPE STANDARD TABLE OF template.

    DATA wa_template TYPE template.

    wa_template-a = 'A'.

    wa_template-b = 'B'.

    wa_template-c1 = 'C'.

    APPEND wa_template TO itab_template.

    wa_template-a = 'C'.

    wa_template-b = 'E'.

    wa_template-c1 = 'F'.

    APPEND wa_template TO itab_template.

    wa_template-a = 'G'.

    wa_template-b = 'H'.

    wa_template-c1 = 'I'.

    APPEND wa_template TO itab_template.

    LOOP AT itab_template INTO wa_template.

    WRITE: / wa_template.

    ENDLOOP.

    here you find another type that is wa_template that only hold one line at a time you store the value into wa_template then append (insert at the end) it to internal table.

    if you want to know the operations on internal table replay be back.

    Rai

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 16, 2005 at 08:20 AM

    Hi,

    If u want to learn with sample programs u can goto <b>/oABAPDOCU</b> and u will get lots of sample codes, u can aslo execute and check with the results.

    Check this link

    internal-tables

    Please reward and close the thread if u have got sufficient info.

    Thanks & Regards,

    Judith.

    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.