Skip to Content
avatar image
Former Member

Need a SPT

Hi Experts

I need to block the user who attempt to post the JE (Open, Not based on Document)

when ever a User try to post JE and if the user included any GL codes from any of these Drawers

Turnover,Cost of Sales,Operating Costs,Non-Operating Income and Expenditure,Taxation and Extraordinary Items

the user should not be allowed with out selecting Cost center, and it should be applicable for

Open JE & From These Drawers only

Regards


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Nov 15, 2016 at 12:09 AM

    Hi Shahan

    For validate JE use the object type 30 in your transaction notification. Like this:

    if (@object_type = '30') begin 
    	--Do your validation here
    end
    

    Kind Regards,

    Diego Lother

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Shahan,

      This is the way. Below the your query with some corrections. I believe that should do the work.

      IF (@Object_Type='30') AND (@transaction_type in ('A', 'U'))
      BEGIN 
      	IF (EXISTS (SELECT T0.Account FROM JDT1 T0 INNER JOIN OACT T1 ON T0.Account = T1.AcctCode WHERE T1.GroupMask IN ('4','5','6','7') and ISNULL(T0.ProfitCode, '') = '' AND T0.TransId = @list_of_cols_val_tab_del))
      	BEGIN 
      		SET @error = 10 SET @error_message = N'Its Mandatory to Choose The Cost Center'
      	END
      END

      Kind Regards,

      Diego Lother

  • avatar image
    Former Member
    Nov 17, 2016 at 10:52 AM

    Hi,

    What's your SAP version?

    In General settings, you can define whether to block postings without Cost center code.

    Administration -> System initialization -> General settings -> Cost accounting Tab -> Distribution Rule.

    Regards,

    Bala

    Add comment
    10|10000 characters needed characters exceeded