cancel
Showing results for 
Search instead for 
Did you mean: 

Userexit invoked before Billing Documents are saved

Former Member
0 Kudos

Hi everyone,

I need to perform some extra validations during Billing Documents creation and I' looking via which userexit I could perform it.

Could you let me know if there is a userexit that is invoked just before the SAVE is done?

Meaning, during the Billind Document creation the screen is presented and when the SAVE is done, then I would need a userexit where I could process my validations.

Anubod knows which is the rigjt userexit to use?

Many thanks!

Fátima

Accepted Solutions (0)

Answers (2)

Answers (2)

sarthak_mohantysd
Active Contributor
0 Kudos

Hello,

For user exit related to billing, if you want to have extra validation then plz refer the following user exit.

1. USEREXIT_ACCOUNT_PREP_KOMKCV (Module pool SAPLV60A, program RV60AFZZ) -->

In this user exit additional fields for account determination that are not provided in the standard system are copied into communication structure KOMKCV (header fields).

2. USEREXIT_FILL_VBRK_VBRP (Module pool SAPLV60A, program RV60AFZC)

This user exit is only called when the billing document is created. It is used to provide the header and the item of the new billing document with deviating or additional data.

Regards,

Sarthak

Lakshmipathi
Active Contributor
0 Kudos

You can try with USEREXIT_FILL_VBRK_VBRP (Module pool SAPLV60A, program RV60AFZC). Perhaps, if you can tell what exactly is the requirement, suitable exit can be suggested.

thanks

G. Lakshmipathi

Former Member
0 Kudos

Hi,

Thanks very much for your reply!

Sometimes billing documents that have the net value=0 they still are posted generating the related COPA updates.

I need to avoid that those documents generates any postings so I would like to validate that if VBRK-NETWR = 0 it should give an error message and don't allow to save the document.

Do you think this userexit can be used for this validations?

Thanks

Fátima

sarthak_mohantysd
Active Contributor
0 Kudos

Hello,

Check in "USEREXIT_PRICING_PREPARE_TKOMK and USEREXIT_PRICING_PREPARE_TKOMP"

under "RV60AFZZ". Put your requirement i.e. VBRK-NETWR = 0 (it should give an error message and

don't allow to save the document) here. Please let me know your result.

Regards,

Sarthak

Former Member
0 Kudos

Hello,

Thanks for your answer.

I also manage to have this result creating a new routine in VOFM (Formulas/Condition Value) and assigning it the the Pricing Procedure.

However, I'll try another scenario, that will be to allow to save the document but perform that validation while the Posting into Accounting is done.

Do you know the exit that allow me to perform extra validations and how can I avoid that the document is posted? How can I force the document from being posted?

I want to issue an error related with pricing so that the Posting Status is set to "F" (VBRK-RFBSK).

Thanks a million for your great help!

Fátima