on 09-18-2010 4:12 PM
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
Hi Ajhit,
SAP does not recommend to update / delete System or User Defined Object table, better use DI API to update / delete
Regards
Manish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
hi this thread is closed
thanks to all
kind regards
ajith
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.