cancel
Showing results for 
Search instead for 
Did you mean: 

Rule -Hcm Forms

Former Member
0 Kudos

Hi

I am working in HCM form in my scenario I need to validate employee new annual salary which should be greater than employee old salary , if not we should get warning message . I have used rule in form scenario for eg : ( New Annual Salary of Employee >= Current Annual Salary of Employee ) its not working . Is there any way to check the rule there is more validation yet to be done , please do let me know how to resolve this or some documents .

With Regards

Abdull hakkim .K

Accepted Solutions (0)

Answers (2)

Answers (2)

ChrisSolomon
Active Contributor
0 Kudos

The fields used in your rule MUST be part of the interface to the operation the rule is assigned to. Are they?

For example, new salary and old salary MUST be fields in the operation. So if the operation is on IT0008, then you would have something like

IT0008_NEW_ANSAL mapped to IT0008-ANSAL in SAP_PA

IT0008_OLD_ANSAL mapped to IT0008-ANSAL in SAP_PA

then operation on IT0008 for a create but with rule "IT0008_NEW_ANSAL != IT0008_OLD_ANSAL"

then it should work.

Former Member
0 Kudos

Hi Chris

In Spro -configuration of form - Process Form Scenario for Personnel Admin. Infotypes (Service SAP_PA)- operation - infotype , operation, rule was assigned and also in (assignment of fields-step ) fields are assigned . I am able to get the values in my form . But in validation part when i use the formula in rule i am unable able to validate .

I am not clear of the example (new salary and old salary MUST be fields in the operation) ,can u provide more details . I don't find documents in (sap help) related to rule and generic service with example ,can u send some documents for this two topics in HCM-FORMS.

With Regards

Abdull Hakkim .K

ChrisSolomon
Active Contributor
0 Kudos

What is your rule attache to? It can't just sit out there by itself. It will be either associated with an entire backend service or with an operation of a service. Furthermore, any field used as part of the rule, must be a field present in the operation of the service's interface. Soooooooooo......how are you using your rule?

My guess...you have a custom generic service to which you pass new and old salary (since they are used in the rule).....your rule will check to see if it even needs to call your service....if it does, you want to send an error message back. Simple enough.

Former Member
0 Kudos

Hi Chris

In Form Scenario we have a dialogue step (RULE) where we can create a new rule and in the bottom we have a formula button to create a formula and in this we can add form fields. I have compared my form fields (Employee New annual salary GE Employee Old salary ) . In Process Form Scenario for Personnel Admin. Infotypes (Service SAP_PA) the rule was assigned to operation but when i check the process ,rule is not working . Let me know how to sort out this issue and proceed further and do provide some documents for rule .

With Regards

Abdull Hakkim .K