Category Archives: SAP ABAP

Focus On SAP ABAP Articles And Training

  • How To Change And Create SAP HR Infotype Screens Continued

    This is continuation from the previous article on How To Change And Create SAP HR Infotype Screens. In the first article we learnt how to customize an infotype screen using features. In this second part we will see how we can enhance a standard infotype by adding some additional custom fields.

    The process of enhancing a standard infotype can be divided into three main steps:

    1. Creating the Customer Include (CI Include): CI_Include is a structure which contains all additional customer fields. For every infotype this structure is created with the name as CI_PNNNN where NNNN is the infotype number.
    2. Creating the Include Screen: It is a subscreen which is generated for customer enhancement.
    3. Assigning enhancement to the infotype: In this step we assign the custom screen to the infotype.

    Lets take a look at a Step by Step process .

    1. Creating the Customer Include (CI Include)

    Step 1.1. Go to ‘Enhance Infotypes’ through transaction code PM01. Click on “SingleScrn” Tab and provide the infotype number and infotype version. From the Subobjects select the radio button ‘Customer Include’ and then click on the “Generate Objects” button.

    Enhance Single Screen Of Standard Infotype

  • How To Change And Create SAP HR Infotype Screens

    In SAP HR, infotypes are used to group employee data. SAP provides many standard infotypes for different information group. Many times, based on the business requirements, we have to modify the standard infotypes.

    We can modify the infotypes either by showing/hiding the standard infotypes fields based on certain criteria or by adding additional custom fields in the infotype structure.

    This is a 2 part tutorial. In Part – 1 you will learn how to configure infotype screens. In Part – 2 you will learn how to add additional custom fields to your screens.

    Show/Hide fields in infotype screen

    The infotype screen can be configured based on the values of the following fields:

    Field Field Name Field Length
    Screen number DYNNR 4 characters
    Subtype SUBTY Up to 4 characters, but always  the same length for one feature
    Company code BUKRS 4 characters
    Personnel area WERKS 4 characters
    Employee group PERSG 1 character
    Employee subgroup PERSK 2 characters
    Payroll area ABKRS 2 characters
    Country grouping MOLGA 2 characters

    Based on the relevant employee data in the above fields the infotype screen can be customized. The fields which are used to decide the screen layout are maintained in a ‘Feature’ through transaction code PE04.

    Features return the value in the Variable key, which is then maintained against the infotype screen numbers in table T588M.

    Let us take an example of infotype 0185 (Personal IDs).The standard screen is:

    Example Of infotype 0185 (Personal IDs)


    Our requirement is to show only two fields, ID Type and ID no. for subtype Resident Status.

  • How To create SAP PA-HR Infotype In 5 Easy Steps

    In SAP HR/HCM, employee data is grouped in Infotypes. This employee data is saved in infotypes based on his/her personal number (PERNR).

    For example in infotype PA0006 (Addresses) you will find employee’s address details. Similarly, in infotype PA0021 you will find the employee’s family details.

    SAP provides hundreds of standard infotypes, but many times there are business/client requirements where we have to create new infotypes. In this tutorial we will see how to create a custom PA (Personal Administration) infotype in just five easy steps.

    Step 1. Creating the PSnnnn Structure

    Each infotype requires a PS structure which contains all the data fields.

    To create the ‘PS structure’, go to transaction code PM01.

    To create The ‘PS Structure’, Go To Transaction Code PM01

    Give a four digit number between 9000 – 9999 in the ‘Infotype no.’ field. Select the radio button ‘Employee infotype’. Select the radio button ‘PS Structure’ and then click on the ‘Edit’ button.

  • How To Use The SAP ABAP Debugger Efficiently

    The ABAP Debugger is used tool to execute and analyze programs line by line. Using it we can check the flow logic of a program and display runtime values of the variables. Currently, SAP offers two types of Debuggers:

    • The Classic ABAP Debugger
    • The New ABAP Debugger

    The Classic ABAP Debugger, with its old user interface and its limitations to debug certain types of ABAP program is now not in use by many new and old ABAP developers.

    Learn How To Use The ABAP Debugger In This Training Course

    The New ABAP Debugger, with its state of the art and flexible user interface, can be used to debug all types of ABAP programs. It provides many new features which improve our efficiency of debugging, both in ABAP support and development.

    In this article, we will learn how to use these new features and discover some tips and tricks to efficiently use ABAP debugger.

    Switching between the ‘Classic Debugger’ and ‘New Debugger’

    You can switch between both the debugger and make any one your default debugger. To do this, go to ABAP Editor (SE38)→ Utilities → Settings.

    SAP ABAP Editor - SE38


    Now in the user-specific settings pop up box click on ABAP Editor tab and then click on Debugging.

  • ABAP Workbench – How To Use System Logs And Short Dump Analysis

    Following on from a previous article ‘ABAP Programming With The ABAP Workbench – The Tools You Must Learn And Master‘, where we went through how you can use some of the SAP workbench development tools to quickly analyze our ABAP code and improve your program performance; we will now learn how to troubleshoot our ABAP code when it returns a runtime error.

    There are many reasons why a run-time error can occur such as un-handled exceptions, a resource or system problem or an error in coding. Let’s look a little deeper…

    Tools for Troubleshooting Your ABAP Code

    System Logs (TCODE – SM21)

    When faced with a program that crashes, developers end up spending a lot of time debugging ABAP code to find and trace what went wrong. But they should know that SAP records all the warnings, exceptions and system errors in the System Log. So, when we get an error we can make best use of time by taking a good look at the System Logs first to help find and correct the errors in our code quickly and easily.

    System Logs Go To Transaction SM21

    System Logs Go To Transaction SM21

  • ABAP Programming With The ABAP Workbench – The Tools You Must Learn And Master

    ABAP Programming is a skill that involves learning how to master the ABAP Workbench toolset. Here you will get an introduction to some of the most important tools which an ABAP professional needs to master. Although in-depth knowledge of ABAP is not required, you should have some experience with ABAP.

    Undoubtedly, the most important tool in a ABAP programmers toolbox is the ABAP debugger, but here in this tutorial we are not going to focus on that, rather we will focus on “Tools for Analysis”. In a later article I will focus on “Tools for Troubleshooting”.

    Tools for Analysis

    ABAP Code Inspector (TCODE – SCI)

    With the help of the code inspector you can check your ABAP code for performance, security, syntax, error proneness and Statistical information. You can perform different code checks using this tool on a single object (simple check on programs, function modules or classes) or a set of objects (special check on set of objects).

    Example of Checking a single object:

    Calling code inspector for single objects is very easy, to call it from programs go to Program (SE38) then from the menu choose Check=> Code Inspector

    ABAP Code Inspector

    From Function Modules go to Function Modules – SE37 then from the menu choose Check=> Code Inspector.

  • 5 Easy Steps To Create A Web Dynpro ABAP Application

    Summary: This is a step by step guide for those ABAP consultants who want to try their hand at Web Dynpro ABAP. By following these 5 easy steps anyone who has knowledge of ABAP can create their first fully functioning Web Dynpro ABAP Application which fetches data from an SAP back-end system. This example Web Dynpro Applications displays the personal information of an employee whose personal number (PERNR) is provided.

    Step 1. Create Web Dynpro Component

    1. Go to Transaction SE80, choose Web-Dynpro-Comp./Intf in the object list and provide a new name (Y_FIRST_WEBDYNPRO) and click on Display.
      Web dynpro ABAP 1
    2. Confirm you want to create the object by clicking on Yes.
      Web dynpro ABAP 2
    3. Enter the description and choose the Type radio button as Web Dynpro Component.
      Web dynpro ABAP 3

    Step 2: Component Controller

    1. Go to Component Controller and Right click on the CONTEXT, select Create and then select Node.