cancel
Showing results for 
Search instead for 
Did you mean: 

FMS help

Former Member
0 Kudos

Hi Experts

I had created a UDF in Employee Master data ' Guaranteed  ' and set the Default value as 'Y' & 'N'.

now what i required is when ever in an employees master data this Field is marked as 'Y' system should not allow to change the Department

and once if the same field  is marked to 'N', system should allow to change the Department

same time when it is marked as 'Y', and if the user try to change the Department i need to pop up an msg stating

'Your are not Permitted to change the Department as this employee is a Guarantee '

how could i do this process,, is it possible via Fms or Store Procedure Transaction

pls help me to do it

REGARDS

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

Make the reply is correct/helpful.

Regards,

Tausif

Former Member
0 Kudos

sir

it is not working,,, am getting some other error

Regards

Former Member
0 Kudos

Hi,

You can took help from tech team.

Regards,

Tausif

Former Member
0 Kudos

Hi sir

how to get the help form tech people

Regards

Former Member
0 Kudos

Hi Tausif

i have already send the query yesterday to the said mail id,,

Hope u have received,, any further updates on the same

Regards

Former Member
0 Kudos

Hi,

check the IF end block and add your code to '  Add your Code Block'

Regards,

Tausif

Former Member
0 Kudos

Hi

pls sir, i couldnt understand

Regards

Former Member
0 Kudos

Hi,

Give the ID

Regards,

Tausif

Former Member
0 Kudos

HI

TV ID : 918 445 908

PW : 12345

REGARDS

Former Member
0 Kudos

Pw is incorrect

Former Member
0 Kudos

PLS TRY THIS ONE

123456

Former Member
0 Kudos

same error

Former Member
0 Kudos

Hi sir

the last given pw is correct

123456

i try it from another system

it is working

Regards

Former Member
0 Kudos

Hi sir

what happen,  u can use the same pw

regards

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

Try:

IF @transaction_type IN ('U') and @object_type = '171'

BEGIN

  IF EXISTS(SELECT T0.[empID] FROM OHEM T0 WHERE T0.empid=@list_of_cols_val_tab_del AND T0.U_Flag='Y')

  SET @error=10000

  SET @error_message= 'You are not permitted to change the Department'

END

END

Thanks & Regards,

Nagarajan

Former Member
0 Kudos

hi Rajan

i try with your SAP, but after that  in the interface,, it is as usual,,we are able to change the

dept , no blocking is happening

Regards

kothandaraman_nagarajan
Active Contributor
0 Kudos

Have you replaced T0.U_Flag with your UDF field?

Former Member
0 Kudos

Hi rajan

i had replaced the Field to my Field Name

The field type is 'AlphaNumeric'

**********************************************************************************************************************

IF @transaction_type IN ('U') and @object_type = '171'

BEGIN

  IF EXISTS(SELECT T0.[empID] FROM OHEM T0 WHERE T0.empid=@list_of_cols_val_tab_del AND T0.U_Guaranteed='YES')

  SET @error=10000

  SET @error_message= 'You are not permitted to change the Department'

END

**********************************************************************************************************************

Regards

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

Tested and working as expected:

IF @transaction_type IN ('U') and @object_type = '171'

BEGIN

  IF EXISTS(SELECT T0.[empID] FROM OHEM T0 WHERE T0.empid=@list_of_cols_val_tab_del AND T0.[U_Guaranteed] ='Y')

  SET @error=10000

  SET @error_message= 'You are not permitted to change the Department'

END

Let me know your exact issue.

Former Member
0 Kudos

Hi,

You may run a simple query:

SELECT T0.empID, T0.U_Guaranteed FROM OHEM T0

Check the exact value for T0.U_Guaranteed.

Thanks,

Gordon

Former Member
0 Kudos

Hi rajan

thanks for the support

when am using this query am not able to change the U_Define field also from Y to N

How i need to work is

when the U_Define Field is marked as Y the user should not be able to change the department

but he should be able to change the U_Define Field from Y to N

once it is changed from Y to N the user should be able to change the Department also

hope u understand the process,,

Regards

kothandaraman_nagarajan
Active Contributor
0 Kudos

How it works?

1. Assuem UDF field = YES

2. User tries to update department field.

3. In this condition, the TN  will block update of department field.

4. To  update department field, user must change Y to N, then only above TN  will not block.

It is not possible to change while updating ( Y to N)

Former Member
0 Kudos

Hi Rajan

yes i understand what u say,,,but when the user is trying to change the Y to N, the same TN is pop up,,,,,

  " t is not possible to change while updating ( Y to N)"



so u means that once we change the UDF to Y it cant be updated to N



and no other option for this




regards

kothandaraman_nagarajan
Active Contributor
0 Kudos

Yes. UDF = No if you want update department.

Former Member
0 Kudos

Hi rajan

any other options to solve this issue

Regards

Former Member
0 Kudos

Hi gorden

Could u pls check over the TV

TV ID : 918 445 908

PW : 123456

Regards

kothandaraman_nagarajan
Active Contributor
0 Kudos

What option you want?

Former Member
0 Kudos

Hi rajan

i need an option to change the UDF from Y to N and also able to change the dept once UDF is marked as N

Regards

kothandaraman_nagarajan
Active Contributor
0 Kudos

It  will work as per your requirement. To understand,

1. Create new Employee with UDF = YES

2. In this condition, not possible to update department.

3. Chagen YES to NO, then you can update department.

Former Member
0 Kudos

Hi,

You can do this through Store Procedure.

" IF EXISTS(SELECT empid FROM OHEM T0 WHERE T0.empid=@list_of_cols_val_tab_del AND T0.U_Flag='Y')"

Regards,

Tausif

Former Member
0 Kudos

Hi Tausif

am not a expert in Tech side

pls could u help me over the TV

regards

Former Member
0 Kudos

Hi,

Add the below code in transaction Notification.

Change the field name instead of 'U_Flag'

IF @object_type ='171'

BEGIN

  IF EXISTS(SELECT empid FROM OHEM T0 WHERE T0.empid=@list_of_cols_val_tab_del AND T0.U_Flag='Y')

  SET @error=10000

  SET @error_message= 'You are not permitted to change the Department'

END

Regards,

Tausif

Former Member
0 Kudos

Hi Tausif

thanks for the support

as per you given the last SP, i try with the same

but am getting an error

'Could not commit transaction: Error -1 detected during transaction'

and also i could not change the user define field from 'Y' and 'N'

and also not able to change the Department

for both the same error is pop up

Regards