Skip to Content
author's profile photo Former Member
Former Member

Stored Procedure in Journal Entries

Hi All,

I've tried to make a control on the project code for each journal entry line where the account begin with a certain digit.

even if my stored procedure syntax is ok, nothing happens in SBO.

Can anybody tell whats wrong in my source code :

IF @transaction_type IN ('A','U') and @Object_type = 30

BEGIN

IF EXISTS (SELECT LINE_ID FROM JDT1 WHERE (PROJECT = '' OR PROJECT IS NULL)

AND (ACCOUNT LIKE '4%' or ACCOUNT like '5%')

AND LINE_ID = @list_of_cols_val_tab_del)

BEGIN

SELECT @Error = 1,

@error_message = 'Cost Center/Project Code cannot be blank for P&L Accounts...'

END

END

Thanks for answer

Chris

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2008 at 04:08 PM

    You are missing single quote in the Obj_Type field. This field is a varchar field.

    Use @Object_type = '30'

    Suda

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      I am glad it worked well for you.

      There is a point system in SDN Forum which I am not sure if you are aware of this, but please take a look at how it works

      How do I reward points?

      I posted a thread and marked it as a question. Several people replied and gave me useful advice. I'd like to reward points. What do I do?

      If you designated your thread as a question and are satisfied with one or more of the responses received, you may award points according to the following scheme:

      Designation ................. Point Value

      Solved My Problem..........10

      Very Helpful ...................... 6

      Helpful .............................2

      To award points, go to your user profile and select the relevant thread from the list of Recent Messages. Click on the hyperlinked title. You will be directed to a page that shows all the responses to your original post.

      Click on the star icon next to the response for which you wish to reward points. A popup window will appear. Use the radio buttons to mark a response "Solved My Problem," "Very Helpful," or "Helpful."

      You are allowed to grant only one 10 point "Solved My Problem" award and one six point "Very Helpful" award, so evaluate all the replies carefully. You may designate an unlimited number of two point "Helpful" awards.

      Suda

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.