cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Prevent billing doc creation when vbrk & vbrp records are available based on a condition

Meg90
Explorer
0 Kudos
460

We are looking to stop billing document creation for a delivery after checking VBRK-NETWR and VBRP-NETWR (so we need XVBRK, XVBRP and XKOMV internal tables to be populated for our requirement), if condition is not satisfied stop billing doc creation in VF06 / VF04 / VF01.

We tried couple of user exits but nothing was helpful to stop the billing document creation.

Could you please recommend a condition/setting to stop the billing document creation if condition is not met  and which user exit would be  an appropriate place to handle it ?

Accepted Solutions (0)

Answers (1)

Answers (1)

jignesh_mehta3
Active Contributor

interesting requirement. 

Would you mind describing the Business requirements further? 

What is to be checked before deciding whether the Invoice should be allowed to create or not? 

How would be the idea to block the Account Posting instead via a development? 

Trust you had a look at available Billing User Exits here: 

https://help.sap.com/saphelp_46c/helpdata/en/1c/f62c7dd435d1118b3f0060b03ca329/frameset.htm

Meg90
Explorer
0 Kudos
we need to set billing block in sales order after checking XVBRK, XVBRP,XKOMV tables record for a delivery where pricing is within decided margin so we are able to achieve that part using the user exit - USEREXIT_FILL_VBRK_VBRP in include
Meg90
Explorer
0 Kudos
RV60AFZC
Meg90
Explorer
0 Kudos
But that doesn't stop billing doc creation even if we set the fields vbak-faksk = 'Z4'. and vbap-faksp = 'Z4'.
Meg90
Explorer
0 Kudos
And then populate XVBFS for error endling. PERFORM VBFS_HINZUFUEGEN USING LIPS-POSNR '065' VBAP-VBELN VBAP-POSNR SPACE. SY-SUBRC = 4. EXIT.
Meg90
Explorer
0 Kudos
we need a solution to stop billing doc creation after xvbrk xvbrp structures are filled to do validation when these tables are filled we are able to do validation but unsuccessful in stopping the billing doc creation. We need the solution for background run using VF06, VF04 so that next billing doc creation is not interrupted if the previous billing doc is not created and we are dealing with delivery related billing doc creation.