Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Trigger Employee Data in Human Resource for Sales Employee Role to OSLP

Dear all,

I try to trigger an Employee name with the role Sales Employee to OSLP using SBO Notiffication.

My query in SBO _notification is like this.

if (@object_type='171' ) And (@transaction_type = 'A' Or @transaction_type = 'U')
BEGIN 
	
	set @empid = (select HEM6.empID  from hem6 where  HEM6.roleID = -3 
	and HEM6.empID = @list_of_cols_val_tab_del )
	
	if @empid <> null 
	begin
	set @empname = ( select  OHEM.firstName  from OHEM,HEM6 where OHEM.empID = HEM6.empID and 
	 HEM6.roleID = -3 and
	HEM6.empID = @empid  )
	
	set @slpcode = ( select MAX(slpcode) from oslp)
	if @slpcode = -1 
		set @slpcode = 1 
	else 
		set @slpcode = @slpcode + 1
  
  insert into OSLP
  (	SlpCode , SlpName,Memo,Commission ,GroupCode ,Locked ,DataSource,UserSign,EmpID )
  values( @slpcode , @empname ,null ,0,0,'N','I',1,null)
  end
	
end

After i add the employee in human resource by choosing the role sales employee, it can't automatically trigger to Sales Employee(OSLP). Does any one know where is the problem ??

Thanks in advance

regards

Jia shun

Former Member
Not what you were looking for? View more on this topic or Ask a question