cancel
Showing results for 
Search instead for 
Did you mean: 

[dbo].[SBO_SP_TransactionNotification] problem

Former Member
0 Kudos

hi experts

the following is my [dbo].[SBO_SP_TransactionNotification]

if(@object_type='ATTENDANCE' and @transaction_type in ('A','U'))
begin	 
	declare @vDocEntry int 
	declare @vLineId int 
	declare @vempid varchar(25)
	declare @vdate datetime
	declare @Aorp nvarchar(MAX)

	declare ATT_CURSOR CURSOR
		for 	select T1.DocEntry,LineId,U_EmpID,U_DDATE,U_Aorp from [@ATTENDANCE] T1, [@ATTENDANCE1] T2 where T1.DocEntry=T2.DocEntry and T1.DocEntry = @list_of_cols_val_tab_del
	OPEN ATT_CURSOR
	FETCH NEXT FROM ATT_CURSOR INTO @vDocEntry,@vLineId,@vempid,@vdate,@Aorp
		WHILE @@FETCH_STATUS = 0
		BEGIN
			if exists(select U_Empno,U_CODate from [@ZAM_CO1]T1,[@ZAM_CO_LINE] T2 where T1.DocEntry = T2.DocEntry and T1.U_Empno=@vempid and U_CODate=@vdate and U_Status='granted')
			begin
				update [@ATTENDANCE1] set U_Aorp='CO' where DocEntry=@vDocEntry and LineId=@vLineId
			end
			if exists(select * from Leave_Child_Table  where empid = @vempid  and leve_dates=@vdate) --and @Aorp not in ('R'))
			begin
				update [@ATTENDANCE1] set U_Aorp='L' where DocEntry=@vDocEntry and LineId=@vLineId
			end
			FETCH NEXT FROM ATT_CURSOR INTO @vDocEntry,@vLineId,@vempid,@vdate,@Aorp
		END
	CLOSE ATT_CURSOR			
end

1.this Sp is executing with out any error and even functionality wise too working fine

the problem which i am facing here is ,able to enter only one document corresponding to UDO 'ATTENDANCE'

while creating second document its showing error message as

'18/09/2010  20:36:44: Internal error (16915) occurred  [Message 131-183]'

once i closed the sap b1 application ,then again i can add one more document ,later i m facing the same issue which i mentioned above .please give some clarification regarding this .

thanks in advance

ajith

Accepted Solutions (1)

Accepted Solutions (1)

CRVMANISH
Contributor
0 Kudos

Hi Ajhit,

SAP does not recommend to update / delete System or User Defined Object table, better use DI API to update / delete

Regards

Manish

Former Member
0 Kudos

hi

i think this problem is all most solved ,now i am able to enter more than one document of the Same UDO

in my code i was not deallocating the cursor, i think ,because of this only the above problem came up ,this is not the case please tell me the exact reason ,i did only this change in my SP,now its working fine ,anyhow i need to test further

thanks to all

kind regards ajith

Former Member
0 Kudos

Yes, the only problem I see is dealocating the cursor - in your previous code it falls becuase for same user the cusrosr existed already and it falls on sql side. With deallocating it will work.

In previous code you had you were able to add more docuemnts from different PCs - thats way how to check if its only cursor dealocating problem.

Former Member
0 Kudos

hi Petr Verner

thanks for reply.

now its working fine ,but i need to know is there any problem if i am inserting/updating any other user defined tables through sp_transationNotification

thanks to all

ajith

Former Member
0 Kudos

Hi Ajith,

You are free to update/insert your UDT. Only system tables are not touchable even UDF within those tables.

Thanks,

Gordon

Answers (1)

Answers (1)

Former Member
0 Kudos

hi this thread is closed

thanks to all

kind regards

ajith