cancel
Showing results for 
Search instead for 
Did you mean: 

Block billing document creation for missing condition type

Former Member
0 Kudos

Hi,

 

We need to put a check on the Billing process, wherein if mandatory condition type is missing in relation to Intercompany transfer STO (created through 'ME27' and order type 'DUB' (Depot STO-SD-IntNo)), than the billing should not get generated.

 

For Sales Order transaction (VA01), we already have incompletion procedure.

For example-

For STO A - while creating billing (VF01) from delivery created through (VL10D), if mandatory pricing is missing then also the billing gets created. System only gives Information message V1801 'Pricing error: Mandatory condition PR00 is missing'.

Now at this step want to convert  Information message to Error message, so system can't allow to create billing document.

 

Need your help for whether we can achieve through customizing or have to write logic in routine.

Regards,

Shailesh

Accepted Solutions (1)

Accepted Solutions (1)

Lakshmipathi
Active Contributor
0 Kudos

You would be aware there is no incompletion log for billing document.  Hence, in order to achieve this, you can add the logic to your existing routine assigned in VTFL for Data:VBRK/VBRP.  If already a standard routine is there, then you need to copy the standard, rename it and add the logic

G. Lakshmipathi

Former Member
0 Kudos

Hi,

As far as possible to achieve result we have to go through routine only. Forwarded this query to SAP so waiting for SAP's reply.

Thanks,

Shailesh

Former Member
0 Kudos

Hi,

Received reply from SAP;

"It is not possible to restrict creation of billing document even if mandatory conditions are missing in the billing document. See note 11.". 

So we have to take route through VTFL for restricting creation billing document if mandatory pricing is missing.

Thanks for contributing your views.

Shailesh

former_member182378
Active Contributor
0 Kudos

,

You have suggested to use the field Data VBRK/VBRP in VTFL, what about using field Copying requirements?

As the logic has to check if a requirement is fulfilled i.e. mandatory pricing cond type has been given. (is not missing) wouldn't copying requirement be the right place to incorporate this logic?

Could you please comment?

Answers (3)

Answers (3)

former_member182708
Active Participant
0 Kudos

Hi SHAILESH DESAI,

the suggestion to program logic into the VBRP/VBRK data transport routine, as made by G Lakshmipathi, will not work.

The reason is very simple, for the missing mandatory condition type to be detected, the function PRICING will have to be executed first.

At the point of time when the copy control customizing is checked and executed, no information from PRICING is available, this function module is executed only thereafter:

This is also the reason that T W's idea with the copy requirement would not fulfill the task. In the requirement it can be controlled if the creation of the item should be done or not. In standard several checks are present, but in the case with the MM order, no VBUK entries available. Nothing present on what a check for the missing mandatory condition could be based on.

The only possibility is to have first PRICING executed, and then the error message V1 801 will have to be reached:

Then based on this result you will have to find a way to prevent the invoice creation with an error message.

Only after PRICING is run and the error message is reached, further steps are possible, not with the copy control customizing itself.

Best regards,

Tobias

former_member182378
Active Contributor
0 Kudos

Tobias,

Your post is interesting!

Could you please clarify -

no VBUK entries available. Nothing present on what a check for the missing mandatory condition could be based on.

How and when would table VBUK (Sales Document: Header Status and Administrative Data) be accessed in a normal sales cycle (not STO)?

If VTFL is not the "right" place to do the coding, then where exactly can this be done?

Former Member
0 Kudos

Hi Tobias,

Yes, you are right. To arrive at message 'Mandatory pricing missing' (V1801), PRICING function requires to execute. But in our case (STO), we are maintaining pricing only at Customer/Material level. At VTFL we are getting data of VBRK & VBRP so written below code to restrict billing with Zero value.

This solution will restrict only specific function but for rest we have to find solution on how to execute 'PRICING' function.

Regards,

Shailesh

former_member182708
Active Participant
0 Kudos

Hi TW,

thanks!

Well, in the normal SD document flow you can control the creation of the invoice with the help of the status check of the predecessor document. In standard copy requirement 4 you find the check on VBUK-UVPRS, which indicates the completeness concerning pricing:

