Skip to Content

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

Project and Profit Centre

Hi all.

We have client that would like some limitations attached to the adding of A/R invoices. They use both Project and Profit Centre on sales documents. When adding an A/R Invoice that contains a specific profit centre, they would like that the user is told to also attach a project before proceeding. I'm thinking in terms of a stored procedure, but can't seem to figure out how to check for the correct profit centres, as the profit centre seems to only appear on the rows of the Invoice. (please correct me if I'm wrong).

I see that I may need to loop trough all rows and check each row - collect information of the rows that contain the profit centre in question and then trigger the error message - but I don't know how to do this. Can someone please guide me on my way?

Thank you very much.

Best regards, Runar.

replied

The project should also be entered at the row level to reflect in the Journal Entry.

The SBO_SP_TransactionNotification code would be

IF @object_type = '13' AND @transaction_type = 'A'

BEGIN

If EXISTS(SELECT T0.ItemCode FROM [dbo\].[INV1\] T0 WHERE T0.DocEntry = @list_of_cols_val_tab_del AND T0.OcrCode = '{your Profit Center Code}' AND T0.Project IS NULL)

BEGIN

set @error = 1

set @error_message = 'Please enter Project Code'

END

END

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