Skip to main content

Posts

Showing posts from December, 2014

ATTRIBUTES OF INTERNAL TABLES

                        Attributes  of  Internal Tables: KIND: >> Kind  is the  keyword  which  returns  the  TYPE  of  the  internal  table. >> If  the  internal table    is   Standard  then  it  returns  T. >>If  the  internal table   is   Sorted  then  it  returns  S  and  if   Hashed   then it returns    H. LINES: >> Lines  is the  keyword   which returns  the  numbers  of   RECORDS  are  avaiable   in  the  internal tables. SYNTAX:  Describe  Table  <internal table >  kind  <variable 1>   lines <variable 2>. >> By  default  a  variable  is  cha...

TYPES OF INTERNAL TABLE.

Types of Internal Tables: 1. Indexed internal tables. 2.Hashed internal tables. INDEXED INTERNAL TABLES : >> Indexed  internal tables are  two types 1. STANDARD Internal tables                                                                         2.SORTED       Internal tables. STANDARD INTERNAL TABLES: >>   It  accepts  duplicate records  ,because  here ,all fields  are  non-unique. >> Pushing  data from workspace to internal table is always through  APPEND  keyword. >>Searching  of  a record  is  Linear Search(line by line). SYNTAX:  Data <internal table>  like  standard table of <workarea>. note:       ...

INTERNAL TABLES(SELECT OPTIONS,PARAMETER)

SELECT-OPTIONS:      Select - options    is  the  keyword  which  accepts  single                value, multiple  single values, single range ,multiple ranges. Syntax:   Select-options  <Name of the select-options>   for                          <variable name>. eg:                  Data  V1  TYPE  T001-BUKRS .        Select-options  S_BUKRS  for  V1. (the  variable v1  must  be decleared  before  the  statement). eg:     Data V TYPE  KNA1-KUNNR.    Select-options  S_KUNNR   for  V.    Syntax  of  Select-options  in Select Query:  Select  <field1> <field2>....... ...

INTERNAL TABLES 3( DECLARING THE FIELDS VARIABLES).

Syntax  of  declaring  the  field  variables:    Data <field name>(<length>)  Type  <Data Type>   ----->1st(way).                            or   Data <field name>  Type   <Data Element>. --------> 2nd(way).                                                        or Data <field name>   Type  <Database table name>--<field name>.       3rd(way) [ this is the most preferable way of declaring fields ]. Eg:           Data   BUKRS(4)  Type  C.    1st way.          Data  BUKRS   Type BUKRS.   2nd  way(the  data element ...

INTERNAL TABLES CONTINUATION ....2

Object(task):     To  Display  the  company  codes , company names, and  cities. solution:(our  task is to fetch  the data from database and display it). To Fetch  data  from database we need to write a select query: Syntax of Select Query:   Select  <field 1> <field 2>....<field n>   from <Data Base Table>    Into    Table    <Internal Table>     where <condition>. T001(Company Table):   It is standard database table which is given by SAP. It consists of data. BUKRS ----->  Company Code. BUTXT ------->Company Name. ORT01 -------->City LAND1 --------> Country. TO KNOW THE DATATYPE  AND LENTH OF DATATYPE: we follow  this  method  initially , but  there is  another  method  i  will dicuss in next post declearing  the  ...

INTERNL TABLES CONTINUATION ....1

OBJECT(TASK): In real time  or  in ABAP  we  name  a  task  as  object. Manually  Filling  the  Internal Tables.          Steps  to  create  the  program.   >> Execute  S38(IN Cmd prompt).   >> Provide  the  program  name  starts  with  Y  or  Z          eg: zdemo_ internal_table         note:  the  name  program  does  not  allow  extra  characters           or  space,  it  allows  only  underscore. >> Click on create. >> Provide  the  Title(any thing  for  your understanding.) >> Select  the  Type  is  Executable program. >> Click on Save/enter. >> Click  on  Loc...

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. L...

CREATING PROGRAM AND INTERNAL TABLES.

MESSAGE:                        first  basic  concept is  INTERNAL TABLES. so i am                       going with  INTERNAL TABLES,  i will discuss DATA                  DICITIONARY LATER.     STEPS TO CREATE  THE  PROGRAM(ADDITION): >>  Execute  SE 38 [ABAP Editor]  in the  command          prompt  and  click enter. >> Provide  the program   name , it must  starts  with Y or  Z.      ZDEMO_ADD. >> Click on create. >> Provide  title [anything ex:  adding two numbers]. >> Select  the type  is EXECUTABLE  PROGRAM.[ because      we can  execute  this  program independently ...