cancel
Showing results for 
Search instead for 
Did you mean: 

Block invoice without a sales order through - SAP B1

former_member325743
Participant
0 Kudos

Hi everyone, in the project management window it is possible to see the numbers of the invoiced amounts and the pending ones and so. When you have a sales order but do not make the invoice taking that sales order as the base document, the system duplicates that quantity and there would be non-real numbers.

So, my question is ... does the client invoice could be blocked unless there would be a sales order? I mean, that the user can not make an invoice if he / she does not have a sales order.

I don't know if I'm explaining myself well. So if someone needs more detailed explanation, please tell me. Thanks and regards.

Accepted Solutions (1)

Accepted Solutions (1)

former_member185682
Active Contributor
0 Kudos

Hi Anderson,

You can achieve your goal by two ways.

1. Transaction notification

You can use a query like below to avoid that the user input any invoice with one or more lines without base document.

IF @object_type = '13' AND @transaction_type IN ('A','U')
BEGIN
	IF (SELECT COUNT(DocEntry) FROM INV1 WHERE DocEntry = @list_of_cols_val_tab_del AND BaseType = -1) > 0
	BEGIN
		SET @error = -1
		SET @error_message = 'Your invoice should have a base document like delivery, sales order, sales quotation...'
	END
END

2. Approval procedure

You can use the query below in an approval procedure to avoid the user input any invoice with one more lines without base document without the authorization of the manager. In this situation the manager can handle the situation and can choose if the document is allowed or not.

SELECT CASE WHEN $[$38.43.NUMBER] = -1 THEN 'TRUE' ELSE 'FALSE' END

I think that the second option is better than the first. Because can have some situtation that the user need create an invoice without base document and when this happens the manager can choose.

Hope it helps.

Kind Regards,

Diego Lother

former_member325743
Participant
0 Kudos

Pretty cool. I'm not very familiar with stored procedures, would you give me a simple explanation of how I could do an "approval procedure"?

former_member185682
Active Contributor
0 Kudos

Hi Anderson,

Sure. Follow the steps:

1. If you doesn't have an Approval Stage setup, first you need setup it.

Go To Administration -> Approval Procedures -> Approval Stages

In this screen you setup who are the persons should approve the document, and how many approvers is necessary to approve the document if the stage have more than one approver.

2. After this, go To Administration -> Approval Procedures -> Approval Templates

This form have 4 tabs that need setup.

a. Originator In this tab you should setup all user that need authorization to perform the action.

b. Documents In this tab you need select what documents need authorization.

c. Stage In this tab, you need setup the stage that you created in step 1.

d. Terms In this tab, you will setup what is the rule to fire the approval procedure process.

You can do this through pre defined rules or do this by query (our case) .

P.S: Teste 5 is the query that I provided on my answer.

The result of our configuration is: When a manager user do an A/R invoice that doesn't have base document for all lines, will be fire an approval request for the user setup on the stage tab.

If the lines of the A/R Invoice have base document, the approval procedure process will not be fired.

Hope it helps.

Kind Regards,

Diego Lother

former_member325743
Participant
0 Kudos

Thank you so much!

Answers (0)