Here in my example with delivery related billing, the SD sales order pricing status is checked, and it would have to be "C" - complete, to allow the creation of the item in the invoice.

With MM document as predecessor, there are no VBUK entries to check.

Best regards,

Tobias

former_member182708
Active Participant
0 Kudos

Hi Shailesh,

thank you for your positive feed-back!

The code you show is very creative, but at the same time also very specific - for a specific item category NLN with billing quantity not being zero, a PR00 condition record is trying to be found for sold-to-party/ material number combination in  specific A951 condition table.

Before considering any modifications I myself would consider the question why should the invoice creation prevented? What for do you have this business requirement?

If the invoice is created with missing PR00 the user get's the error message V1 801, and can then decide to leave the transaction without saving. This would be an organizational solution.

But if the invoice is saved without PR00, the condition record can be created, and pricing updated in VF02 to get complete pricing conditions, right?

When saving with missing mandatory condition, the error message VF 072 (Document .... has been saved (pricing errror) is issued, and the invoice can not be transferred to accounting.

Therefor after saving still a correction in VF02 would be possible, to complete the invoice's pricing.

However if really a modification should be implemented to prevent saving, I would check for points to stop the saving process.

When the error message V1 801 is occuring, the O.K. indicator of the item pricing (tkomp-prsok) is set from 'X' to space and subsequently xvbrp-uvrps is set to 'X'.

The problem is that in the saving process not many user-exits are available, as in the creation phase. One possibility to influence the system behavior would be an Enhancement Point in function module RV_INVOICE_DOCUMENT_ADD, before the invoice number is assigned.

Based on XVBRP-UVPRS being 'X' processing could be stopped.

But again, before considering such modifications, I would first recommend to use organizational means to achieve the requirements and instruct the users to not save the invoice when getting V1 801.

Best regards,

Tobias

former_member204407
Active Contributor
0 Kudos

Hi,

Have you checked

Pricing analysis in Billing document conditions tab why PR00 is missing?

check PR00 is mandatory condition or not in your pricing procedure

also in VTFL maintain Pricing Type with "G" and check and update your feedback.

Regards,

Krishna.

Former Member
0 Kudos

Hi Krishna,

PR00 is mandatory condition.  Pricing analysis displayed as PR00 is marked for deletion.

Checked VTFL by maintaining Pricing Type with 'G' but same result. We are having Pricing Type as 'B'.

Thanks,

Shailesh

former_member204407
Active Contributor
0 Kudos

Hi,

Create a new condition record (VK11) for the respective material and check

Regards,

Krishna.

Former Member
0 Kudos

Hi Krishna,

Through creating new condition record or undelete existing record we can achieve this.

But my concern is how to restrict creation of billing document, if mandatory pricing is missing. Currently system is giving information message  V1801 ' Pricing error: Mandatory condition PR00 is missing'.

Thanks,

Shailesh

former_member204407
Active Contributor
0 Kudos

Hi,

Not possible in standard functionality try with user exit 

USEREXIT_FILL_VBRK_VBRP -Program RV60AFZC

explain the same logic to your ABAPER he can wirte it as per your business requirement.

Regards,

Krishna.

former_member204407
Active Contributor
0 Kudos

Hi,

Check last reply of Mr.Jyoti Prakash ,nicely explained about the same query.

http://scn.sap.com/thread/1727362s

Regards,

Krishna.

Former Member
0 Kudos

Hi,

Thanks for sharing thread, already gone through it. Am not agreeing with answer provided as it involved changes in SAP functionality. Rather doing changes in standard procedure, we can restrict it through routine functionality (VTFL in data for VBRK/VBRP) and achieve desired result.

But we are in search of standard SAP practice for the issue.

Thanks,

Shailesh

former_member186385
Active Contributor
0 Kudos

Hi Desai,

You have to use a User exit to achieve this

i believe there is no standard approach or any OSS note related to this

i doubt of using VTFL routine as well, it may not be useful, however you can try.

But using User exit could be a good option

regards,

santosh