Tuesday, October 30, 2012

Singapore - IR8A Appendix 8A - Address

In Singapore's IR8A - Appendix 8A form, if an employer provides accomodation to the employee, this is recorded as a benefit ( A wagetype in IT0015 ).

The address that will be printed on the form comes from IT0006 Subtype R1

R1 subtype is hardcoded in the report RPCT8A00_01 - which is called by the tcode: PC00_M25_NCT8A

Monday, October 29, 2012

LSO/TEM Configuring Course and Participant Cancelling Reasons

IMG -> Training and Event Management -> Day-to-day Activities -> Cancelling Attendance -> Reasons for Attendance Cancellation

Table: T77CAR

Use tcode: LSO_PSV1 - Dynamic Participation Menu. Then search for the course and display the list of participants. Select the participant and then Right Click and select Cancel.
 
 
 This next screen will be shown. The Participant Cancellation Reasons will be listed from the dropdown as shown below.


IMG -> Training and Event Management -> Recurring Activities -> Firmly Booking/Cancellation -> Reasons for Event Cancellation

Table: T77CR

Use tcode LSO_PV12 - Firmly Book/Cancel Course and search and select for a Course. Then select the 'Cancel event' radio button. Click on 'Data Screen' button.

The next screen will be shown. Click on Save.
 
Then the 'Reason for Cancellation' popup will appear and the Reasons for Cancellation of Course will appear

Displaying Wagetypes at Singapore's IR8A form

For the Wagetypes to appear in Singapore's IR8A form, configure the wagetypes in V_512W_D and use Evaluation Class 07. Below screenshots are a rough guide on what are the settings for different parts of the form.
 
Use tcode PC00_m25_NCT8A to generate a IR8A form for the employee
 


Sunday, October 28, 2012

