Skip to Content
avatar image
Former Member

How to sort wage type in HR Forms.


I have created Zpay_slip in using HR forms. When I we added wage type in evaluation class In this the amount is displayed in the payslip. but it displaying in the order "/" in the first and other wage types after. but we require in the order like...

current order:

/BT1 tax details

0710 Basic salary

0715 Hra

0719 Med allowances

required order.

0710 Basic salary

0715 Hra

0719 Med allowances

/BT1 tax details

how to achieve this in HRforms or in evaluation class?

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Mar 26, 2017 at 02:57 PM

    You can't. That is just how standard sorting is done......special chars (_,-,*,/,\,etc), then numbers (0,1,2,3...), then alpha (a,b,c,d...)....(usually by ACSII or binary values of the character). For example in your case, "/" equals 47 while "0" equals "48", so the "/" comes first in the order.

    Why is this such an issue? I would be more worried that the correct wage types are there rather than changing how the underlying sorting works.....and I am talking "global", database level sorting....not just here.

    If you want the more "technical" reason/how sorting is done there are other links I can give. Also, at times, this sort can be different depending on underlying operating system too. YOu are getting into a "deep water" discussion. haha

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Christoper,

      Thanks for the replay, we are using HRFORMS as payslip for country US

      in this form the order of displaying the Earnings is like




      misc amount.

      When i added the /BT1 wagetype in evalution class it is not showing the as expected in the form as shown in attachment.

      Can you advice on this...



      earnings.png (20.4 kB)
  • May 13, 2017 at 06:12 AM

    Hi yashwanth

    Options to achieve sorting over your infodimension:

    - you can do your selection with wage types and use the sorting option instead of doing your selection over evaluation class.

    - you can change your wagetype to set them in different groups for evaluation class 02, create one infodimension per grouping value and "physically" sort them on your form context.

    - you can use the BADI HRFORM_HRF02 method CHECK_PERNR_LATE and perform a custom sorting in any stars belonging to your infonet.

    - you probably have a lot of other options I am not thinking of.



    sorthrforms.png (11.8 kB)
    groupcontext.png (7.4 kB)
    sortbadi.png (23.7 kB)
    Add comment
    10|10000 characters needed characters exceeded