Skip to Content

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

SP Transaction Notification

Hi all.

Again I'm struggling with a stored procedure and needs som help. This is supposed to check if a property is checked before we can add a A/R Invoice. As it is now, it stops me from adding the document even though the property is checked. Any pointers on what is causing this?

If @object_type = '13'

            begin
                                               
                    Declare @AktivKunde as nvarchar (50)
					
                    Select @AktivKunde = qrygroup62 from OCRD where cardcode = @list_of_cols_val_tab_del
					
					If  (@AktivKunde <> 'Y')

                        begin
                        set @error = 1
                        set @error_message = 'Check property 62 on BP before you continue adding the document'
                                                                                end
end

Thanks and regards, Runar.

Edited by: Runar Wigestrand on Sep 12, 2008 1:30 PM

Former Member
Former Member replied

try it as

If @object_type = '13'

begin

Declare @AktivKunde as nvarchar (50)

Select @AktivKunde = o.qrygroup62 from OCRD o, OINV oi where o.cardcode = oi.cardcode and oi.docentry = @list_of_cols_val_tab_del

If (@AktivKunde 'Y')

begin

set @error = 1

set @error_message = 'Check property 62 on BP before you continue adding the document'

end

end

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question