ABAP Webdynpro - A simple Form and automatic selection screen

  • Creating a Web Dynpro Component and a View
  • Create 'USER_DETAILS' node at Component Controller with structure as PA0002
    • Add attributes for the 4 fields required VORNA, NACHN, PERNR, ANRED
  • Drag and drop this context to a View's context
  • On Layout tab, select the Wizard and select Form
  • Perform binding with the context
  • Ensure the layout header of the container is Matrix Head Data. This will ensure the fields look like a form in table format instead of aligning horizontally
    • Adapt Context for DESTINATION_FROM, DESTINATION_TO, FLIGHT_LIST
  • Select the PERNR field and create an action 'USERDET' by clicking the Create button at Events -> onEnter
  • Place this code at the Method tab in USERDET

  •  Data: context_node type ref to if_wd_context_node,
            ld_pernr type pernr-pernr,
            wa_userdet type if_main=>element_USER_DETAILS.


    * Retrieve value of webDynpro field
      context_node = wd_context->get_child_node( name = 'USER_DETAILS').
      context_node->GET_ATTRIBUTE( exporting NAME = 'PERNR'
                                     importing value = ld_pernr ).
      if not ld_pernr is initial.
        select single anred nachn vorna
          from pa0002
          into CORRESPONDING FIELDS OF wa_userdet
          where pernr = ld_pernr.
      endif.

    * Populate webDynpro field(s)
      context_node = wd_context->get_child_node( name = 'USER_DETAILS').
      context_node->BIND_STRUCTURE( wa_userdet ).


  • Embedding the View into the Window
  • Activation, Creation of a Web Dynpro Application and Execution

  • After entering the PERNR number, press Enter. If the employee number exist, the fields below will be populated
     
    Observe that the fields are binded automatically with the possible selections

     

    Thursday, October 25, 2012

    Understanding ESS/MSS Homepage Framework Configuration

    
    This post's objective is an introduction on how configurations from IMG are done to affect the navigation menus in ESS/MSS via the Homepage Framework
     
    In IMG -> Cross Application Components -> Homepage Framework
     
     
    As you can see, there are two rows of tabs. The top level tab is known as Area Group. The second level is known as Area.
    Table: V_T7XSSSERARG
     
     
    Then for each sub tab (Areas), link it to a Subarea. Subarea we can envision it as a box that will collectively group the links (Services).
    Table: V_T7XSSSERAR

     
    Then we need to link the links (Services) to the Subareas.
    Table: V_T7XSSSERSAR
     
     
    Refer to example screenshot below to relate how the configurations shown are mapped to the navigation/links that appear in ESS/MSS
     
     
    There are of course many more tables to configure, below are some other important ones and not the complete exhaustive list:-
    • V_T7XSSSERSRV - Define Service
    • V_T7XSSSERRES - Define Resource
    • V_T7XSSSERLNK - Define Confirmation Screen Links
     






    Wagetype basics 101

    A Wagetype has 3 important fields. The Number, Rate or Amount.

    Example of usage:-
    • Number = Number of hours work in Overtime
    • Rate = EPF contribution percentage rate
    • Amount = Monthly salary amount

    A wagetype is configured in 4 main tables:-
    • T512T - Wage Type Text Description
    • T512Z - Permissibility of Wage Types per Infotypes
    • T511 - Wage Type Characteristics
      • Is used for Dialog Wagetypes ( Meaning they appear in Infotypes and starts with a Number )
      • It determines whether the wagetype is earnings/deductions
      • It determines whether the wagetype should be entered as amount, number, rate or combination
      • It links to Indirect Valuation ( Defaulting of Wagetypes )
        • CONST - Constant linking to T511K
        • PRZNT - Percentage linking to T539J
        • TARIF - PST,PSA,PSG,PSL linking to T710 or T510
        • ANSAL - Bidirectional
    • V_512W_B - Valuation Bases
    • V_512W_D - Processing Class, Cumulation Class, Evaluation Class

    Australia and New Zealand specific tables

    To find country specific tables:-

    Australia, use 'T5Q*' - (There are 110 tables)

    New Zealand, use 'T7NZ*' - (There are 33 tables)

    Remove Retroactive Details on HRFORM Payslip

    Remove Retroactive Accounting Details on HRFORMS Payslip
     
    There were times where you need to run payroll retroactive covering past periods. And when using HRFORMs as your Payslip, you find that the Retro Wagetypes are shown in the Payslip. However, as some of it can appear with the amount 0.00, this can be confusing to the user and brings not much value.
     
     
    A sample employee that would have such payroll records are shown in the Payroll Results (PC_PAYRESULT) as below. Observe the highlighted block.

     
    Run the Payslip for the HR Form using tcode: PC00_M13_HRF. The other important input parameters are the Pernr, Payroll Area and Period as well as the HRFORM name.
     
    After click on F8, you will get to this screen. The highlighted setting is what's causing the retroactive wagetypes to appear.

     
     
    Change this 'Include Retroactive Accounting' to 'Only Original Period'



    Finally, the payslip generated does not show the Retroactive wagetypes anymore.

     

    Wednesday, October 24, 2012

    SAP Learning Solution (LSO) / Training and Event Management (TEM)

    Learning Solution (LSO) / Training and Event Management (TEM)
    Below are list of tcodes and a sample of object model and relationships to help get started with this submodule.

    OOEG / PVL0 - Business Event/Course Group
    OOET / PVD0 - Business Event/Course Type
    LSO_PSV1 - Dynamic Participation Menu
    LSO_PSV2 - Dynamic Course Menu
    LSO_PSV3 - Dynamic Information Menu
    LSO_PVCT - LS - Master Data Catalog
    LSO_PV15 - Follow Up
    LSO_PV33 - Course Appraisals
    PV34 - Participant Appraisals
    LSO_PV1B - Display Course
    LSO_PV1A - Change Course

    LSO_PV12 - Cancel Course
    LSO_PV14 - Lock/Unlock Course
    LSO_PV00 - Book Participant
    LSO_PV02 - Prebook Participant
    LSO_PV04 - Cancel Participant


    Object Model used in LSO

    D object - Course Type

    •   (Belongs To - A 003) L object - Course Group
    •   (Imparts - A 028) Q object - Qualification
    •   (Mandatory for - A 615) S object - Position
    •   (Is a gener - B 020) ET object - E-Learning/Delivery Method
    •   (Develops - B 049) P object - Pernr

    Tuesday, October 23, 2012

    Tcode SCC1 - Transport in same R/3 but different Client

    Tcode: SCC1

    This Tcode is used to transport configurations from one client to another client within the same R/3 box.

    Specify the source client number and transport request and perform the 'pull/import'

    Fixing IT2001 vs IT2006 discrepancies - Method 2

    There is another standard SAP program to align the IT2001 vs IT2006 records so that the deduction of quotas matches the records found in IT2001.

    Purpose: Opens and saves the Absences Infotype (2001) records in order to transfer the leave entitlement/deduction to the relevant Absences Quotas Infotype (2006) record.

    Program Name: HNZLABQ0
    Tcode: PC00_M43_LABQ0

    Time Transfer Rules - Important Tables

    The configuration in the pair of tables below should be checked for Time Transfer / Leave Quota Generation.

    • T559L - Automatic Absence Quota Generation
    • T5QIT - Calculation Rules for Transfer Frequency
      • The rules here determine how the generation will take place, for example giving Long Term Service leaves when employee reaches 10 years, and subsequently every 5 years
    After updating the configuration, test it by running Time Evaluation via tcode: PT60

    ESG Grouping for Time Quota Types

    Node in IMG
    Time Management > Time Data Recording and Administration >Managing Time Accounts Using Attendance/Absence Quotas > Setting Groupings for Time Quotas > Group Employee Subgroups for Time Quotas

    View: V_503_E

    Use ESG Grouping for Time Quotas to differentiate which group of employees according to EG / ESG grouping, will be processed for quota entitlements. For example, holiday calendars, factory calendars, specific Absence Types.

    Monday, October 22, 2012

    ESS/MSS Leave Requests stored

    Have you wondered where are the leave requests created from ESS/MSS are stored? And which table(s) is updated after approval is given by the Manager via the Workflow?

    1. PTREQ_HEADER
    2. PTREQ_ITEMS
    3. PTREQ_ATTABSDATA

    Might be useful and related
    1. T572B - Illness Texts

    Thursday, October 18, 2012

    Discrepancies between deductions made in IT2006 vs Absence records in IT2001

    Sometimes there are discrepancies between deductions made in Absence Quota in IT2006 and the records entered in Absence IT2001 where the numbers does not tally.

    In order to resolve this, SAP provides 2 report programs to check for this inconsistency and also to fix it.

     
    First, run RPTKOK00 - Check Leave and Quota Deduction program to check whether inconsistencies exist for the employee
     
    The result table below will be populated if inconsistencies are detected

    Should there be any inconsistencies, you can run the next program. RPTBPC10 - Leave Accrual and Quota Deduction to save the new deductions
     
    This program will generated the total deductions as a summary for the employee after making the changes
     
    Finally you can check again the employee's IT2006 records and see that the correct deductions have been aligned with the Absence records
     


    V_512W_B - Valuation Bases

    V_512W_B - Valuation Bases

    If you have a wagetype for additional allowance such as $100 for mobile phone allowance entered in IT0015 Additional Payment Infotype, these are known as Dialog Wagetypes. They have either an entry in the Amount (AMT) field or in the Number (NUM) and Rate (RTE) fields.

    It is not required to valuate such dialog wagetypes further. However, for time wagetypes, usually only a Number is entered. The rate is the valuation basis and is defined by Customizing.

    For example, employee works 2 hours overtime. The rate for the Bonus for Overtime wagetype will be valuated during Payroll Run.

    Constant Valuation
    K - Valuation will be based on the constant value maintained in T510J / V_T511k 


    Pay-Scale-dependent Constant Valuations
    These mode of valuation uses values from table T510 / V_T511.


    T - Takes into account Pay Scale Type and Pay Scale Area
    TG - Takes into account Pay Scale Type, Pay Scale Area and Pay Scale Group
    TS - Takes into account Pay Scale Type, Pay Scale Area, Pay Scale Group and Pay Scale Level

    01 - Valuation using basis wagetypes such as /001 or /002
    This will go through the Payroll Calculation Rules (PCR)
    • PCR X010 - to add wagetypes based on its processing class 01 value. For example 1 can add to /001, 2 to /002, 3 to add to both /001 & /002. You may set basic pay to add to /001 & /002.
    • PCR X013 - divides the basis wagetype like /001, /002 to obtain a daily or hourly rate.
    • PCR X015 - values a wagetype if the amt is zero, then if number is not zero, etc, based on the valuation basis used for this w/t.
     

    Wednesday, October 17, 2012

    RPDASC00 - Formatting Schemas and Personnel Calculation Rules

    RPDASC00 - Formatting Schemas and Personnel Calculation Rules

    This is a program that can help to display Payroll Schema and expand the rules. It can be used to download the details into a file (Excel, Text, etc.)

    Payroll Schema Crash Course part 2

    Common Operations

    MULTI, DIVID
    These operations let you multiply and divide two fields of a wagetype and store it in a third. The fields you can work with are AMT, RTE and NUM. MULTI RNA would multiply the rate with the numberand store it in the Amount field. DIVID ANA would divide the Amount field by the number and store it back in the amount field.

    NUM, RTE and AMT
    These are the basic fields and powerful assignment operations.

    NUM = 1 or AMT 2.50 - You can do this but it is bad practise to do this

    Create a constant in T511K called ZNUM
    NUM = KZNUM
    This is a better way to do it because constants are date-effective

    AMT = E9XXX will set the amount with the amount field from wagetype 9XXX

    AMT < 9XXX will only set the amount from wagetype 9XXX if the AMT field is currently less than it

    AMT*100 will multiply Amount with 100 and store it back into Amount

    ADDWT
    Transfers the wagetype in the header into another table

    ADDWT * transfers the current wagetype to OT

    ADDWTE* transfers the wagetype to RT without renaming the wagetype. It will no longer be in the IT or OT

    ADDWT9xxx transfers the wagetype to RT and changing the wagetype to 9xxx

    ELIMI and RESET
    Splits are attributes of wagetypes that link them to some other table in payroll. Sometimes you have to remove certain splits when doing work in a rule - that's what ELIMI does. To restore them use RESET.

    FILLF
    This operation resets the value of a wagetype field. FILLF A will reset the amount back to what it was before.

    Making Decisions
    OUTWP
    is used to make decisions based on WPBP table in payroll. It mainly concerns IT0000 and IT0001 data. As an example, OUTWPCOMPY puts company code field into variable key

    VAKEY
    Places certain data into variable key. For example AMT?0 checks whether AMT is equal to 0

    VWTCL
    This operation returns the value of a certain processing class. As an example, VWTCL 93 places in the variable key the value of processing class 93.

    OPIND
    Changes sign to positive or negative

    GEN/8 16
    Used with parameter 16, this means it generates 16 wagetypes thst starts from /8. Hence, /801 to /816 will be generated in the IT.

    Payroll Schema Crash Course

    I believe everyone has some trouble getting around and understanding payroll schema when they first see it. It is so old-school with almost Assembly language like. I decided to just bite the bullet and jump straight in and learn it. Here's a summary of my notes for the fundamentals.

    Schemas and Functions

    Schemas ( Use tcode PE01 )

    • is a collection of functions executed in a specific order
    • Schemas are stored in T52C0 (SAP standard) / T52C1 ( Customer created)
    • Example is X000 ( X stands for International )
    • Another Example is L000 ( L stands for Malaysia )
    Functions ( Use tcode PE04 )

    • WPBP a common function used to process IT0, IT1, IT7, IT8
    Wagetypes
     

    Wagetypes are used to store a rate/number/amount. It ends up as an object in the payroll result database. It can be earnings, deductions, taxes.

    Wagetype attributes are stored mainly in T512W.
    3 types of Wagetypes:-

    • Model Wagetypes = Start with a letter. Wagetype M320 is a sample wagetype. To implement for customer, it is copied to 0001 for example
    • Technical wagetypes = Start with /. Used for very specific processing. Not advisable to edit/delete this type of wagetype. These wagetypes are used during calculations and cannot be seen in Infotypes
    • User wagetypes = Starts with a number. Will not be changed SAP. It's company-specific payroll payments or deductions
    Rules and Operations

    Payroll Rules (Use tcode PE02)

    • is a collection of operations.Rules are stored in T52C5.

    Operations (Use tcode PE04)

    • MULTI = Multiplies the rate and number of a wagetype to determine the amount
    • OUTWP = Retrieves specific data about employee. For example IT0001-Work Contract = UA then do 'x'. If it is UB, then do 'y'
    Common Functions
    COPY is the same as 'include' in ABAP. Calls the sub-schema

    BLOCK is used with BEG/END. It is used to make the log easy to read

    IF/ELSE/ENDIF Used in Parameter 2. E.g. IF NAMC in schema U000

    Pxxxx - Reads information from Infotype xxxx

    PIT - Process Input Table. It is normally used after Pxxxx function where it loops each wagetype from IT (Input Table) and sends them to RT (Results Table)

    PRT - Process Results Table. Similar logic to PIT where it loops RT table and outputs into RT table

    ACTIO - Process a payroll rule, but does not loops a table. But it can loop Infotype records for the current pay period for rule processing

    Tuesday, October 16, 2012

    Payroll Australia - Payment Summary, 13ADD Feature, V_T5QGP

    Validity Dates for the Australian Country Modifiers ( V_T5QGP )
    This table can be found in IMG as below:-

    - Payroll Australia -> Group Certificates / Payment Summaries -> Maintain
    Certificate / Summary format -> Maintain Employer Details


    - Payroll Australia -> Group Certificates / Payment Summaries -> Maintain Tax
    Tape Format

    - Payroll Australia -> Superannuation -> Creating Superannuation Funds -> Define Special Fund Rules -> Link Fund Modifiers


    This table is used to specific ABN with validity dates for a PA/PSA combination. This table is an enhancement over an earlier table where could only specify one ABN (Australian Business Number) for a PA/PSA ( T5QOP ).

    If there are multiple ABNs within a selected period, the Payment summary/ETP summary
    Report (RPCP01Q0) will henceforth, generate multiple Payment Summaries for the employee(s).
     

    Payment Summary/ETP Summary Report
    The default address printed by the Payment summary/ETP summary Report  (RPCP01Q0 )depends on the Determine employee's address feature ( 13ADD ) configurations. You have the option of specifying the order of priority by which, the report should check for the employee address. For example, check for Temporary Address first and if not found, print the Permanent Address of the employee. The system obtains the information from the Address infotype (0006).
     
    The link to configure this feature can be found in IMG as below:-
    - Payroll Australia -> Group Certificates / Payment Summaries -> Maintain
    Certificate / Summary format -> Maintain Subtype for Employee Address.






    ABAP Webdynpro with Selection Screens and BAPI

    This is my second Webdynpro creation from following a tutorial.

    • Creating a Web Dynpro Component and a View
    • Creating a Service Call for BAPI BAPI_FLIGHT_GETLIST
      •   Use Existent Controller
      •   FM = BAPI_FLIGHT_GETLIST
    • Defining the Context Mapping
      •   Adapt Context for DESTINATION_FROM, DESTINATION_TO, FLIGHT_LIST
    • Defining Group and a Button on the View
      •   Perform Binding to DESTINATION_FROM and DESTINATION_TO to Group
    • Defining an Action and Corresponding Action Handler
      •   Enter GET_FLIGHTS in OnACTION
      •   Double click and use 'Webdynpro Code Wizard Icon' and link it to EXECUTE_BAPI_FLIGHT_GETLIST using radio button 'Method Call in Used Controller'
    • Defining the Table on the View
      •   Bind table to FLIGHT_LIST
    • Embedding the View into the Window
    • Activation, Creation of a Web Dynpro Application and Execution
    It is important to have an understanding of how the UI on the Webdynpro maps to the Context that was defined. As this drawing shows how the UI is closely mapped to the BAPI used.
     Below is the final result from testing.
     
    Tried and successfully created my first Webdynpro application following a tutorial. It's a Hello World. It's just to famliarise myself with the ABAP Webdynpro environment and to experience hands-on how complex or easy it is to create a basic Webdynpro application.


    The example produced is just a table that outputs flights data.

    Below are the main steps that I followed upon launching tcode SE80:-
    • Creating a Web Dynpro Component
    • Create a new View and assigning the View to the Window
    • Create a View Context for the new View created
      •   Context Tab
      •   Create a new Node
      •   Create the bindings from structure
    • Creating a corresponding UI Element for the context node
      •   Layout Tab
      •   Create a table and bind it to the context
    • Supply data from table SFLIGHT at runtime
      •   Methods Tab
      •   Write the code in the WDDOINIT
    • Creating a Web Dynpro Application
    • Activate and Run

    Monday, October 15, 2012

    Delimiting Qualifications

    Delimit/Delimiting Qualifications

    Qualifications are usually maintained in Employee's Infotype 0024 with no validity end date. I.e. 31.12.9999. However if the client wants a particular Qualification/Competencies to be delimited with an End Date, it cannot be directly maintained via PA30 as one would normally would.

    To do this, in PA30 screen, select the Preview Period using a future period to which the Qualification will not be valid anymore. Assuming in this case, we want the Qualification to end at 15.10.2012, so we enter 16.10.2012 and 31.12.9999 in the Period radio buttons.

    Then, select and delete the Qualification required. Click on Save.

    Display again the Employee's IT0024 record using PA30 but this time view it through using Period = All.

    The required Qualification has been delimited.

    Also another point to note, it is only possible to have two lines of the same Qualification appearing for the Employee if there is a gap between the first End Date and the next Start Date as shown below. If there is no gap, SAP will automatically merge the record into one line.