Skip to main content

INTERNAL TABLES.

                                    INTERNAL  TABLES:

Before moving to internal tables ,some  of the  STANDARD Database Tables(these tables are given by SAP default.) 
don not about database tables i will discuss in data dictionary.

  1.  T001 ------>   Company Codes Table.
  2.  KNA1 -------> Customer Master Table.
  3. LFA1  --------> Vendor Master Table.

SOME OF FIELDS IN  T001:
  1. BUKRS  ----->  Company Code.
  2. BUTXT  ------>Company Name.
  3. ORT01  -------> City.
  4. LAND1  ------> Country.
  5. SPARS   --------> Language.

SOME OF FIELDS IN  KNA1:
  1. KUNNR  ----->  Customer Number.
  2. NAME1 ------>Name  of the Customer.
  3. ORT01  -------> City.
  4. LAND1  ------> Country.
  5. SPARS   --------> Language.

SOME OF FIELDS IN  LFA1:
  1. LIFNR  ----->  Vendor Number.
  2. NAME1  ------>Name of the Vendor.
  3. ORT01  -------> City.
  4. LAND1  ------> Country.
  5. SPARS   --------> Language.

Need   Of  The  INTERNAL TABLES:

>> Main  reason to go internal tables.In real time  senario  we will not be  given  access to  database  table, because  if  any  company  gives  access to  database  they  may  change the  data  whic  is present  in  the  database.

>> suppose  there  are  two  tables 1. employees  salary,                                                                          2. employee details.    

   1.  employee salary  contains fields(columns)[empid,  empsalary].
   2   employee details  contains fields[empid,                                                                                                  empname,    empaddress].

if  you  are  given  a task  to  print  a  table  with  fields  from  both  the  tables  then  we  go   internal  tables.

Internal  table  are  temparary tables .which  are  used  only  for  particular task.


WORKAREA:

>>Work area  is  single  record  of  an internal table  through               work area only  we  can  write  into  an internal  table  and  read       from  the internal  table.
 DECLARING  THE  WORKAREA:
>>         Data :  Begin  of  EMP ,
                          EID(10)                  Type     C ,
                          ENAME(25)           Type     C,
                          EADDRESS(35)     Type     C,
                          End of  EMP.

>>  EID , ENAME , EADDRESS,  are  the  fields  in  the  EMP .
>>  This  above  one  row  is  called  as  record(details  of  single       employee).

SYNTAX  OF  declaring  the  structure or  internal table in ABAP editor:

     Data :  Begin  of   <structure/table name>,
                   list  of  fields,
                   list  of  fields,
                   end  of  <structure/table name>.

note:
  since   the  work area  can holds or stores  only  one  record.          so  we  go  for  internal table  at  a time.


Internal table:

>> Internal  Table  is the  collection  of  records.

>>Internal  table s  are  temporary  table  ,that  means  the  data  in the  internal  table  will not  save  anywhere  in  the  SAP.

>>Internal  table  are  dynamic memory  allocation  that means  we  need  not  provide  the  size  of  the  internal  table.

>> the  scope(accesability)  of  internal  table  is  upto  that  program.

Backend  Picture  of  Internal Tables:



Differences  between database table  and  internal  table.

          Database Table                                            Internal Table

1. Database  tables  are  perma-      1.  Internal tables  are 
    nent storage  location.                        temparary storage locat                                                                     ion.
                                                                  
2. we can  access he  database           2.  We  can  access the  
    from  any where  in the SAP.              internal table upto that
   (globally).                                              program(locally).

3. we must  provide  the  size          3. Internal table are dynamic
    of  the  database  table.                   so  we need not provide
                                                              the  size.

syntax  of  declaring  the  internal  table:

>>    Data <internal table> like  Table  of <work area>.

eg:   Data  emp1  like  Table  of emp.

in the above diagram emp1 is internal table name

syntax  of   accessing  the  fields  from  workspace:

    <work area name>--< field name>

eg:  emp-eid.
     emp-ename.

note:
    APPEND  is  the  keyword  to  transfers  data   from                      work area  to  internal table.

message:  we  perform  task  in  the  next  post.




Comments

Popular posts from this blog

ABAP BASICS CONTINUEATION

message: daily just follow my post maximum i will cover upto 90% of abap.                   DATA TYPES IN ABAP Data type specifies what type of the variable it is. data types in abap are divided into two categories.                                    NUMERIC DATATYPE                                   CHARACTER DATATYPE         1. Integer  [ I ]                                             1. Char  [ C ]           2. Float       [ F ]                                         ...

STEPS TO LOG ON TO SAP

            STEPS   TO   UP (ON) THE  SERVER: >> Double  click  on   the  SAP  Management  console  on desktop.   >> Select   the   server   , right   click ,   all tasks,  start. >> Provide  the  password. >>Expand  the server [ECC6], double click on the  ABAP WP               Table  in   the  leftside  , contiuncely  click  on  Refresh  button       until  the  status  is  wait   then  minimize  the  server. >>  Check  until  the  status  is  wait  ,if  it is  in  run  status  you             cannot  login.  so  check  until  status  is  wait. ...

INTRODUCTION TO SAP ABAP

                                                        SAP SAP   stands   as Systems Applications  and  Products in data processing. manufacturing unit Purchasing : The    purchasing department purchases  raw materials from the shops . Warehouse: The raw materials which are received  by  the unit is stored in the ware house. Finance: The amount of the raw materials are paid to shops by the finance department. Production: The production department looks after the production from the raw materials which are in the warehouse. Sales and Distribution: This department looks after the sales. Shipping: Shipping department looks after delevering the products from ware houseto the customers. And again finance department collects the amount from the customers. Human resou...