DATA BASE TABLE AND INTERNAL TABLE

Dear Friends,
please help me out in getting complete information about database table and internal table.
you can email me at < Removed by moderator - please maintain e-mail iDs in Business Card>
Message was edited by:
        Arun Varadarajan

Hi Hazi,
<b>DATABASE Tables :</b>
This are the tables which are stored in the database (eg Oracle , informix , DB2 etc..) Physically. u can view it from T-codes SE11 or SE16. here in SE11 u can create ur own Transparent table.
for more information...
http://www.sapbrainsonline.com/TUTORIALS/TECHNICAL/dictionary_tutorial.html
<b>Internal Tables.</b>
While generating reports or other objects we are not modifying the database tables directly first we are selecting the data of the database table into the internal tables... so that we can reduce the database access time and network traffic .. which is highly needed in R/3 system..
internal tables are not exist phyiscally in the system. its like a array. the existance of the internal tables is upto the program execution in which u r declaring nd using it...
for more information..
http://www.sapbrainsonline.com/TUTORIALS/TECHNICAL/internaltables_tutorial.html
Hope it will solve ur problem..
<b>Reward points if useful..</b>
Thanks & Regards
ilesh 24x7

Similar Messages

  • Creating MS- Access data base from the Internal tables data of an ABAP Prog

    Hi,
    I have a requirement where I have to create Access tables from the Internal tables of ABAP program.
    The tables are like Project systems Header data, WBS elements data, Netwrok data, Activity data, Milestone data and Project revunes. I will have the internal tables for these. I want to transfer these tables data into MS-Access tables onto Users desktop.
    Please adivce me how to do this.
    Thanks,
    Prabhakar

    HI,
    I am trying to create a DB table in the access but I am not successful. The following is the format of the table needs to be created from the ABAP program.
    I have created a table with the following format in MS-Access with the name tblHeader. Is it neccessary to create a DB table ( MS-Access) in advance or by using the FM  STRUCTURE_EXPORT_ TO_MSACCESS  we need to create a structure in MS-Access?
    False tblHeader
    Field Name Type Length
    ProjectDef Text 255
    ProjectDes Text 255
    Created Text 50
    Change Text 50
    RespPerson Text 255
    Profile Text 255
    Plant Text 255
    ObjNo Text 255
    OverheadKey Text 255
    I have created a Z table ZTAB1 with the same format from the SAP fields.
    MS-Access Table name : tblHeader
    ABAP program Internal table : t_tblheader
    Z table Name : ZTAB1.
    First I am trying to create a structure in MS-Access with the following FM.
    CALL FUNCTION 'STRUCTURE_EXPORT_ TO_MSACCESS'
    EXPORTING
    dbname = 'D:\test\db2'
    LANGU = SY-LANGU
    dest = 'PS_ACCESS_1'
    TABLES
    tabname = ttblheader
    EXCEPTIONS
    system_failure = 1
    comm_failure = 2
    OTHERS = 3
    Table ttblheader type is DFIES and I am filling the table with only one record and one field i.e TABNAME and the value is ZTAB1.
    The source code of the FM is using another FM
    CALL FUNCTION 'MSACCESS_STRUCT_ EXPORT_RFC' DESTINATION DEST
    Here I am getting the Error message Object required. I can't able to create a table structure in MS-Access.
    Next I am going to Use the FM
    'TABLE_EXPORT_ TO_MSACCESS'
    and it will create the records in the MS-access table.
    CALL FUNCTION 'TABLE_EXPORT_ TO_MSACCESS'
    EXPORTING
    dbname = 'D:\test\db2'
    langu = sy-langu
    dest = 'PS_ACCESS_2'
    tabname = 'ZTAB1'
    reftable = 'tblheader'
    FLG_NO_DOWNLOAD = ' '
    FLG_APPEND = ' '
    FLG_POPUP = ' '
    TABLES
    dtab = t_tblheader
    here t_tblheader is the internal table.
    Reftable = tblheader is the table which i have created in advance. ( not by using the First FM)
    In this FM i am getting a error message : Unable to connect to Database D:\test\db2.
    Please help me how to create the MS-Access database.

  • REG:Internal table and Database table

    Hi Xperts,
    Can you tell me /give me a sample code so as to
    Compare the data present in the database table and internal table.i.e
    Wheher the data in the db table matches with the data in the internal table
    Thanks.

    Hello,  
    First make sure that data is there in the internal table
    TABLES : Declare your table example MARA, VBAK etc
    TYPES: BEGIN OF ITAB1,
    Declare your fields here
    example
    v_mat(10) type c,
    v_code(5) type I,
    END OF ITAB1.
    IF NOT ITAB[] is INITIAL.
    LOOP AT
    END IF.
    To compare the data with DB tables, read the database table and copy into the internal table ITAB2
    Then compare the ITAB and ITAB1
    IF ITAB1[] = ITAB2[]
    END IF
    See these links for [Creating Internal Tables|http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3660358411d1829f0000e829fbfe/content.htm]
    [Comparing Internal Tables|http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3841358411d1829f0000e829fbfe/content.htm]
    See this for more about [Processing Internal Tables|http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb36ae358411d1829f0000e829fbfe/content.htm]
    Declaring the internal table in ABAP objects
    [Thanks|http://chandranonline.blogspot.com/]
    [Chandran|http://chandranonline.blogspot.com/]

  • How to bring data from 3 different internal table to one

    hii all,
              i have 3 internal table ls_mat,which has around 20 fields,it_stpo,which has 3 fields,and it_mast,i need to bring all these 3 table data in one tabel...how do i do...plzz help...

    Hi ,
    Does this internal table have any fields in common in all the three.
    If yes , then loop ls_mat
    Declare a type will all the fields and create a structure and internal table with that type (for ex lx_final and lt_final respectively)
    Loop at ls_mat into lx_mat.
    1.copy all the fields of lx_mat to respective lx_final.
    2.read table it_stpo into lx_stpo with key field = lx_mat-field.
    3.Copy all fields of lx_stpo to respective lx_final.
    4. read table it_mast into lx_mast with key field = lx_mat-field.
    5. copy all fields of lx_mast to respective lx_final.
    6. now append lx_final to lt_final.
    Endloop.
    now you can get all values inside lt_final.
    Regards,
    sivaganesh

  • How to transfer data from a dynamic internal table

    Hi All
    I want to transfer data from a dynamic internal table<dyn_table>
    to a non dynamic internal table itab which should have the same structure as <dyn_table>.
    How can this be done?
    Regards,
    Harshit Rungta

    As stated earlier this can be done only through field symbols...
    You cannot create an non dynamic internal table with ANY structure...using DATA statement
    If the strucutre is defined well and good...you can create an non-dynamic internal table...
    If you do not know the structure then the internal table has to be dynamic...and to be generated using field symbols
    DATA: lv_ref TYPE REF TO data.
    FIELD-SYMBOLS: <fs_dyn_table> TYPE STANDARD TABLE.
    * You create a dynamic internal table...
    CREATE DATA lv_ref LIKE (your_dynamic_internal_table).
    ASSIGN lv_ref->* TO <fs_dyn_table>.
    Now...do the transfer.
    <fs_dyn_table> = "your_dynamic_internal_Table
    Hope it helps!

  • SAP QUERY LOOPS AND INTERNAL TABLE

    Hi All, I have a query which i have made. It runs from Table EKPO which has PO details and what I want to do is now via ABAP Code pull through the total of goods receipt for the PO and Line Item into a field. Sounds Easy enough..Problem now,
    The table which contains the GR data is EKBE which agains a PO and Line Item can have many 101 movements and 102 movements so what I want is an ABAP Statent to basically sum up the total of 101 for the PO & LINE ITEMS and then minus this from the total of 102 for the PO & LINE ITEMS and post the result in to this new field I have created.
    I am pretty decent with ABAP Code in Querys I.e Select statements etc but from what I can see i need to create an internal table and do a loop and collect statement but I keep on failing due to not enough knowledge. Please can some one help me with this and provide me with the code and explanation as i would like to understand,
    POINTS WILL BE REWARDED
    Thanks
    Kind Regards
    Adeel Sarwar

    Hi,
    This is the full code i have entered but its not working. Any help would be appreciated. If you could rectify the code and internal tables that would be great.
    Thanks
    TABLES: EKBE.
    DATA: PurO LIKE EKPO-EBELN,
          POLI LIKE EKPO-EBELP.
    *New Table and Vars defined
    DATA:   BEGIN OF IT_EKBE,
              IT_EKBE LIKE EKBE,
            END OF IT_EKBE.
    DATA:  BEGIN OF IT_SUM OCCURS 0,
              EBELN TYPE EBELN,
              EBELP TYPE EBELP,
              DMBTR TYPE DMBTR,
              MENGE TYPE MENGE,
          END OF IT_SUM.
    CLEAR: QTYD.
    MOVE: EKPO-EBELN TO PurO,
          EKPO-EBELP TO POLI.
    SELECT * FROM EKBE INTO IT_EKBE
        WHERE EBELN = PurO
        AND   EBELP = POLI
        AND   BEWTP = 'E'
    LOOP AT IT_EKBE.
      MOVE CORRESPOING IT_EKBE TO IT_SUM.
      IF IT_EKBE-BWART = '102'.
        IT_SUM-DMBTR = IT_SUM-DMBTR * -1.
        IT_SUM-MENGE = IT_SUM-MENGE * -1.
      ENIDF.
      COLLECT IT_SUM.
      CLEAR IT_SUM.
    ENDLOOP.
    ENDSELECT.
    If sy-subrc = 0.
      QTYD = IT_SUM.
    ELSE.
      QTYD = 0.
    ENDIF.

  • Export - Import In ABAP ( for variables and internal table)

    how can we pass value for the variable and internal table using Export and Import?
    data: var type sy-uzeit.
    var = sy-uzeit.
    EXPORT var TO MEMORY ID 'TIME'.
    data: var type sy-uzeit.
    IMPORT var FROM MEMORY ID 'TIME'.
    write:/ var,sy-subrc,sy-uzeit.
    i found var value 0 while importing. 
    what is the right syntax for passing value of variable and internaltable.
    regards,
    dushyant.

    Hi,
    There are two possible solutions.
    Solution1:
    Program1.Should be run before atleast once so that TIME should be filled.
    data: var type sy-uzeit.
    var = sy-uzeit.
    EXPORT var TO MEMORY ID 'TIME'.
    Program2.IF the TIME is filled,then only it will produce the result.
    data: var type sy-uzeit.
    clear var.
    IMPORT var FROM MEMORY ID 'TIME'.
    write:/ var, sy-subrc, sy-uzeit.
    Solution2:
    Single program:
    data: var type sy-uzeit.
    var = sy-uzeit.
    EXPORT var TO MEMORY ID 'TIME'.
    clear var.
    IMPORT var FROM MEMORY ID 'TIME'.
    write:/ var, sy-subrc, sy-uzeit.
    Kindly reward points by clikcing the star on the left of reply,if it helps.

  • DIFF: Field string ,Structure and Internal table declaration

    Hai,
           what is the diference between  Field string ,Structure in ABAP program and Internal table declaration and how it will work ?
    Thank you
    ASHOK KUMAR.

    hi,
    Look this u will get a good idea.
    *& Report  ZTYPES                                                      *
    REPORT  ZTYPES                                                  .
    * Table declaration (old method)
    DATA: BEGIN OF tab_ekpo OCCURS 0,             "itab with header line
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
    END OF tab_ekpo.
    *Table declaration (new method)     "USE THIS WAY!!!
    TYPES: BEGIN OF t_ekpo,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
    END OF t_ekpo.
    DATA: it_ekpo TYPE STANDARD TABLE OF t_ekpo INITIAL SIZE 0,      "itab
          wa_ekpo TYPE t_ekpo.                    "work area (header line)
    * Build internal table and work area from existing internal table
    DATA: it_datatab LIKE tab_ekpo OCCURS 0,      "old method
          wa_datatab LIKE LINE OF tab_ekpo.
    * Build internal table and work area from existing internal table,
    * adding additional fields
    TYPES: BEGIN OF t_repdata.
            INCLUDE STRUCTURE tab_ekpo.  "could include EKKO table itself!!
    TYPES: bukrs  TYPE ekpo-werks,
           bstyp  TYPE ekpo-bukrs.
    TYPES: END OF t_repdata.
    DATA: it_repdata TYPE STANDARD TABLE OF t_repdata INITIAL SIZE 0,   "itab
          wa_repdata TYPE t_repdata.                 "work area (header line)
    Regards
    Reshma

  • Difference between the Field Group  and Internal Table.

    Hi all,
    Can anybody tell me the difference between the Field group and Internal table and when they will used?
    Thanks,
    Sriram.

    Hi
    Internal Tables: They are used to store record type data in tabular form temporarily in ABAP programming. Or we can say, it stores multiple lines of records for temporary use in ABAP programming.
    A field group is a user-defined grouping of characteristics and basic key figures from the EC-EIS or EC-BP field catalog.
    Use
    The field catalog contains the fields that are used in the aspects. As the number of fields grows, the field catalog becomes very large and unclear. To simplify maintenance of the aspects, you can group fields in a field group. You can group the fields as you wish, for example, by subject area or responsibility area. A field may be included in several field groups.
    When maintaining the data structure of an aspect, you can select the field group that contains the relevant characteristics and basic key figures. This way you limit the number of fields offered.
    Regards
    Ashish

  • Difference between line type and internal table?

    Hi..
    I wanted to know, what is the difference between Line type and Internal Table?

    Hi,
        Before the 4.7 release in SAP if we want to define an internal table we have to write the defination using the occurs statement and we need to define all the fields using INCLUDE STRUCTURE or indidually all the fields ine by one.
    From 4.7 release of R/3 SAP introduced the Line type concept and it's part of the ABAP OOPS concept. for internal table defination we don't need to use the occur statements. Instead INCLUDE structure  we need to create a Line type for that structure in Se11 and then we can define the internal table like :
    DATA : ITAB TYPE TABLE OF <LINE_TYPE>.
    Only thing is this table will be  a table without header. So for internal table processing we need to define a work area structure of type line of line type  . EX:
    DATA: WA_ITAB TYPE LINE OF <LINE_TYPE>.
    Hope this helps.
    Thanks,
    Greetson

  • Group by and internal table

    Hi everyone,
    Please help me. Is it possible to select data from database table into an internal table with group by?
    For example:
    select carrid connid SUM(seatsocc)
    from sflight
    into(internal-table-carrid, internal-table-connid, sum)
    group by carrid connid
    where fldate between ***
    endselect
    thank you in advance!
    Linda

    yes,
    select carrid connid SUM( seatsocc )      
    from sflight                              
    into (sflight-carrid, sflight-connid, sflight-seatsocc)
    where fldate = sy-datum group by carrid connid
    endselect.     
    The problems with yours were:
    . no space after SUM(
    . group by in wrong spot (before where)
    Here's the into table version:
    data ts type table of sflight with header line.
    select carrid connid SUM( seatsocc ) as seatsocc
    from sflight                               
    into corresponding fields of table ts      
    where fldate = sy-datum group by carrid connid
    This is not the most efficient way though. It is probably better to select into a table and sort and aggregate into another table in abap.

  • Table types and internal table

    Hi all,
    What is the relationship between table type in ABAP dictionary and internal table?
    Moderator message : Search for available information OR read ABAP documentation. Thread locked.
    Edited by: Vinod Kumar on Jul 16, 2011 11:16 AM

    You can INCLUDE TYPE.
    Types: begin of itab,
           field1 type string,
           field2 type string,
    *      More Fields in here.
           Field30 type string,
           End of itab.
    Data: lt_itab type table of itab.
    TYPES BEGIN OF new_itab.
           INCLUDE type itab.
    TYPES: field31 type string,
           field32 type string,
    END OF new_itab.
    Regards,
    Rich Heilman

  • What is the difference betwee STRUCTRUE AND INTERNAL TABLE

    what is the difference betwee STRUCTRUE AND INTERNAL TABLE

    Hi
    <b>Internal table  </b>            
    Internal Tables are runtime objects.
    A.     The lines of an internal table always have the same structure
    B.     You have to define the structure of the internal table at the begining.
    C.     Internal tables require special work area for interface     
    Types:
    STANDARD table
    Key access to a standard table uses a linear search. This means that the time required for a search is in linear relation to the number of table entries.
    You should use index operations to access standard tables.
    SORTED table
    Defines the table as one that is always saved correctly sorted.
    Key access to a sorted table uses a binary key. If the key is not unique, the system takes the entry with the lowest index. The runtime required for key access is logarithmically related to the number of table entries.
    HASHED table
    Defines the table as one that is managed with an internal hash procedure
    You can only access a hashed table using the generic key operations or other generic operations ( SORT, LOOP, and so on). Explicit or implicit index operations (such as LOOP ... FROM oe INSERT itab within a LOOP) are not allowed.                                                                               
    <b> Structure         </b>                                                             
        Structure are data dictionary objects.     Tcode -SE11                                                                        
         No data records exist in the database for a structure. Structures are used for the interface definition between programs or between screens and programs.                                             
    Reward points if this helps.
    Manish
    Message was edited by:
            Manish Kumar

  • Passing SELECT-OPTIONS and Internal Tables to SUBROUTINES

    Hi Guys
    In the code below my colleague has created her own table types in order to pass a select option and internal tables to her subroutine. Is there an easier way of making them known to the subroutine.
    data : v_vbeln type vbeln_vf,
          it_bdoc type table of vbrp,
          it_t006 type table of t006a,
          wa_bdoc type vbrp,
          wa_t006 type t006a,
          it_bdoc2 type table of zsswathi_st_vbeln,
          wa_bdoc2 type zsswathi_st_vbeln
    select-options s_vbeln for v_vbeln matchcode object zswathi_vbeln obligatory.
    start-of-selection.
    perform bdoc using s_vbeln[]
                 changing it_bdoc
                          it_bdoc2
                          it_t006.
      loop at it_bdoc2 into wa_bdoc2.
    form bdoc using f_s_vbeln type ZSWATHI_ST_SELECT_OPTION_TA_TY       " all these are table types. for select options, a structure is created and then a table type for it is created.
            changing f_it_bdoc type zswathi_vbrp_ty_ta
                     f_it_bdoc2 type zswathi_vbeln_ty_ta
                      f_it_t006 type ZSWATHI_T006_TA_TY.
    select * from vbrp into table f_it_bdoc where vbeln in f_s_vbeln.
          if f_it_bdoc is not initial.
          select  vbeln sum( netwr ) prsdt from vbrp into table f_it_bdoc2 where vbeln in f_s_vbeln group by vbeln prsdt.
          sort f_it_bdoc2 by vbeln.
          "select * from t006a into table it_t006 for all entries in it_bdoc where msehi = it_bdoc-vrkme.
          select * from t006a into table f_it_t006 for all entries in f_it_bdoc where msehi = f_it_bdoc-vrkme.
       endif.
        endform.

    Hi Brett,
    1. you can use a select-options-range in a FORM subroutine also without passing it as a parameter because parameters and select-option range tables are global fields in their program.
    2. If you need a parameter, declare it as type table or type standard table or type any table. You do not need any special table type.
    Regards
    Clemens

  • How do we pass values and Internal tables to Sub-routines

    how do we pass values and Internal tables to Sub-routines

    Hi,
    You can use the USING..or TABLES..or Changing addition..
    Check this example.
    DATA: T_MARA TYPE STANDARD TABLE OF MARA.
    PERFORM DISPLAY USING T_MARA.
    FORM DISPLAY USING LT_MARA LIKE T_MARA.
    DATA: WA TYPE MARA.
    LOOP AT LT_MARA INTO WA.
      WRITE: / WA-MATNR.
    ENDLOOP.
    ENDFORM.
    Thanks
    Naren

Maybe you are looking for

  • Css text formatting

    most css text formatting options can be found under the font or text family of properties (ie font-size, font-family, text-align, text-shaddow ect) but there are a few which do not fall under the text or font properties letter-spaceing, line-height a

  • How do I change my iMessage Apple ID?

    So, I've had my Apple ID account for quite a few years now when I purchased my first iPhone. My Apple ID (which needs to be a valid email address) was my work email. I am no longer with that company so I'm no longer using that email address and neede

  • Check Partner Authorisation--Quantity Contract

    Hi, I have created a quantity contract with Sold To Party ( Partner Function SP)as 100276 and Sold To Party for release Order (  Partner Function AA)as 1000 and 100276.   I have selected Check Partner Authorisation as A in contract definition in VOV8

  • Interface FS preparation

    Hi, I am preparing FS for Interface (EDI) in rollout project we are upgrading. 4.7 to ECC 5.0. i need information as a functional consultant what we have to mention in FS. THANKS IN ADVANCE JAI

  • Computer name changed secretly

    I found that sometimes the computer name had been changed ... For example, from ABC to ABC (1). And if ABC (1) exists then the name changed to ABC (2). I don't know when it had been changed and it sometimes give me trouble. When time machine is used