Thursday, February 24, 2022

1.Introduction

Topics Covered

  1. ERP
  2. SAP
  3. Role of ABAPer
  4. Types of project
  5. Source code
  6. Datatypes
  7. Technical requirement to create program

 SAP ABAP Introduction

  1. SAP    - System Application and Product in data processing
  2. ERP    - Enterprise Resource Planning
  3. ECC    - Enterprise Central Component
  4. ABAP - Advance Bussiness Application Programming

    1.ERP

        ERP contains predefine database tables and programs
        Some of the ERP products available in the markets are 
    • BAAN - Small and Medium scale industries [Vendors and Customers]
    • RAMCO - Small and Medium scale industries [Finance]
    • Peoplesoft - Large scale industries [Human Resource]
    • Oracle Apps - Large scale industries [Finance]
    • SAP - Large scale industries
        Note:
            Enterprise means big companies
            Resource means money, material, man power, machineries, marketing, etc
            Planning means how to properly utilise these resources for companies betterment 

    2.SAP

    1. SAP has tightly integrated across all the modules and departments [HR,MM, SD, FICO, etc]
    2. SAP is developed in multi-language and supports multi currencies
    3. SAP is developed by 5 former IBM employees
    4. SAP is ready made product with customisation facility 
    5. SAP is platform independent
    6. SAP supports cross application. ie, [SAP to SAP, SAP to non-SAP, non-SAP to SAP]
    7. SAP has its own programming language called ABAP
    8. SAP ABAP is not case sensitive language
    9. SAP ABAP is used to customise standard functionality of SAP

    3.Role of ABAPer

    ABAPer are responsible to create RICEFW

    R - Reports
    I  - Interface
    C - Conversion
    E - Enhancement
    F - Forms
    W - Workbench 

     1. Reports: 

                    Based on the given input fetching the data from database table and displaying it in a predefined formate is called reports. There are 3 types of reports
    • Classical reports - Display the entire information in a single list.
    • Interactive reports - Display the summarised information in the basic list and detailed information in the next list.
    • ALV reports - Display the output with predefined functionalities such as borders, sorting, etc
    2. Interface:
                    Interface are used to establish the connection between SAP to SAP and SAP to non-SAP
                    Example: ALE/IDOC and BAPI
    3. Conversion:
                    Conversion program are used to upload the data from the legacy system(file) to SAP system
                    Example: BDC, LSMW and BAPI
    4. Enhancement:
                    Enhancement are used to add some additional functionalities to standard SAP functionalities without disturbing the existing functionalities 
                    Example: User exit, Customer exit, Enhancement point, BADI            
    5. Forms:
                    Forms are used to prepare the business documents such as offer letters, invoice etc
                    Example: SMARTFORMS, SAP Script
    6. Workflow:
                    Workflow used to automate the existing business process
                    ie.. Workflow is used to identify the workload of an employee as well as performance of an employee

    4.Types of project

    • Implementation project
    • Upgradation project
    • Maintenance/Support project
    • Rollout project
    1.Implementation project:
                    If we want to implement SAP from scratch, then it means implementation project.
                    Phases:
        1. Project preparation phase
        2. Business blue print phase
        3. Realisation phase
        4. Post preparation phase
        5. Go-live and support phase
    2.Upgradation project:
                   Whenever there is change in SAP version, we have to implement the new features into our existing implementation is called upgradation project.
    3.Maintenance/Support project:
                  After project in live, it needs 24/7 support is called support project.
    4.Rollout project:
                   Whenever company purchase a new company or to implement a new module, it means rollout project.

    5.Source code

        The source code of an ABAP program consists of either a statement or comment.

        Statement:

             Statement is the collection of operators, operands, variable and keyword.

             Operators and  Operands:

                   In ABAP we have 3 types of operators mathematical operator, comparative operator, relational or logical operator.

                    1.Mathematical Operator
                                    
                         Operators   |    Description        |    Example

                         +                 |    Addition            |    3+2 = 5
                         -                  |    Subtraction        |    3-2 = 1
                         *                 |    Multiplication    |    3*2 = 6
                         **               |    Exponential       |    3**2 = 9
                         /                  |    Division            |    4/2 = 2
                         mod           |    Modulo division   5mod2 = 1

                    2.Comparative Operator

                        Description    `               |    Operator

                        Less Than                       |  <      or    LT
                        Less Than or EquaL       |  <=    or    LE
                        Greater Than                  |   >      or    GT
                        Greater Than or Equal   |   >=    or    GE
                        Equal                              |   =      or    EQ
                        Not Equal                       |   <>    or    NE 

                    3.Relational Operator

                        Operator       |     Example

                        AND             |   a<b and a<c
                        OR                |  a<b or a<c
                        NOT             |  a<b not a<c

            Variables

                Variable is the name given to the memory location.
                ie.. int a = 10, where value 10 is stored in memory location 'a'

            Keywords

                Keywords are used to identify the type of the statement.There are many keywords like
                    1.Calling Keywords
                    2.Controlling Keywords
                    3.Declarative Keywords (Data, Parameter, Types, Tables, etc)
                    4.Definition Keywords
                    5.Database Keywords
                    6.Event Keywords
                    7.Operational Keywords

        Comments:

            Comments are non executable statements, they are used to improve the readability of the code.

                Single line comment                     - use *
                Multiline comment.                      -  use
                To comment part of the line          - use "

    6.Datatypes

        There are two type of data types
            Numeric datatypes - Integer(I), Float(F), Packed decimal(P)
            Character datatype - Char(C), Date(D), Time(T), Numeric(N) 
            
            Note: 
                N is alphanumeric, it accepts both integer as well as character.
                I, F, D, T are Fixed length data type.
                P, C, N are variable length data type.

        Integer(I):    
            Syntax: Data <variable name> Type I.
                         Data roll_number Type I.
            Note: 
               Initial value of I is 0, 

        Float(F):    
            Syntax: Data <variable_name> Type F.
                         Data mark_1 Type F.    //    10.00 
            Note: 
               Initial value of F is .00, 

        Packed Decimal(P): 
            Syntax: Data <variable_name>(<length>) Type P decimal <no>.
                         Data item_price(10) Type P decimal 2.  
           Note: 
              Initial value of P is .00. // Based on 'no'  

        Char(C): 
            Syntax: Data <Variable_name>(<length>) Type C.
                         Data name(40) Type C.    
            Note: 
               Initial value of C is 'space'. 

        Numeric Char(N): 
            Syntax: Data <Variable_name>(<length>) Type N.
                         Data roll_number(5) Type N.
             Note: 
                Initial value of N is 00000. 

        Date: 
            Syntax: Data <variable_name> Type D.
                         Data creation_date Type D.    //yyyymmdd
            Note: 
                Initial value of D is 00000000. 

        Time(T): 
            Syntax: Data <variable_name> Type T.
                         Data delivery_time Type T.    //hh:mm:ss
            Note: 
               Initial value of integer is 000000. 

    Example:

    //Declaration
    Data: A Type I,
              B Type I,
              C Type I.
    //Assignment
    A = 10.
    B = 20.
    //Logic
    C = A + B.
    //Display
    write C.

    Output:
    30

        Note:
    1. In ABAP each statement ends with period(.)
    2. 'write' is operational statement to display the output.
    3. Chain operator(:) is used to declare more than one variable separated by Comma(,) and ends with Period(.)
    4. Data: A Type I,
                B Type I,
                C Type I.
      A = 10.
      B = 20.
      C = A + B.
      write C.

    7.Technical requirement to create program

    1. In ABAP, All the custom program must start with either z or y. 
    2. In ABAP, All the program must be stored in either local package/default package ($tmp) or custom package (zpackage)
    3. Latest version of ECC is 7.4

        Steps to create the program

    1. Open sap log on
    2. Goto SE38(ABAP Editor)
    3. Provide the program name and click create button
    4. Provide title/description
    5. Select the type of the program as executable
    6. Click save button
    7. Enter package name or save on local package($tmp)

        Steps to execute the program

    1. Save the program - ctrl+s
    2. Check the program - ctrl+F2
    3. Activate the program - ctrl+F3
    4. Execute the program - F8

            Note:

      1. Parameter is the keyword which accepts the inputs at runtime.
      2. Name of the parameter should not exceeds the length of 8 character.
      3. Parameter cannot accept the Float data type, only accepts packed decimal. 
      4. Default is the keyword used to provide default value to thr input variable.
      5. Obligatory is the keyword used to make input field mandatory.
    Example:

    //Declaration
    Parameter: input_1 Type I default 10,
                      input_2 Type I obligatory.
    Data: output Type I.
    //Logic
    output = input_1 + input_2.
    //Display output
    write output.

    Errors:

    // name more than 8 char
    Parameter: Name_of_the_country Type C(5).
     
    // only P is allowed
    Parameter: Item_price Type F.                             


                



















        


    No comments:

    Post a Comment

    15.Modern Syntax ( 7.4/7.5 Syntax )